yann@1: * sysdeps/i386/dl-machine.h (RTLD_START): Don't use multi-line yann@1: strings. yann@1: (ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. yann@1: yann@1: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.82&r2=1.83&cvsroot=glibc&hideattic=0 yann@1: backported a bit yann@1: yann@1: --- glibc-2.1.3/sysdeps/i386/dl-machine.h.old 1999-02-20 10:19:47.000000000 -0800 yann@1: +++ glibc-2.1.3/sysdeps/i386/dl-machine.h 2004-03-05 15:56:25.000000000 -0800 yann@1: @@ -124,68 +124,68 @@ yann@1: and then redirect to the address it returns. */ yann@1: #ifndef PROF yann@1: # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ yann@1: - .text yann@1: - .globl _dl_runtime_resolve yann@1: - .type _dl_runtime_resolve, @function yann@1: - .align 16 yann@1: -_dl_runtime_resolve: yann@1: - pushl %eax # Preserve registers otherwise clobbered. yann@1: - pushl %ecx yann@1: - pushl %edx yann@1: - movl 16(%esp), %edx # Copy args pushed by PLT in register. Note yann@1: - movl 12(%esp), %eax # that `fixup' takes its parameters in regs. yann@1: - call fixup # Call resolver. yann@1: - popl %edx # Get register content back. yann@1: - popl %ecx yann@1: - xchgl %eax, (%esp) # Get %eax contents end store function address. yann@1: - ret $8 # Jump to function address. yann@1: - .size _dl_runtime_resolve, .-_dl_runtime_resolve yann@1: - yann@1: - .globl _dl_runtime_profile yann@1: - .type _dl_runtime_profile, @function yann@1: - .align 16 yann@1: -_dl_runtime_profile: yann@1: - pushl %eax # Preserve registers otherwise clobbered. yann@1: - pushl %ecx yann@1: - pushl %edx yann@1: - movl 20(%esp), %ecx # Load return address yann@1: - movl 16(%esp), %edx # Copy args pushed by PLT in register. Note yann@1: - movl 12(%esp), %eax # that `fixup' takes its parameters in regs. yann@1: - call profile_fixup # Call resolver. yann@1: - popl %edx # Get register content back. yann@1: - popl %ecx yann@1: - xchgl %eax, (%esp) # Get %eax contents end store function address. yann@1: - ret $8 # Jump to function address. yann@1: - .size _dl_runtime_profile, .-_dl_runtime_profile yann@1: - .previous yann@1: + .text\n\ yann@1: + .globl _dl_runtime_resolve\n\ yann@1: + .type _dl_runtime_resolve, @function\n\ yann@1: + .align 16\n\ yann@1: +_dl_runtime_resolve:\n\ yann@1: + pushl %eax # Preserve registers otherwise clobbered.\n\ yann@1: + pushl %ecx\n\ yann@1: + pushl %edx\n\ yann@1: + movl 16(%esp), %edx # Copy args pushed by PLT in register. Note\n\ yann@1: + movl 12(%esp), %eax # that `fixup' takes its parameters in regs.\n\ yann@1: + call fixup # Call resolver.\n\ yann@1: + popl %edx # Get register content back.\n\ yann@1: + popl %ecx\n\ yann@1: + xchgl %eax, (%esp) # Get %eax contents end store function address.\n\ yann@1: + ret $8 # Jump to function address.\n\ yann@1: + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ yann@1: +\n\ yann@1: + .globl _dl_runtime_profile\n\ yann@1: + .type _dl_runtime_profile, @function\n\ yann@1: + .align 16\n\ yann@1: +_dl_runtime_profile:\n\ yann@1: + pushl %eax # Preserve registers otherwise clobbered.\n\ yann@1: + pushl %ecx\n\ yann@1: + pushl %edx\n\ yann@1: + movl 20(%esp), %ecx # Load return address\n\ yann@1: + movl 16(%esp), %edx # Copy args pushed by PLT in register. Note\n\ yann@1: + movl 12(%esp), %eax # that `fixup' takes its parameters in regs.\n\ yann@1: + call profile_fixup # Call resolver.\n\ yann@1: + popl %edx # Get register content back.\n\ yann@1: + popl %ecx\n\ yann@1: + xchgl %eax, (%esp) # Get %eax contents end store function address.\n\ yann@1: + ret $8 # Jump to function address.\n\ yann@1: + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ yann@1: + .previous\n\ yann@1: "); yann@1: #else yann@1: -# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ yann@1: - .text yann@1: - .globl _dl_runtime_resolve yann@1: - .globl _dl_runtime_profile yann@1: - .type _dl_runtime_resolve, @function yann@1: - .type _dl_runtime_profile, @function yann@1: - .align 16 yann@1: -_dl_runtime_resolve: yann@1: -_dl_runtime_profile: yann@1: - pushl %eax # Preserve registers otherwise clobbered. yann@1: - pushl %ecx yann@1: - pushl %edx yann@1: - movl 16(%esp), %edx # Push the arguments for `fixup' yann@1: - movl 12(%esp), %eax yann@1: - pushl %edx yann@1: - pushl %eax yann@1: - call fixup # Call resolver. yann@1: - popl %edx # Pop the parameters yann@1: - popl %ecx yann@1: - popl %edx # Get register content back. yann@1: - popl %ecx yann@1: - xchgl %eax, (%esp) # Get %eax contents end store function address. yann@1: - ret $8 # Jump to function address. yann@1: - .size _dl_runtime_resolve, .-_dl_runtime_resolve yann@1: - .size _dl_runtime_profile, .-_dl_runtime_profile yann@1: - .previous yann@1: +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\ yann@1: + .text\n\ yann@1: + .globl _dl_runtime_resolve\n\ yann@1: + .globl _dl_runtime_profile\n\ yann@1: + .type _dl_runtime_resolve, @function\n\ yann@1: + .type _dl_runtime_profile, @function\n\ yann@1: + .align 16\n\ yann@1: +_dl_runtime_resolve:\n\ yann@1: +_dl_runtime_profile:\n\ yann@1: + pushl %eax # Preserve registers otherwise clobbered.\n\ yann@1: + pushl %ecx\n\ yann@1: + pushl %edx\n\ yann@1: + movl 16(%esp), %edx # Push the arguments for `fixup'\n\ yann@1: + movl 12(%esp), %eax\n\ yann@1: + pushl %edx\n\ yann@1: + pushl %eax\n\ yann@1: + call fixup # Call resolver.\n\ yann@1: + popl %edx # Pop the parameters\n\ yann@1: + popl %ecx\n\ yann@1: + popl %edx # Get register content back.\n\ yann@1: + popl %ecx\n\ yann@1: + xchgl %eax, (%esp) # Get %eax contents end store function address.\n\ yann@1: + ret $8 # Jump to function address.\n\ yann@1: + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ yann@1: + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ yann@1: + .previous\n\ yann@1: "); yann@1: #endif yann@1: yann@1: @@ -197,10 +197,10 @@ yann@1: The C function `_dl_start' is the real entry point; yann@1: its return value is the user program's entry point. */ yann@1: yann@1: -#define RTLD_START asm ("\ yann@1: -.text\n\ yann@1: -.globl _start\n\ yann@1: -.globl _dl_start_user\n\ yann@1: +#define RTLD_START asm ("\n\ yann@1: + .text\n\ yann@1: + .globl _start\n\ yann@1: + .globl _dl_start_user\n\ yann@1: _start:\n\ yann@1: pushl %esp\n\ yann@1: call _dl_start\n\ yann@1: @@ -208,7 +208,7 @@ yann@1: _dl_start_user:\n\ yann@1: # Save the user entry point address in %edi.\n\ yann@1: movl %eax, %edi\n\ yann@1: - # Point %ebx at the GOT. yann@1: + # Point %ebx at the GOT.\n\ yann@1: call 0f\n\ yann@1: 0: popl %ebx\n\ yann@1: addl $_GLOBAL_OFFSET_TABLE_+[.-0b], %ebx\n\ yann@1: @@ -255,7 +255,7 @@ yann@1: movl _dl_fini@GOT(%ebx), %edx\n\ yann@1: # Jump to the user's entry point.\n\ yann@1: jmp *%edi\n\ yann@1: -.previous\n\ yann@1: + .previous\n\ yann@1: "); yann@1: yann@1: /* Nonzero iff TYPE should not be allowed to resolve to one of