Skip to content

Conversation

@ZequanWu
Copy link
Contributor

@ZequanWu ZequanWu commented Jun 3, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Jun 3, 2025

@llvm/pr-subscribers-debuginfo

Author: Zequan Wu (ZequanWu)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/142644.diff

2 Files Affected:

  • (modified) llvm/test/tools/llvm-dwarfdump/X86/debug_info_addrx.s (+2)
  • (removed) llvm/test/tools/llvm-dwarfdump/X86/debug_info_crel.yaml (-76)
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'
-...

Copy link
Collaborator

@dwblaikie dwblaikie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ZequanWu ZequanWu merged commit 857138b into llvm:main Jun 3, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants