Symbol export whitelist
authorMatt Fleming <matt.fleming@intel.com>
Tue, 4 Dec 2012 21:17:47 +0000 (21:17 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Wed, 5 Dec 2012 22:41:32 +0000 (22:41 +0000)
commite4b3ce2dd82ce2da85c37fd3f332ec2eb802b734
tree8b98440a37716dab0bd4de8b87a3800e5a40b07b
parenta79ceb45909434d392aacbb92eb2dfa738479783
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 <matt.fleming@intel.com>
44 files changed:
com32/elflink/ldlinux/Makefile
com32/elflink/ldlinux/adv.c
com32/elflink/ldlinux/advwrite.c
com32/elflink/ldlinux/execute.c
com32/elflink/ldlinux/get_key.c
com32/elflink/ldlinux/getadv.c
com32/elflink/ldlinux/ldlinux.c
com32/elflink/ldlinux/readconfig.c
com32/elflink/ldlinux/setadv.c
com32/include/klibc/compiler.h
core/call16.c
core/callback.inc
core/cleanup.c
core/com32.inc
core/comboot.inc
core/conio.c
core/diskboot.inc
core/diskfs.inc
core/diskstart.inc
core/elflink/load_env32.c
core/font.c
core/fs/chdir.c
core/fs/fs.c
core/fs/getcwd.c
core/fs/lib/searchconfig.c
core/fs/pxe/pxe.c
core/fs/readdir.c
core/graphics.c
core/idle.c
core/idle.inc
core/init.c
core/kaboom.c
core/layout.inc
core/localboot.c
core/localboot.inc
core/mem/free.c
core/mem/malloc.c
core/plaincon.c
core/rawcon.c
core/serirq.c
core/stack.inc
core/timer.inc
diag/geodsp/Makefile
mk/embedded.mk