Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132560675
D21755.id62466.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21755.id62466.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D21755: Use elf_relocaddr() when handling R_X86_64_RELATIVE relocations.
Attached
Detach File
Event Timeline
Log In to Comment