[all-commits] [llvm/llvm-project] d6e07e: [X86] Treat __ehdr_start as large (#79884)

Arthur Eubanks via All-commits all-commits at lists.llvm.org
Mon Jan 29 14:25:52 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6e07e084511cac56c6e468a444ecbf2de3489b9
      https://github.com/llvm/llvm-project/commit/d6e07e084511cac56c6e468a444ecbf2de3489b9
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/test/CodeGen/X86/code-model-elf.ll

  Log Message:
  -----------
  [X86] Treat __ehdr_start as large (#79884)

The __ehdr_start symbol is added by the linker and points to the ELF
file headers, which can be very far away from text. Treat it as a large
symbol under the medium/large code models. Performance to access
__ehdr_start is almost certainly not important.

There are a couple of other symbols that the linker adds [1], but this
is the most relevant one that may be far away from text.

[1]
https://github.com/llvm/llvm-project/blob/547c395b279a93357082ac06cf3e8fe37ebfc3fe/lld/ELF/Writer.cpp#L226




More information about the All-commits mailing list