This is the mail archive of the 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

TÃrÃk Edwin <> 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


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