Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870913 - sys-boot/mbr-gpt-0.0.1-r1 - /.../x86_64-pc-linux-gnu-ld: boot.elf: error: PHDR segment not covered by LOAD segment
Summary: sys-boot/mbr-gpt-0.0.1-r1 - /.../x86_64-pc-linux-gnu-ld: boot.elf: error: PHD...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-17 17:35 UTC by Toralf Förster
Modified: 2022-12-05 05:24 UTC (History)
0 users

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


Attachments
emerge-info.txt (emerge-info.txt,17.53 KB, text/plain)
2022-09-17 17:35 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,53.81 KB, text/plain)
2022-09-17 17:35 UTC, Toralf Förster
Details
environment (environment,60.93 KB, text/plain)
2022-09-17 17:35 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,10.93 KB, application/x-bzip)
2022-09-17 17:35 UTC, Toralf Förster
Details
sys-boot:mbr-gpt-0.0.1-r1:20220917-163241.log (sys-boot:mbr-gpt-0.0.1-r1:20220917-163241.log,1.93 KB, text/plain)
2022-09-17 17:35 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,16.06 KB, application/x-bzip)
2022-09-17 17:35 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-09-17 17:35:04 UTC
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-boot/mbr-gpt-0.0.1-r1/work/mbr-gpt-0.0.1 ...
make -j4 CC=clang 
clang -Wall -m32 -nostdinc -nostdlib -Wl,-N,-Ttext,0x600 -DRELOC_ADDR=0x600 boot.S -o boot.elf
/usr/bin/x86_64-pc-linux-gnu-ld: boot.elf: error: PHDR segment not covered by LOAD segment
/usr/bin/x86_64-pc-linux-gnu-ld: warning: boot.elf has a LOAD segment with RWX permissions
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-j4-20220917-070004

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-12.2.0 *
clang/llvm (if any):
clang version 15.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
/usr/lib/llvm/15
15.0.0
Python 3.10.7
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.63.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 17.0.4.1_p1 [openjdk-bin-17]
2)	Eclipse Temurin JDK 8.345_p01 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
GNU Make 4.3

  HEAD of ::gentoo
commit 27e349751fc08f79c6f96f84652edf0c93ba9a1f
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Sep 17 14:46:52 2022 +0000

    2022-09-17 14:46:52 UTC

emerge -qpvO sys-boot/mbr-gpt
[ebuild  N    ] sys-boot/mbr-gpt-0.0.1-r1
Comment 1 Toralf Förster gentoo-dev 2022-09-17 17:35:05 UTC
Created attachment 808555 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-09-17 17:35:06 UTC
Created attachment 808558 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-09-17 17:35:08 UTC
Created attachment 808561 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-09-17 17:35:09 UTC
Created attachment 808564 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-09-17 17:35:10 UTC
Created attachment 808567 [details]
sys-boot:mbr-gpt-0.0.1-r1:20220917-163241.log
Comment 6 Toralf Förster gentoo-dev 2022-09-17 17:35:11 UTC
Created attachment 808570 [details]
temp.tar.bz2
Comment 7 Larry the Git Cow gentoo-dev 2022-12-05 05:24:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1de25303bd07f70781ec37d648b62fe7c1d3916

commit f1de25303bd07f70781ec37d648b62fe7c1d3916
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2022-12-05 05:19:25 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2022-12-05 05:24:44 +0000

    sys-boot/mbr-gpt: fix PHDR/LOAD mess
    
    "PHDR segment not covered by LOAD segment", an error meaningless for MBR
    code.
    
    The solution is buried in binutils changelogs: --no-dynamic-linker for
    obscure cases like this.
    
    Reference: https://inbox.sourceware.org/binutils/20200222023739.GB5570@bubble.grove.modra.org/T/#u
    Closes: https://bugs.gentoo.org/870913
    Closes: https://bugs.gentoo.org/709510
    Closes: https://bugs.gentoo.org/722206
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 sys-boot/mbr-gpt/mbr-gpt-0.0.1-r2.ebuild | 69 ++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)