* 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>
+
+ * 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.
{
}
-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
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
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
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
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
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;
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
+/* Ensure we get syscall declared. */
+#define _DEFAULT_SOURCE
+
#include <unistd.h>
#include <link.h>
#include <syscall.h>
int foo;
-asm (".hidden foo");
+__asm__ (".hidden foo");
int
_start (void)
#ifndef PROTECTED_UNDEF_TEST
int shared_data = 1;
-asm (".protected shared_data");
+__asm__ (".protected shared_data");
int
shared_func (void)
return 1;
}
-asm (".protected shared_func");
+__asm__ (".protected shared_func");
extern int * shared_data_p ();
typedef int (*func) ();
#ifdef HIDDEN_NORMAL_TEST
int visibility_com;
-asm (".hidden visibility_com");
+__asm__ (".hidden visibility_com");
int
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 ()
}
#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)
#endif
#ifdef HIDDEN_NORMAL_TEST
-asm (".hidden visibility_normal");
+__asm__ (".hidden visibility_normal");
int
visibility_normal ()
#endif
#ifdef HIDDEN_NORMAL_TEST
-asm (".hidden visibility_var_normal");
+__asm__ (".hidden visibility_var_normal");
int visibility_var_normal = 2;
#endif
}
#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 ()
#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 ()
#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)
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__)
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__)
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__)
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__)
{
}
-asm (".symver dwarf_bytesize,dwarf_bytesize@@@ELFUTILS_0.143");
+__asm__ (".symver dwarf_bytesize,dwarf_bytesize@@@ELFUTILS_0.143");
__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 *
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;
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 *
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;
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;
__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;
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;
}
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;
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;
}
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;
#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
#include <stdio.h>
-extern char size_of_bar asm ("bar@SIZE");
+extern char size_of_bar __asm__ ("bar@SIZE");
int
main ()
#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
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;