summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/gnu-notes.test
diff options
context:
space:
mode:
authorgeorgerim <georgerim@gmail.com>2019-10-25 13:03:19 +0300
committergeorgerim <georgerim@gmail.com>2019-10-25 13:25:56 +0300
commitde3cef1d5d33212059164d6095aca5c5b0284001 (patch)
treeba617e1ffe517fbf1622d98b21ef6e5a25a3d659 /llvm/test/tools/llvm-readobj/gnu-notes.test
parent8aa84ad37db7ddbff5c1a2e4ef8ff2a616f1da57 (diff)
downloadbcm5719-llvm-de3cef1d5d33212059164d6095aca5c5b0284001.tar.gz
bcm5719-llvm-de3cef1d5d33212059164d6095aca5c5b0284001.zip
[yaml2obj, obj2yaml] - Add support for SHT_NOTE sections.
SHT_NOTE is the section that consists of namesz, descsz, type, name + padding, desc + padding data. This patch teaches yaml2obj, obj2yaml to dump and parse them. This patch implements the section how it is described here: https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-18048.html Which says: "For 64–bit objects and 32–bit objects, each entry is an array of 4-byte words in the format of the target processor" The official specification is different http://www.sco.com/developers/gabi/latest/ch5.pheader.html#note_section And says: "n 64-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS64), each entry is an array of 8-byte words in the format of the target processor. In 32-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS32), each entry is an array of 4-byte words in the format of the target processor" Since LLVM uses the first, 32-bit way, this patch follows it. Differential revision: https://reviews.llvm.org/D68983
Diffstat (limited to 'llvm/test/tools/llvm-readobj/gnu-notes.test')
-rw-r--r--llvm/test/tools/llvm-readobj/gnu-notes.test12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-readobj/gnu-notes.test b/llvm/test/tools/llvm-readobj/gnu-notes.test
index b3801f59ebf..a625c024b00 100644
--- a/llvm/test/tools/llvm-readobj/gnu-notes.test
+++ b/llvm/test/tools/llvm-readobj/gnu-notes.test
@@ -119,6 +119,7 @@ FileHeader:
Sections:
- Name: .note
Type: SHT_NOTE
+ Notes: []
ShOffset: 0xffff0000
## Test tools report an error if a note section has invalid size
@@ -140,6 +141,7 @@ Sections:
- Name: .note
Type: SHT_NOTE
ShSize: 0xffff0000
+ Notes: []
## Test tools report an error if a note program header has an invalid offset that
## goes past the end of file.
@@ -157,8 +159,9 @@ FileHeader:
Type: ET_CORE
Machine: EM_X86_64
Sections:
- - Name: .note
- Type: SHT_NOTE
+ - Name: .note
+ Type: SHT_NOTE
+ Notes: []
ProgramHeaders:
- Type: PT_NOTE
Offset: 0xffff0000
@@ -181,8 +184,9 @@ FileHeader:
Type: ET_CORE
Machine: EM_X86_64
Sections:
- - Name: .note
- Type: SHT_NOTE
+ - Name: .note
+ Type: SHT_NOTE
+ Notes: []
ProgramHeaders:
- Type: PT_NOTE
FileSize: 0xffff0000
OpenPOWER on IntegriCloud