git: DragonFly_RELEASE_6_4 efi/loader: Improve the linker script and LDFLAGS
Aaron LI
aly at crater.dragonflybsd.org
Fri Oct 2 05:11:00 PDT 2026
commit ffd4b445811c40b5617e5320cdd34b78dd2ee936
Author: Aaron LI <aly at aaronly.me>
Date: Fri Oct 2 13:14:35 2026 +0800
efi/loader: Improve the linker script and LDFLAGS
* Remove the stale comment of `.hash`, which is empty under the default
`--hash-style=gnu`. The image base is also pinned by
`. = 0; ImageBase = .`.
* Fold the remaining linker-generated PLT sections (`.plt.*` and `.iplt`)
into `.text` so the `objcopy -j .text` can never drop them.
* Add `-Wl,-z,defs` to fail the link if there are unresolved symbols,
instead of generating PLT entries for them.
* Add `-Wl,--no-eh-frame-hdr` to skip generating the `.eh_frame_hdr`
section because it's never copied into the final `loader.efi`
executable. What's worse, the generation sidesteps a bug in
bintuils/bfd that produced the misleading overlapping FDEs error, as
observed in the previous commit.
Assisted-by: DeepSeek-v4.1-flash (with Pi Coding Agent)
Summary of changes:
stand/boot/efi/loader/Makefile | 6 ++++++
stand/boot/efi/loader/arch/x86_64/ldscript.x86_64 | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ffd4b445811c40b5617e5320cdd34b78dd2ee936
--
DragonFly BSD source repository
More information about the Commits
mailing list