This is the mail archive of the
mailing list for the binutils project.
Re: Help needed to track down bug: linking Linux kernel with gold creates unbootable kernel
- From: Ian Lance Taylor <iant at google dot com>
- To: TÃrÃk Edwin <edwintorok at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 09 Apr 2010 15:24:07 -0700
- Subject: Re: Help needed to track down bug: linking Linux kernel with gold creates unbootable kernel
- References: <4BBF7F0B.email@example.com>
TÃrÃk Edwin <firstname.lastname@example.org> 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
> 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