Skip to content

build: replace ld binary format with objcopy#201

Open
lrisguan wants to merge 1 commit into
SchedMD:masterfrom
lrisguan:fix/mold-linker-compatibility
Open

build: replace ld binary format with objcopy#201
lrisguan wants to merge 1 commit into
SchedMD:masterfrom
lrisguan:fix/mold-linker-compatibility

Conversation

@lrisguan

Copy link
Copy Markdown

Replace ld --format=binary with objcopy to support modern linkers (mold/lld)

The --format=binary flag is a GNU ld extension not supported by mold or lld.

objcopy -I binary -O default

is the POSIX-standard, cross-linker compatible way to embed raw data into ELF objects. This change preserves identical output while enabling builds with alternative linkers.

Signed-off-by: lrisguan <lrisguan@outlook.com>
@lrisguan lrisguan force-pushed the fix/mold-linker-compatibility branch from 71c8b2d to 0bf1fea Compare May 28, 2026 08:36
@mcmult mcmult assigned mcmult and unassigned mcmult Jun 24, 2026
@mcmult mcmult self-requested a review June 24, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants