Finding BFD bug

Ian Lance Taylor ian@wasabisystems.com
Wed Jun 9 16:48:00 GMT 2004


pladow@pullman.com writes:

> This is a repost of my previous message from my work email.  We do not have 
> control over the disclaimer attachment, so I'm posting from my home email.  I 
> apologize for the extra post.

Thanks for doing that.

> So, since the error didn't appear in the x86 configuration, and only in the
> Microblaze configuration, we are fairly certain the bug is in the
> Microblaze portion of the code.  Most of the code is in the BFD library,
> and surfing around in ld and reading docs it appears that the BFD does the
> bulk of the linking anyhow.
> 
> We reported this to Xilinx, but right now our design is halted waiting for
> a resolution.  We are happy generating our own version of the tools if we
> knew how to fix it.  We are even willing to try and locate the bug ourself,
> but we need a good starting point.
> 
> I'm asking anyone that may have seen this problem before, or one similar,
> could point us in the right direction.  In fact, even if an knowledgeable
> BFD person could point us to where in the BFD this type of linking occurs,
> we would at least know where to look.

This is a more or less typical relocation problem.  BFD's handling of
relocations is poorly designed and basically broken.  Historically
people just workaround the issues.

The problem is most likely in the assembler.  Perhaps the tc_gen_reloc
function needs some tweaks, or perhaps the special howto function
needs work.

To tell just where the problem is requires looking at the contents of
the object file generated by the assembler: the relocation information
and, perhaps, the section contents.  The assembler needs to generate
something which the linker will process correctly.

It's difficult to be more specific without more information.

Ian



More information about the Binutils mailing list