gold aarch64 linker error when building Linux kernel |
|||
Issue descriptionVersion: 2016.10.01.110146 OS: Linux What steps will reproduce the problem? Obtain kernel archive from here: https://drive.google.com/a/google.com/file/d/0BwyK862MRTrFTHZ5X3RicU5LaDQ/view?usp=sharing (Sorry for the internal link, this shouldn't be shared externally). tar xf kernel.tgz cd kernel # place toolchain 2016.10.01.110146 in PATH ./build.sh steak What is the expected output? Compilation should run successfully e.g. script should run without error, $? will return 0 What do you see instead? /usr/x86_64-pc-linux-gnu/aarch64-cros-linux-gnu/binutils-bin/2.25.51/ld.gold.real.elf: internal error in fix_errata, at /var/tmp/portage/cross-aarch64 -cros-linux-gnu/binutils-2.25.51-r59/work/binutils-2.25.51/binutils-2.25/gold/aarch64.cc:1960 Please use labels and text to provide additional information. Note this error happens on '2016.06.13.220748' too. This isn't extremely high priority, because we can revert to the bfd linker, but I thought I would bring it up.
,
Oct 25 2016
Luis, Thanks for looking into it. Yes. We can switch to bfd linker for 64-bit kernel. IIRC, there always seems to be more hiccup for gold to link Linux kernel, compared to bfd linker. Why is that?
,
Oct 25 2016
What I remember is that in GCC 4.8 the default linker is was bfd and in GCC 4.9 the default linker was changed to gold. Have you guys updated from GCC 4.8 to GCC 4.9 any time recently?
,
Oct 25 2016
assigning to Rahul. I think we can stay with the workaround until we roll to next version of binutils early next year. But, Can you please verify if this is happening with the version of binutils we are going to roll to? If so, can you file a bug for it on binutils?
,
Oct 25 2016
i don't think the bfd->gold transition was related to the gcc version (unless it happened coincidentally, but i don't think it did)
,
Oct 25 2016
We have been able to use gold in the past for generating vmlinux. Interestingly reversing either one of these patches will cause the issue to go away: https://drive.google.com/a/google.com/file/d/0BwyK862MRTrFVHJOZlVCSlNGcWM/view?usp=sharing https://drive.google.com/a/google.com/file/d/0BwyK862MRTrFanJERV9lSVN2dFk/view?usp=sharing
,
Sep 29 2017
Two things have happened since last update on this issue: -) We changed the default linker in standalone toolchain for aarch64-cros-linux-gnu to be ld.bfd (https://bugs.chromium.org/p/chromium/issues/detail?id=699628). -) We've upgraded to binutils-2.27. I cannot reproduce the linker error any longer. While trying to reproduce, I changed the default linker back to ld.gold, and verified that ld.gold was being used during kernel build. The build works fine. |
|||
►
Sign in to add a comment |
|||
Comment 1 by llozano@chromium.org
, Oct 25 2016