Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 607974

Summary: =sys-kernel/hardened-sources-4.8.17-r2: build fails with gold linker
Product: Gentoo Linux Reporter: Michael Orlitzky <mjo>
Component: Current packagesAssignee: Anthony Basile <blueness>
Status: RESOLVED WONTFIX    
Severity: normal CC: hardened, kernel, pageexec, ss23
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=623566
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: gold-build.log
kernel-config.txt

Description Michael Orlitzky gentoo-dev 2017-02-02 03:17:02 UTC
Created attachment 462184 [details]
gold-build.log

I have my ld set to ld.gold usually, and I've noticed this failure before but ignored it:

  ...
    CC      init/calibrate.o
    CC      init/init_task.o
    LD      init/built-in.o
  ld: error: init/mounts.o: multiple definition of '__rap_hash_shmem_init'

It happens on both my desktop and laptop, both ~amd64. Build log and kernel config attached.
Comment 1 Michael Orlitzky gentoo-dev 2017-02-02 03:17:37 UTC
Created attachment 462186 [details]
kernel-config.txt
Comment 2 Michael Orlitzky gentoo-dev 2017-11-12 03:35:45 UTC
I moved this issue to the minipli sources, since that's probably where I'll wind up eventually:

https://github.com/minipli/linux-unofficial_grsec/issues/12
Comment 3 Michael Orlitzky gentoo-dev 2018-01-30 00:40:33 UTC
For the record, this turned out to be a linker issue. The gold linker was rejecting multiple symbols that shared the same absolute value, and has been patched to accept them:

https://sourceware.org/ml/binutils/2017-11/msg00543.html