[PATCH] D56570: [llvm-objcopy] Use SHT_NOTE for added note sections.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 14 10:06:58 PST 2019


rupprecht added inline comments.


================
Comment at: test/tools/llvm-objcopy/ELF/add-note.test:5
+# Add [namesz, descsz, type, name, desc] for a build id.
+# RUN: echo -en "\x04\x00\x00\x00" >  %t-note.bin
+# RUN: echo -en "\x10\x00\x00\x00" >> %t-note.bin
----------------
jhenderson wrote:
> I have a suspicion that I've seen a TODO in lit saying the built-in echo can only handle one switch.
> 
> This is backed up by the fact that the test fails on my Windows machine with an error from llvm-readobj saying that the note overflows its container.
Yes, looks like you're talking about this: https://github.com/llvm/llvm-project/blob/a974b33a10745b528c34f0accbd230b0a4e1fb87/llvm/utils/lit/lit/TestRunner.py#L289

Switch to -e -n. Strange that it doesn't fail on my machine though -- it doesn't seem to be a windows specific limitation, but somehow -en works for me. It looks like lit does have an option to use the local shell (which would explain it), but that is not the default.

I could also check this bit in as a binary file, but I'd prefer this if possible.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56570





More information about the llvm-commits mailing list