]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Hmm. Perhaps all those top-level pieces of assembly weren't such a
authorJulian Seward <jseward@acm.org>
Fri, 18 Nov 2005 23:50:43 +0000 (23:50 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 18 Nov 2005 23:50:43 +0000 (23:50 +0000)
clever idea.  There's no reason to assume the assembler is in
.text-mode when it encounters them, and as gcc 2.96 rudely
demonstrates, sometimes it isn't.  So put .text in front of all of
them.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5202

coregrind/m_main.c
coregrind/m_signals.c
coregrind/m_syscall.c
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c

index 94345ec6a672a9ebfb6811a26a8f9db45ffb2433..71bd0e2e24de62eef5d701ccd9d3a03afd787b6a 100644 (file)
@@ -2785,6 +2785,7 @@ void* memset(void *s, int c, size_t n) {
    the new stack.  */
 #if defined(VGP_x86_linux)
 asm("\n"
+    ".text\n"
     "\t.globl _start\n"
     "\t.type _start,@function\n"
     "_start:\n"
@@ -2803,6 +2804,7 @@ asm("\n"
 );
 #elif defined(VGP_amd64_linux)
 asm("\n"
+    ".text\n"
     "\t.globl _start\n"
     "\t.type _start,@function\n"
     "_start:\n"
@@ -2819,6 +2821,7 @@ asm("\n"
 );
 #elif defined(VGP_ppc32_linux)
 asm("\n"
+    ".text\n"
     "\t.globl _start\n"
     "\t.type _start,@function\n"
     "_start:\n"
index 438262dde73f46f8ffdde3abfe0cb00379b59229..272887f6a515fbfebf3323904f22c5539ae568f1 100644 (file)
@@ -397,16 +397,19 @@ extern void my_sigreturn(void);
 
 #if defined(VGP_x86_linux)
 #  define _MYSIG(name) \
+   ".text\n" \
    "my_sigreturn:\n" \
    "   movl    $" #name ", %eax\n" \
    "   int     $0x80\n"
 #elif defined(VGP_amd64_linux)
 #  define _MYSIG(name) \
+   ".text\n" \
    "my_sigreturn:\n" \
    "   movq    $" #name ", %rax\n" \
    "   syscall\n"
 #elif defined(VGP_ppc32_linux)
 #  define _MYSIG(name) \
+   ".text\n" \
    "my_sigreturn:\n" \
    "   li      0, " #name "\n" \
    "   sc\n"
index 58b031229e5ab6736a02e36db62fad2deeb89a3a..084604c9974749fbdb4c7eedcc9d0070a253bb8b 100644 (file)
@@ -111,6 +111,7 @@ extern UWord do_syscall_WRK (
           UWord a4, UWord a5, UWord a6
        );
 asm(
+".text\n"
 "do_syscall_WRK:\n"
 "      push    %esi\n"
 "      push    %edi\n"
@@ -149,6 +150,7 @@ extern UWord do_syscall_WRK (
           UWord a4, UWord a5, UWord a6
        );
 asm(
+".text\n"
 "do_syscall_WRK:\n"
         /* Convert function calling convention --> syscall calling
            convention */
@@ -179,6 +181,7 @@ extern ULong do_syscall_WRK (
           UWord a4, UWord a5, UWord a6
        );
 asm(
+".text\n"
 "do_syscall_WRK:\n"
 "        mr      0,3\n"
 "        mr      3,4\n"
index 42fccbd323837a971114578fd10c9ff902610b5e..dd64dedfb41b8768706b78bd68d73a27103deb14 100644 (file)
@@ -70,6 +70,7 @@ void ML_(call_on_new_stack_0_1) ( Addr stack,
 // %rdx == f
 // %rcx == arg1
 asm(
+".text\n"
 ".globl vgModuleLocal_call_on_new_stack_0_1\n"
 "vgModuleLocal_call_on_new_stack_0_1:\n"
 "   movq   %rdi, %rsp\n"   // set stack
@@ -134,7 +135,7 @@ Long do_syscall_clone_amd64_linux ( Word (*fn)(void *),
                                     Long* parent_tid, 
                                     vki_modify_ldt_t * );
 asm(
-"\n"
+".text\n"
 "do_syscall_clone_amd64_linux:\n"
         // set up child stack, temporarily preserving fn and arg
 "       subq    $16, %rsi\n"            // make space on stack
index d95836abb4e9f6aecb1383486de1b191bfee1e83..a6160f088f9287862fc8beb3c10774b1e1c6698a 100644 (file)
@@ -70,6 +70,7 @@ void ML_(call_on_new_stack_0_1) ( Addr stack,
 //    r5 = f
 //    r6 = arg1
 asm(
+".text\n"
 ".globl vgModuleLocal_call_on_new_stack_0_1\n"
 "vgModuleLocal_call_on_new_stack_0_1:\n"
 "   mr    %r1,%r3\n\t"     // stack to %sp
@@ -151,7 +152,7 @@ ULong do_syscall_clone_ppc32_linux ( Word (*fn)(void *),
                                      Int*  parent_tid, 
                                      vki_modify_ldt_t * );
 asm(
-"\n"
+".text\n"
 "do_syscall_clone_ppc32_linux:\n"
 "       stwu    1,-32(1)\n"
 "       stw     29,20(1)\n"
index d9b0583944ec806bea84014c8b2d499d8f846d80..d65ece209e41e40164b9cb1a53c9990a262c714a 100644 (file)
@@ -78,6 +78,7 @@ void ML_(call_on_new_stack_0_1) ( Addr stack,
 // 12(%esp) == f
 // 16(%esp) == arg1
 asm(
+".text\n"
 ".globl vgModuleLocal_call_on_new_stack_0_1\n"
 "vgModuleLocal_call_on_new_stack_0_1:\n"
 "   movl %esp, %esi\n"     // remember old stack pointer
@@ -136,7 +137,7 @@ Int do_syscall_clone_x86_linux ( Word (*fn)(void *),
                                  Int*  parent_tid, 
                                  vki_modify_ldt_t * );
 asm(
-"\n"
+".text\n"
 "do_syscall_clone_x86_linux:\n"
 "        push    %ebx\n"
 "        push    %edi\n"