summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-04-24 09:24:59 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-04-24 09:24:59 +0000
commit1d8abd74c4ae9b28035b549345f9f736cdb98c10 (patch)
tree9a534ad59f2ddfc18076a92e3331128d4c5bd2da /ldso
parent1db4be5334a327dde925c73b8d924440257cf487 (diff)
- fixup asm. No object-code changes
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/arm/dl-sysdep.h10
-rw-r--r--ldso/ldso/bfin/dl-inlines.h2
-rw-r--r--ldso/ldso/bfin/dl-syscalls.h2
-rw-r--r--ldso/ldso/bfin/dl-sysdep.h6
-rw-r--r--ldso/ldso/frv/dl-inlines.h2
-rw-r--r--ldso/ldso/frv/dl-syscalls.h2
-rw-r--r--ldso/ldso/frv/dl-sysdep.h2
-rw-r--r--ldso/ldso/frv/elfinterp.c4
-rw-r--r--ldso/ldso/m68k/dl-sysdep.h4
-rw-r--r--ldso/ldso/mips/dl-sysdep.h2
-rw-r--r--ldso/ldso/powerpc/dl-sysdep.h18
-rw-r--r--ldso/ldso/sparc/dl-sysdep.h10
12 files changed, 32 insertions, 32 deletions
diff --git a/ldso/ldso/arm/dl-sysdep.h b/ldso/ldso/arm/dl-sysdep.h
index c5ec891df..65368d296 100644
--- a/ldso/ldso/arm/dl-sysdep.h
+++ b/ldso/ldso/arm/dl-sysdep.h
@@ -77,14 +77,14 @@ elf_machine_dynamic (void)
{
Elf32_Addr dynamic;
#if !defined __thumb__
- asm ("ldr %0, 2f\n"
+ __asm__ ("ldr %0, 2f\n"
"1: ldr %0, [pc, %0]\n"
"b 3f\n"
"2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n"
"3:" : "=r" (dynamic));
#else
int tmp;
- asm (".align 2\n"
+ __asm__ (".align 2\n"
"bx pc\n"
"nop\n"
".arm\n"
@@ -107,16 +107,16 @@ elf_machine_dynamic (void)
static inline Elf32_Addr __attribute__ ((unused))
elf_machine_load_address (void)
{
- extern void __dl_start asm ("_dl_start");
+ extern void __dl_start __asm__ ("_dl_start");
Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
Elf32_Addr pcrel_addr;
#if defined __OPTIMIZE__ && !defined __thumb__
- asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
+ __asm__ ("adr %0, _dl_start" : "=r" (pcrel_addr));
#else
/* A simple adr does not work in Thumb mode because the offset is
negative, and for debug builds may be too large. */
int tmp;
- asm ("adr %1, 1f\n\t"
+ __asm__ ("adr %1, 1f\n\t"
"ldr %0, [%1]\n\t"
"add %0, %0, %1\n\t"
"b 2f\n\t"
diff --git a/ldso/ldso/bfin/dl-inlines.h b/ldso/ldso/bfin/dl-inlines.h
index 18f366873..76ce32dea 100644
--- a/ldso/ldso/bfin/dl-inlines.h
+++ b/ldso/ldso/bfin/dl-inlines.h
@@ -422,7 +422,7 @@ _dl_lookup_address (void const *address)
struct funcdesc_value const *fd;
/* Make sure we don't make assumptions about its alignment. */
- asm ("" : "+r" (address));
+ __asm__ ("" : "+r" (address));
if ((Elf32_Addr)address & 7)
/* It's not a function descriptor. */
diff --git a/ldso/ldso/bfin/dl-syscalls.h b/ldso/ldso/bfin/dl-syscalls.h
index af0b425d3..f9ba79b7c 100644
--- a/ldso/ldso/bfin/dl-syscalls.h
+++ b/ldso/ldso/bfin/dl-syscalls.h
@@ -67,7 +67,7 @@ _dl_mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
if (! _dl_mmap_base)
{
void *stack;
- asm ("mov sp, %0" : "=r" (stack));
+ __asm__ ("mov sp, %0" : "=r" (stack));
_dl_mmap_base = (void *)(((long)stack + 2 * PAGE_SIZE) & -PAGE_SIZE);
retry:
if (((void **)_dl_mmap_base)[0] == _dl_mmap_base
diff --git a/ldso/ldso/bfin/dl-sysdep.h b/ldso/ldso/bfin/dl-sysdep.h
index 38ed51300..8c3a16663 100644
--- a/ldso/ldso/bfin/dl-sysdep.h
+++ b/ldso/ldso/bfin/dl-sysdep.h
@@ -80,7 +80,7 @@ struct funcdesc_ht;
do { \
static const char __attribute__((section(".text"))) __s[] = (S); \
const char *__p, *__scratch; \
- asm ("call 1f;\n1:\n\t" \
+ __asm__ ("call 1f;\n1:\n\t" \
"%1 = RETS;\n\t" \
"%0 = [%3 + 1b@GOT17M4];\n\t" \
"%1 = %1 - %0;\n\t" \
@@ -89,7 +89,7 @@ struct funcdesc_ht;
: "d" (__s), "a" (dl_boot_got_pointer) : "RETS"); \
SEND_STDERR (__p); \
{ int __t; \
- for (__t = 0; __t < 0x1000000; __t++) asm volatile (""); } \
+ for (__t = 0; __t < 0x1000000; __t++) __asm__ __volatile__ (""); } \
} while (0)
#define DL_LOADADDR_TYPE struct elf32_fdpic_loadaddr
@@ -101,7 +101,7 @@ struct funcdesc_ht;
((void(*)(void)) _dl_funcdesc_for ((void*)(ADDR), (LOADADDR).got_value))
#define _dl_stabilize_funcdesc(val) \
- ({ asm ("" : "+m" (*(val))); (val); })
+ ({ __asm__ ("" : "+m" (*(val))); (val); })
#define DL_CALL_FUNC_AT_ADDR(ADDR, LOADADDR, SIGNATURE, ...) \
({ struct funcdesc_value fd = { (void*)(ADDR), (LOADADDR).got_value }; \
diff --git a/ldso/ldso/frv/dl-inlines.h b/ldso/ldso/frv/dl-inlines.h
index 345139696..00ff263ea 100644
--- a/ldso/ldso/frv/dl-inlines.h
+++ b/ldso/ldso/frv/dl-inlines.h
@@ -406,7 +406,7 @@ _dl_lookup_address (void const *address)
struct funcdesc_value const *fd;
/* Make sure we don't make assumptions about its alignment. */
- asm ("" : "+r" (address));
+ __asm__ ("" : "+r" (address));
if ((Elf32_Addr)address & 7)
/* It's not a function descriptor. */
diff --git a/ldso/ldso/frv/dl-syscalls.h b/ldso/ldso/frv/dl-syscalls.h
index 3ece9d85e..ffd59b82d 100644
--- a/ldso/ldso/frv/dl-syscalls.h
+++ b/ldso/ldso/frv/dl-syscalls.h
@@ -53,7 +53,7 @@ _dl_mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
if (! _dl_mmap_base)
{
void *stack;
- asm ("mov sp, %0" : "=r" (stack));
+ __asm__ ("mov sp, %0" : "=r" (stack));
_dl_mmap_base = (void *)(((long)stack + 2 * PAGE_SIZE) & -PAGE_SIZE);
retry:
if (((void **)_dl_mmap_base)[0] == _dl_mmap_base
diff --git a/ldso/ldso/frv/dl-sysdep.h b/ldso/ldso/frv/dl-sysdep.h
index 3efc10118..f72d54a4d 100644
--- a/ldso/ldso/frv/dl-sysdep.h
+++ b/ldso/ldso/frv/dl-sysdep.h
@@ -76,7 +76,7 @@ struct funcdesc_ht;
((void(*)(void)) _dl_funcdesc_for ((void*)(ADDR), (LOADADDR).got_value))
#define _dl_stabilize_funcdesc(val) \
- ({ asm ("" : "+m" (*(val))); (val); })
+ ({ __asm__ ("" : "+m" (*(val))); (val); })
#define DL_CALL_FUNC_AT_ADDR(ADDR, LOADADDR, SIGNATURE, ...) \
({ struct funcdesc_value fd = { (void*)(ADDR), (LOADADDR).got_value }; \
diff --git a/ldso/ldso/frv/elfinterp.c b/ldso/ldso/frv/elfinterp.c
index a6e4d2727..d8714c58e 100644
--- a/ldso/ldso/frv/elfinterp.c
+++ b/ldso/ldso/frv/elfinterp.c
@@ -172,7 +172,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
reloc_addr = (unsigned long *)(intptr_t)
DL_RELOC_ADDR (rpnt->r_offset, tpnt->loadaddr);
- asm ("" : "=r" (reloc_addr_packed) : "0" (reloc_addr));
+ __asm__ ("" : "=r" (reloc_addr_packed) : "0" (reloc_addr));
reloc_type = ELF32_R_TYPE(rpnt->r_info);
symtab_index = ELF32_R_SYM(rpnt->r_info);
symbol_addr = 0;
@@ -238,7 +238,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
= symbol_tpnt->loadaddr.got_value;
else
funcval.got_value = 0;
- asm ("std%I0\t%1, %M0"
+ __asm__ ("std%I0\t%1, %M0"
: "=m" (*(struct funcdesc_value *)reloc_addr)
: "e" (funcval));
break;
diff --git a/ldso/ldso/m68k/dl-sysdep.h b/ldso/ldso/m68k/dl-sysdep.h
index cf1d22004..138cabd41 100644
--- a/ldso/ldso/m68k/dl-sysdep.h
+++ b/ldso/ldso/m68k/dl-sysdep.h
@@ -44,7 +44,7 @@ extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
static inline Elf32_Addr
elf_machine_dynamic (void)
{
- register Elf32_Addr *got asm ("%a5");
+ register Elf32_Addr *got __asm__ ("%a5");
return *got;
}
@@ -54,7 +54,7 @@ static inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr;
- asm ("lea _dl_start(%%pc), %0\n\t"
+ __asm__ ("lea _dl_start(%%pc), %0\n\t"
"sub.l _dl_start@GOT.w(%%a5), %0"
: "=a" (addr));
return addr;
diff --git a/ldso/ldso/mips/dl-sysdep.h b/ldso/ldso/mips/dl-sysdep.h
index d6fc141bb..1e69653b7 100644
--- a/ldso/ldso/mips/dl-sysdep.h
+++ b/ldso/ldso/mips/dl-sysdep.h
@@ -196,7 +196,7 @@ static inline ElfW(Addr)
elf_machine_load_address (void)
{
ElfW(Addr) addr;
- asm (" .set noreorder\n"
+ __asm__ (" .set noreorder\n"
" " STRINGXP (PTR_LA) " %0, 0f\n"
" bltzal $0, 0f\n"
" nop\n"
diff --git a/ldso/ldso/powerpc/dl-sysdep.h b/ldso/ldso/powerpc/dl-sysdep.h
index 44f9c955c..a4a2dd144 100644
--- a/ldso/ldso/powerpc/dl-sysdep.h
+++ b/ldso/ldso/powerpc/dl-sysdep.h
@@ -50,11 +50,11 @@
#define OPCODE_SLWI(ra,rs,sh) OPCODE_RLWINM(ra,rs,sh,0,31-sh)
-#define PPC_DCBST(where) asm volatile ("dcbst 0,%0" : : "r"(where) : "memory")
-#define PPC_SYNC asm volatile ("sync" : : : "memory")
-#define PPC_ISYNC asm volatile ("sync; isync" : : : "memory")
-#define PPC_ICBI(where) asm volatile ("icbi 0,%0" : : "r"(where) : "memory")
-#define PPC_DIE asm volatile ("tweq 0,0")
+#define PPC_DCBST(where) __asm__ __volatile__ ("dcbst 0,%0" : : "r"(where) : "memory")
+#define PPC_SYNC __asm__ __volatile__ ("sync" : : : "memory")
+#define PPC_ISYNC __asm__ __volatile__ ("sync; isync" : : : "memory")
+#define PPC_ICBI(where) __asm__ __volatile__ ("icbi 0,%0" : : "r"(where) : "memory")
+#define PPC_DIE __asm__ __volatile__ ("tweq 0,0")
/* Here we define the magic numbers that this dynamic loader should accept */
@@ -95,13 +95,13 @@ ppc_got (void)
{
Elf32_Addr *got;
#ifdef HAVE_ASM_PPC_REL16
- asm (" bcl 20,31,1f\n"
+ __asm__ (" bcl 20,31,1f\n"
"1:mflr %0\n"
" addis %0,%0,_GLOBAL_OFFSET_TABLE_-1b@ha\n"
" addi %0,%0,_GLOBAL_OFFSET_TABLE_-1b@l\n"
: "=b" (got) : : "lr");
#else
- asm (" bl _GLOBAL_OFFSET_TABLE_-4@local"
+ __asm__ (" bl _GLOBAL_OFFSET_TABLE_-4@local"
: "=l" (got));
#endif
return got;
@@ -130,7 +130,7 @@ elf_machine_load_address (void)
I think this is so that machines that do bl/blr pairing don't
get confused.
- asm ("bcl 20,31,0f ;"
+ __asm__ ("bcl 20,31,0f ;"
"0: mflr 0 ;"
"lis %0,0b@ha;"
"addi %0,%0,0b@l;"
@@ -151,7 +151,7 @@ elf_machine_load_address (void)
the address ourselves. That gives us the following code: */
/* Get address of the 'b _DYNAMIC@local'... */
- asm ("bcl 20,31,0f;"
+ __asm__ ("bcl 20,31,0f;"
"b _DYNAMIC@local;"
"0:"
: "=l"(branchaddr));
diff --git a/ldso/ldso/sparc/dl-sysdep.h b/ldso/ldso/sparc/dl-sysdep.h
index 4ec2c37d9..c3462264f 100644
--- a/ldso/ldso/sparc/dl-sysdep.h
+++ b/ldso/ldso/sparc/dl-sysdep.h
@@ -109,8 +109,8 @@ sparc_mod(unsigned long m, unsigned long p)
invoked from functions that have no GOT references, and thus the compiler
has no obligation to load the PIC register. */
#define LOAD_PIC_REG(PIC_REG) \
-do { register Elf32_Addr pc __asm("o7"); \
- __asm("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t" \
+do { register Elf32_Addr pc __asm__("o7"); \
+ __asm__("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t" \
"call 1f\n\t" \
"add %1, %%lo(_GLOBAL_OFFSET_TABLE_+4), %1\n" \
"1:\tadd %1, %0, %1" \
@@ -123,7 +123,7 @@ do { register Elf32_Addr pc __asm("o7"); \
static inline Elf32_Addr
elf_machine_dynamic (void)
{
- register Elf32_Addr *got asm ("%l7");
+ register Elf32_Addr *got __asm__ ("%l7");
LOAD_PIC_REG (got);
@@ -134,9 +134,9 @@ elf_machine_dynamic (void)
static inline Elf32_Addr
elf_machine_load_address (void)
{
- register Elf32_Addr *pc __asm ("%o7"), *got __asm ("%l7");
+ register Elf32_Addr *pc __asm__ ("%o7"), *got __asm ("%l7");
- __asm ("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t"
+ __asm__ ("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t"
"call 1f\n\t"
" add %1, %%lo(_GLOBAL_OFFSET_TABLE_+4), %1\n\t"
"call _DYNAMIC\n\t"