mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
cb7a47f782
This patch tries to resolve problems faced in D68943 and uses some of the code written by Konrad Wilhelm Kleine in that patch. Previously, yaml2obj tool always created a .symtab section. This patch changes that. With it we only create it when have a "Symbols:" tag in the YAML document or when we need to create it because it is used by another section(s). obj2yaml follows the new behavior and does not print "Symbols:" anymore when there is no symbol table. Differential revision: https://reviews.llvm.org/D69041 llvm-svn: 375361
27 lines
840 B
Plaintext
27 lines
840 B
Plaintext
# RUN: yaml2obj %s -o %t
|
|
# RUN: not llvm-readelf --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=GNU
|
|
# RUN: not llvm-readobj --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=LLVM
|
|
|
|
# GNU: ELF Header:
|
|
# GNU: Section header string table index: 255
|
|
# GNU-NEXT: There are 3 section headers, starting at offset 0x58:
|
|
# GNU: Section Headers:
|
|
# GNU-NEXT: [Nr] Name
|
|
# GNU-EMPTY:
|
|
# GNU-NEXT: error: '[[FILE]]': section header string table index 255 does not exist
|
|
|
|
# LLVM: ElfHeader {
|
|
# LLVM: StringTableSectionIndex: 255
|
|
# LLVM-NEXT: }
|
|
# LLVM-NEXT: Sections [
|
|
# LLVM-EMPTY:
|
|
# LLVM-NEXT: error: '[[FILE]]': section header string table index 255 does not exist
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
SHStrNdx: 0xFF
|