Summary: | libelf doesn't reload section headers after update with ELF_C_WRITE | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Eric McCorkle <emc2> | ||||
Component: | misc | Assignee: | Ed Maste <emaste> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | cem, emaste, jkoshy, kaiw, rgrimes, toolchain | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 228911 | ||||||
Attachments: |
|
Review for fix: https://reviews.freebsd.org/D10486 A commit references this bug: Author: emaste Date: Wed Aug 1 15:55:15 UTC 2018 New revision: 337045 URL: https://svnweb.freebsd.org/changeset/base/337045 Log: libelf: reload section headers after update with ELF_C_WRITE These issues (PR 218860 and PR 218861) are still undergoing additional discussion in the upstream context and there may be additional changes to come. PR: 218860 Submitted by: Eric McCorkle MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10486 Changes: head/contrib/elftoolchain/libelf/elf_update.c A commit references this bug: Author: emaste Date: Fri Aug 31 17:29:25 UTC 2018 New revision: 338411 URL: https://svnweb.freebsd.org/changeset/base/338411 Log: MFC r337045: libelf: reload section headers after update with ELF_C_WRITE These issues (PR 218860 and PR 218861) are still undergoing additional discussion in the upstream context and there may be additional changes to come. PR: 218860 Submitted by: Eric McCorkle Sponsored by: The FreeBSD Foundation (MFC) Changes: _U stable/11/ stable/11/contrib/elftoolchain/libelf/elf_update.c |
Created attachment 182064 [details] Patch to fix the problem The libelf library in base doesn't reload section headers after clearing them when performing an elf_update with ELF_C_WRITE. This is because it fails to clear a flag indicating that the section headers have been loaded. This is fixed with the attached patch.