The create_scn() (create section) function wants to place the new section before .shstrtab section but this section is added to the elf later in the main code. Thus it fails the first time and succeed the second time. I added a check so that if .shstrtab is not present the code still calls the insert_section function.
Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241437
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Thank you for the investigation and patch. I commented on a few minor items, I will update them before committing to svn (i.e., no need to reupload).
contrib/elftoolchain/elfcopy/sections.c | ||
---|---|---|
343 | I'd probably call the new variable sections_added, and we can use C99 bool. | |
443–444 | style(9) wants the /* on its own line, i.e. /* * Like this */ |