diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-08-28 21:32:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-08-28 21:32:56 +0000 |
commit | 669ed638144a784bd7fdea2e922ddf5e85a6b2bc (patch) | |
tree | 8010af69c272d12d3f96342e34533777a47b2bd6 | |
parent | 7f86dfcce9d628c757cf9ea7787d546fb953b2cc (diff) | |
download | glibc-669ed638144a784bd7fdea2e922ddf5e85a6b2bc.zip glibc-669ed638144a784bd7fdea2e922ddf5e85a6b2bc.tar.gz glibc-669ed638144a784bd7fdea2e922ddf5e85a6b2bc.tar.bz2 |
Update.
2002-08-28 Ulrich Drepper <drepper@redhat.com>
* sysdeps/s390/s390-64/dl-machine.h: Avoid unescaped newlines in
string constants.
* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
* sysdeps/arm/dl-machine.h: Likewise.
* sysdeps/cris/dl-machine.h: Likewise.
* sysdeps/unix/sysv/linux/m68k/register-dump.h: Likewise.
* sysdeps/unix/sysv/aix/gettimeofday.c: Likewise.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | sysdeps/arm/dl-machine.h | 355 | ||||
-rw-r--r-- | sysdeps/cris/dl-machine.h | 150 | ||||
-rw-r--r-- | sysdeps/s390/s390-64/dl-machine.h | 12 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/dl-machine.h | 214 | ||||
-rw-r--r-- | sysdeps/unix/sysv/aix/gettimeofday.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/m68k/register-dump.h | 20 |
7 files changed, 392 insertions, 381 deletions
@@ -1,3 +1,13 @@ +2002-08-28 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/s390/s390-64/dl-machine.h: Avoid unescaped newlines in + string constants. + * sysdeps/sparc/sparc32/dl-machine.h: Likewise. + * sysdeps/arm/dl-machine.h: Likewise. + * sysdeps/cris/dl-machine.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/register-dump.h: Likewise. + * sysdeps/unix/sysv/aix/gettimeofday.c: Likewise. + 2002-08-28 Roland McGrath <roland@redhat.com> * Makeconfig (default_cflags): Revert unintended change. diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index aeee1d7..9905d15 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -126,14 +126,15 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) and then redirect to the address it returns. */ // macro for handling PIC situation.... #ifdef PIC -#define CALL_ROUTINE(x) " ldr sl,0f - add sl, pc, sl -1: ldr r2, 2f - mov lr, pc - add pc, sl, r2 - b 3f -0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4 -2: .word " #x "(GOTOFF) +#define CALL_ROUTINE(x) "\ + ldr sl,0f\n\ + add sl, pc, sl\n\ +1: ldr r2, 2f\n\ + mov lr, pc\n\ + add pc, sl, r2\n\ + b 3f\n\ +0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4\n\ +2: .word " #x "(GOTOFF)\n\ 3: " #else #define CALL_ROUTINE(x) " bl " #x @@ -141,114 +142,114 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #ifndef PROF # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ - .text - .globl _dl_runtime_resolve - .type _dl_runtime_resolve, #function - .align 2 -_dl_runtime_resolve: - @ we get called with - @ stack[0] contains the return address from this call - @ ip contains &GOT[n+3] (pointer to function) - @ lr points to &GOT[2] - - @ save almost everything; lr is already on the stack - stmdb sp!,{r0-r3,sl,fp} - - @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each - sub r1, ip, lr - sub r1, r1, #4 - add r1, r1, r1 - - @ get pointer to linker struct - ldr r0, [lr, #-4] - - @ call fixup routine - " CALL_ROUTINE(fixup) " - - @ save the return - mov ip, r0 - - @ restore the stack - ldmia sp!,{r0-r3,sl,fp,lr} - - @ jump to the newly found address - mov pc, ip - - .size _dl_runtime_resolve, .-_dl_runtime_resolve - - .globl _dl_runtime_profile - .type _dl_runtime_profile, #function - .align 2 -_dl_runtime_profile: - @ save almost everything; lr is already on the stack - stmdb sp!,{r0-r3,sl,fp} - - @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each - sub r1, ip, lr - sub r1, r1, #4 - add r1, r1, r1 - - @ get pointer to linker struct - ldr r0, [lr, #-4] - - @ call profiling fixup routine - " CALL_ROUTINE(profile_fixup) " - - @ save the return - mov ip, r0 - - @ restore the stack - ldmia sp!,{r0-r3,sl,fp,lr} - - @ jump to the newly found address - mov pc, ip - - .size _dl_runtime_resolve, .-_dl_runtime_resolve - .previous + .text\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve, #function\n\ + .align 2\n\ +_dl_runtime_resolve:\n\ + @ we get called with\n\ + @ stack[0] contains the return address from this call\n\ + @ ip contains &GOT[n+3] (pointer to function)\n\ + @ lr points to &GOT[2]\n\ +\n\ + @ save almost everything; lr is already on the stack\n\ + stmdb sp!,{r0-r3,sl,fp}\n\ +\n\ + @ prepare to call fixup()\n\ + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ + sub r1, ip, lr\n\ + sub r1, r1, #4\n\ + add r1, r1, r1\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ +\n\ + @ call fixup routine\n\ + " CALL_ROUTINE(fixup) "\n\ +\n\ + @ save the return\n\ + mov ip, r0\n\ +\n\ + @ restore the stack\n\ + ldmia sp!,{r0-r3,sl,fp,lr}\n\ +\n\ + @ jump to the newly found address\n\ + mov pc, ip\n\ +\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ +\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_profile, #function\n\ + .align 2\n\ +_dl_runtime_profile:\n\ + @ save almost everything; lr is already on the stack\n\ + stmdb sp!,{r0-r3,sl,fp}\n\ +\n\ + @ prepare to call fixup()\n\ + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ + sub r1, ip, lr\n\ + sub r1, r1, #4\n\ + add r1, r1, r1\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ +\n\ + @ call profiling fixup routine\n\ + " CALL_ROUTINE(profile_fixup) "\n\ +\n\ + @ save the return\n\ + mov ip, r0\n\ +\n\ + @ restore the stack\n\ + ldmia sp!,{r0-r3,sl,fp,lr}\n\ +\n\ + @ jump to the newly found address\n\ + mov pc, ip\n\ +\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ + .previous\n\ "); #else // PROF # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ - .text - .globl _dl_runtime_resolve - .globl _dl_runtime_profile - .type _dl_runtime_resolve, #function - .type _dl_runtime_profile, #function - .align 2 -_dl_runtime_resolve: -_dl_runtime_profile: - @ we get called with - @ stack[0] contains the return address from this call - @ ip contains &GOT[n+3] (pointer to function) - @ lr points to &GOT[2] - - @ save almost everything; return add is already on the stack - stmdb sp!,{r0-r3,sl,fp} - - @ prepare to call fixup() - @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each - sub r1, ip, lr - sub r1, r1, #4 - add r1, r1, r1 - - @ get pointer to linker struct - ldr r0, [lr, #-4] - - @ call profiling fixup routine - " CALL_ROUTINE(fixup) " - - @ save the return - mov ip, r0 - - @ restore the stack - ldmia sp!,{r0-r3,sl,fp,lr} - - @ jump to the newly found address - mov pc, ip - - .size _dl_runtime_profile, .-_dl_runtime_profile - .previous + .text\n\ + .globl _dl_runtime_resolve\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_resolve, #function\n\ + .type _dl_runtime_profile, #function\n\ + .align 2\n\ +_dl_runtime_resolve:\n\ +_dl_runtime_profile:\n\ + @ we get called with\n\ + @ stack[0] contains the return address from this call\n\ + @ ip contains &GOT[n+3] (pointer to function)\n\ + @ lr points to &GOT[2]\n\ +\n\ + @ save almost everything; return add is already on the stack\n\ + stmdb sp!,{r0-r3,sl,fp}\n\ +\n\ + @ prepare to call fixup()\n\ + @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\ + sub r1, ip, lr\n\ + sub r1, r1, #4\n\ + add r1, r1, r1\n\ +\n\ + @ get pointer to linker struct\n\ + ldr r0, [lr, #-4]\n\ +\n\ + @ call profiling fixup routine\n\ + " CALL_ROUTINE(fixup) "\n\ +\n\ + @ save the return\n\ + mov ip, r0\n\ +\n\ + @ restore the stack\n\ + ldmia sp!,{r0-r3,sl,fp,lr}\n\ +\n\ + @ jump to the newly found address\n\ + mov pc, ip\n\ +\n\ + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ + .previous\n\ "); #endif //PROF @@ -261,70 +262,70 @@ _dl_runtime_profile: its return value is the user program's entry point. */ #define RTLD_START asm ("\ -.text -.globl _start -.globl _dl_start_user -_start: - @ at start time, all the args are on the stack - mov r0, sp - bl _dl_start - @ returns user entry point in r0 -_dl_start_user: - mov r6, r0 - @ we are PIC code, so get global offset table - ldr sl, .L_GET_GOT - add sl, pc, sl -.L_GOT_GOT: - @ Store the highest stack address - ldr r1, .L_STACK_END - ldr r1, [sl, r1] - str sp, [r1] - @ See if we were run as a command with the executable file - @ name as an extra leading argument. - ldr r4, .L_SKIP_ARGS - ldr r4, [sl, r4] - @ get the original arg count - ldr r1, [sp] - @ subtract _dl_skip_args from it - sub r1, r1, r4 - @ adjust the stack pointer to skip them - add sp, sp, r4, lsl #2 - @ get the argv address - add r2, sp, #4 - @ store the new argc in the new stack location - str r1, [sp] - @ compute envp - add r3, r2, r1, lsl #2 - add r3, r3, #4 - - @ now we call _dl_init - ldr r0, .L_LOADED - ldr r0, [sl, r0] - ldr r0, [r0] - @ call _dl_init - bl _dl_init_internal(PLT) - @ clear the startup flag - ldr r2, .L_STARTUP_FLAG - ldr r1, [sl, r2] - mov r0, #0 - str r0, [r1] - @ load the finalizer function - ldr r0, .L_FINI_PROC - ldr r0, [sl, r0] - @ jump to the user_s entry point - mov pc, r6 -.L_GET_GOT: - .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\ -.L_SKIP_ARGS: \n\ - .word _dl_skip_args(GOTOFF) \n\ -.L_STARTUP_FLAG: - .word _dl_starting_up(GOT) -.L_FINI_PROC: - .word _dl_fini(GOT) -.L_STACK_END: - .word __libc_stack_end(GOT) -.L_LOADED: - .word _rtld_local(GOT) +.text\n\ +.globl _start\n\ +.globl _dl_start_user\n\ +_start:\n\ + @ at start time, all the args are on the stack\n\ + mov r0, sp\n\ + bl _dl_start\n\ + @ returns user entry point in r0\n\ +_dl_start_user:\n\ + mov r6, r0\n\ + @ we are PIC code, so get global offset table\n\ + ldr sl, .L_GET_GOT\n\ + add sl, pc, sl\n\ +.L_GOT_GOT:\n\ + @ Store the highest stack address\n\ + ldr r1, .L_STACK_END\n\ + ldr r1, [sl, r1]\n\ + str sp, [r1]\n\ + @ See if we were run as a command with the executable file\n\ + @ name as an extra leading argument.\n\ + ldr r4, .L_SKIP_ARGS\n\ + ldr r4, [sl, r4]\n\ + @ get the original arg count\n\ + ldr r1, [sp]\n\ + @ subtract _dl_skip_args from it\n\ + sub r1, r1, r4\n\ + @ adjust the stack pointer to skip them\n\ + add sp, sp, r4, lsl #2\n\ + @ get the argv address\n\ + add r2, sp, #4\n\ + @ store the new argc in the new stack location\n\ + str r1, [sp]\n\ + @ compute envp\n\ + add r3, r2, r1, lsl #2\n\ + add r3, r3, #4\n\ +\n\ + @ now we call _dl_init\n\ + ldr r0, .L_LOADED\n\ + ldr r0, [sl, r0]\n\ + ldr r0, [r0]\n\ + @ call _dl_init\n\ + bl _dl_init_internal(PLT)\n\ + @ clear the startup flag\n\ + ldr r2, .L_STARTUP_FLAG\n\ + ldr r1, [sl, r2]\n\ + mov r0, #0\n\ + str r0, [r1]\n\ + @ load the finalizer function\n\ + ldr r0, .L_FINI_PROC\n\ + ldr r0, [sl, r0]\n\ + @ jump to the user_s entry point\n\ + mov pc, r6\n\ +.L_GET_GOT:\n\ + .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\ +.L_SKIP_ARGS:\n\ + .word _dl_skip_args(GOTOFF)\n\ +.L_STARTUP_FLAG:\n\ + .word _dl_starting_up(GOT)\n\ +.L_FINI_PROC:\n\ + .word _dl_fini(GOT)\n\ +.L_STACK_END:\n\ + .word __libc_stack_end(GOT)\n\ +.L_LOADED:\n\ + .word _rtld_local(GOT)\n\ .previous\n\ "); diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h index 51ae43d..0fa13a7 100644 --- a/sysdeps/cris/dl-machine.h +++ b/sysdeps/cris/dl-machine.h @@ -129,27 +129,27 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) and the link map in MOF. */ #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ -"; Trampoline for " #fixup_name " - .globl " #tramp_name " - .type " #tramp_name ", @function -" #tramp_name ": - push $r13 - push $r12 - push $r11 - push $r10 - push $r9 - push $srp - move.d [$sp+6*4],$r11 - move $mof,$r10 - " CALL_FN (fixup_name) " - move.d $r10,[$sp+6*4] - pop $srp - pop $r9 - pop $r10 - pop $r11 - pop $r12 - pop $r13 - jump [$sp+] +"; Trampoline for " #fixup_name "\n\ + .globl " #tramp_name "\n\ + .type " #tramp_name ", @function\n\ +" #tramp_name ":\n\ + push $r13\n\ + push $r12\n\ + push $r11\n\ + push $r10\n\ + push $r9\n\ + push $srp\n\ + move.d [$sp+6*4],$r11\n\ + move $mof,$r10\n\ + " CALL_FN (fixup_name) "\n\ + move.d $r10,[$sp+6*4]\n\ + pop $srp\n\ + pop $r9\n\ + pop $r10\n\ + pop $r11\n\ + pop $r12\n\ + pop $r13\n\ + jump [$sp+]\n\ .size " #tramp_name ", . - " #tramp_name "\n" #ifndef PROF #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ @@ -172,60 +172,60 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ its return value is the user program's entry point. */ #define RTLD_START asm ("\ - .text - .globl _start - .type _start,@function -_start: - move.d $sp,$r10 - " CALL_FN (_dl_start) " - /* FALLTHRU */ - - .globl _dl_start_user - .type _dl_start_user,@function -_dl_start_user: - ; Save the user entry point address in R1. - move.d $r10,$r1 - ; Point R0 at the GOT. - move.d $pc,$r0 - sub.d .:GOTOFF,$r0 - ; Remember the highest stack address. - move.d [$r0+__libc_stack_end:GOT16],$r13 - move.d $sp,[$r13] - ; See if we were run as a command with the executable file - ; name as an extra leading argument. - move.d [$r0+_dl_skip_args:GOT16],$r13 - move.d [$r13],$r9 - ; Get the original argument count - move.d [$sp],$r11 - ; Subtract _dl_skip_args from it. - sub.d $r9,$r11 - ; Adjust the stack pointer to skip _dl_skip_args words. - addi $r9.d,$sp - ; Put the new argc in place as expected by the user entry. - move.d $r11,[$sp] - ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) - ; env: skip scaled argc and skip stored argc and NULL at end of argv[]. - move.d $sp,$r13 - addi $r11.d,$r13 - addq 8,$r13 - ; argv: skip stored argc. - move.d $sp,$r12 - addq 4,$r12 - ; main_map: at _dl_loaded. - move.d [$r0+_rtld_local:GOT16],$r9 - move.d [$r9],$r10 - move.d _dl_init_internal:PLTG,$r9 - add.d $r0,$r9 - jsr $r9 - ; Pass our finalizer function to the user in R10. - move.d [$r0+_dl_fini:GOT16],$r10 - ; Terminate the frame-pointer. - moveq 0,$r8 - ; Cause SEGV if user entry returns. - move $r8,$srp - ; Jump to the user's entry point. - jump $r1 - .size _dl_start_user, . - _dl_start_user + .text\n\ + .globl _start\n\ + .type _start,@function\n\ +_start:\n\ + move.d $sp,$r10\n\ + " CALL_FN (_dl_start) "\n\ + /* FALLTHRU */\n\ +\n\ + .globl _dl_start_user\n\ + .type _dl_start_user,@function\n\ +_dl_start_user:\n\ + ; Save the user entry point address in R1.\n\ + move.d $r10,$r1\n\ + ; Point R0 at the GOT.\n\ + move.d $pc,$r0\n\ + sub.d .:GOTOFF,$r0\n\ + ; Remember the highest stack address.\n\ + move.d [$r0+__libc_stack_end:GOT16],$r13\n\ + move.d $sp,[$r13]\n\ + ; See if we were run as a command with the executable file\n\ + ; name as an extra leading argument.\n\ + move.d [$r0+_dl_skip_args:GOT16],$r13\n\ + move.d [$r13],$r9\n\ + ; Get the original argument count\n\ + move.d [$sp],$r11\n\ + ; Subtract _dl_skip_args from it.\n\ + sub.d $r9,$r11\n\ + ; Adjust the stack pointer to skip _dl_skip_args words.\n\ + addi $r9.d,$sp\n\ + ; Put the new argc in place as expected by the user entry.\n\ + move.d $r11,[$sp]\n\ + ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ + ; env: skip scaled argc and skip stored argc and NULL at end of argv[].\n\ + move.d $sp,$r13\n\ + addi $r11.d,$r13\n\ + addq 8,$r13\n\ + ; argv: skip stored argc.\n\ + move.d $sp,$r12\n\ + addq 4,$r12\n\ + ; main_map: at _dl_loaded.\n\ + move.d [$r0+_rtld_local:GOT16],$r9\n\ + move.d [$r9],$r10\n\ + move.d _dl_init_internal:PLTG,$r9\n\ + add.d $r0,$r9\n\ + jsr $r9\n\ + ; Pass our finalizer function to the user in R10.\n\ + move.d [$r0+_dl_fini:GOT16],$r10\n\ + ; Terminate the frame-pointer.\n\ + moveq 0,$r8\n\ + ; Cause SEGV if user entry returns.\n\ + move $r8,$srp\n\ + ; Jump to the user's entry point.\n\ + jump $r1\n\ + .size _dl_start_user, . - _dl_start_user\n\ .previous"); /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h index 95056a8..a4033ee 100644 --- a/sysdeps/s390/s390-64/dl-machine.h +++ b/sysdeps/s390/s390-64/dl-machine.h @@ -148,7 +148,7 @@ _dl_runtime_resolve:\n\ stg 0,0(15)\n\ # load args saved by PLT\n\ lmg 2,3,208(15)\n\ - brasl 14,fixup # call fixup + brasl 14,fixup # call fixup\n\ lgr 1,2 # function addr returned in r2\n\ # restore registers\n\ aghi 15,160\n\ @@ -236,12 +236,12 @@ _dl_start_user:\n\ # Point %r12 at the GOT.\n\ larl %r12,_GLOBAL_OFFSET_TABLE_\n\ # Store the highest stack address\n\ - lghi %r1,__libc_stack_end@GOT + lghi %r1,__libc_stack_end@GOT\n\ lg %r1,0(%r1,%r12)\n\ stg %r15, 0(%r1)\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ - lghi %r1,_dl_skip_args@GOT + lghi %r1,_dl_skip_args@GOT\n\ lg %r1,0(%r1,%r12)\n\ lgf %r1,0(%r1) # load _dl_skip_args\n\ # Get the original argument count.\n\ @@ -262,7 +262,7 @@ _dl_start_user:\n\ # Call the function to run the initializers.\n\ # Load the parameters:\n\ # (%r2, %r3, %r4, %r5) = (_dl_loaded, argc, argv, envp)\n\ - lghi %r2,_rtld_local@GOT + lghi %r2,_rtld_local@GOT\n\ lg %r2,0(%r2,%r12)\n\ lg %r2,0(%r2)\n\ lg %r3,160(%r15)\n\ @@ -270,9 +270,9 @@ _dl_start_user:\n\ lgr %r5,%r3\n\ sllg %r5,%r5,3\n\ la %r5,176(%r5,%r15)\n\ - brasl %r14,_dl_init_internal@PLT\n + brasl %r14,_dl_init_internal@PLT\n\ # Pass our finalizer function to the user in %r14, as per ELF ABI.\n\ - lghi %r14,_dl_fini@GOT + lghi %r14,_dl_fini@GOT\n\ lg %r14,0(%r14,%r12)\n\ # Free stack frame\n\ aghi %r15,160\n\ diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 6977cdc..72258bb 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -205,23 +205,23 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) and then redirect to the address it returns. */ #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \ asm ( "\ - .text - .globl " #tramp_name " - .type " #tramp_name ", @function - .align 32 -" #tramp_name ": - /* Set up the arguments to fixup -- - %o0 = link_map out of plt0 - %o1 = offset of reloc entry - %o2 = return address */ - ld [%o7 + 8], %o0 - srl %g1, 10, %o1 - mov %i7, %o2 - call " #fixup_name " - sub %o1, 4*12, %o1 - jmp %o0 - restore - .size " #tramp_name ", . - " #tramp_name " + .text\n\ + .globl " #tramp_name "\n\ + .type " #tramp_name ", @function\n\ + .align 32\n\ +" #tramp_name ":\n\ + /* Set up the arguments to fixup --\n\ + %o0 = link_map out of plt0\n\ + %o1 = offset of reloc entry\n\ + %o2 = return address */\n\ + ld [%o7 + 8], %o0\n\ + srl %g1, 10, %o1\n\ + mov %i7, %o2\n\ + call " #fixup_name "\n\ + sub %o1, 4*12, %o1\n\ + jmp %o0\n\ + restore\n\ + .size " #tramp_name ", . - " #tramp_name "\n\ .previous") #ifndef PROF @@ -256,96 +256,96 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) its return value is the user program's entry point. */ #define RTLD_START __asm__ ("\ - .text - .globl _start - .type _start, @function - .align 32 -_start: - /* Allocate space for functions to drop their arguments. */ - sub %sp, 6*4, %sp - /* Pass pointer to argument block to _dl_start. */ - call _dl_start - add %sp, 22*4, %o0 - /* FALTHRU */ - .globl _dl_start_user - .type _dl_start_user, @function -_dl_start_user: - /* Load the PIC register. */ -1: call 2f - sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7 -2: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7 - add %l7, %o7, %l7 - /* Save the user entry point address in %l0 */ - mov %o0, %l0 - /* Store the highest stack address. */ - sethi %hi(__libc_stack_end), %g2 - or %g2, %lo(__libc_stack_end), %g2 - ld [%l7 + %g2], %l1 - sethi %hi(_dl_skip_args), %g2 - add %sp, 6*4, %l2 - or %g2, %lo(_dl_skip_args), %g2 - st %l2, [%l1] - /* See if we were run as a command with the executable file name as an - extra leading argument. If so, adjust the contents of the stack. */ - ld [%l7+%g2], %i0 - ld [%i0], %i0 - tst %i0 - beq 3f - ld [%sp+22*4], %i5 /* load argc */ - /* Find out how far to shift. */ - sethi %hi(_dl_argv), %l3 - or %l3, %lo(_dl_argv), %l3 - ld [%l7+%l3], %l3 - sub %i5, %i0, %i5 - ld [%l3], %l4 - sll %i0, 2, %i2 - st %i5, [%sp+22*4] - sub %l4, %i2, %l4 - add %sp, 23*4, %i1 - add %i1, %i2, %i2 - st %l4, [%l3] - /* Copy down argv */ -21: ld [%i2], %i3 - add %i2, 4, %i2 - tst %i3 - st %i3, [%i1] - bne 21b - add %i1, 4, %i1 - /* Copy down env */ -22: ld [%i2], %i3 - add %i2, 4, %i2 - tst %i3 - st %i3, [%i1] - bne 22b - add %i1, 4, %i1 - /* Copy down auxiliary table. */ -23: ld [%i2], %i3 - ld [%i2+4], %i4 - add %i2, 8, %i2 - tst %i3 - st %i3, [%i1] - st %i4, [%i1+4] - bne 23b - add %i1, 8, %i1 - /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp. */ -3: sethi %hi(_rtld_local), %o0 - add %sp, 23*4, %o2 - orcc %o0, %lo(_rtld_local), %o0 - sll %i5, 2, %o3 - ld [%l7+%o0], %o0 - add %o3, 4, %o3 - mov %i5, %o1 - add %o2, %o3, %o3 - call _dl_init_internal - ld [%o0], %o0 - /* Pass our finalizer function to the user in %g1. */ - sethi %hi(_dl_fini), %g1 - or %g1, %lo(_dl_fini), %g1 - ld [%l7+%g1], %g1 - /* Jump to the user's entry point and deallocate the extra stack we got. */ - jmp %l0 - add %sp, 6*4, %sp - .size _dl_start_user, . - _dl_start_user + .text\n\ + .globl _start\n\ + .type _start, @function\n\ + .align 32\n\ +_start:\n\ + /* Allocate space for functions to drop their arguments. */\n\ + sub %sp, 6*4, %sp\n\ + /* Pass pointer to argument block to _dl_start. */\n\ + call _dl_start\n\ + add %sp, 22*4, %o0\n\ + /* FALTHRU */\n\ + .globl _dl_start_user\n\ + .type _dl_start_user, @function\n\ +_dl_start_user:\n\ + /* Load the PIC register. */\n\ +1: call 2f\n\ + sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n\ +2: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n\ + add %l7, %o7, %l7\n\ + /* Save the user entry point address in %l0 */\n\ + mov %o0, %l0\n\ + /* Store the highest stack address. */\n\ + sethi %hi(__libc_stack_end), %g2\n\ + or %g2, %lo(__libc_stack_end), %g2\n\ + ld [%l7 + %g2], %l1\n\ + sethi %hi(_dl_skip_args), %g2\n\ + add %sp, 6*4, %l2\n\ + or %g2, %lo(_dl_skip_args), %g2\n\ + st %l2, [%l1]\n\ + /* See if we were run as a command with the executable file name as an\n\ + extra leading argument. If so, adjust the contents of the stack. */\n\ + ld [%l7+%g2], %i0\n\ + ld [%i0], %i0\n\ + tst %i0\n\ + beq 3f\n\ + ld [%sp+22*4], %i5 /* load argc */\n\ + /* Find out how far to shift. */\n\ + sethi %hi(_dl_argv), %l3\n\ + or %l3, %lo(_dl_argv), %l3\n\ + ld [%l7+%l3], %l3\n\ + sub %i5, %i0, %i5\n\ + ld [%l3], %l4\n\ + sll %i0, 2, %i2\n\ + st %i5, [%sp+22*4]\n\ + sub %l4, %i2, %l4\n\ + add %sp, 23*4, %i1\n\ + add %i1, %i2, %i2\n\ + st %l4, [%l3]\n\ + /* Copy down argv */\n\ +21: ld [%i2], %i3\n\ + add %i2, 4, %i2\n\ + tst %i3\n\ + st %i3, [%i1]\n\ + bne 21b\n\ + add %i1, 4, %i1\n\ + /* Copy down env */\n\ +22: ld [%i2], %i3\n\ + add %i2, 4, %i2\n\ + tst %i3\n\ + st %i3, [%i1]\n\ + bne 22b\n\ + add %i1, 4, %i1\n\ + /* Copy down auxiliary table. */\n\ +23: ld [%i2], %i3\n\ + ld [%i2+4], %i4\n\ + add %i2, 8, %i2\n\ + tst %i3\n\ + st %i3, [%i1]\n\ + st %i4, [%i1+4]\n\ + bne 23b\n\ + add %i1, 8, %i1\n\ + /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp. */\n\ +3: sethi %hi(_rtld_local), %o0\n\ + add %sp, 23*4, %o2\n\ + orcc %o0, %lo(_rtld_local), %o0\n\ + sll %i5, 2, %o3\n\ + ld [%l7+%o0], %o0\n\ + add %o3, 4, %o3\n\ + mov %i5, %o1\n\ + add %o2, %o3, %o3\n\ + call _dl_init_internal\n\ + ld [%o0], %o0\n\ + /* Pass our finalizer function to the user in %g1. */\n\ + sethi %hi(_dl_fini), %g1\n\ + or %g1, %lo(_dl_fini), %g1\n\ + ld [%l7+%g1], %g1\n\ + /* Jump to the user's entry point and deallocate the extra stack we got. */\n\ + jmp %l0\n\ + add %sp, 6*4, %sp\n\ + .size _dl_start_user, . - _dl_start_user\n\ .previous"); static inline Elf32_Addr diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index a0105ae..34a92eb 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -32,12 +32,12 @@ extern int rtc_upper (void); extern int rtc_lower (void); /* Assembler Routines to access the timer registers */ -asm(" -.rtc_upper: mfspr 3,4 # copy RTCU to return register - blr - -.rtc_lower: mfspr 3,5 # copy RTCL to return register - blr +asm("\n\ +.rtc_upper: mfspr 3,4 # copy RTCU to return register\n\ + blr\n\ +\n\ +.rtc_lower: mfspr 3,5 # copy RTCL to return register\n\ + blr\n\ "); /* Get the current time of day and timezone information, diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index ab9a155..bece6d5 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab <schwab@gnu.org>. @@ -51,15 +51,15 @@ static void __attribute__ ((unused)) __dummy__ (void) { - asm (" -catch_segfault: - move.l 12(%%sp),%%a0 - lea %c0(%%a0),%%a0 - /* Clear the first 4 bytes to make it a null fp state, just - in case the handler does return. */ - clr.l (%%a0)+ - movem.l %%d2-%%d7/%%a2-%%a6,(%%a0) - fmovem.x %%fp2-%%fp7,11*4(%%a0) + asm ("\n\ +catch_segfault:\n\ + move.l 12(%%sp),%%a0\n\ + lea %c0(%%a0),%%a0\n\ + /* Clear the first 4 bytes to make it a null fp state, just\n\ + in case the handler does return. */\n\ + clr.l (%%a0)+\n\ + movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\ + fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\ jra real_catch_segfault" : : "n" (offsetof (struct sigcontext, sc_fpstate))); } |