This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help needed to track down bug: linking Linux kernel with gold creates unbootable kernel


I am actually working on a similar problem.  The compressed ARM Linux
kernel is not bootable because it assumes entry point is at address 0.
 Unfortunately in script processing we move stuff around and we end up
having a bunch of strings from .rodata input sections in address 0.
Since compressed kernel does not have the ELF file header, there is no
way to specify the correct entry point.  I am working on a fix for
this problem.

-Doug

2010/4/9 Ian Lance Taylor <iant@google.com>:
> Török Edwin <edwintorok@gmail.com> writes:
>
>> I tried to link the Linux kernel with gold.
>> Everything went fine with linking, however after rebooting the kernel
>> wasn't working: it instantly rebooted as soon as I selected it from
>> grub.
>
>> How can I track down what the problem is with gold here?
>> Has anyone encountered a similar issue before (has anyone got a
>> working kernel with gold)?
>
> People have gotten working kernels with gold. ?The kernel and gold
> move in and out of working together. ?The kernel uses several
> extremely obscure and undocumented linker script features. ?As they
> change the linker scripts, the build sometimes stops working.
>
> The usual approach to fixing the bug is to compare the kernel
> generated by GNU ld with the one generated by gold. ?The problem is
> invariably one of the output files generated by a linker script. ?So
> look at those files. ?Look for significant differences in size. ?Look
> at the section headers and look for differences in alignment. ?If that
> doesn't help you may need to figure out what is crashing, but I can't
> help with that.
>
>
>> This is the gold version I am using:
>> GNU gold (GNU Binutils for Debian 2.20.1-system.20100303) 1.9
>
> Use mainline instead. ?There have been quite a few bug fixes since the
> 2.20 release. ?The 2.20 release is fine for most uses, but not for the
> kernel.
>
> Ian
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]