Page MenuHomeFreeBSD

D46891.id144175.diff
No OneTemporary

D46891.id144175.diff

diff --git a/lib/libkldelf/ef_aarch64.c b/lib/libkldelf/ef_aarch64.c
--- a/lib/libkldelf/ef_aarch64.c
+++ b/lib/libkldelf/ef_aarch64.c
@@ -71,9 +71,18 @@
addr = EF_SYMADDR(ef, symidx) + addend;
le64enc(where, addr);
break;
+ case R_AARCH64_TSTBR14:
+ case R_AARCH64_CONDBR19:
+ case R_AARCH64_JUMP26:
+ case R_AARCH64_CALL26:
+ case R_AARCH64_GLOB_DAT:
+ case R_AARCH64_JUMP_SLOT:
+ case R_AARCH64_IRELATIVE:
+ /* NOP for now */
+ break;
default:
warnx("unhandled relocation type %d", (int)rtype);
- break;
+ return (EOPNOTSUPP);
}
return (0);
}
diff --git a/lib/libkldelf/ef_amd64.c b/lib/libkldelf/ef_amd64.c
--- a/lib/libkldelf/ef_amd64.c
+++ b/lib/libkldelf/ef_amd64.c
@@ -104,8 +104,16 @@
addr = relbase + addend;
le64enc(where, addr);
break;
+ case R_X86_64_PC32: /* S + A - P */
+ case R_X86_64_PLT32: /* L + A - P, L is PLT location for
+ the symbol, which we treat as S */
+ case R_X86_64_JMP_SLOT: /* XXX need addend + offset */
+ case R_X86_64_IRELATIVE:
+ /* NOP for now */
+ break;
default:
warnx("unhandled relocation type %d", (int)rtype);
+ return (EOPNOTSUPP);
}
return (0);
}
diff --git a/lib/libkldelf/ef_arm.c b/lib/libkldelf/ef_arm.c
--- a/lib/libkldelf/ef_arm.c
+++ b/lib/libkldelf/ef_arm.c
@@ -85,8 +85,12 @@
addr = relbase + addend;
le32enc(where, addr);
break;
+ case R_ARM_JUMP_SLOT:
+ /* NOP for now */
+ break;
default:
warnx("unhandled relocation type %d", (int)rtype);
+ return (EOPNOTSUPP);
}
return (0);
}
diff --git a/lib/libkldelf/ef_i386.c b/lib/libkldelf/ef_i386.c
--- a/lib/libkldelf/ef_i386.c
+++ b/lib/libkldelf/ef_i386.c
@@ -88,8 +88,14 @@
addr = EF_SYMADDR(ef, symidx);
le32enc(where, addr);
break;
+ case R_386_PC32:
+ case R_386_JMP_SLOT:
+ case R_386_IRELATIVE:
+ /* NOP for now */
+ break;
default:
warnx("unhandled relocation type %d", (int)rtype);
+ return (EOPNOTSUPP);
}
return (0);
}
diff --git a/lib/libkldelf/ef_powerpc.c b/lib/libkldelf/ef_powerpc.c
--- a/lib/libkldelf/ef_powerpc.c
+++ b/lib/libkldelf/ef_powerpc.c
@@ -86,8 +86,13 @@
else
be64enc(where, addr);
break;
+ case R_PPC_JMP_SLOT:
+ case R_PPC_IRELATIVE:
+ /* NOP for now */
+ break;
default:
warnx("unhandled relocation type %d", (int)rtype);
+ return (EOPNOTSUPP);
}
return (0);
}
diff --git a/lib/libkldelf/ef_riscv.c b/lib/libkldelf/ef_riscv.c
--- a/lib/libkldelf/ef_riscv.c
+++ b/lib/libkldelf/ef_riscv.c
@@ -76,8 +76,20 @@
addr = relbase + addend;
le64enc(where, addr);
break;
+ case R_RISCV_JUMP_SLOT:
+ case R_RISCV_JAL:
+ case R_RISCV_CALL:
+ case R_RISCV_PCREL_HI20:
+ case R_RISCV_PCREL_LO12_I:
+ case R_RISCV_PCREL_LO12_S:
+ case R_RISCV_HI20:
+ case R_RISCV_LO12_I:
+ case R_RISCV_LO12_S:
+ /* NOP for now */
+ break;
default:
warnx("unhandled relocation type %d", (int)rtype);
+ return (EOPNOTSUPP);
}
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 7:20 PM (20 h, 52 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15885596
Default Alt Text
D46891.id144175.diff (2 KB)

Event Timeline