Gentoo Archives: gentoo-embedded

From: Ned Ludd <solar@g.o>
To: "Peter S. Mazinger" <ps.m@×××.net>
Cc: gentoo-hardened@g.o, gentoo-embedded@g.o
Subject: Re: [gentoo-embedded] hardened gcc-3.3.2 and uClibc
Date: Wed, 19 Nov 2003 01:20:11
Message-Id: 1069204744.11184.165.camel@simple
In Reply to: [gentoo-embedded] hardened gcc-3.3.2 and uClibc by "Peter S. Mazinger"
1 On Tue, 2003-11-18 at 18:57, Peter S. Mazinger wrote:
2 > Hello!
3 >
4 > I have a clean uClibc environment (not gentoo based), and inspired by
5 > hardened-gcc-3.3.2 the gcc specs file was changed to support ET_DYN
6 > binaries, the only change I have done is replacing Scrt1.o with "crt1S.o
7 > interp.o" (crt1S.o not yet in the uClibc tree, but in portage), due to the
8 > fact that Scrt1.o does not exist in uClibc like in glibc-2.3.2. I do not
9 > know what the difference is between Scrt1.o from glibc and crt1S.o coming
10 > from the hardened-gcc-2.4.6 (the version for uClibc is PaX version, so
11 > similar to those in hardened-gcc-2.4.6).
12 > Could someone comment on problems regarding this change?
13 ...
14
15 > I have seen a dependency on binutils-2.14.90.0.7, but this one has some
16 > problems with uClibc (does not correctly support canadian cross-compiling,
17 > binutils-2.14.90.0.6 yes). Is it really needed, or is
18 > binutils-2.14.90.0.6-r7 enough?
19 >
20 > I have rebuilt about 50 packages (mainly development environment) with
21 > these changes, but there is some strange behaviour (it is not related
22 > to the fact that everything is -fPIC built, I had this already defined
23 > earlier in my CFLAGS for almost all packages)
24 > I am also interested in an Scrt1.o version for uClibc, so a changes
25 > description between the PaX and the glibc-2.3.2 implementation would be
26 > helpful.
27
28 <rant>
29 Quick rundown. Sctr1.S is a redhat knock off creation of PaX's ctr1S.S
30 (ie somebody probably got paid to rip it off and claim it was a redhat
31 original creation) they even fscked up the naming convention. I wont go
32 to much in detail because I would end up ranting for hours. In short
33 Scrt1 the way it gets built by redhat will most likely end up with text
34 relocations from what I understand so the PaX crt1S.S should be used and
35 preferred till such time as redhat finds a way to break that for us.
36 </rant>
37
38 > Why was the default -fomit-frame-pointer option removed? From my
39 > experience there are only a few packages, that are incompatible with it
40 > (mainly libraries).
41
42 You would have to ask the maintainer pappy@g.o about why this
43 functionality was removed. However I can say from my personal testing we
44 truly don't seem to gain any performance by trying to gain back an extra
45 register from adding -fomit-frame-pointer when -fPIC steals away the ebx
46 register, in fact I even get roughly exactly same number of instructions
47 that get executed when using those flags together. Attached is a file I
48 did this testing with.
49
50 --
51 Ned Ludd <solar@g.o>
52 Gentoo Linux Developer

Attachments

File name MIME type
1407.c text/x-c
signature.asc application/pgp-signature