summaryrefslogtreecommitdiffstats
path: root/reloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'reloc.c')
-rw-r--r--reloc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/reloc.c b/reloc.c
index 39016b2..374b495 100644
--- a/reloc.c
+++ b/reloc.c
@@ -22,7 +22,7 @@
bootstrap relocation instead of general-purpose relocation. */
#define RTLD_BOOTSTRAP
-struct link_map
+struct link_map
{
ElfW(Addr) l_addr; /* Current load address */
ElfW(Addr) ll_addr; /* Last load address */
@@ -127,7 +127,7 @@ elf_get_dynamic_info(ElfW(Dyn) *dyn, ElfW(Addr) l_addr,
{
if (! dyn)
return;
-
+
while (dyn->d_tag != DT_NULL)
{
if (dyn->d_tag < DT_NUM)
@@ -142,8 +142,8 @@ elf_get_dynamic_info(ElfW(Dyn) *dyn, ElfW(Addr) l_addr,
assert (! "bad dynamic tag");
++dyn;
}
-
- if (info[DT_PLTGOT] != NULL)
+
+ if (info[DT_PLTGOT] != NULL)
info[DT_PLTGOT]->d_un.d_ptr += l_addr;
if (info[DT_STRTAB] != NULL)
info[DT_STRTAB]->d_un.d_ptr += l_addr;
@@ -194,7 +194,7 @@ elf_dynamic_do_rel (struct link_map *map,
const ElfW(Sym) *const symtab =
(const void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
-
+
for (; r < end; ++r) {
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
(void *) (map->l_addr + r->r_offset));
@@ -221,32 +221,32 @@ void _dl_start(void)
/* Figure out the run-time load address of the dynamic linker itself. */
last_load_address = map.l_addr = elf_machine_load_address();
-
+
/* Read our own dynamic section and fill in the info array. */
map.l_ld = (void *)map.l_addr + elf_machine_dynamic();
elf_get_dynamic_info (map.l_ld, map.l_addr - map.ll_addr, map.l_info);
/* Relocate ourselves so we can do normal function calls and
- * data access using the global offset table.
+ * data access using the global offset table.
*/
#if !ELF_MACHINE_NO_REL
- elf_dynamic_do_rel(&map,
+ elf_dynamic_do_rel(&map,
map.l_info[DT_REL]->d_un.d_ptr,
map.l_info[DT_RELSZ]->d_un.d_val);
if (map.l_info[DT_PLTREL]->d_un.d_val == DT_REL) {
- elf_dynamic_do_rel(&map,
+ elf_dynamic_do_rel(&map,
map.l_info[DT_JMPREL]->d_un.d_ptr,
map.l_info[DT_PLTRELSZ]->d_un.d_val);
}
#endif
#if !ELF_MACHINE_NO_RELA
- elf_dynamic_do_rela(&map,
+ elf_dynamic_do_rela(&map,
map.l_info[DT_RELA]->d_un.d_ptr,
map.l_info[DT_RELASZ]->d_un.d_val);
if (map.l_info[DT_PLTREL]->d_un.d_val == DT_RELA) {
- elf_dynamic_do_rela(&map,
+ elf_dynamic_do_rela(&map,
map.l_info[DT_JMPREL]->d_un.d_ptr,
map.l_info[DT_PLTRELSZ]->d_un.d_val);
}