endif
$(shared_objs) $(ar_objs): | $(sub_headers)
+define objects_with_syms
+ $(foreach o,$(2),$(if $(shell $(NM) $(1) $(o) | grep .),$(o)))
+endef
+
headers-y: $(headers-y)
@true
define rel_srcdir
$(shell $(CONFIG_SHELL) $(top_srcdir)/extra/scripts/relative_path.sh $(@D) .)
endef
-ifneq ($(findstring -s,$(MAKEFLAGS)),)
+ifneq ($(findstring s,$(MAKEFLAGS)),)
export MAKE_IS_SILENT := y
SECHO := -@false
DISP := sil
cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags)))
cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
cmd_t_strip = $(STRIPTOOL) $(STRIP_FLAGS) $@
-cmd_ar = $(AR) $(ARFLAGS) $@ $^
+cmd_ar = $(AR) $(ARFLAGS) $@ $(call objects_with_syms,,$^)
define do_ln
@$(disp_ln)
-Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
-Wl,--verbose 2>&1 | LC_ALL=C \
sed -e '/^=========/,/^=========/!d;/^=========/d' \
- -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds
+ -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
endef
define link.so
$(top_builddir)lib/interp.c: | $(top_builddir)lib
$(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@.tmp
$(Q)echo "#include <features.h>" >> $@.tmp
-ifeq ($(HARDWIRED_ABSPATH),y)
$(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
"(\".interp\"))) =\""$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO)"\";" >> $@.tmp
$(Q)$(SED) -i -e 's://:/:g' $@.tmp
-else
- $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
- "(\".interp\"))) =\""$(UCLIBC_LDSO)"\";" >> $@.tmp
-endif
$(Q)mv $@.tmp $@
$(interp): $(top_builddir)lib/interp.c | $(sub_headers)
$(libm-a-y) $(libm-so-y) \
$(libpthread-a-y) $(libpthread-so-y) $(libpthread-nonshared-y) \
$(libthread_db-a-y) $(libthread_db-so-y) $(libpthread-generated-y) \
+ $(START_FILE-libpthread.so) $(END_FILE-libpthread.so) \
+ $(PTHREAD_INITFINI:.c=.s) \
$(librt-a-y) $(librt-so-y) $(libresolv-a-y) $(libresolv-so-y) \
$(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
$(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \