From 2aad3fab233f0235f9a8f677ae7bb402f1647eb6 Mon Sep 17 00:00:00 2001 From: Joshua Oreman Date: Wed, 26 May 2010 17:52:44 -0700 Subject: [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 Signed-off-by: Michael Brown --- src/net/80211/net80211.c | 11 +++++++++++ src/net/udp/dhcp.c | 5 +++++ 2 files changed, 16 insertions(+) (limited to 'src/net') diff --git a/src/net/80211/net80211.c b/src/net/80211/net80211.c index 0069abaa8..8df2c3155 100644 --- a/src/net/80211/net80211.c +++ b/src/net/80211/net80211.c @@ -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 * @{ diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index ac03412d3..7850fb4b8 100644 --- a/src/net/udp/dhcp.c +++ b/src/net/udp/dhcp.c @@ -1406,6 +1406,11 @@ static struct sockaddr dhcp_peer = { .sa_family = AF_INET, }; +/** + * Get cached DHCPACK where none exists + */ +__weak void get_cached_dhcpack ( void ) {} + /** * Start DHCP state machine on a network device * -- cgit v1.2.3-55-g7522