[clang] [Hexagon] Pass -m emulation flag to linker from clang driver (PR #185745)
Shankar Easwaran via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 3 12:35:00 PDT 2026
quic-seaswara wrote:
@MaskRay
Sorry—this was easily noticeable in the output.
We are using ld.eld here, and ld.eld defaults to a bare‑metal configuration. This default exists because our customers primarily target bare‑metal use cases, and the Hexagon binaries we use for testing typically do not rely on linker scripts or expect program headers to be loaded by default.
However, to test against Hexagon Linux, we do need program headers to be loaded so they can be inspected at runtime.
Given this requirement, could we introduce a flag such as -z programheader? When specified, this flag would instruct ELD to load program headers even when no linker script is used.
With this approach, we can support Hexagon Linux testing without introducing a separate Hexagon Linux emulation mode.
https://github.com/llvm/llvm-project/pull/185745
More information about the cfe-commits
mailing list