This fixes the https://bugs.llvm.org/show_bug.cgi?id=40980. Previously if string optimization occurred as a result of StringTableBuilder's finalize() method, the size wasn't updated. This hopefully also makes the interaction between sections during finalization processes a bit more clear. Differential revision: https://reviews.llvm.org/D59488 llvm-svn: 356371
29 lines
693 B
Plaintext
29 lines
693 B
Plaintext
# RUN: yaml2obj %s > %t
|
|
# RUN: llvm-objcopy %t %t2
|
|
# RUN: llvm-readobj --sections %t2 | FileCheck %s
|
|
|
|
## Check we have the correct size of the .shstrtab section
|
|
## after the strings tail merge optimization.
|
|
|
|
# CHECK: Name: .shstrtab
|
|
# CHECK-NEXT: Type: SHT_STRTAB
|
|
# CHECK-NEXT: Flags [
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: Address:
|
|
# CHECK-NEXT: Offset:
|
|
# CHECK-NEXT: Size: 36
|
|
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .bar
|
|
Type: SHT_PROGBITS
|
|
Flags: [ ]
|
|
- Name: .foo.bar
|
|
Type: SHT_PROGBITS
|
|
Flags: [ ]
|