[clang] [Hexagon] Pass -m emulation flag to linker from clang driver (PR #185745)

Brian Cain via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 2 12:49:41 PDT 2026


androm3da wrote:

> ```
> $ ld.eld hw.o && llvm-readelf -l -W a.out 
>   LOAD           **0x001000** 0x00000000 0x00000000 ....
> 
> $ld.eld -mhexagonlinux hw.o && llvm-readelf -l -W a.out
>   LOAD           **0x000000** 0x00000000 0x00000000 ....
> ```
> 
> Can we have a switch such as `-z programheader` that linker can consume to selectively load program headers when linker script is not used ?

I think @quic-seaswara was asking @MaskRay here if this was an appropriate solution for consideration by the linkers.

If that works, then I'll update this PR to use that new switch instead.

https://github.com/llvm/llvm-project/pull/185745


More information about the cfe-commits mailing list