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/core/dumpregs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/x86/core') diff --git a/src/arch/x86/core/dumpregs.c b/src/arch/x86/core/dumpregs.c index 37d62a7b6..a5108ea14 100644 --- a/src/arch/x86/core/dumpregs.c +++ b/src/arch/x86/core/dumpregs.c @@ -7,7 +7,7 @@ void __asmcall _dump_regs ( struct i386_all_regs *ix86 ) { TEXT16_CODE ( ".globl dump_regs\n\t" "\ndump_regs:\n\t" VIRT_CALL ( _dump_regs ) - "ret\n\t" ) ); + "ret\n\t" ) : ); printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n" "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n" -- cgit v1.2.3-55-g7522