Page MenuHomeFreeBSD

D33615.diff
No OneTemporary

D33615.diff

diff --git a/usr.sbin/kldxref/ef_powerpc.c b/usr.sbin/kldxref/ef_powerpc.c
--- a/usr.sbin/kldxref/ef_powerpc.c
+++ b/usr.sbin/kldxref/ef_powerpc.c
@@ -55,7 +55,7 @@
Elf_Off dataoff, size_t len, void *dest)
{
Elf_Addr *where, addend;
- Elf_Size rtype;
+ Elf_Size rtype, symidx;
const Elf_Rela *rela;
if (reltype != EF_RELOC_RELA)
@@ -65,6 +65,7 @@
where = (Elf_Addr *) ((Elf_Off)dest - dataoff + rela->r_offset);
addend = rela->r_addend;
rtype = ELF_R_TYPE(rela->r_info);
+ symidx = ELF_R_SYM(rela->r_info);
if ((char *)where < (char *)dest || (char *)where >= (char *)dest + len)
return (0);
@@ -73,6 +74,9 @@
case R_PPC_RELATIVE: /* word32|doubleword64 B + A */
*where = relbase + addend;
break;
+ case R_PPC64_ADDR64: /* S + A */
+ *where = EF_SYMADDR(ef, symidx) + addend;
+ break;
default:
warnx("unhandled relocation type %" PRI_ELF_SIZE, rtype);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 10:52 PM (20 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15758610
Default Alt Text
D33615.diff (899 B)

Event Timeline