[build] Use weak definitions instead of weak declarations

This removes the need for inline safety wrappers, marginally reducing
the size penalty of weak functions, and works around an apparent
binutils bug that causes undefined weak symbols to not actually be
NULL when compiling with -fPIE (as EFI builds do).

A bug in versions of binutils prior to 2.16 (released in 2005) will
cause same-file weak definitions to not work with those
toolchains. Update the README to reflect our new dependency on
binutils >= 2.16.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Joshua Oreman
2010-05-26 17:52:44 -07:00
committed by Michael Brown
parent ba27168c2e
commit 2aad3fab23
12 changed files with 48 additions and 98 deletions

View File

@@ -139,6 +139,17 @@ struct net80211_assoc_ctx {
int times_tried;
};
/**
* Detect secure 802.11 network when security support is not available
*
* @return -ENOTSUP, always.
*/
__weak int sec80211_detect ( struct io_buffer *iob __unused,
enum net80211_security_proto *secprot __unused,
enum net80211_crypto_alg *crypt __unused ) {
return -ENOTSUP;
}
/**
* @defgroup net80211_netdev Network device interface functions
* @{