Use -Wl,-r instead of plain -r.

This commit is contained in:
Roland McGrath 2011-06-09 17:06:46 -07:00
parent 175b70988b
commit 28368601e3
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2011-06-09 Roland McGrath <roland@hack.frob.com>
* Makerules ($(common-objpfx)libc_pic.os): Use -Wl, before -r.
* elf/Makefile ($(objpfx)librtld.os): Likewise.
(reloc-link): Likewise.
2011-06-09 Ulrich Drepper <drepper@gmail.com> 2011-06-09 Ulrich Drepper <drepper@gmail.com>
* elf/Makefile: Add rules to build pldd. * elf/Makefile: Add rules to build pldd.

View File

@ -610,7 +610,7 @@ endif
# between libc.so and ld.so, which can make it impossible to upgrade. # between libc.so and ld.so, which can make it impossible to upgrade.
ifeq ($(elf),yes) ifeq ($(elf),yes)
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a $(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \ $(LINK.o) -nostdlib -nostartfiles -Wl,-r -o $@ \
$(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^ $(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^
# Use our own special initializer and finalizer files for libc.so. # Use our own special initializer and finalizer files for libc.so.
$(common-objpfx)libc.so: $(elfobjdir)/soinit.os \ $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \

View File

@ -353,7 +353,7 @@ lib-noranlib: $(objpfx)$(rtld-installed-name) \
endif endif
# Command to link into a larger single relocatable object. # Command to link into a larger single relocatable object.
reloc-link = $(LINK.o) -nostdlib -nostartfiles -r reloc-link = $(LINK.o) -nostdlib -nostartfiles -Wl,-r
$(objpfx)dl-allobjs.os: $(all-rtld-routines:%=$(objpfx)%.os) $(objpfx)dl-allobjs.os: $(all-rtld-routines:%=$(objpfx)%.os)
$(reloc-link) -o $@ $^ $(reloc-link) -o $@ $^
@ -398,7 +398,8 @@ $(objpfx)rtld-libc.a: $(objpfx)librtld.mk FORCE
$(MAKE) -f $< -f rtld-Rules $(MAKE) -f $< -f rtld-Rules
$(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a $(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ '-Wl,-(' $^ -lgcc '-Wl,-)' \ $(LINK.o) -nostdlib -nostartfiles -Wl,-r -o $@ \
'-Wl,-(' $^ -lgcc '-Wl,-)' \
-Wl,-Map,$@.map -Wl,-Map,$@.map
generated += librtld.map librtld.mk rtld-libc.a librtld.os.map generated += librtld.map librtld.mk rtld-libc.a librtld.os.map