[ELF][test] Change some tests to use SHF_COMPRESSED instead of legacy .zdebug
authorFangrui Song <i@maskray.me>
Wed, 1 Jun 2022 07:18:54 +0000 (00:18 -0700)
committerFangrui Song <i@maskray.me>
Wed, 1 Jun 2022 07:18:54 +0000 (00:18 -0700)
lld/test/ELF/compressed-debug-input-err.s
lld/test/ELF/gdb-index.s

index 922fcfc..0683a4b 100644 (file)
@@ -1,14 +1,19 @@
-# REQUIRES: zlib, ppc, x86
-
-# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# REQUIRES: zlib
+# RUN: yaml2obj %s -o %t.o
 # RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
 
-# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-unknown %s -o %t-be.o
-# RUN: not ld.lld %t-be.o -o /dev/null -shared 2>&1 | FileCheck %s
-
 ## Check we are able to report zlib uncompress errors.
-# CHECK: error: {{.*}}.o:(.debug_str): uncompress failed: zlib error: Z_DATA_ERROR
+# CHECK: error: {{.*}}.o:(.debug_info): uncompress failed: zlib error: Z_DATA_ERROR
 
-.section .zdebug_str,"MS",@progbits,1
- .ascii "ZLIB"
- .byte 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1
+!ELF
+FileHeader:
+  Class:   ELFCLASS64
+  Data:    ELFDATA2LSB
+  Type:    ET_REL
+  Machine: EM_X86_64
+Sections:
+  - Type:         SHT_PROGBITS
+    Name:         .debug_info
+    Flags:        [ SHF_COMPRESSED ]
+    AddressAlign: 0x04
+    Content:      "010000000000000004000000000000000100000000000000ffff"
index 2b59956..7e72d47 100644 (file)
@@ -14,7 +14,7 @@
 # SECTION-NOT: .debug_gnu_pubnames
 # SECTION-NOT: .debug_gnu_pubtypes
 
-# RUN: llvm-mc -compress-debug-sections=zlib-gnu -filetype=obj -triple=x86_64-pc-linux \
+# RUN: llvm-mc -compress-debug-sections=zlib -filetype=obj -triple=x86_64-pc-linux \
 # RUN:   %p/Inputs/gdb-index.s -o %t2.o
 # RUN: ld.lld --gdb-index %t1.o %t2.o -o %t