[PATCH] D74736: [ELF] Ignore the maximum of input section alignments for two cases

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 14:07:46 PST 2020


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: lld/ELF/Writer.cpp:2220
+    cmd->alignExpr = [align = cmd->alignment]() { return align; };
+    if (!cmd->addrExpr) {
       // Prefer advancing to align(dot, maxPageSize) + dot%maxPageSize to avoid
----------------
I don't want to use early return to change the indentation of the large code block below.


================
Comment at: lld/test/ELF/linkerscript/outsections-addr.s:86
 #CHECK:    ]
-#CHECK:    Address: 0x5010
-#CHECK:    Offset: 0x4010
-#CHECK:    Size: 8
+#CHECK:    Address: 0x5001
+#CHECK:    Offset: 0x4001
----------------
I can do a follow-up change to change the llvm-readobj test to use llvm-readelf.

`llvm-readobj -S` output is very hard to read.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74736





More information about the llvm-commits mailing list