[all-commits] [llvm/llvm-project] ec1e3a: [BOLT] Update LSDA encoding for x86-64 large code ...

Farid Zakaria via All-commits all-commits at lists.llvm.org
Thu Apr 16 00:34:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec1e3aef9a153d71441fe7214151272929b066e1
      https://github.com/llvm/llvm-project/commit/ec1e3aef9a153d71441fe7214151272929b066e1
  Author: Farid Zakaria <fmzakari at fb.com>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M bolt/include/bolt/Core/BinaryContext.h
    M bolt/lib/Core/BinaryContext.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp
    M bolt/lib/Utils/CommandLineOpts.cpp
    A bolt/test/X86/lsda-encoding.s

  Log Message:
  -----------
  [BOLT] Update LSDA encoding for x86-64 large code model (#190685)

BOLT hardcoded 4-byte LSDA (exception table) encoding for x86-64. This
is insufficient for large code model binaries where functions in .ltext
sections may be placed at addresses above 2GB, exceeding the range of
DW_EH_PE_udata4/DW_EH_PE_sdata4 encodings.

Detect large code model by checking for .ltext sections
(SHF_X86_64_LARGE) and update LSDAEncoding to use 8-byte pointers:
- Non-PIC: DW_EH_PE_absptr (8-byte absolute)
- PIC: DW_EH_PE_pcrel | DW_EH_PE_sdata8 (8-byte PC-relative)

This was pulled out from
https://github.com/llvm/llvm-project/pull/190637



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