Page MenuHomeFreeBSD

D21755.id62466.diff
No OneTemporary

D21755.id62466.diff

Index: head/sys/amd64/amd64/elf_machdep.c
===================================================================
--- head/sys/amd64/amd64/elf_machdep.c
+++ head/sys/amd64/amd64/elf_machdep.c
@@ -267,7 +267,6 @@
*/
printf("kldload: unexpected R_COPY relocation\n");
return (-1);
- break;
case R_X86_64_GLOB_DAT: /* S */
case R_X86_64_JMP_SLOT: /* XXX need addend + offset */
@@ -279,7 +278,7 @@
break;
case R_X86_64_RELATIVE: /* B + A */
- addr = relocbase + addend;
+ addr = elf_relocaddr(lf, relocbase + addend);
val = addr;
if (*where != val)
*where = val;
Index: head/sys/kern/link_elf.c
===================================================================
--- head/sys/kern/link_elf.c
+++ head/sys/kern/link_elf.c
@@ -1162,6 +1162,9 @@
{
elf_file_t ef;
+ KASSERT(lf->ops->cls == (kobj_class_t)&link_elf_class,
+ ("elf_relocaddr: unexpected linker file %p", lf));
+
ef = (elf_file_t)lf;
if (x >= ef->pcpu_start && x < ef->pcpu_stop)
return ((x - ef->pcpu_start) + ef->pcpu_base);

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 18, 11:52 PM (13 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23834122
Default Alt Text
D21755.id62466.diff (1 KB)

Event Timeline