From: Ulrich Drepper Date: Wed, 27 Aug 1997 19:58:41 +0000 (+0000) Subject: (RTLD_START): Switch back to previous section to avoid confusing the X-Git-Tag: glibc-2.16-ports-merge^2~3432 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0d5b73e055f817d78f2093c1cf302df486881fe;p=platform%2Fupstream%2Fglibc.git (RTLD_START): Switch back to previous section to avoid confusing the compiler. --- diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 746cdd2..e0ba67b 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -243,7 +243,8 @@ _dl_start_user: /* Jump to the user's entry point. */ mov $9, $27 jmp ($9) - .end _dl_start_user"); + .end _dl_start_user +.previous"); /* Nonzero iff TYPE describes relocation of a PLT entry, so PLT entries should not be allowed to define the value. */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 01fc339..75434cd 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -56,21 +56,12 @@ static inline Elf32_Addr elf_machine_load_address (void) { Elf32_Addr addr; - asm (".Lhere: lea .Lhere(%%pc), %0\n" - " sub.l %#.Lhere, %0" + asm ("1: lea 1b(%%pc), %0\n" + " sub.l 1b@GOTPC(%%pc), %0" : "=a" (addr)); return addr; } -/* The `subl' insn above will contain an R_68K_RELATIVE relocation - entry intended to insert the run-time address of the label `.Lhere'. - This will be the first relocation in the text of the dynamic - linker; we skip it to avoid trying to modify read-only text in this - early stage. */ -#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ - ((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \ - (dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela)) - /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ @@ -157,13 +148,16 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \ its return value is the user program's entry point. */ #define RTLD_START asm ("\ -.text -.globl _start -.globl _dl_start_user + .text + .globl _start + .type _start,@function _start: move.l %sp, -(%sp) jbsr _dl_start addq.l #4, %sp + + .globl _dl_start_user + .type _dl_start_user,@function _dl_start_user: | Save the user entry point address in %a4. move.l %d0, %a4 @@ -209,7 +203,9 @@ _dl_start_user: | Initialize %fp with the stack pointer. move.l %sp, %fp | Jump to the user's entry point. - jmp (%a4)"); + jmp (%a4) + .size _dl_start_user, . - _dl_start_user + .previous"); /* Nonzero iff TYPE describes a relocation that should skip the executable when looking up the symbol value. */ diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 6973f76..7ee2e20 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -423,6 +423,7 @@ _dl_runtime_resolve:\n \ move $25, $2\n \ jr $25\n \ .end _dl_runtime_resolve\n \ + .previous\n \ "); /* Mask identifying addresses reserved for the user program, @@ -519,6 +520,7 @@ _dl_start_user:\n\ lw $7, 12($29)\n\ jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT)\ + "\n.previous"\ ); /* The MIPS never uses Elfxx_Rela relocations. */ diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h index e501a25..76981a6 100644 --- a/sysdeps/mips/mips64/dl-machine.h +++ b/sysdeps/mips/mips64/dl-machine.h @@ -423,6 +423,7 @@ _dl_runtime_resolve:\n \ move $25, $2\n \ jr $25\n \ .end _dl_runtime_resolve\n \ + .previous\n \ "); /* Mask identifying addresses reserved for the user program, @@ -514,6 +515,7 @@ _dl_start_user:\n\ ld $7, 3*8($29)\n\ jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT) \ + "\n.previous"\ );