mirror of git://sourceware.org/git/glibc.git
Consolidate shlib.lds references in new variables.
This commit is contained in:
parent
31fffa6b07
commit
2d4fa81e11
|
|
@ -1,5 +1,12 @@
|
||||||
2011-07-02 Roland McGrath <roland@hack.frob.com>
|
2011-07-02 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
|
* Makerules (shlib-lds): New variable.
|
||||||
|
(shlib-lds-flags): New variable.
|
||||||
|
(build-shlib, build-moduile, build-module-asneeded): Use it.
|
||||||
|
($(common-objpfx)libc.so): Use $(shlib-lds).
|
||||||
|
($(extra-modules-build:%=$(objpfx)%.so)): Likewise.
|
||||||
|
* iconvdata/extra-module.mk ($(objpfx)$(mod).so): Likewise.
|
||||||
|
|
||||||
* elf/dynamic-link.h (elf_get_dynamic_info): Make asserts accept
|
* elf/dynamic-link.h (elf_get_dynamic_info): Make asserts accept
|
||||||
DT_FLAGS/DT_FLAGS_1 with zero flags.
|
DT_FLAGS/DT_FLAGS_1 with zero flags.
|
||||||
|
|
||||||
|
|
|
||||||
13
Makerules
13
Makerules
|
|
@ -514,8 +514,11 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
|
||||||
mv -f $@T $@
|
mv -f $@T $@
|
||||||
common-generated += shlib.lds
|
common-generated += shlib.lds
|
||||||
|
|
||||||
|
shlib-lds = $(common-objpfx)shlib.lds
|
||||||
|
shlib-lds-flags = -T $(shlib-lds)
|
||||||
|
|
||||||
define build-shlib
|
define build-shlib
|
||||||
$(build-shlib-helper) -o $@ -T $(common-objpfx)shlib.lds \
|
$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
|
||||||
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
|
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
|
||||||
endef
|
endef
|
||||||
else
|
else
|
||||||
|
|
@ -557,11 +560,11 @@ ifeq (yes,$(elf))
|
||||||
# binutils only position loadable notes into the first page for binaries,
|
# binutils only position loadable notes into the first page for binaries,
|
||||||
# not for shared objects
|
# not for shared objects
|
||||||
define build-module
|
define build-module
|
||||||
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
|
$(build-module-helper) -o $@ $(shlib-lds-flags) \
|
||||||
$(csu-objpfx)abi-note.o $(build-module-objlist)
|
$(csu-objpfx)abi-note.o $(build-module-objlist)
|
||||||
endef
|
endef
|
||||||
define build-module-asneeded
|
define build-module-asneeded
|
||||||
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
|
$(build-module-helper) -o $@ $(shlib-lds-flags) \
|
||||||
$(csu-objpfx)abi-note.o \
|
$(csu-objpfx)abi-note.o \
|
||||||
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
|
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
|
||||||
endef
|
endef
|
||||||
|
|
@ -618,7 +621,7 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
|
||||||
$(common-objpfx)libc_pic.os \
|
$(common-objpfx)libc_pic.os \
|
||||||
$(elfobjdir)/sofini.os \
|
$(elfobjdir)/sofini.os \
|
||||||
$(elfobjdir)/interp.os $(elfobjdir)/ld.so \
|
$(elfobjdir)/interp.os $(elfobjdir)/ld.so \
|
||||||
$(common-objpfx)shlib.lds
|
$(shlib-lds)
|
||||||
$(build-shlib)
|
$(build-shlib)
|
||||||
ifeq ($(versioning),yes)
|
ifeq ($(versioning),yes)
|
||||||
$(common-objpfx)libc.so: $(common-objpfx)libc.map
|
$(common-objpfx)libc.so: $(common-objpfx)libc.map
|
||||||
|
|
@ -689,7 +692,7 @@ include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
|
||||||
|
|
||||||
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
|
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
|
||||||
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
|
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
|
||||||
$(objpfx)%.os $(common-objpfx)shlib.lds \
|
$(objpfx)%.os $(shlib-lds) \
|
||||||
$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
|
$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
|
||||||
$(build-module)
|
$(build-module)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ extra-modules-left := $(strip $(filter-out $(mod),$(extra-modules-left)))
|
||||||
extra-objs := $(extra-objs) $(patsubst %,%.os,$($(mod)-routines))
|
extra-objs := $(extra-objs) $(patsubst %,%.os,$($(mod)-routines))
|
||||||
|
|
||||||
$(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))\
|
$(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))\
|
||||||
$(common-objpfx)shlib.lds
|
$(shlib-lds)
|
||||||
$(build-module-asneeded)
|
$(build-module-asneeded)
|
||||||
|
|
||||||
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue