Failed to build linux-2.6.34-rc5 when CONFIG_RELOCATABLE=y using gold

Wenji Huang
Wed Jun 2 09:26:00 GMT 2010

On 05/12/2010 01:05 PM, Ian Lance Taylor wrote:
> Randy Dunlap<>  writes:
>> FYI:  a reported modprobe bug when using gold:
> Thanks for letting me know about these issues.
> Unfortunately, there is essentially nothing I can do to fix it.  I
> have neither the time nor the expertise to debug kernel problems.  If
> people familiar with the kernel can pin down the difference between
> what GNU ld and gold are doing, such that gold causes a failure, that
> would be extremely helpful.  The differences tend to be due to
> undocumented linker script behaviour or disagreements about alignment.
> Ian

I made some tests, found the clue. The absolute symbol seems from the 
following combination. For example,

The declaration and reference:

extern struct builtin_fw __start_builtin_fw[];
for (b_fw = __start_builtin_fw; b_fw != __end_builtin_fw; b_fw++)

But the definition is in linker script.

  . = ALIGN(((1 << 12))); .rodata
.builtin_fw : AT(ADDR(.builtin_fw) - 0xC0000000) { __start_builtin_fw = 
.; *(.builtin_fw) __end_builtin_fw = .; }

Once we removed the reference of __start_builtin_fw, it won't exist in
absolute symbol table. I don't understand how gold will deal with the
case and fix it either.


More information about the Binutils mailing list