Problem with objcopy corrupting section names

Eric McCorkle eric at metricspace.net
Wed May 11 03:12:09 UTC 2016


I've been head-down in my boot/loader project (as well as at work), but I've basically confirmed that this is an issue with the tool chain.  I can reproduce it reliably, and I have a workaround.  It seems to manifest when the -j option is used and some sections are omitted.

My changes are pulling the filesystem backend code over from loader into boot, which seemed to add some new sections.

There's a simple enough workaround though (don't omit sections), and I want to keep up my current momentum on this stuff.  I'll circle back around once I've got this project ready for testing.

> On May 4, 2016, at 09:23, Ed Maste <emaste at freebsd.org> wrote:
> 
>> On 2 May 2016 at 18:25, Eric McCorkle <eric at metricspace.net> wrote:
>> 
>> I've run into a weird problem where the section names are seemingly being corrupted for boot1. The process to reproduce this should be simple: just build boot1 and then do objdump -x boot1.efi and you should see that the section names are corrupted.
> 
> This could well be a bug in elfcopy's libpe - it's a new addition to
> the ELF Tool Chain project, and I have not tested it extensively
> outside of the plain boot1.efi and loader.efi. To confirm my
> understanding, this happens with your patched tree, but not stock
> FreeBSD? Also, in what way are they corrupted? It's expected that
> section will be truncated, as the COFF format only supports char[8]
> for the name.
> 
> If you mail me (off-list) a copy of boot1.sym I'll take a look.
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"


More information about the freebsd-hackers mailing list