aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mips/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mips/dl-machine.h')
-rw-r--r--sysdeps/mips/dl-machine.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index ce5f0f9..3d83491 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -52,11 +52,6 @@
in l_info array. */
#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
-#if 0
-/* We may need 64k alignment. */
-#define ELF_MACHINE_ALIGN_MASK 0xffff
-#endif
-
/*
* MIPS libraries are usually linked to a non-zero base address. We
* subtract the base address from the address where we map the object
@@ -204,8 +199,13 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
special argument registers t7 ($15) and t8 ($24):
t7 address to return to the caller of the function
t8 index for this function symbol in .dynsym
- to usual c arguments. */
+ to usual c arguments.
+ Other architectures call fixup from dl-runtime.c in
+ _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We
+ have to use our own version because of the way the got section is
+ treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */
+
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
generated by the gnu linker. */ \
@@ -240,6 +240,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
/* Look up the symbol's run-time value. */ \
definer = &symtab[sym_index]; \
\
+ /* FIXME: Handle symbol versioning correctly. */ \
loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \
l->l_scope, R_MIPS_REL32); \
\
@@ -457,7 +458,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Sym) *sym;
int i, n;
const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
-
+ /* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */
#define RESOLVE_GOTSYM(sym) \
({ \
const ElfW(Sym) *ref = sym; \
@@ -523,7 +524,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
}
/* Set up the loaded object described by L so its stub function
- will jump to the on-demand fixup code in dl-runtime.c. */
+ will jump to the on-demand fixup code __dl_runtime_resolve. */
static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)