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>tags/v1.20.1
|
|
||
191 |
|
191 |
|
192 |
|
192 |
|
193 |
|
193 |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
|
|
194 |
|
202 |
|
195 |
|
203 |
|
196 |
|
204 |
|
|
|
||
1389 |
|
1389 |
|
1390 |
|
1390 |
|
1391 |
|
1391 |
|
1392 |
|
|
|
|
1392 |
|
|
1393 |
|
1393 |
|
1394 |
|
1394 |
|
1395 |
|
1395 |
|