diff options
author | Roland McGrath <roland@hack.frob.com> | 2011-06-11 02:04:14 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2011-07-02 15:11:43 -0700 |
commit | 4e34ac6a1e256f40ab0d8eeed37aa1ea83440e76 (patch) | |
tree | 578f31130b4e074bac47e13001260f8486db935d | |
parent | feea4948bca7e442edad3f995696f33450549e80 (diff) | |
download | glibc-4e34ac6a1e256f40ab0d8eeed37aa1ea83440e76.zip glibc-4e34ac6a1e256f40ab0d8eeed37aa1ea83440e76.tar.gz glibc-4e34ac6a1e256f40ab0d8eeed37aa1ea83440e76.tar.bz2 |
Use -defsym=_begin=0 instead of linker script munging.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | elf/Makefile | 12 |
2 files changed, 7 insertions, 10 deletions
@@ -1,3 +1,8 @@ +2011-07-02 Roland McGrath <roland@hack.frob.com> + + * elf/Makefile ($(objpfx)ld.so): Use -defsym=_begin=0 instead of + linker script munging. + 2011-07-02 Ulrich Drepper <drepper@gmail.com> * crypt/sha512.h (struct sha512_ctx): Add union to access total also diff --git a/elf/Makefile b/elf/Makefile index fbd7d88..d418099 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -406,19 +406,11 @@ generated += librtld.map librtld.mk rtld-libc.a librtld.os.map z-now-yes = -Wl,-z,now $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map) - @rm -f $@.lds - $(LINK.o) -nostdlib -nostartfiles -shared $(z-now-$(bind-now)) \ - $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \ - LC_ALL=C \ - sed -e '/^=========/,/^=========/!d;/^=========/d' \ - -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ - > $@.lds - test -s $@.lds $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \ $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \ $(filter-out $(map-file),$^) $(load-map-file) \ - -Wl,-soname=$(rtld-installed-name) -T $@.lds - rm -f $@.lds + -Wl,-soname=$(rtld-installed-name) \ + -Wl,-defsym=_begin=0 readelf -s $@ \ | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }' |