iPXE - Open Source Boot Firmware

[linker] Expand and correct symbol requirement macros
authorJoshua Oreman <oremanj@rwcr.net>
Sun, 2 Aug 2009 21:01:36 +0000 (14:01 -0700)
committerMarty Connor <mdc@etherboot.org>
Sat, 21 Nov 2009 01:27:25 +0000 (20:27 -0500)
commit572e61754adca6739b17e8604da964ce2aa98eef
treea046b319d7b7048df1884e0d884a678acea6e2bf
parent7a5aaecda2b37653b6f3debe25ff4cf03cb0d4d4
[linker] Expand and correct symbol requirement macros

REQUIRE_SYMBOL() formerly used a formulation of symbol requirement
that would allow a link to succeed despite lacking a required symbol,
because it did not introduce any relocations. Fix by renaming it to
REQUEST_SYMBOL() (since the soft-requirement behavior can be useful)
and add a REQUIRE_SYMBOL() that truly requires.

Add EXPORT_SYMBOL() and IMPORT_SYMBOL() for REQUEST_SYMBOL()-like
behavior that allows one to make use of the symbol, by combining a
weak external on the symbol itself with a REQUEST_SYMBOL() of a second
symbol.

Signed-off-by: Marty Connor <mdc@etherboot.org>
src/arch/i386/scripts/i386-kir.lds
src/arch/i386/scripts/i386.lds
src/arch/x86/scripts/efi.lds
src/include/compiler.h