mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 18:11:49 +03:00
[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:
committed by
Michael Brown
parent
ba27168c2e
commit
2aad3fab23
@@ -42,6 +42,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
/** Shutdown flags for exit */
|
||||
int shutdown_exit_flags = 0;
|
||||
|
||||
/**
|
||||
* Perform PXE menu boot when PXE stack is not available
|
||||
*/
|
||||
__weak int pxe_menu_boot ( struct net_device *netdev __unused ) {
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identify the boot network device
|
||||
*
|
||||
@@ -155,7 +162,7 @@ static int netboot ( struct net_device *netdev ) {
|
||||
buf, sizeof ( buf ) );
|
||||
pxe_discovery_control =
|
||||
fetch_uintz_setting ( NULL, &pxe_discovery_control_setting );
|
||||
if ( ( strcmp ( buf, "PXEClient" ) == 0 ) && pxe_menu_boot != NULL &&
|
||||
if ( ( strcmp ( buf, "PXEClient" ) == 0 ) &&
|
||||
setting_exists ( NULL, &pxe_boot_menu_setting ) &&
|
||||
( ! ( ( pxe_discovery_control & PXEBS_SKIP ) &&
|
||||
setting_exists ( NULL, &filename_setting ) ) ) ) {
|
||||
|
||||
Reference in New Issue
Block a user