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

Bug 438056

Summary: sys-firmware/sgabios-0.1_pre8 fails to build with gold: ld: error: load segment overlap [0xc80 -> 0xfff] and [0xc80 -> 0xc80]
Product: Gentoo Linux Reporter: Alexandre Rostovtsev (RETIRED) <tetromino>
Component: [OLD] LibraryAssignee: Doug Goldstein (RETIRED) <cardoe>
Severity: normal CC: esigra, virtualization
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 269315    
Attachments: emerge --info

Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-12 02:25:26 UTC
# binutils-config --linker
 * Setting default linker to for x86_64-pc-linux-gnu-2.22.90 ...                             [ ok ]
# MAKEOPTS=-j1 emerge -1 sgabios
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-firmware/sgabios-0.1_pre8
 * sgabios-0.1_pre8.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                     [ ok ]
 * sgabios-0.1_pre8-bins.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                [ ok ]
>>> Unpacking source...
>>> Unpacking sgabios-0.1_pre8.tar.xz to /var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work
>>> Unpacking sgabios-0.1_pre8-bins.tar.xz to /var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work
>>> Source unpacked in /var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work
>>> Preparing source in /var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work/sgabios-0.1_pre8 ...
 * Applying sgabios-0.1_pre8-makefile.patch ...                                                     [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work/sgabios-0.1_pre8 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work/sgabios-0.1_pre8 ...
make -j1 
rm -f .depend
cc -E -M -Wall -Os -m32 -nostdlib  sgabios.S >.tmpdepend && mv .tmpdepend .depend
touch sgabios.S
cc -Wall -Os -m32 -nostdlib -DBUILD_DATE="\"Fri Oct 12 02:22:48 UTC 2012\"" -DBUILD_SHORT_DATE="\"10/12/12\"" -DBUILD_HOST="\"rook\"" -DBUILD_USER="\"root\""   -c -o sgabios.o sgabios.S
cc -Wall -O2 -o csum8 csum8.c
csum8.c: In function ‘main’:
csum8.c:60:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ld -T rom16.ld -nostdlib  sgabios.o -o sgabios.elf
ld: error: load segment overlap [0xc80 -> 0xfff] and [0xc80 -> 0xc80]
make: *** [sgabios.elf] Error 1
 * ERROR: sys-firmware/sgabios-0.1_pre8 failed (compile phase):
 *   emake failed
 * If you need support, post the output of `emerge --info '=sys-firmware/sgabios-0.1_pre8'`,
 * the complete build log and the output of `emerge -pqv '=sys-firmware/sgabios-0.1_pre8'`.
 * The complete build log is located at '/var/tmp/portage/sys-firmware/sgabios-0.1_pre8/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-firmware/sgabios-0.1_pre8/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work/sgabios-0.1_pre8'
 * S: '/var/tmp/portage/sys-firmware/sgabios-0.1_pre8/work/sgabios-0.1_pre8'

When using ld.bfd as the linker, sgabios builds successfully.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-12 02:27:59 UTC
Created attachment 326344 [details]
emerge --info
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2012-10-12 13:41:32 UTC
Gold doesn't support 16-bit real mode code, which is what a BIOS is, until it does it can't be considered a full replacement to ld.bfd.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2013-06-29 18:27:08 UTC
This is really a dup of bug #438058.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2013-06-30 02:36:43 UTC
The ebuild will now gracefully just use bfd and give a message why gold won't work and point you to the bug.