Files
ipxe/src/include
Joshua Oreman 49d6f57005 [compiler] Prevent empty weak function stubs from being removed
Even with the noinline specifier added by commit 1a260f8, gcc may skip
calls to non-inlinable functions that it knows have no side
effects. This caused the get_cached_dhcpack() call in start_dhcp(),
the weak stub of which has no code in its body, to be removed,
preventing cached DHCP from working.

Fix by adding a __keepme macro to compiler.h expanding to asm(""), as
recommended by gcc's info page, and using it in the weak stub for
get_cached_dhcpack().

Reported-by: Aaron Brooks <aaron@brooks1.net>
Tested-by: Aaron Brooks <aaron@brooks1.net>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-19 13:37:52 +01:00
..
2010-08-19 12:45:41 +01:00
2010-08-19 13:12:53 +01:00
2010-04-19 23:43:39 +01:00
2006-09-11 17:54:19 +00:00
2005-03-08 18:53:11 +00:00
2005-03-08 18:53:11 +00:00
2005-03-08 18:53:11 +00:00
2010-08-17 14:44:27 +01:00
2010-04-19 23:43:39 +01:00
2010-04-19 23:43:39 +01:00
2005-03-08 18:53:11 +00:00
2005-03-08 18:53:11 +00:00
2010-08-19 12:29:37 +01:00
2010-04-19 23:43:39 +01:00
2010-04-19 23:43:39 +01:00
2005-03-08 18:53:11 +00:00
2005-03-08 18:53:11 +00:00
2007-07-14 15:42:26 +01:00
2010-08-19 12:22:07 +01:00
2005-03-08 18:53:11 +00:00
2010-04-19 23:43:39 +01:00