Page MenuHomeFreeBSD

D20852.id59395.diff
No OneTemporary

D20852.id59395.diff

Index: head/contrib/elftoolchain/elfcopy/sections.c
===================================================================
--- head/contrib/elftoolchain/elfcopy/sections.c
+++ head/contrib/elftoolchain/elfcopy/sections.c
@@ -1403,7 +1403,7 @@
struct section *s;
size_t indx, sizehint;
- if (elf_getshstrndx(ecp->ein, &indx) != 0) {
+ if (elf_getshdrstrndx(ecp->ein, &indx) == 0) {
shstrtab = elf_getscn(ecp->ein, indx);
if (shstrtab == NULL)
errx(EXIT_FAILURE, "elf_getscn failed: %s",
@@ -1413,6 +1413,8 @@
elf_errmsg(-1));
sizehint = shdr.sh_size;
} else {
+ /* Clear the error from elf_getshdrstrndx(3). */
+ (void)elf_errno();
sizehint = 0;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 10, 9:24 PM (3 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38667989
Default Alt Text
D20852.id59395.diff (682 B)

Event Timeline