[PATCH] D150510: [ELF] x86-64: place .lrodata, .lbss, and .ldata away from code sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 13:27:46 PDT 2023


MaskRay added inline comments.


================
Comment at: lld/ELF/Writer.cpp:895
       rank |= RF_RODATA;
+    // Among PROGBITS sections, place .rodata closer to .text.
+    if (!(osec.flags & SHF_X86_64_LARGE && config->emachine == EM_X86_64))
----------------
peter.smith wrote:
> Do you mean .lrodata in the comment above?
I mean `.rodata` is closer to `.text`. We have `.dynsym ... .lrodata .rodata`, but the comment can probably rewritten in a clearer way.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150510/new/

https://reviews.llvm.org/D150510



More information about the llvm-commits mailing list