[PATCH roland/ehdr_start] Use __ehdr_start, when available, for rtld to get its own headers.
Mike Frysinger
vapier@gentoo.org
Wed Mar 19 04:24:00 GMT 2014
On Tue 11 Mar 2014 15:29:33 Roland McGrath wrote:
> My motivation for this change is my NaCl port, where the old code's
> assumption about ELF file layout does not hold. But in fact this is
> not only cleaner but results in marginally better code. (To compensate
> I've added a couple of asserts. ;-)
>
> Tested on x86_64-linux-gnu:
> * with binutils-2.22 that the configure check fails and nothing changes
> * with binutils trunk (2.23 or 2.24 would do as well) that the configure
> check passes and the new code works (no 'make check' regressions)
>
> I'll commit this in a few days absent objections.
this breaks on ia64 w/binutils-2.23.2. using gcc-4.7.3 in case it matters.
$ ../configure --prefix=/usr
$ make -j4
$ echo 'main(){puts("HI");}' | gcc -x c - -o a.out
$ ./elf/ld.so --library-path $PWD ./a.out
./a.out: symbol lookup error: ./elf/ld.so: undefined symbol: __ehdr_start
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140319/abbcbfff/attachment.sig>
More information about the Libc-alpha
mailing list