[PATCH] D79270: [test] Fix lld's ELF/linkerscript/thunk-gen-mips.s

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 2 14:50:49 PDT 2020


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


================
Comment at: lld/test/ELF/linkerscript/thunk-gen-mips.s:18
 # CHECK: SYMBOL TABLE:
-# CHECK-ANY: 00000000         .text           00000000 _start
-# CHECK-ANY: 0010000c l     F .text           00000010 __LA25Thunk_too_far
-# CHECK-ANY: 00100020 g     F .text           00000024 too_far
+# Ideally we'd use [[#%x, START_ADDR:<0x100000]] if it was supported by
+# FileCheck.
----------------
MaskRay wrote:
> What does `[[#%x, START_ADDR:<0x100000]]` mean?
> 
> s/was/were/ I think
It is not supported by FileCheck yet but the syntax for numeric expression was designed to allow for it. The meaning would be:

Match an lower case hex number (%x) that is less in value than 0x100000 and assign its value to START_ADDR. But reading the testcase again it is clear the address of __start does not matter but only the offset of the 2 other symbols relative to it. Therefore I'm going to remove the 0x30 and just set START_ADDR to whatever is the address of __start unconditionally.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79270





More information about the llvm-commits mailing list