]> granicus.if.org Git - llvm/commit
[llvm-readelf] Fix core note descriptions
authorJordan Rupprecht <rupprecht@google.com>
Mon, 5 Aug 2019 15:43:20 +0000 (15:43 +0000)
committerJordan Rupprecht <rupprecht@google.com>
Mon, 5 Aug 2019 15:43:20 +0000 (15:43 +0000)
commitebb27f6cc936b08f43eb64ef8f536034f340192e
tree44827941efa65c7aa6d4aae3f561e4adb16f0a72
parentcf42753220015624dbaf3bcf0765b9bb31c6f138
[llvm-readelf] Fix core note descriptions

Summary:
Core files have different descriptions for note values. llvm-readelf currently prints the generic note type, which is wrong when using it to read a core file.

To verify the constants/strings, see:
Values: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=75c4fb7e9d7c0f780d635ac305f579546b7b071b;hb=HEAD#l571
Strings: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/readelf.c;h=c31a5c1266b7bb62a485895b01b49e1f832ade35;hb=HEAD#l16881

Note: this does not handle printing the note data for NT_FILE, it just fixes the descriptions.

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: labath, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65608

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367878 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/BinaryFormat/ELF.h
test/tools/llvm-readobj/note-core.test [new file with mode: 0644]
tools/llvm-readobj/ELFDumper.cpp