Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602532 - <sys-devel/binutils-2.28: linking linux kernel w/ld.gold fails: ld: internal error in target, at .../gold/parameters.h:105
Summary: <sys-devel/binutils-2.28: linking linux kernel w/ld.gold fails: ld: internal ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/git/gitweb.cgi...
Whiteboard:
Keywords:
: 602808 602834 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-13 10:49 UTC by Steffen Hau
Modified: 2017-09-15 19:25 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2016-12-13 10:49:41 UTC
objdump -h lib/lib.a | sed -ne '/___ksymtab/{s/.*+/EXTERN(/;s/ .*/)/;p}' >lib/.lib-ksyms.o.lds; rm -f lib/.lib_exports.o; ar rcsD lib/.lib_exports.o; ld -m elf_x86_64   -r -o lib/lib-ksyms.o -T lib/.lib-ksyms.o.lds lib/.lib_exports.o; rm lib/.lib_exports.o lib/.lib-ksyms.o.lds
ld: internal error in target, at /home/gentoo/tmp/portage/sys-devel/binutils-2.27/work/binutils-2.27/gold/parameters.h:105
make[1]: *** [scripts/Makefile.build:498: lib/lib-ksyms.o] Error 1

rlated to this commit https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7f2084fa55e6cb61f61b4224d4a8bafaeee55f9f

Please backport https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c13b08dbbcf752480a7621aa1f89bc5440c74c25 or look at https://bugzilla.kernel.org/show_bug.cgi?id=177741
Comment 1 Adrian Bassett 2016-12-13 17:12:42 UTC
(In reply to Steffen Hau from comment #0)
> objdump -h lib/lib.a | sed -ne '/___ksymtab/{s/.*+/EXTERN(/;s/ .*/)/;p}'
> >lib/.lib-ksyms.o.lds; rm -f lib/.lib_exports.o; ar rcsD lib/.lib_exports.o;
> ld -m elf_x86_64   -r -o lib/lib-ksyms.o -T lib/.lib-ksyms.o.lds
> lib/.lib_exports.o; rm lib/.lib_exports.o lib/.lib-ksyms.o.lds
> ld: internal error in target, at
> /home/gentoo/tmp/portage/sys-devel/binutils-2.27/work/binutils-2.27/gold/
> parameters.h:105
> make[1]: *** [scripts/Makefile.build:498: lib/lib-ksyms.o] Error 1
> 
> rlated to this commit
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/
> ?id=7f2084fa55e6cb61f61b4224d4a8bafaeee55f9f
> 
> Please backport
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> h=c13b08dbbcf752480a7621aa1f89bc5440c74c25 or look at
> https://bugzilla.kernel.org/show_bug.cgi?id=177741

The links make it clear but this problem is only with the gold linker and not with ld.bfd so the bug title could be made more specific.  Don't know how to do that ...
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-12-16 08:42:28 UTC
*** Bug 602808 has been marked as a duplicate of this bug. ***
Comment 3 Tomáš Mózes 2016-12-17 01:33:15 UTC
*** Bug 602834 has been marked as a duplicate of this bug. ***
Comment 5 Ooblick 2017-01-07 09:09:17 UTC
gentoo-sources-4.9.1 still not building with gold with the same error:

  EXPORTS lib/lib-ksyms.o
ld: internal error in target, at /tmp/portage/sys-devel/binutils-2.27/work/binutils-2.27/gold/parameters.h:105
make[1]: *** [scripts/Makefile.build:498: lib/lib-ksyms.o] Error 1
Comment 6 Leonardo Ferraguzzi 2017-01-09 09:32:54 UTC
(In reply to Rodrigo Saboya from comment #4)
> Tested with backported patch from
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blobdiff;f=gold/
> gold.cc;h=7b3414f5f918f30f8357b23d3693b260a85bc40a;
> hp=123d79bc17d65a44076896a3580ff3d3053b7d37;
> hb=c13b08dbbcf752480a7621aa1f89bc5440c74c25;
> hpb=d0de53e251ce60057d91536a4c71740b047be040
> 
> Works just fine.

Confirmed.
It just works with sys-devel/binutils-2.27
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2017-09-15 18:47:04 UTC
All versions <2.28.1 are now masked.