diff options
author | Michael Brown | 2018-03-21 15:47:33 +0100 |
---|---|---|
committer | Michael Brown | 2018-03-21 16:00:53 +0100 |
commit | bc85368cdd311fe68ffcf251e7e8e90c14f8a9dc (patch) | |
tree | 2966a5d8310f0b57e39a8db9dec202ea5823286d /src/arch/x86/interface/pcbios/bios_reboot.c | |
parent | [librm] Provide symbols for inline code placed into other sections (diff) | |
download | ipxe-bc85368cdd311fe68ffcf251e7e8e90c14f8a9dc.tar.gz ipxe-bc85368cdd311fe68ffcf251e7e8e90c14f8a9dc.tar.xz ipxe-bc85368cdd311fe68ffcf251e7e8e90c14f8a9dc.zip |
[librm] Ensure that inline code symbols are unique
Commit 6149e0a ("[librm] Provide symbols for inline code placed into
other sections") may cause build failures due to duplicate label names
if the compiler chooses to duplicate inline assembly code.
Fix by using the "%=" special format string to include a
guaranteed-unique number within the label name.
The "%=" will be expanded only if constraints exist for the inline
assembly. This fix therefore requires that all REAL_CODE() fragments
use a (possibly empty) constraint list.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/x86/interface/pcbios/bios_reboot.c')
-rw-r--r-- | src/arch/x86/interface/pcbios/bios_reboot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/interface/pcbios/bios_reboot.c b/src/arch/x86/interface/pcbios/bios_reboot.c index c6c5a5a9..071173f1 100644 --- a/src/arch/x86/interface/pcbios/bios_reboot.c +++ b/src/arch/x86/interface/pcbios/bios_reboot.c @@ -48,7 +48,7 @@ static void bios_reboot ( int warm ) { put_real ( flag, BDA_SEG, BDA_REBOOT ); /* Jump to system reset vector */ - __asm__ __volatile__ ( REAL_CODE ( "ljmp $0xf000, $0xfff0" ) ); + __asm__ __volatile__ ( REAL_CODE ( "ljmp $0xf000, $0xfff0" ) : ); } /** |