[all-commits] [llvm/llvm-project] 407f8a: [Hexagon][Driver] Tell llvm-mc about PIC under -fn...

Brian Cain via All-commits all-commits at lists.llvm.org
Mon Sep 28 10:45:51 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 407f8a1f7d1edf096cb9e9ca868916599ad52b4e
      https://github.com/llvm/llvm-project/commit/407f8a1f7d1edf096cb9e9ca868916599ad52b4e
  Author: Brian Cain <brian.cain at oss.qualcomm.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M clang/lib/Driver/ToolChains/Hexagon.cpp
    A clang/test/Driver/hexagon-eh-frame-pic.c
    A llvm/test/MC/Hexagon/eh-frame.s

  Log Message:
  -----------
  [Hexagon][Driver] Tell llvm-mc about PIC under -fno-integrated-as (#213821)

Hexagon picks the .eh_frame FDE pointer encoding from whether the code
is position independent: DW_EH_PE_pcrel if so, DW_EH_PE_absptr otherwise
(MCObjectFileInfo::initELFMCObjectFileInfo). Unlike most targets,
Hexagon uses llvm-mc rather than GNU as for -fno-integrated-as, and the
driver was not passing the PIC setting along. llvm-mc defaults to
non-PIC, so the same source assembled the two ways produced different
unwind tables: the integrated assembler emitted R_HEX_32_PCREL, while
-fno-integrated-as emitted R_HEX_32 with an absptr CIE augmentation.

hexagon-unknown-linux-musl defaults to PIC, so it was the default config
that diverged.

Pass -position-independent to llvm-mc when the relocation model is PIC.
Non-PIC keeps DW_EH_PE_absptr, unchanged.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list