diff options
author | Petr Hosek <phosek@chromium.org> | 2017-04-05 18:55:50 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-04-05 18:55:50 +0000 |
commit | 02185c04b2334d962c2a8918c16cf3d5182c5fbb (patch) | |
tree | 207a124fd7600e13c7493973c375610e1a1d715b /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 9ac2cc7812b1dcfe0b9a27c1627822c4b5cacfe1 (diff) | |
download | llvm-02185c04b2334d962c2a8918c16cf3d5182c5fbb.zip llvm-02185c04b2334d962c2a8918c16cf3d5182c5fbb.tar.gz llvm-02185c04b2334d962c2a8918c16cf3d5182c5fbb.tar.bz2 |
[llvm-readobj] Only print the real size of the note
Note payloads are padded to a multiple of 4 bytes in size, but the size
of the string that should be print can be smaller e.g. the n_descsz
field in gold's version note is 9, so that's the whole size of the
string that should be printed. The padding is part of the format of a
SHT_NOTE section or PT_NOTE segment, but it's not part of the note
itself.
Printing the extra null bytes may confuse some tools, e.g. when the
llvm-readobj is sent to grep, it treats the output as binary because
it contains a null byte.
Differential Revision: https://reviews.llvm.org/D30804
llvm-svn: 299576
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions