Re: same prog, different sizes
Bela Lubkin <[email protected]> Sun, 21 Sep 2014 18:12:47 -0700
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <[email protected]> |
Jorge Almeida and Steven Honeyman wrote: Steven>>> On your Gentoo i3... am I right in thinking you have a hardened/PaX Steven>>> build environment? Jorge>> Nope. It's a standard profile, no fancy Jorge>> stuff whatsoever (box is used to backups and compiling some stuff, Jorge>> used mainly via ssh, not even X installed) Steven> Oh well, worth a guess! I just noticed this strange program header Steven> entry (only in the i3 version), which google says has something to do Steven> with PaX. They are both the same binary really, but the i3 has a few Steven> kb of padding on the end (just empty space). I have no idea why; but Steven> I'm sure someone will be able to help you. I think Steven's right. For instance, see: https://blogs.gentoo.org/mgorny/2014/06/23/inlining-marchnative-for-distcc/ which says (about flags being bandied about by `gcc`): " You may also notice -fstack-protector there. This is because nowadays " Gentoo enables it by default. -- the 2nd sentence links to: http://sources.gentoo.org/gitweb/?p=proj/gentoo-news.git;a=blob;f=2014/2014-06-15-gcc48_ssp/2014-06-15-gcc48_ssp.en.txt which certainly seems to support the claim. The two binaries contain .comment sections with "GCC: (GNU) 4.8.2" and "GCC: (Gentoo 4.8.3 p1.1, pie-0.5.9) 4.8.3"; in which I *think* the "pie-0.5.9" is another hint about hardening. >Bela<