[PATCH] D86142: [LLD] Search archives for non-tentative defintions.

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 09:48:14 PDT 2020


NeHuang added inline comments.


================
Comment at: lld/ELF/InputFiles.cpp:1172
 void ArchiveFile::parse() {
+
   for (const Archive::Symbol &sym : file->symbols())
----------------
nit:  remove the empty line. 


================
Comment at: lld/test/ELF/common-archive-lookup.s:1
+# RUN: llvm-mc -filetype=obj --defsym FOO=1 --defsym COMMON=1 %s -o %t1.o
+# RUN: llvm-mc -filetype=obj --defsym BAR=1 --defsym COMMON=1 %s -o %t2.o
----------------
The test cases are failing on linux and windows in phabricator unit test, are we missing `-triple=powerpc64le` or `-triple=powerpc64` when running `llvm-mc`?


================
Comment at: lld/test/ELF/common-archive-lookup.s:28
+
+# Function defintions which reference 'block'
+.ifdef FOO
----------------
nit: `definitions`


================
Comment at: lld/test/ELF/common-archive-lookup.s:28
+
+# Function defintions which reference 'block'
+.ifdef FOO
----------------
NeHuang wrote:
> nit: `definitions`
nit: missing period.


================
Comment at: lld/test/ELF/common-archive-lookup.s:80
+# An alternate strong defintion of block, in the same file as
+# a different refrenced symbol.
+.ifdef BARANDDATA
----------------
nit: `referenced`


================
Comment at: lld/test/ELF/common-archive-lookup.s:103
+block:
+        .quad   0x0000000000000000              # double 0
+        .quad   0x0000000000000000              # double 0
----------------
Can we remove the comments `#` in block definitions?


================
Comment at: lld/test/ELF/common-archive-lookup.s:158
+
+# Ensure we have used the initalized definition of 'block' instead of a common definition.
+# TEST1:     Disassembly of section .data:
----------------
nit: `initialized` 


================
Comment at: lld/test/ELF/common-archive-lookup.s:160
+# TEST1:     Disassembly of section .data:
+# TEST1:       <block>:
+# TEST1-NEXT:   ...
----------------
nit: `TEST1-LABEL:`


================
Comment at: lld/test/ELF/common-archive-lookup.s:166
+
+# Expecting the strong defintion from the object file, and the defintions from
+# the archive do not interfere.
----------------
nit: `definition` from the object file, and the `definitions` from the archive. 


================
Comment at: lld/test/ELF/common-archive-lookup.s:169
+# TEST2: Disassembly of section .data:
+# TEST2:  <block>:
+# TEST2:    ...
----------------
nit: `TEST2-LABEL:`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86142



More information about the llvm-commits mailing list