[llvm] 857138b - [Test] Consolidate crel test coverage into existing file and remove redundant test. (#142644)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 14:27:48 PDT 2025


Author: Zequan Wu
Date: 2025-06-03T14:27:45-07:00
New Revision: 857138b3bd4ab54cf509b32de2f4a94cde0685cb

URL: https://github.com/llvm/llvm-project/commit/857138b3bd4ab54cf509b32de2f4a94cde0685cb
DIFF: https://github.com/llvm/llvm-project/commit/857138b3bd4ab54cf509b32de2f4a94cde0685cb.diff

LOG: [Test] Consolidate crel test coverage into existing file and remove redundant test. (#142644)

Added: 
    

Modified: 
    llvm/test/tools/llvm-dwarfdump/X86/debug_info_addrx.s

Removed: 
    llvm/test/tools/llvm-dwarfdump/X86/debug_info_crel.yaml


################################################################################
diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_info_addrx.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_info_addrx.s
index ec1ad227bd56c..51f61496d71ff 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_info_addrx.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_info_addrx.s
@@ -1,6 +1,8 @@
 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o
 # RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s
 # RUN: llvm-dwarfdump -debug-info %t.o -v | FileCheck --check-prefix=VERBOSE %s
+# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o -crel
+# RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s
 
 # CHECK: DW_TAG_compile_unit
 # CHECK:   DW_AT_low_pc                                              (0x0000000000000000)

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_info_crel.yaml b/llvm/test/tools/llvm-dwarfdump/X86/debug_info_crel.yaml
deleted file mode 100644
index 308f21136b798..0000000000000
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_info_crel.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
-# Test llvm-dwarfdump handles CREL relocation sections correctly.
-
-# RUN: yaml2obj %s | llvm-dwarfdump - | FileCheck %s
-
-# CHECK: DW_AT_producer    ("clang version
-
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_REL
-  Machine:         EM_X86_64
-  SectionHeaderStringTable: .strtab
-Sections:
-  - Name:            .debug_abbrev
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x1
-    Content:         011101252513050325721710171B25111B120673170000022E00111B120640187A196E2503253A0B3B0B49133F19000003240003253E0B0B0B000000
-  - Name:            .debug_info
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x1
-    Content:         '3400000005000108000000000100210001000000000000000002000600000000000000020006000000015703040001330000000305050400'
-  - Name:            .debug_str_offsets
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x1
-    Content:         1C00000005000000000000000000000000000000000000000000000000000000
-  - Name:            .crel.debug_info
-    Type:            SHT_CREL
-    Flags:           [ SHF_INFO_LINK ]
-    Link:            .symtab
-    AddressAlign:    0x1
-    EntSize:         0x1
-    Info:            .debug_info
-    Relocations:
-      - Offset:          0x11
-        Symbol:          .debug_str_offsets
-        Type:            R_X86_64_32
-        Addend:          8
-  - Name:            .crel.debug_str_offsets
-    Type:            SHT_CREL
-    Flags:           [ SHF_INFO_LINK ]
-    Link:            .symtab
-    AddressAlign:    0x1
-    EntSize:         0x1
-    Info:            .debug_str_offsets
-    Relocations:
-      - Offset:          0x8
-        Symbol:          .debug_str
-        Type:            R_X86_64_32
-  - Type:            SectionHeaderTable
-    Sections:
-      - Name:            .strtab
-      - Name:            .debug_abbrev
-      - Name:            .debug_info
-      - Name:            .crel.debug_info
-      - Name:            .debug_str_offsets
-      - Name:            .crel.debug_str_offsets
-      - Name:            .debug_str
-      - Name:            .symtab
-Symbols:
-  - Name:            foo.cpp
-    Type:            STT_FILE
-    Index:           SHN_ABS
-  - Name:            .debug_abbrev
-    Type:            STT_SECTION
-    Section:         .debug_abbrev
-  - Name:            .debug_str_offsets
-    Type:            STT_SECTION
-    Section:         .debug_str_offsets
-  - Name:            .debug_str
-    Type:            STT_SECTION
-    Section:         .debug_str
-DWARF:
-  debug_str:
-    - 'clang version 21.0.0git'
-...


        


More information about the llvm-commits mailing list