diff options
| author | Paul Semel <semelpaul@gmail.com> | 2018-07-23 18:49:04 +0000 |
|---|---|---|
| committer | Paul Semel <semelpaul@gmail.com> | 2018-07-23 18:49:04 +0000 |
| commit | 1dbbfba888b350dd10af61cb8f42ef3f78abf1a1 (patch) | |
| tree | cb83be0d38ee1a96fdf2461c942985dd17dc3d3d /llvm/test/tools | |
| parent | 3810b23ffa628d692d6d445c6b097a5b20fa9966 (diff) | |
| download | bcm5719-llvm-1dbbfba888b350dd10af61cb8f42ef3f78abf1a1.tar.gz bcm5719-llvm-1dbbfba888b350dd10af61cb8f42ef3f78abf1a1.zip | |
[yaml2obj] Add default sh_entsize for dynamic sections
Dynamic section holds a table, so the sh_entsize might be set. As the
dynamic section entry size never changes, we can default it to the size
of a dynamic entry.
Differential Revision: https://reviews.llvm.org/D49619
llvm-svn: 337725
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/yaml2obj/dynamic-section.yaml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/tools/yaml2obj/dynamic-section.yaml b/llvm/test/tools/yaml2obj/dynamic-section.yaml new file mode 100644 index 00000000000..39da5c1f6f0 --- /dev/null +++ b/llvm/test/tools/yaml2obj/dynamic-section.yaml @@ -0,0 +1,17 @@ +# Ensures that dynamic section has sh_entsize correctly set +# RUN: yaml2obj %s -o %t +# RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=SECTION + +!ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_DYN + Machine: EM_X86_64 +Sections: + - Name: .dynamic + Type: SHT_DYNAMIC + Flags: [ SHF_ALLOC, SHF_WRITE ] + +# SECTION: Name: .dynamic +# SECTION: EntrySize: 16 |

