iPXE - Open Source Boot Firmware

[linker] Add safe weak symbol macros
authorJoshua Oreman <oremanj@rwcr.net>
Thu, 26 Nov 2009 02:10:05 +0000 (18:10 -0800)
committerMarty Connor <mdc@etherboot.org>
Wed, 20 Jan 2010 22:05:25 +0000 (17:05 -0500)
commit2d58a62330c755dcde93ccaf09def7f8c2fae158
tree9136f497f512da4359512286709ae1a2c01c6ca8
parent272cfac8afd34852f6a7cac55c49162733c65d50
[linker] Add safe weak symbol macros

Weak symbols are a useful tool in eliminating unnecessary dependencies
between object files, but they are somewhat dangerous because one must
remember to test the weak symbol against NULL before using it. To
rectify that, add macros for declaring weak functions that will return
a default value inline if the file defining them is not available at
link time.

Signed-off-by: Marty Connor <mdc@etherboot.org>
src/include/compiler.h