[PATCH] D58681: [llvm-readobj]Fix error messages for bad archive members and add testing for archive handling

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 21:28:28 PST 2019


rupprecht accepted this revision.
rupprecht added inline comments.


================
Comment at: test/tools/llvm-readobj/thin-archive.test:16
+
+# LLVM: File: {{.*}}1.o
+# LLVM: Format: ELF64-x86-64
----------------
Probably not in this patch, but I'd like to see the full filename verified for a thin archive in a nested dir (which I found to be full of errors when dealing with llvm-ar), e.g. something like:

```
$ mkdir -p %t/x/y/z
$ cd %t # So we can invoke ar/readobj with relative paths
$ cp 1.o 2.o 3.o x/y/z
$ rm -f x/%t.a
$ llvm-ar rcT x/%t.a x/y/z/*.o
$ llvm-readobj --file-headers x/%t.a | FileCheck %s

# Full filename should be printed; possibly(?) replacing / with \ on Windows
# (IIRC it's stored as / in the raw archive contents, although readobj may translate that on the fly to \)
CHECK: File: y/z/1.o
...
```


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58681





More information about the llvm-commits mailing list