From bc85368cdd311fe68ffcf251e7e8e90c14f8a9dc Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 21 Mar 2018 16:47:33 +0200 Subject: [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 --- src/arch/x86/interface/syslinux/comboot_call.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/arch/x86/interface/syslinux') diff --git a/src/arch/x86/interface/syslinux/comboot_call.c b/src/arch/x86/interface/syslinux/comboot_call.c index 2f5c252c1..e70f200e3 100644 --- a/src/arch/x86/interface/syslinux/comboot_call.c +++ b/src/arch/x86/interface/syslinux/comboot_call.c @@ -663,7 +663,7 @@ void hook_comboot_interrupts ( ) { VIRT_CALL ( int20 ) "clc\n\t" "call patch_cf\n\t" - "iret\n\t" ) ); + "iret\n\t" ) : ); hook_bios_interrupt ( 0x20, ( intptr_t ) int20_wrapper, &int20_vector ); @@ -672,7 +672,7 @@ void hook_comboot_interrupts ( ) { VIRT_CALL ( int21 ) "clc\n\t" "call patch_cf\n\t" - "iret\n\t" ) ); + "iret\n\t" ) : ); hook_bios_interrupt ( 0x21, ( intptr_t ) int21_wrapper, &int21_vector ); @@ -681,7 +681,7 @@ void hook_comboot_interrupts ( ) { VIRT_CALL ( int22 ) "clc\n\t" "call patch_cf\n\t" - "iret\n\t" ) ); + "iret\n\t" ) : ); hook_bios_interrupt ( 0x22, ( intptr_t ) int22_wrapper, &int22_vector ); } -- cgit v1.2.3-55-g7522