From e4b3ce2dd82ce2da85c37fd3f332ec2eb802b734 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Tue, 4 Dec 2012 21:17:47 +0000 Subject: Symbol export whitelist Before modules were dynamically loaded the boundary between GPL and non-GPL code was implicit because of the separate link domains for each module. With dynamic modules we need an explicit whitelist of core symbols that non-GPL code can link against at runtime without needing to be re-licensed under the GPL. Mark such symbols with __export, so that it is explicitly clear which symbols in the core can be linked against by non-GPL code. Reduce the visibility of symbols in both the core and ldlinux.c32 with -fvisibility=hidden. __export changes the visibility to 'default'. Signed-off-by: Matt Fleming --- mk/embedded.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'mk') diff --git a/mk/embedded.mk b/mk/embedded.mk index e8f3ae30..c2f4edf3 100644 --- a/mk/embedded.mk +++ b/mk/embedded.mk @@ -32,6 +32,7 @@ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,) GCCOPT += $(call gcc_ok,-mincoming-stack-boundary=2,) +GCCOPT += $(call gcc_ok,-fvisibility=hidden) LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) -- cgit v1.2.3