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

Ian Lance Taylor iant@google.com
Wed Jun 2 14:04:00 GMT 2010


Wenji Huang <wenji.huang@oracle.com> writes:

> On 05/12/2010 01:05 PM, Ian Lance Taylor wrote:
>> Randy Dunlap<randy.dunlap@oracle.com>  writes:
>>
>>> FYI:  a reported modprobe bug when using gold:
>>>    https://bugzilla.kernel.org/show_bug.cgi?id=15466
>>
>> 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
>>
> Hi,
>
> 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
> /*snip*/
> .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.

Thanks for looking into this.

I don't quite understand what you are saying.  Are you saying that
gold is generating __start_builtin_fw as an absolute symbol rather
than as a section relative symbol, and that that is causing the
problem with the kernel?

Ian



More information about the Binutils mailing list