[PATCH] D56780: [llvm-objdump] - Dump the archive headers when -all-headers is specified

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 17 06:43:30 PST 2019


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


================
Comment at: test/tools/llvm-objdump/all-headers.test:17
+
+# RUN: yaml2obj %s > %t2
+# RUN: rm -f %t.a
----------------
jhenderson wrote:
> grimar wrote:
> > grimar wrote:
> > > jhenderson wrote:
> > > > Not that it really matters, but I wonder if it would be better to simply copy %t?
> > > I have no preference. Actually, we can even use the existent file twice, what do you think?
> > > (it works, I just tested).
> > > 
> > i.e. with
> > `llvm-ar rcs t.a t1.o t1.o`
> > `llvm-objdump t.a --all-headers`
> > 
> > It then dumps them both as expected:
> > 
> > ```
> > t.a(t1.o):	file format ELF64-x86-64
> > 
> > ...
> > 
> > t.a(t1.o):	file format ELF64-x86-64
> > 
> > ....
> > ```
> > 
> > The name is the same, but since we want to test the headers order, that should be fine I think.
> I'm surprised that that actually works! I'd expect the second "t1.o" to replace the first one. However, I think it would be good to have two differently named members anyway - I've seen bugs in tools where they only use one member's names for everything!
> 
> Copying would probably be a bit faster ;-)
Ok :)


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

https://reviews.llvm.org/D56780





More information about the llvm-commits mailing list