From b3f5ef604f77a7a802ba4a7fa0b91756b8894a66 Mon Sep 17 00:00:00 2001 From: ourairquality Date: Fri, 16 Sep 2016 20:54:44 +1000 Subject: [PATCH] Hack references to get the linker using the open lib definitions. --- core/app_main.c | 15 +++++++++++++++ open_esplibs/libnet80211/ieee80211_hostap.c | 3 +++ open_esplibs/libnet80211/wl_cnx.c | 3 +++ 3 files changed, 21 insertions(+) diff --git a/core/app_main.c b/core/app_main.c index ed78025..feb4b81 100644 --- a/core/app_main.c +++ b/core/app_main.c @@ -451,3 +451,18 @@ static __attribute__((noinline)) void dump_flash_config_sectors(uint32_t start_s dump_flash_sector(start_sector + 3, BOOT_INFO_SIZE); } + +/* + * Hack references to dummy functions in open_esplibs object files to + * ensure that the linker uses the open definitions rather than the + * sdk definitions. + */ + +void libnet80211_hostap_linker_hack(); +void libnet80211_wl_cnx_linker_hack(); + +void open_esplibs_refs() +{ + libnet80211_hostap_linker_hack(); + libnet80211_wl_cnx_linker_hack(); +} diff --git a/open_esplibs/libnet80211/ieee80211_hostap.c b/open_esplibs/libnet80211/ieee80211_hostap.c index 745461e..08949f3 100644 --- a/open_esplibs/libnet80211/ieee80211_hostap.c +++ b/open_esplibs/libnet80211/ieee80211_hostap.c @@ -28,4 +28,7 @@ void sdk_hostap_handle_timer(struct sdk_netif_conninfo *cnx_node) } } +/* Needed to have the linker actually replace the above definitions. */ +void libnet80211_hostap_linker_hack(){} + #endif /* OPEN_LIBNET80211_HOSTAP */ diff --git a/open_esplibs/libnet80211/wl_cnx.c b/open_esplibs/libnet80211/wl_cnx.c index 7ed74f5..943903b 100644 --- a/open_esplibs/libnet80211/wl_cnx.c +++ b/open_esplibs/libnet80211/wl_cnx.c @@ -31,4 +31,7 @@ void *sdk_cnx_node_search(uint8_t mac[6]) return NULL; } +/* Needed to have the linker actually replace the above definitions. */ +void libnet80211_wl_cnx_linker_hack(){} + #endif /* OPEN_LIBNET80211_WL_CNX */