Browse Source

Use __asm__ rather than asm in gold testsuite

discard_locals_test.c:28:6: error: expected declaration specifiers or
‘...’ before string constant
 asm (".Lshould_be_discarded:");
      ^

	* testsuite/discard_locals_test.c: Replace uses of asm with __asm__.
	* testsuite/discard_locals_relocatable_test.c: Likewise.
binutils-2_35-branch
Alan Modra 6 years ago
parent
commit
423054bead
  1. 5
      gold/ChangeLog
  2. 6
      gold/testsuite/discard_locals_relocatable_test.c
  3. 5
      gold/testsuite/discard_locals_test.c

5
gold/ChangeLog

@ -1,3 +1,8 @@
2020-06-16 Alan Modra <amodra@gmail.com>
* testsuite/discard_locals_test.c: Replace uses of asm with __asm__.
* testsuite/discard_locals_relocatable_test.c: Likewise.
2020-06-16 Alan Modra <amodra@gmail.com>
* testsuite/Makefile.am (export_dynamic_plugin.o): Use CXXCOMPILE.

6
gold/testsuite/discard_locals_relocatable_test.c

@ -29,14 +29,14 @@
/* Local symbol format for generic ELF target.
Use GCC -Wa,-L option to preserve this local symbol
in the output object file. */
asm (".Lshould_be_discarded:");
__asm__ (".Lshould_be_discarded:");
#ifdef __powerpc__
/* Test wants to keep one local. Satisfy it. */
#ifdef __powerpc64__
asm (".reloc 0,R_PPC64_NONE,.LC0");
__asm__ (".reloc 0,R_PPC64_NONE,.LC0");
#else
asm (".reloc 0,R_PPC_NONE,.LC0");
__asm__ (".reloc 0,R_PPC_NONE,.LC0");
#endif
#endif

5
gold/testsuite/discard_locals_test.c

@ -25,11 +25,11 @@
main program should override the shared library symbol. */
/* Local symbol format for generic ELF target. */
asm (".Lshould_be_discarded:");
__asm__ (".Lshould_be_discarded:");
#ifdef __i386__
/* Additional local symbol format for the i386 target. */
asm (".Xshould_be_discarded:");
__asm__ (".Xshould_be_discarded:");
#endif
int
@ -37,4 +37,3 @@ main (void)
{
return 0;
}

Loading…
Cancel
Save