aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-02-11 00:29:55 +0000
committerRoland McGrath <roland@gnu.org>2005-02-11 00:29:55 +0000
commit561bcb8086e326e06f295278dcdb13493636c61a (patch)
tree7140bccf8c9bbb4001d7b4e28a2a07c0376b6c0c /Makerules
parent5d9e8991825aee911baff84d7aa0623a9df1122c (diff)
downloadglibc-561bcb8086e326e06f295278dcdb13493636c61a.zip
glibc-561bcb8086e326e06f295278dcdb13493636c61a.tar.gz
glibc-561bcb8086e326e06f295278dcdb13493636c61a.tar.bz2
* include/libc-symbols.h (stub_warning): Emit a marker section called .gnu.glibc-stub.NAME. * Makerules ($(objpfx)stubs): Depend on object files, not dep files. Use objdump to collect those marker section names. ($(common-objpfx)shlib.lds): Discard .gnu.glibc-stub.* sections.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules27
1 files changed, 12 insertions, 15 deletions
diff --git a/Makerules b/Makerules
index 1cc6809..887d727 100644
--- a/Makerules
+++ b/Makerules
@@ -492,7 +492,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
- -e 's/^.*\*(\.jcr).*$$/& \
+ -e 's@^.*\*(\.jcr).*$$@& \
PROVIDE(__start___libc_subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
@@ -501,7 +501,8 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_thread_subfreeres = .);\
__libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
- PROVIDE(__stop___libc_thread_subfreeres = .);/'
+ PROVIDE(__stop___libc_thread_subfreeres = .);\
+ /DISCARD/ : { *(.gnu.glibc-stub.*) }@'
mv -f $@T $@
common-generated += shlib.lds
@@ -1385,19 +1386,15 @@ ifdef objpfx
.PHONY: stubs # The parent Makefile calls this target.
stubs: $(objpfx)stubs
endif
-$(objpfx)stubs: $(+depfiles)
-ifneq (,$(strip $(+depfiles)))
-# Use /dev/null since `...` might expand to empty.
- c=`($(patsubst %/,cd % &&,$(objpfx)) \
- sed -n -e 's@\$$(common-objpfx)@$(common-objpfx)@g' \
- -e 's@\$$(objpfx)@$(objpfx)@g' \
- -e '/stub-tag\.h/{; g; s/./&/p; }' \
- -e '/:/{x; s/^.*$$//; x; }' \
- -e 's/^.*://;s/\\$$//;s/^ *\([^ ][^ ]*\) .*$$/\1/' \
- -e '/^[^ ][^ ]*$$/{G;s/^.*\n\(..*\)/\1/;s/\n//;h; }' \
- $(patsubst $(objpfx)%,%,$^)) | sort | uniq`; \
- sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
- $$c /dev/null > $@T
+objs-for-stubs := $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
+ $(addprefix $(objpfx),$(extra-objs))
+$(objpfx)stubs: $(objs-for-stubs)
+ifneq (,$(strip $(objs-for-stubs)))
+ $(OBJDUMP) -h $^ | \
+ $(AWK) '/\.gnu\.glibc-stub\./ { \
+ sub(/\.gnu\.glibc-stub\./, "", $$2); \
+ stubs[$$2] = 1; } \
+ END { for (s in stubs) print "#define __stub_" s }' > $@T
mv -f $@T $@
else
> $@