Summary: | bfd elf.c assertion for multiple relocations to same section | ||
---|---|---|---|
Product: | binutils | Reporter: | Joe Lawrence <joe.lawrence> |
Component: | binutils | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mbenes, nickc |
Priority: | P2 | ||
Version: | 2.23 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | Test binary |
Description
Joe Lawrence
2019-04-15 21:40:06 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a7ba389645d178c43100ec47e513389ae8bf8f93 commit a7ba389645d178c43100ec47e513389ae8bf8f93 Author: Nick Clifton <nickc@redhat.com> Date: Fri Aug 23 13:22:02 2019 +0100 Stop the BFD library from failing when encountering a second set of relocs for the same section. PR 24456 * elf.c (bfd_section_from_shdr): Issue an informative warning message and continue processing other sections after encountering a reloc section for a section which already has other relocs associated with it. Hi Joe, Sorry for dropping this PR. I have now checked in a patch which makes the BFD library generate a more helpful warning message, and then continue processing the rest of the input file. The downside though, is that this patch does not enable processing of the extra reloc section - it is just ignored - but I feel that that is better than just failing outright. % objdump -D livepatch-annotated-sample.ko > /dev/null objdump: livepatch-annotated-sample.ko: warning: multiple relocation sections for section .text found - ignoring all but the first % echo $? 0 I hope that this will suffice for your purposes. Cheers Nick Hi Nick, Thanks for revisiting this one! I can confirm that with the latest master branch, objdump can now process the .ko's that we've generated with multiple section relocations. Even if those follow-up relocations aren't processed, it is very helpful to at least dump assembly, sections, etc. when debugging. Thanks, -- Joe OK, I am going to close this PR. If it turns out that there is a need to process the other reloc sections then this PR can be reopened, or a new one filed. I suspect however that enabling support for them will be difficult, as it is likely to invole a lot of rewriting of the internals of the BFD library. Created attachment 11987 [details]
Test binary
|