[Bug 232176] elftoolchain elfcopy/strip incorrectly strips relocations
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Oct 11 13:49:45 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232176
--- Comment #2 from Ed Maste <emaste at freebsd.org> ---
In fact it's even worse; from filter_reloc():
for(i = 0; (uint64_t)i < n; i++) {
if (s->type == SHT_REL) {
if (gelf_getrel(id, i, &rel) != &rel)
errx(EXIT_FAILURE, "gelf_getrel failed: %s",
elf_errmsg(-1));
} else {
if (gelf_getrela(id, i, &rela) != &rela)
errx(EXIT_FAILURE, "gelf_getrel failed: %s",
elf_errmsg(-1));
}
name = elf_strptr(ecp->ein, elf_ndxscn(ecp->strtab->is),
GELF_R_SYM(rel.r_info));
rel.r_info is uninitialized if s->type == SHT_RELA.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list