[PATCH] D108328: [lld/test/ELF] Test fetch from archive to resolve undefined symbols in shared libs

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 20 11:40:29 PDT 2021


MaskRay added inline comments.


================
Comment at: lld/test/ELF/undef-in-shared-from-lazy.s:2
+// REQUIRES: x86
+// Build %t1.o with a trivial main function
+// RUN: echo -e ".text\n.globl main\n.type main, at function\nmain:\nret" > %t1.s
----------------
```
# REQUIRES: x86
## Regular comments.
# RUN:
# CHECK: ...
```


================
Comment at: lld/test/ELF/undef-in-shared-from-lazy.s:3
+// Build %t1.o with a trivial main function
+// RUN: echo -e ".text\n.globl main\n.type main, at function\nmain:\nret" > %t1.s
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t1.s -o %t1.o
----------------
Consider `rm -fr %t && split-file %s %t`


================
Comment at: lld/test/ELF/undef-in-shared-from-lazy.s:4
+// RUN: echo -e ".text\n.globl main\n.type main, at function\nmain:\nret" > %t1.s
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t1.s -o %t1.o
+
----------------



================
Comment at: lld/test/ELF/undef-in-shared-from-lazy.s:21
+
+// RUN: ld.lld --entry=main %t1.o %t2.a %t3.so -o %t
+// RUN: llvm-readelf --dyn-symbols %t | FileCheck %s --check-prefix=CHECK-FETCH
----------------
Use `_start` instead of `main`, then you can omit `--entry`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108328



More information about the llvm-commits mailing list