diff options
Diffstat (limited to 'sysdeps/arm')
-rw-r--r-- | sysdeps/arm/dl-machine.h | 18 | ||||
-rw-r--r-- | sysdeps/arm/frame.h | 4 |
2 files changed, 17 insertions, 5 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 4a7ab3867c..aeee1d7892 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -422,10 +422,20 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, { const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) { -# ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. + This declaration cannot be done when compiling rtld.c + (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the + common defn for _dl_rtld_map, which is incompatible with a + weak decl in the same file. */ +# ifndef SHARED + weak_extern (_dl_rtld_map); +# endif + if (map != &GL(dl_rtld_map)) /* Already done in rtld itself. */ # endif *reloc_addr += map->l_addr; } @@ -434,6 +444,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, return; # endif else +#endif { const Elf32_Sym *const refsym = sym; Elf32_Addr value = RESOLVE (&sym, version, r_type); @@ -483,7 +494,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, # ifndef SHARED weak_extern (_dl_rtld_map); # endif - if (map == &_dl_rtld_map) + if (map == &GL(dl_rtld_map)) /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a binding found in the user program or a loaded library @@ -541,7 +552,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, return; else { - const Elf32_Sym *const refsym = sym; Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h index 2a3f29709f..deb46c0135 100644 --- a/sysdeps/arm/frame.h +++ b/sysdeps/arm/frame.h @@ -1,5 +1,5 @@ /* Definition of stack frame structure. ARM/APCS version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,3 +24,5 @@ struct layout void *__unbounded sp; void *__unbounded return_address; }; + +#define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0)) |