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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 02:08:42 PST 2019


jhenderson marked an inline comment as done.
jhenderson added inline comments.


================
Comment at: test/tools/llvm-readobj/thin-archive.test:16
+
+# LLVM: File: {{.*}}1.o
+# LLVM: Format: ELF64-x86-64
----------------
rupprecht wrote:
> 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
> ...
> ```
Sounds reasonable. I'll take a look. If it's broken, I'll probably just file a bug, unless it's an obvious one-line fix (currently I'm focusing on testing).


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