mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
38d4353156
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375361 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
490 B
Plaintext
21 lines
490 B
Plaintext
# RUN: yaml2obj %s > %t
|
|
# RUN: llvm-objcopy -R=.test --keep-section=.test %t %t2
|
|
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
|
|
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .test
|
|
Type: SHT_PROGBITS
|
|
Flags: [ ]
|
|
|
|
# CHECK: SectionHeaderCount: 4
|
|
|
|
# CHECK: Name: .test
|
|
# CHECK: Name: .strtab
|
|
# CHECK: Name: .shstrtab
|