mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
Don't let ld.so that failed its sanity check land in place.
This commit is contained in:
parent
ad36ba2bd6
commit
f4a29fba07
@ -1,3 +1,8 @@
|
||||
2013-06-13 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* elf/Makefile ($(objpfx)ld.so): Link into a temporary file and move
|
||||
it into place only when and if the sanity check passes.
|
||||
|
||||
2013-06-13 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* stdlib/gen-tst-strtod-round.c (round_str): Always generate
|
||||
|
@ -318,13 +318,16 @@ 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)
|
||||
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
|
||||
# Link into a temporary file so that we don't touch $@ at all
|
||||
# if the sanity check below fails.
|
||||
$(LINK.o) -nostdlib -nostartfiles -shared -o $@.new \
|
||||
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
|
||||
$(filter-out $(map-file),$^) $(load-map-file) \
|
||||
-Wl,-soname=$(rtld-installed-name) \
|
||||
-Wl,-defsym=_begin=0
|
||||
$(READELF) -s $@ \
|
||||
$(READELF) -s $@.new \
|
||||
| $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
|
||||
mv -f $@.new $@
|
||||
|
||||
# interp.c exists just to get this string into the libraries.
|
||||
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(rtlddir)/$(rtld-installed-name)"' \
|
||||
|
Loading…
Reference in New Issue
Block a user