2021-08-07 18:29:59 +08:00
|
|
|
# REQUIRES: zlib, ppc, x86
|
2016-06-24 19:18:44 +08:00
|
|
|
|
|
|
|
# RUN: llvm-mc -compress-debug-sections=zlib -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
2021-08-06 18:29:47 +08:00
|
|
|
# RUN: llvm-mc -compress-debug-sections=zlib -filetype=obj -triple=powerpc64-unknown-unknown %s -o %t-be
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --sections %t | FileCheck -check-prefix=ZLIB %s
|
2021-08-06 18:29:47 +08:00
|
|
|
# RUN: llvm-readobj --sections %t-be | FileCheck -check-prefix=ZLIB %s
|
2016-10-13 06:36:31 +08:00
|
|
|
# ZLIB: Section {
|
|
|
|
# ZLIB: Index: 2
|
|
|
|
# ZLIB: Name: .debug_str
|
|
|
|
# ZLIB-NEXT: Type: SHT_PROGBITS
|
|
|
|
# ZLIB-NEXT: Flags [
|
|
|
|
# ZLIB-NEXT: SHF_COMPRESSED (0x800)
|
|
|
|
# ZLIB-NEXT: SHF_MERGE (0x10)
|
|
|
|
# ZLIB-NEXT: SHF_STRINGS (0x20)
|
|
|
|
# ZLIB-NEXT: ]
|
|
|
|
# ZLIB-NEXT: Address:
|
|
|
|
# ZLIB-NEXT: Offset:
|
|
|
|
# ZLIB-NEXT: Size:
|
|
|
|
# ZLIB-NEXT: Link:
|
|
|
|
# ZLIB-NEXT: Info:
|
2019-04-23 17:30:26 +08:00
|
|
|
# ZLIB-NEXT: AddressAlignment: 8
|
2016-10-13 06:36:31 +08:00
|
|
|
# ZLIB-NEXT: EntrySize: 1
|
|
|
|
# ZLIB-NEXT: }
|
2016-06-24 19:18:44 +08:00
|
|
|
|
2016-10-13 06:36:31 +08:00
|
|
|
# RUN: llvm-mc -compress-debug-sections=zlib-gnu -filetype=obj -triple=x86_64-unknown-linux %s -o %t2
|
2021-08-06 18:29:47 +08:00
|
|
|
# RUN: llvm-mc -compress-debug-sections=zlib-gnu -filetype=obj -triple=powerpc64-unknown-unknown %s -o %t2-be
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --sections %t2 | FileCheck -check-prefix=GNU %s
|
2021-08-06 18:29:47 +08:00
|
|
|
# RUN: llvm-readobj --sections %t2-be | FileCheck -check-prefix=GNU %s
|
2016-10-13 06:36:31 +08:00
|
|
|
# GNU: Section {
|
|
|
|
# GNU: Index: 2
|
|
|
|
# GNU: Name: .zdebug_str
|
|
|
|
# GNU-NEXT: Type: SHT_PROGBITS
|
|
|
|
# GNU-NEXT: Flags [
|
|
|
|
# GNU-NEXT: SHF_MERGE (0x10)
|
|
|
|
# GNU-NEXT: SHF_STRINGS (0x20)
|
|
|
|
# GNU-NEXT: ]
|
|
|
|
# GNU-NEXT: Address:
|
|
|
|
# GNU-NEXT: Offset:
|
|
|
|
# GNU-NEXT: Size:
|
|
|
|
# GNU-NEXT: Link:
|
|
|
|
# GNU-NEXT: Info:
|
|
|
|
# GNU-NEXT: AddressAlignment: 1
|
|
|
|
# GNU-NEXT: EntrySize: 1
|
|
|
|
# GNU-NEXT: }
|
2016-06-24 19:18:44 +08:00
|
|
|
|
2017-10-06 17:46:04 +08:00
|
|
|
# RUN: ld.lld --hash-style=sysv %t -o %t.so -shared
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --sections --section-data %t.so | FileCheck -check-prefix=DATA %s
|
2021-08-06 18:29:47 +08:00
|
|
|
# RUN: ld.lld --hash-style=sysv %t-be -o %t-be.so -shared
|
|
|
|
# RUN: llvm-readobj --sections --section-data %t-be.so | FileCheck -check-prefix=DATA %s
|
2016-06-24 19:18:44 +08:00
|
|
|
|
2017-10-06 17:46:04 +08:00
|
|
|
# RUN: ld.lld --hash-style=sysv %t2 -o %t2.so -shared
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --sections --section-data %t2.so | FileCheck -check-prefix=DATA %s
|
2021-08-06 18:29:47 +08:00
|
|
|
# RUN: ld.lld --hash-style=sysv %t2-be -o %t2-be.so -shared
|
|
|
|
# RUN: llvm-readobj --sections --section-data %t2-be.so | FileCheck -check-prefix=DATA %s
|
2016-10-13 06:36:31 +08:00
|
|
|
|
|
|
|
# DATA: Section {
|
|
|
|
# DATA: Index: 6
|
|
|
|
# DATA: Name: .debug_str
|
|
|
|
# DATA-NEXT: Type: SHT_PROGBITS
|
|
|
|
# DATA-NEXT: Flags [
|
|
|
|
# DATA-NEXT: SHF_MERGE (0x10)
|
|
|
|
# DATA-NEXT: SHF_STRINGS (0x20)
|
|
|
|
# DATA-NEXT: ]
|
|
|
|
# DATA-NEXT: Address: 0x0
|
2019-09-10 20:28:07 +08:00
|
|
|
# DATA-NEXT: Offset:
|
2016-10-13 06:36:31 +08:00
|
|
|
# DATA-NEXT: Size: 69
|
|
|
|
# DATA-NEXT: Link: 0
|
|
|
|
# DATA-NEXT: Info: 0
|
|
|
|
# DATA-NEXT: AddressAlignment: 1
|
2017-11-16 00:56:20 +08:00
|
|
|
# DATA-NEXT: EntrySize: 1
|
2016-10-13 06:36:31 +08:00
|
|
|
# DATA-NEXT: SectionData (
|
2017-10-01 05:28:49 +08:00
|
|
|
# DATA-NEXT: 0000: 6C6F6E67 20756E73 69676E65 6420696E |long unsigned in|
|
|
|
|
# DATA-NEXT: 0010: 7400756E 7369676E 65642063 68617200 |t.unsigned char.|
|
|
|
|
# DATA-NEXT: 0020: 756E7369 676E6564 20696E74 00636861 |unsigned int.cha|
|
|
|
|
# DATA-NEXT: 0030: 72007368 6F727420 756E7369 676E6564 |r.short unsigned|
|
2017-09-30 19:46:26 +08:00
|
|
|
# DATA-NEXT: 0040: 20696E74 00 | int.|
|
2016-10-13 06:36:31 +08:00
|
|
|
# DATA-NEXT: )
|
|
|
|
# DATA-NEXT: }
|
2016-06-24 19:18:44 +08:00
|
|
|
|
|
|
|
.section .debug_str,"MS",@progbits,1
|
|
|
|
.LASF2:
|
|
|
|
.string "short unsigned int"
|
|
|
|
.LASF3:
|
|
|
|
.string "unsigned int"
|
|
|
|
.LASF0:
|
|
|
|
.string "long unsigned int"
|
|
|
|
.LASF8:
|
|
|
|
.string "char"
|
|
|
|
.LASF1:
|
|
|
|
.string "unsigned char"
|