Experimental PAX patch for gold linker

Dean Takemori deant at hawaii.rr.com
Wed Feb 8 19:39:38 PST 2012

This HIGHLY EXPERIMENTAL patch adds PAX header support to the
gold linker binutils-2.21.1 (The patch applies with some fuzz to
2.22 and appears to work)

I have just finished a HLFS ( + 201202051926 grsec, 
32-bit x86) variant build using binutils-2.22 using the following patches

- http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/binutils/2.22/62_all_binutils-2.22-hardened-crtbegin.patch?view=markup&revision=1.1
- http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/binutils/2.22/63_all_binutils-2.22-pt-pax-flags-20111121.patch?view=markup&revision=1.1
- http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/binutils/2.22/66_all_binutils-2.22-warn-textrel.patch?view=markup

Plus the included patch.  I configured binutils with
	--enable-shared --enable-gold=yes --enable-ld=yes

The system build used the bfd (standard) linker, but post-build, I 
compiled and linked pax-test-0.9.9 once with bfd and once with gold.
The resultant paxtest.log are identical with "kiddie" and "blackhat"
runs, although the resultant binaries are different.

I have done very little testing otherwise, and am not a C++ guy,
but I am aware of only one issue - binaries linked with this
patched gold have RANDEXEC enabled by default, unlike bfd linked

-dean takemori

-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-2.21.1-gold-pt_pax-0.patch
Type: application/octet-stream
Size: 2541 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20120208/fd5dbc3c/attachment.obj>
-------------- next part --------------

More information about the hlfs-dev mailing list