[PATCH] D124266: [lld/elf] fix quote usage in section names

Roger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 07:12:26 PDT 2022


royger added a comment.

Thanks for the review, let me know if you agree with the reply. Will look into using split-file if that's desirable.



================
Comment at: lld/test/ELF/linkerscript/section-quotes.test:19
+  ".text" : AT(ADDR(".text")) {
+    LONG (ALIGNOF(".text"))
+    LONG (LOADADDR(".text"))
----------------
MaskRay wrote:
> Just keep ALIGNOF for .text and keep LOADADDR for .data? That provides sufficient coverage without being too verbose.
The point is to test all possible combinations of quoted section name definition and usage of quotes section names in functions. Hence the tree combinations for .text .data and .bss:

* text: quoted section name used for both definition and as function parameter
* data: section definition not quoted, section parameter in functions quoted.
* bss: section definition quoted, section parameter in functions not quoted.


================
Comment at: lld/test/ELF/linkerscript/section-quotes.test:23
+  }
+  text_size = SIZEOF(".text");
+  .data : AT(ADDR(".data")) {
----------------
MaskRay wrote:
> Unused. Delete
It's unused, but the point (here and in usages below) is to test that the SIZEOF function can correctly deal with quoted and unquoted section names. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124266



More information about the llvm-commits mailing list