]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Use portable syntax for pushsection directive in inline assembly
authorKhem Raj <raj.khem@gmail.com>
Wed, 14 May 2025 16:29:33 +0000 (09:29 -0700)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 29 May 2025 17:01:39 +0000 (19:01 +0200)
'@' does not work with clang inline assembler, but '%' works with both
gcc and clang. Therefore use '%' to make it more portable

Fixes
<inline asm>:1:41: error: expected '%<type>' or "<type>"

Signed-off-by: Khem Raj <raj.khem@gmail.com>
coregrind/vg_preloaded.c

index 5bec51d7601c4630957beb16ddbdd36388655343..e4c2dbc21c40421b31879d3b339ed976f38c1ea9 100644 (file)
@@ -55,7 +55,7 @@
 /* Note: The "MS" section flags are to remove duplicates.  */
 #define DEFINE_GDB_PY_SCRIPT(script_name) \
   asm("\
-.pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n\
+.pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n\
 .byte 1 /* Python */\n\
 .asciz \"" script_name "\"\n\
 .popsection \n\