From df0620e7ccb2026a3e18634632f4be5314075906 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 27 Jun 2018 11:50:41 +0200 Subject: extensions: use __attribute__((constructor)) for autoregistration The ebtables initialization is easier, and, judging from the "static" recipe in Makefile, that calling ebt_*_register ahead of main is safe. This means that a static build won't need the pseudomain hack, and that -nostartfiles can also go away. Signed-off-by: Florian Westphal --- extensions/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/Makefile') diff --git a/extensions/Makefile b/extensions/Makefile index 60a70a2..daa11fc 100644 --- a/extensions/Makefile +++ b/extensions/Makefile @@ -11,13 +11,13 @@ EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -lebt_$(T)) EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T)) extensions/ebt_%.so: extensions/ebt_%.o - $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles + $(CC) $(LDFLAGS) -shared -o $@ -lc $< extensions/libebt_%.so: extensions/ebt_%.so mv $< $@ extensions/ebtable_%.so: extensions/ebtable_%.o - $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles + $(CC) $(LDFLAGS) -shared -o $@ -lc $< extensions/libebtable_%.so: extensions/ebtable_%.so mv $< $@ -- cgit v1.2.3