New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658957 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

gold aarch64 linker error when building Linux kernel

Project Member Reported by bcf@chromium.org, Oct 25 2016

Issue description

Version: 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.
 
Cc: cmt...@chromium.org rahulchaudhry@chromium.org
cmtice@ was the linker default changed to gold? I think you encountered a similar problem a few weeks ago.

wzhong@ bcf@ I think the solution is to make sure you use bfd for the kernel. Add -fuse_ld=bfd

Thanks for bringing this up.

Comment 2 by wzhong@chromium.org, 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?

Comment 3 by cmt...@chromium.org, 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?
Owner: rahulchaudhry@chromium.org
Status: assigned (was: Untriaged)
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? 

Comment 5 by vapier@chromium.org, 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)

Comment 6 by bcf@chromium.org, 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
Status: WontFix (was: Assigned)
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