This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Failed to build linux-2.6.34-rc5 when CONFIG_RELOCATABLE=y using gold
- From: Ian Lance Taylor <iant at google dot com>
- To: wenji dot huang at oracle dot com
- Cc: Randy Dunlap <randy dot dunlap at oracle dot com>, binutils at sourceware dot org, elena Zannoni <elena dot zannoni at oracle dot com>, "VAN HEES\,KRIS" <kris dot van dot hees at oracle dot com>
- Date: Wed, 02 Jun 2010 07:04:07 -0700
- Subject: Re: Failed to build linux-2.6.34-rc5 when CONFIG_RELOCATABLE=y using gold
- References: <4BCD6951.9010609@oracle.com> <4BDFDB9B.7000402@oracle.com> <4BE98D66.5070709@oracle.com> <mcrmxw5iuan.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <4C062369.8010508@oracle.com>
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