[llvm-branch-commits] [ELF] Place .lbss/.lrodata/.ldata after .bss (PR #81224)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 9 13:03:52 PST 2024


================
@@ -1124,11 +1127,15 @@ template <class ELFT> void Writer<ELFT>::setReservedSymbolSections() {
   }
 
   if (last) {
-    // _edata points to the end of the last mapped initialized section.
+    // _edata points to the end of the last mapped initialized section before
----------------
MaskRay wrote:

I find that `_etext` needs adjustment and just pushed a commit to fix it.

Hmm. I think splitting this part into a separate PR might be difficult due to the inflexible GitHub PR mechanism.

The test difference is in `lld/test/ELF/x86-64-section-layout.s` below:
```patch
-# CHECK-NEXT: 0000000000205b0a 0 NOTYPE GLOBAL DEFAULT [[#]] (.ldata2) _edata
+# CHECK-NEXT: 0000000000203307 0 NOTYPE GLOBAL DEFAULT [[#]] (.data) _edata
```

https://github.com/llvm/llvm-project/pull/81224


More information about the llvm-branch-commits mailing list