https://bugs.llvm.org/show_bug.cgi?id=40786
Bug ID: 40786
Summary: obj2yaml symbol output missing section index for
SHN_ABS and SHN_COMMON symbols
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: jh7370.2...@my.bristol.ac.uk
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
If you run obj2yaml on an object containing absolute and/or common symbols, the
yaml output contains no section index for them, resulting in them being
undefined symbols, if yaml2obj were run on the output. We should fix this!
Example failing test:
# RUN: yaml2obj %s > %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: Symbols:
# CHECK-NEXT: Global:
# CHECK-NEXT: - Name: absolute1
# CHECK-NEXT: Index: SHN_ABS <--- Missing
# CHECK-NEXT: - Name: absolute2
# CHECK-NEXT: Index: SHN_ABS <--- Missing
# CHECK-NEXT: - Name: common1
# CHECK-NEXT: Index: SHN_COMMON <--- Missing
# CHECK-NEXT: - Name: common2
# CHECK-NEXT: Index: SHN_COMMON <--- Missing
# CHECK-NEXT: - Name: valid_index
# CHECK-NEXT: Section: .text
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Symbols:
Global:
- Name: absolute1
Index: SHN_ABS
Value: 0x1234
- Name: absolute2
Index: 0xfff1
Value: 0x4321
- Name: common1
Index: SHN_COMMON
- Name: common2
Index: 0xfff2
- Name: valid_index
Index: 0x1
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs