aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-06-16 21:46:00 +0930
committerAlan Modra <amodra@gmail.com>2020-06-16 22:13:20 +0930
commit07e7fdfd429985f061630c46e91cb10579607233 (patch)
treeede8a18c253a31669fe7f7159e9ed8e287a5a885 /ld
parent423054beadf317757d43aefb9eddfe711a42e3e1 (diff)
downloadgdb-07e7fdfd429985f061630c46e91cb10579607233.zip
gdb-07e7fdfd429985f061630c46e91cb10579607233.tar.gz
gdb-07e7fdfd429985f061630c46e91cb10579607233.tar.bz2
Use __asm__ rather than asm in ld testsuite
* testsuite/ld-elf/pr23428.c: Define _DEFAULT_SOURCE. * testsuite/ld-elf/indirect1b.c: Replace asm with __asm__. * testsuite/ld-elf/indirect2.c: Likewise. * testsuite/ld-elf/indirect3b.c: Likewise. * testsuite/ld-elf/indirect4b.c: Likewise. * testsuite/ld-elf/pr14323-2.c: Likewise. * testsuite/ld-elf/pr18720b.c: Likewise. * testsuite/ld-elf/pr23428.c: Likewise. * testsuite/ld-elfvsb/common.c: Likewise. * testsuite/ld-elfvsb/main.c: Likewise. * testsuite/ld-elfvsb/sh1.c: Likewise. * testsuite/ld-elfvsb/test.c: Likewise. * testsuite/ld-pe/aligncomm-1.c: Likewise. * testsuite/ld-pe/aligncomm-2.c: Likewise. * testsuite/ld-pe/aligncomm-3.c: Likewise. * testsuite/ld-pe/aligncomm-4.c: Likewise. * testsuite/ld-plugin/pr23958.c: Likewise. * testsuite/ld-size/size-1b.c: Likewise. * testsuite/ld-size/size-2b.c: Likewise. * testsuite/ld-size/size-3a.c: Likewise. * testsuite/ld-size/size-3b.c: Likewise. * testsuite/ld-size/size-3c.c: Likewise. * testsuite/ld-size/size-4b.c: Likewise. * testsuite/ld-size/size-5b.c: Likewise. * testsuite/ld-size/size-6a.c: Likewise. * testsuite/ld-size/size-7a.c: Likewise. * testsuite/ld-size/size-8a.c: Likewise. * testsuite/ld-size/size-9b.c: Likewise. * testsuite/ld-size/size-10b.c: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog32
-rw-r--r--ld/testsuite/ld-elf/indirect1b.c4
-rw-r--r--ld/testsuite/ld-elf/indirect2.c4
-rw-r--r--ld/testsuite/ld-elf/indirect3b.c4
-rw-r--r--ld/testsuite/ld-elf/indirect4b.c8
-rw-r--r--ld/testsuite/ld-elf/pr14323-2.c2
-rw-r--r--ld/testsuite/ld-elf/pr18720b.c14
-rw-r--r--ld/testsuite/ld-elf/pr23428.c3
-rw-r--r--ld/testsuite/ld-elfvsb/common.c2
-rw-r--r--ld/testsuite/ld-elfvsb/main.c18
-rw-r--r--ld/testsuite/ld-elfvsb/sh1.c22
-rw-r--r--ld/testsuite/ld-elfvsb/test.c4
-rw-r--r--ld/testsuite/ld-pe/aligncomm-1.c8
-rw-r--r--ld/testsuite/ld-pe/aligncomm-2.c8
-rw-r--r--ld/testsuite/ld-pe/aligncomm-3.c8
-rw-r--r--ld/testsuite/ld-pe/aligncomm-4.c8
-rw-r--r--ld/testsuite/ld-plugin/pr23958.c2
-rw-r--r--ld/testsuite/ld-size/size-10b.c2
-rw-r--r--ld/testsuite/ld-size/size-1b.c2
-rw-r--r--ld/testsuite/ld-size/size-2b.c2
-rw-r--r--ld/testsuite/ld-size/size-3a.c2
-rw-r--r--ld/testsuite/ld-size/size-3b.c2
-rw-r--r--ld/testsuite/ld-size/size-3c.c2
-rw-r--r--ld/testsuite/ld-size/size-4b.c4
-rw-r--r--ld/testsuite/ld-size/size-5b.c4
-rw-r--r--ld/testsuite/ld-size/size-6a.c2
-rw-r--r--ld/testsuite/ld-size/size-7a.c2
-rw-r--r--ld/testsuite/ld-size/size-8a.c2
-rw-r--r--ld/testsuite/ld-size/size-9b.c2
29 files changed, 107 insertions, 72 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 7d19ced..aa20f50 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,37 @@
2020-06-16 Alan Modra <amodra@gmail.com>
+ * testsuite/ld-elf/pr23428.c: Define _DEFAULT_SOURCE.
+ * testsuite/ld-elf/indirect1b.c: Replace asm with __asm__.
+ * testsuite/ld-elf/indirect2.c: Likewise.
+ * testsuite/ld-elf/indirect3b.c: Likewise.
+ * testsuite/ld-elf/indirect4b.c: Likewise.
+ * testsuite/ld-elf/pr14323-2.c: Likewise.
+ * testsuite/ld-elf/pr18720b.c: Likewise.
+ * testsuite/ld-elf/pr23428.c: Likewise.
+ * testsuite/ld-elfvsb/common.c: Likewise.
+ * testsuite/ld-elfvsb/main.c: Likewise.
+ * testsuite/ld-elfvsb/sh1.c: Likewise.
+ * testsuite/ld-elfvsb/test.c: Likewise.
+ * testsuite/ld-pe/aligncomm-1.c: Likewise.
+ * testsuite/ld-pe/aligncomm-2.c: Likewise.
+ * testsuite/ld-pe/aligncomm-3.c: Likewise.
+ * testsuite/ld-pe/aligncomm-4.c: Likewise.
+ * testsuite/ld-plugin/pr23958.c: Likewise.
+ * testsuite/ld-size/size-1b.c: Likewise.
+ * testsuite/ld-size/size-2b.c: Likewise.
+ * testsuite/ld-size/size-3a.c: Likewise.
+ * testsuite/ld-size/size-3b.c: Likewise.
+ * testsuite/ld-size/size-3c.c: Likewise.
+ * testsuite/ld-size/size-4b.c: Likewise.
+ * testsuite/ld-size/size-5b.c: Likewise.
+ * testsuite/ld-size/size-6a.c: Likewise.
+ * testsuite/ld-size/size-7a.c: Likewise.
+ * testsuite/ld-size/size-8a.c: Likewise.
+ * testsuite/ld-size/size-9b.c: Likewise.
+ * testsuite/ld-size/size-10b.c: Likewise.
+
+2020-06-16 Alan Modra <amodra@gmail.com>
+
* emulparams/tic30aout.sh: Delete file.
* scripttempl/tic30aout.sc: Delete file.
* Makefile.am: Remove etic30aout.c from ALL_EMULATION_SOURCES and
diff --git a/ld/testsuite/ld-elf/indirect1b.c b/ld/testsuite/ld-elf/indirect1b.c
index 60f34527..6bb439c 100644
--- a/ld/testsuite/ld-elf/indirect1b.c
+++ b/ld/testsuite/ld-elf/indirect1b.c
@@ -3,7 +3,7 @@ foo (void)
{
}
-asm (".symver foo,foo@FOO");
+__asm__ (".symver foo,foo@FOO");
#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
-asm (".symver .foo,.foo@FOO");
+__asm__ (".symver .foo,.foo@FOO");
#endif
diff --git a/ld/testsuite/ld-elf/indirect2.c b/ld/testsuite/ld-elf/indirect2.c
index e36532d..f16af0b 100644
--- a/ld/testsuite/ld-elf/indirect2.c
+++ b/ld/testsuite/ld-elf/indirect2.c
@@ -1,8 +1,8 @@
extern void foo (void);
-asm (".symver foo,foo@@@FOO");
+__asm__ (".symver foo,foo@@@FOO");
#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
-asm (".symver .foo,.foo@@@FOO");
+__asm__ (".symver .foo,.foo@@@FOO");
#endif
void
diff --git a/ld/testsuite/ld-elf/indirect3b.c b/ld/testsuite/ld-elf/indirect3b.c
index 74cc461..493d4db 100644
--- a/ld/testsuite/ld-elf/indirect3b.c
+++ b/ld/testsuite/ld-elf/indirect3b.c
@@ -6,7 +6,7 @@ foo (void)
printf ("MAIN\n");
}
-asm (".symver foo,foo@FOO");
+__asm__ (".symver foo,foo@FOO");
#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
-asm (".symver .foo,.foo@FOO");
+__asm__ (".symver .foo,.foo@FOO");
#endif
diff --git a/ld/testsuite/ld-elf/indirect4b.c b/ld/testsuite/ld-elf/indirect4b.c
index 06739b5..d82d630 100644
--- a/ld/testsuite/ld-elf/indirect4b.c
+++ b/ld/testsuite/ld-elf/indirect4b.c
@@ -6,9 +6,9 @@ foo2 (void)
printf ("MAIN2\n");
}
-asm (".symver foo2,foo@@FOO2");
+__asm__ (".symver foo2,foo@@FOO2");
#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
-asm (".symver .foo2,.foo@@FOO2");
+__asm__ (".symver .foo2,.foo@@FOO2");
#endif
void
@@ -17,7 +17,7 @@ foo1 (void)
printf ("MAIN1\n");
}
-asm (".symver foo1,foo@FOO1");
+__asm__ (".symver foo1,foo@FOO1");
#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
-asm (".symver .foo1,.foo@FOO1");
+__asm__ (".symver .foo1,.foo@FOO1");
#endif
diff --git a/ld/testsuite/ld-elf/pr14323-2.c b/ld/testsuite/ld-elf/pr14323-2.c
index 34753d1..b0371d6 100644
--- a/ld/testsuite/ld-elf/pr14323-2.c
+++ b/ld/testsuite/ld-elf/pr14323-2.c
@@ -1,7 +1,7 @@
int foo __attribute__ ((section ("_data_foo"))) = 0;
extern int foo_alias __attribute__ ((weak, alias ("foo")));
extern char __start__data_foo;
-asm (".type __start__data_foo,%object");
+__asm__ (".type __start__data_foo,%object");
int x1 = 1;
int x2 = 2;
diff --git a/ld/testsuite/ld-elf/pr18720b.c b/ld/testsuite/ld-elf/pr18720b.c
index 3644e5d..6b3222d 100644
--- a/ld/testsuite/ld-elf/pr18720b.c
+++ b/ld/testsuite/ld-elf/pr18720b.c
@@ -6,15 +6,15 @@ foo (void)
printf ("MAIN\n");
}
-asm (".symver foo,foo@FOO");
+__asm__ (".symver foo,foo@FOO");
#ifdef __alpha__
-asm ("foo_alias = foo");
+__asm__ ("foo_alias = foo");
#else
-asm (".set foo_alias,foo");
+__asm__ (".set foo_alias,foo");
#endif
-asm (".global foo_alias");
+__asm__ (".global foo_alias");
#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
-asm (".symver .foo,.foo@FOO");
-asm (".set .foo_alias,.foo");
-asm (".global .foo_alias");
+__asm__ (".symver .foo,.foo@FOO");
+__asm__ (".set .foo_alias,.foo");
+__asm__ (".global .foo_alias");
#endif
diff --git a/ld/testsuite/ld-elf/pr23428.c b/ld/testsuite/ld-elf/pr23428.c
index 3631ed7..963b9e5 100644
--- a/ld/testsuite/ld-elf/pr23428.c
+++ b/ld/testsuite/ld-elf/pr23428.c
@@ -1,3 +1,6 @@
+/* Ensure we get syscall declared. */
+#define _DEFAULT_SOURCE
+
#include <unistd.h>
#include <link.h>
#include <syscall.h>
diff --git a/ld/testsuite/ld-elfvsb/common.c b/ld/testsuite/ld-elfvsb/common.c
index 7d05eb7..0432a07 100644
--- a/ld/testsuite/ld-elfvsb/common.c
+++ b/ld/testsuite/ld-elfvsb/common.c
@@ -1,5 +1,5 @@
int foo;
-asm (".hidden foo");
+__asm__ (".hidden foo");
int
_start (void)
diff --git a/ld/testsuite/ld-elfvsb/main.c b/ld/testsuite/ld-elfvsb/main.c
index 5419826..c2c9291 100644
--- a/ld/testsuite/ld-elfvsb/main.c
+++ b/ld/testsuite/ld-elfvsb/main.c
@@ -96,7 +96,7 @@ main_visibility_checkvar (void)
#ifndef PROTECTED_UNDEF_TEST
int shared_data = 1;
-asm (".protected shared_data");
+__asm__ (".protected shared_data");
int
shared_func (void)
@@ -104,7 +104,7 @@ shared_func (void)
return 1;
}
-asm (".protected shared_func");
+__asm__ (".protected shared_func");
extern int * shared_data_p ();
typedef int (*func) ();
@@ -152,7 +152,7 @@ shlib_overriddencall2 (void)
#ifdef HIDDEN_NORMAL_TEST
int visibility_com;
-asm (".hidden visibility_com");
+__asm__ (".hidden visibility_com");
int
main_visibility_checkcom (void)
@@ -174,19 +174,19 @@ main_visibility_checkcom (void)
#pragma weak visibility_undef_var_weak
extern int visibility_undef_var_weak;
-asm (".hidden visibility_undef_var_weak");
+__asm__ (".hidden visibility_undef_var_weak");
#pragma weak visibility_undef_func_weak
extern int visibility_undef_func_weak ();
-asm (".hidden visibility_undef_func_weak");
+__asm__ (".hidden visibility_undef_func_weak");
#pragma weak visibility_var_weak
extern int visibility_var_weak;
-asm (".hidden visibility_var_weak");
+__asm__ (".hidden visibility_var_weak");
#pragma weak visibility_func_weak
extern int visibility_func_weak ();
-asm (".hidden visibility_func_weak");
+__asm__ (".hidden visibility_func_weak");
int
main_visibility_checkweak ()
@@ -198,9 +198,9 @@ main_visibility_checkweak ()
}
#elif defined (HIDDEN_UNDEF_TEST)
extern int visibility_def;
-asm (".hidden visibility_def");
+__asm__ (".hidden visibility_def");
extern int visibility_func ();
-asm (".hidden visibility_func");
+__asm__ (".hidden visibility_func");
int
main_visibility_checkcom (void)
diff --git a/ld/testsuite/ld-elfvsb/sh1.c b/ld/testsuite/ld-elfvsb/sh1.c
index b275424..1aba63c 100644
--- a/ld/testsuite/ld-elfvsb/sh1.c
+++ b/ld/testsuite/ld-elfvsb/sh1.c
@@ -203,7 +203,7 @@ visibility ()
#endif
#ifdef HIDDEN_NORMAL_TEST
-asm (".hidden visibility_normal");
+__asm__ (".hidden visibility_normal");
int
visibility_normal ()
@@ -265,7 +265,7 @@ int visibility_var = 2;
#endif
#ifdef HIDDEN_NORMAL_TEST
-asm (".hidden visibility_var_normal");
+__asm__ (".hidden visibility_var_normal");
int visibility_var_normal = 2;
#endif
@@ -325,18 +325,18 @@ visibility_varval ()
}
#if defined (HIDDEN_TEST) || defined (HIDDEN_UNDEF_TEST)
-asm (".hidden visibility");
-asm (".hidden visibility_var");
+__asm__ (".hidden visibility");
+__asm__ (".hidden visibility_var");
#else
#if defined (PROTECTED_TEST) || defined (PROTECTED_UNDEF_TEST) || defined (PROTECTED_WEAK_TEST)
-asm (".protected visibility");
-asm (".protected visibility_var");
+__asm__ (".protected visibility");
+__asm__ (".protected visibility_var");
#endif
#endif
#ifdef HIDDEN_NORMAL_TEST
int shlib_visibility_com;
-asm (".hidden shlib_visibility_com");
+__asm__ (".hidden shlib_visibility_com");
int
shlib_visibility_checkcom ()
@@ -352,19 +352,19 @@ shlib_visibility_checkweak ()
#elif defined (HIDDEN_WEAK_TEST)
#pragma weak shlib_visibility_undef_var_weak
extern int shlib_visibility_undef_var_weak;
-asm (".hidden shlib_visibility_undef_var_weak");
+__asm__ (".hidden shlib_visibility_undef_var_weak");
#pragma weak shlib_visibility_undef_func_weak
extern int shlib_visibility_undef_func_weak ();
-asm (".hidden shlib_visibility_undef_func_weak");
+__asm__ (".hidden shlib_visibility_undef_func_weak");
#pragma weak shlib_visibility_var_weak
extern int shlib_visibility_var_weak;
-asm (".hidden shlib_visibility_var_weak");
+__asm__ (".hidden shlib_visibility_var_weak");
#pragma weak shlib_visibility_func_weak
extern int shlib_visibility_func_weak ();
-asm (".hidden shlib_visibility_func_weak");
+__asm__ (".hidden shlib_visibility_func_weak");
int
shlib_visibility_checkcom ()
diff --git a/ld/testsuite/ld-elfvsb/test.c b/ld/testsuite/ld-elfvsb/test.c
index ca23d38..d2210ac 100644
--- a/ld/testsuite/ld-elfvsb/test.c
+++ b/ld/testsuite/ld-elfvsb/test.c
@@ -1,10 +1,10 @@
#pragma weak main_hidden_data
extern int main_hidden_data;
-asm (".hidden main_hidden_data");
+__asm__ (".hidden main_hidden_data");
#pragma weak main_hidden_func
extern int main_hidden_func ();
-asm (".hidden main_hidden_func");
+__asm__ (".hidden main_hidden_func");
int
_start (void)
diff --git a/ld/testsuite/ld-pe/aligncomm-1.c b/ld/testsuite/ld-pe/aligncomm-1.c
index fc6cb03..0c03154 100644
--- a/ld/testsuite/ld-pe/aligncomm-1.c
+++ b/ld/testsuite/ld-pe/aligncomm-1.c
@@ -13,10 +13,10 @@ int main (int argc, const char **argv)
void __main (void)
{
- asm (".section .drectve\n"
- " .ascii \" -aligncomm:_r,4\"\n"
- " .ascii \" -aligncomm:r,4\"\n"
- " .text");
+ __asm__ (".section .drectve\n"
+ " .ascii \" -aligncomm:_r,4\"\n"
+ " .ascii \" -aligncomm:r,4\"\n"
+ " .text");
}
#if defined (__CYGWIN__) || defined (__MINGW32__)
diff --git a/ld/testsuite/ld-pe/aligncomm-2.c b/ld/testsuite/ld-pe/aligncomm-2.c
index 5e042b8..dc29bba 100644
--- a/ld/testsuite/ld-pe/aligncomm-2.c
+++ b/ld/testsuite/ld-pe/aligncomm-2.c
@@ -14,10 +14,10 @@ int main (int argc, const char **argv)
void __main (void)
{
- asm (".section .drectve\n"
- " .ascii \" -aligncomm:_r,4\"\n"
- " .ascii \" -aligncomm:r,4\"\n"
- " .text");
+ __asm__ (".section .drectve\n"
+ " .ascii \" -aligncomm:_r,4\"\n"
+ " .ascii \" -aligncomm:r,4\"\n"
+ " .text");
}
#if defined (__CYGWIN__) || defined (__MINGW32__)
diff --git a/ld/testsuite/ld-pe/aligncomm-3.c b/ld/testsuite/ld-pe/aligncomm-3.c
index 69184f9..8fc73cd 100644
--- a/ld/testsuite/ld-pe/aligncomm-3.c
+++ b/ld/testsuite/ld-pe/aligncomm-3.c
@@ -15,10 +15,10 @@ int main (int argc, const char **argv)
void __main (void)
{
- asm (".section .drectve\n"
- " .ascii \" -aligncomm:_r,4\"\n"
- " .ascii \" -aligncomm:r,4\"\n"
- " .text");
+ __asm__ (".section .drectve\n"
+ " .ascii \" -aligncomm:_r,4\"\n"
+ " .ascii \" -aligncomm:r,4\"\n"
+ " .text");
}
#if defined (__CYGWIN__) || defined (__MINGW32__)
diff --git a/ld/testsuite/ld-pe/aligncomm-4.c b/ld/testsuite/ld-pe/aligncomm-4.c
index 085335a..c82f609 100644
--- a/ld/testsuite/ld-pe/aligncomm-4.c
+++ b/ld/testsuite/ld-pe/aligncomm-4.c
@@ -16,10 +16,10 @@ int main (int argc, const char **argv)
void __main (void)
{
- asm (".section .drectve\n"
- " .ascii \" -aligncomm:_r,4\"\n"
- " .ascii \" -aligncomm:r,4\"\n"
- " .text");
+ __asm__ (".section .drectve\n"
+ " .ascii \" -aligncomm:_r,4\"\n"
+ " .ascii \" -aligncomm:r,4\"\n"
+ " .text");
}
#if defined (__CYGWIN__) || defined (__MINGW32__)
diff --git a/ld/testsuite/ld-plugin/pr23958.c b/ld/testsuite/ld-plugin/pr23958.c
index 656dc31..ba83ec9 100644
--- a/ld/testsuite/ld-plugin/pr23958.c
+++ b/ld/testsuite/ld-plugin/pr23958.c
@@ -3,4 +3,4 @@ dwarf_bytesize (void)
{
}
-asm (".symver dwarf_bytesize,dwarf_bytesize@@@ELFUTILS_0.143");
+__asm__ (".symver dwarf_bytesize,dwarf_bytesize@@@ELFUTILS_0.143");
diff --git a/ld/testsuite/ld-size/size-10b.c b/ld/testsuite/ld-size/size-10b.c
index d043371..b55ecdf 100644
--- a/ld/testsuite/ld-size/size-10b.c
+++ b/ld/testsuite/ld-size/size-10b.c
@@ -1,5 +1,5 @@
__thread char bar[10];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;
char *
diff --git a/ld/testsuite/ld-size/size-1b.c b/ld/testsuite/ld-size/size-1b.c
index 723c60a..da93722 100644
--- a/ld/testsuite/ld-size/size-1b.c
+++ b/ld/testsuite/ld-size/size-1b.c
@@ -1,3 +1,3 @@
extern char bar[];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;
diff --git a/ld/testsuite/ld-size/size-2b.c b/ld/testsuite/ld-size/size-2b.c
index 0f02c94..9442fce 100644
--- a/ld/testsuite/ld-size/size-2b.c
+++ b/ld/testsuite/ld-size/size-2b.c
@@ -1,5 +1,5 @@
extern __thread char bar[];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;
char *
diff --git a/ld/testsuite/ld-size/size-3a.c b/ld/testsuite/ld-size/size-3a.c
index b321559..c05e7f8 100644
--- a/ld/testsuite/ld-size/size-3a.c
+++ b/ld/testsuite/ld-size/size-3a.c
@@ -1,3 +1,3 @@
char bar[10] __attribute__ ((visibility("hidden")));
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;
diff --git a/ld/testsuite/ld-size/size-3b.c b/ld/testsuite/ld-size/size-3b.c
index fc379df..ef1f0b9 100644
--- a/ld/testsuite/ld-size/size-3b.c
+++ b/ld/testsuite/ld-size/size-3b.c
@@ -1,4 +1,4 @@
static char bar[10];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;
char *bar_p = bar;
diff --git a/ld/testsuite/ld-size/size-3c.c b/ld/testsuite/ld-size/size-3c.c
index d94ceef..f78c9e8 100644
--- a/ld/testsuite/ld-size/size-3c.c
+++ b/ld/testsuite/ld-size/size-3c.c
@@ -1,3 +1,3 @@
__thread char bar[10] __attribute__ ((visibility("hidden")));
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;
diff --git a/ld/testsuite/ld-size/size-4b.c b/ld/testsuite/ld-size/size-4b.c
index c618be0..8112771 100644
--- a/ld/testsuite/ld-size/size-4b.c
+++ b/ld/testsuite/ld-size/size-4b.c
@@ -1,5 +1,5 @@
extern char bar[];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size_1 = &size_of_bar;
static char *bar_size_2 = &size_of_bar;
@@ -17,7 +17,7 @@ bar_size2 (void)
}
extern char foo[];
-extern char size_of_foo asm ("foo@SIZE");
+extern char size_of_foo __asm__ ("foo@SIZE");
char *foo_size_1 = &size_of_foo;
static char *foo_size_2 = &size_of_foo;
diff --git a/ld/testsuite/ld-size/size-5b.c b/ld/testsuite/ld-size/size-5b.c
index a9450a5..097de85 100644
--- a/ld/testsuite/ld-size/size-5b.c
+++ b/ld/testsuite/ld-size/size-5b.c
@@ -1,5 +1,5 @@
extern __thread char bar[];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size_1 = &size_of_bar;
static char *bar_size_2 = &size_of_bar;
@@ -18,7 +18,7 @@ bar_size2 (void)
}
extern __thread char foo[];
-extern char size_of_foo asm ("foo@SIZE");
+extern char size_of_foo __asm__ ("foo@SIZE");
char *foo_size_1 = &size_of_foo;
static char *foo_size_2 = &size_of_foo;
diff --git a/ld/testsuite/ld-size/size-6a.c b/ld/testsuite/ld-size/size-6a.c
index 3946fb1..512e5d04 100644
--- a/ld/testsuite/ld-size/size-6a.c
+++ b/ld/testsuite/ld-size/size-6a.c
@@ -1,7 +1,7 @@
#include <stdio.h>
extern char bar[];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
extern void set_bar (int, int);
int
diff --git a/ld/testsuite/ld-size/size-7a.c b/ld/testsuite/ld-size/size-7a.c
index c415180..396f30a 100644
--- a/ld/testsuite/ld-size/size-7a.c
+++ b/ld/testsuite/ld-size/size-7a.c
@@ -1,6 +1,6 @@
#include <stdio.h>
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
int
main ()
diff --git a/ld/testsuite/ld-size/size-8a.c b/ld/testsuite/ld-size/size-8a.c
index 78c5732..73fe95e 100644
--- a/ld/testsuite/ld-size/size-8a.c
+++ b/ld/testsuite/ld-size/size-8a.c
@@ -1,7 +1,7 @@
#include <stdio.h>
extern __thread char bar[];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
extern void set_bar (int, int);
int
diff --git a/ld/testsuite/ld-size/size-9b.c b/ld/testsuite/ld-size/size-9b.c
index 16890d1..a2a5a0d 100644
--- a/ld/testsuite/ld-size/size-9b.c
+++ b/ld/testsuite/ld-size/size-9b.c
@@ -1,3 +1,3 @@
char bar[10];
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
char *bar_size = &size_of_bar;