[all-commits] [llvm/llvm-project] 432493: [X86] Use "l" prefix for data sections under mediu...

aeubanks via All-commits all-commits at lists.llvm.org
Wed May 31 12:31:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 43249378da67319906cf04f2c6cd38df141f3bf6
      https://github.com/llvm/llvm-project/commit/43249378da67319906cf04f2c6cd38df141f3bf6
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2023-05-31 (Wed, 31 May 2023)

  Changed paths:
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/Target/TargetMachine.cpp
    A llvm/test/CodeGen/X86/code-model-elf-sections.ll

  Log Message:
  -----------
  [X86] Use "l" prefix for data sections under medium/large code model

And also set the SHF_X86_64_LARGE section flag.

gcc only uses the "l" prefix and SHF_X86_64_LARGE in the medium code model for data larger than -mlarge-data-threshold. But it seems more consistent to use it in the large code model as well in case separate parts of the binary aren't compiled with the large code model and also have a .data/.bss/.rodata section.

Reviewed By: MaskRay, tkoeppe

Differential Revision: https://reviews.llvm.org/D148836




More information about the All-commits mailing list