relocation in _reloc_alpha_got(), and teach RELOC_RELA() to skip R_ALPHA_NONE
relocations (which are just nops used to fill out the relocation table).
Handling R_ALPHA_NONE relocations will be necessary for static PIE support
and it is not inconceivable that ld.so will end up with such relocations
at some point.
ok kurt@
-/* $OpenBSD: archdep.h,v 1.15 2014/11/03 17:50:56 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.16 2014/12/27 13:13:25 kettenis Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
{
if (ELF64_R_TYPE(r->r_info) == RELOC_RELATIVE) {
/* handled by _reloc_alpha_got */
+ } else if (ELF64_R_TYPE(r->r_info) == RELOC_NONE) {
+ /* nothing to do */
} else if (ELF64_R_TYPE(r->r_info) == RELOC_JMP_SLOT) {
Elf64_Addr val = v + s->st_value + r->r_addend -
(Elf64_Addr)(p);
-/* $OpenBSD: rtld_machine.c,v 1.51 2014/04/16 10:52:58 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.52 2014/12/27 13:13:25 kettenis Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
}
relalim = (const Elf_RelA *)((caddr_t)rela + relasz);
for (; rela < relalim; rela++) {
+ if (ELF64_R_TYPE(rela->r_info) != RELOC_RELATIVE)
+ continue;
where = (Elf_Addr *)(relocbase + rela->r_offset);
- /* XXX For some reason I see a few GLOB_DAT relocs here. */
*where += (Elf_Addr)relocbase;
}
}