+2003-03-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Define
+ properly for n64.
+ (elf_machine_runtime_setup): Cast link_map pointer to Elf Addr
+ type.
+ (elf_machine_rel, elf_machine_rel_relative): Cast symidx to Elf
+ Word before comparing with gotsym. Take reloc_addr argument as
+ void*. Remove the code added for the compiler to drop any
+ alignment assumptions.
+
2003-03-19 Ulrich Drepper <drepper@redhat.com>
* Makefile (distribute): Add include/atomic.h and bits/atomic.h.
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+#ifdef _ABI64 && _MIPS_SIM == _ABI64
+# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L
+#else
+# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L
+#endif
/* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope
fiddles with global data. */
#endif
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
- ElfW(Addr) *const reloc_addr)
+ /* We use void* because the location to be relocated
+ is not required to be properly aligned for a
+ ELFW(Addr). */
+ void /* ElfW(Addr) */ *const reloc_addr)
{
const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
const ElfW(Word) gotsym
= (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
- if (symidx < gotsym)
+ if ((ElfW(Word))symidx < gotsym)
{
/* This wouldn't work for a symbol imported from other
libraries for which there's no GOT entry, but MIPS
static inline void
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- ElfW(Addr) *const reloc_addr)
+ void /* ElfW(Addr) */ *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
of got[1] of a gnu object is set to identify gnu objects.
Where we can store l for non gnu objects? XXX */
if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
- got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
+ got[1] = ((ElfW(Addr)) l | ELF_MIPS_GNU_GOT1_MASK);
else
_dl_mips_gnu_objects = 0;
}