mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
638ebd3067
Release Notes: https://lwn.net/Articles/923952/ Refresh patches: - 110-darwin_fixes.patch - 115-add-config-xtlibdir.patch - 140-allow_pfifo_fast.patch - 140-keep_libmnl_optional.patch - 145-keep_libelf_optional.patch - 150-keep_libcap_optional.patch - 155-keep_tirpc_optional.patch - 170-ip_tiny.patch - 175-reduce-dynamic-syms.patch - 180-drop_FAILED_POLICY.patch - 190-fix-nls-rpath-link.patch - 195-build_variant_ip_tc.patch - 200-drop_libbsd_dependency.patch - 300-selinux-configurable.patch Remove upstreamed: - 320-configure-Remove-include-sys-stat.h.patch While working on it remove AUTORELEASE. Signed-off-by: Nick Hainke <vincent@systemli.org>
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
--- a/tc/Makefile
|
|
+++ b/tc/Makefile
|
|
@@ -113,7 +113,7 @@ LDLIBS += -L. -lm
|
|
|
|
ifeq ($(SHARED_LIBS),y)
|
|
LDLIBS += -ldl
|
|
-LDFLAGS += -Wl,-export-dynamic
|
|
+LDFLAGS += -Wl,--dynamic-list=dynsyms.list
|
|
endif
|
|
|
|
TCLIB := tc_core.o
|
|
@@ -143,7 +143,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
|
all: tc $(TCSO)
|
|
|
|
tc: $(TCOBJ) $(LIBNETLINK) libtc.a
|
|
- $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
+ $(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
libtc.a: $(TCLIB)
|
|
$(QUIET_AR)$(AR) rcs $@ $^
|
|
@@ -165,6 +165,7 @@ install: all
|
|
clean:
|
|
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
|
|
rm -f emp_ematch.tab.*
|
|
+ rm -f dynsyms.list
|
|
|
|
q_atm.so: q_atm.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
|
@@ -204,4 +205,16 @@ static-syms.h: $(wildcard *.c)
|
|
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
|
done > $@
|
|
|
|
+else
|
|
+
|
|
+tc: dynsyms.list
|
|
+m_xt.so: dynsyms.list
|
|
+dynsyms.list: $(wildcard *.c)
|
|
+ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
|
|
+ echo "{" > $@ ; \
|
|
+ for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
|
|
+ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:\1;:;p}' $$files ; \
|
|
+ done >> $@ ; \
|
|
+ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@
|
|
+
|
|
endif
|