Gentoo Archives: gentoo-hardened

From: "Peter S. Mazinger" <ps.m@×××.net>
To: Alexander Gabert <pappy@g.o>
Cc: gentoo-hardened@g.o
Subject: [gentoo-hardened] Re: hardened-gcc-3.3.2.1
Date: Mon, 15 Dec 2003 16:22:36
Message-Id: Pine.LNX.4.44.0312152242350.24848-100000@lnx.bridge.net
In Reply to: [gentoo-hardened] Re: hardened-gcc-3.3.2.1 by Alexander Gabert
1 On Mon, 15 Dec 2003, Alexander Gabert wrote:
2
3 > after all, change this also:
4 > HGCC_33_DEFAULT_SPECS_CC1_SECTION_PIC_ACTIVATION="%{!yet_exec: %{!nopie:
5 > -fPIC %{!static: -fpie}}}"
6
7 It does not work with the *.txt files referenced in an other mail, neither
8 with this change.
9
10 zlib test done only
11 It works only if I remove -fpie from cc1
12
13 You have added shared and !shared to the startfile section. Is it needed?
14
15 Peter
16 >
17 >
18 > thanks in advance,
19 >
20 > Alex
21 >
22 > On Mon, 2003-12-15 at 15:06, Peter S. Mazinger wrote:
23 > > On Mon, 15 Dec 2003, Peter S. Mazinger wrote:
24 > >
25 > > New problem: I have rebuilt rpm-4.0.4 and got text relocation in
26 > > librpmbuild shared library hardened-gcc-3.3.2.0 worked)
27 > > I think we have to enforce -fPIC for all (also for static, because if
28 > > later a binary is built against static and dynamic libraries, it will have
29 > > problems (like bash's included readline, this is static)
30 > > The problem happens with libraries due to the change in cc1 section from
31 > > -fPIC to -fPIC -fpie (simple test: build zlib w/o the pic patch)
32 > >
33 > > > Hello!
34 > > >
35 > > > The link section has a !static redundancy (from EXC_FRONT and
36 > > > PIE_ACTIVATION), see attached diff (edited manually based on hcc.conf and
37 > > > the scripts)
38 > > >
39 > > > Why is crt1S.o added in the default config, the conservative one adds
40 > > > Scrt1.o? (crt1S.S is the same as in hardened 2.4.6 non_csu version), it is
41 > > > rather a glibc issue having it or not.
42 > > >
43 > > > Also I am not so sure about the stack-protector[-all] running together, I
44 > > > have the impression, that they work separately, but for all cases I would
45 > > > suggest the possibility to use only fstack-protector if -all is
46 > > > deactivated (there could be some apps that cannot be built with -all) like
47 > > > this, or similar
48 > > > %{!yno_propolice: %{!fno-stack-protector: -fstack-protector}
49 > > > %{!fno-stack-protector-all: -fstack-protector-all}}.
50 > > >
51 > > > I do not really know which one needs fforce-addr (the kernel works with
52 > > > both, using my patch -earlier mail, but does not like fforce-addr).
53 > > > So adapt accordingly.
54 > > >
55 > > > Peter
56 > > >
57 > > >
58 >
59
60 --
61 Peter S. Mazinger <ps.m@×××.net> ID: 0xA5F059F2 NIC: IXUYHSKQLI
62 Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
63
64
65 ____________________________________________________________________
66 Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
67 Probald ki most! http://www.freestart.hu
68
69 --
70 gentoo-hardened@g.o mailing list