[PATCH] D124121: [DebugInfo] Give warning instead of error for premature terminator in .debug_aranges section.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 01:41:16 PDT 2022
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-symbolizer/debug-aranges-premature-end.s:1
+# REQUIRES: x86-registered-target
+
----------------
Nice. This is much simpler. That being said, it would be nice if we could avoid this `# REQUIRES` line by using YAML as the input still. I believe the following is all that would be needed:
```
# RUN: yaml2obj %s -o %t
# RUN: llvm-symbolizer 0xa --obj=%t.o 2>&1 | FileCheck %s
# CHECK: warning: address range table at offset 0x0 has a premature terminator entry at offset 0x10
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Sections:
- Name: foo
Type: SHT_PROGBITS
Size: 12
DWARF:
debug_aranges:
- Version: 2
CuOffset: 0
Descriptors:
- Address: 0
Length: 0
- Address: 0x5678
Length: 0x20
```
If I'm not mistaken, you should be able even to drop the foo section entirely though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124121/new/
https://reviews.llvm.org/D124121
More information about the llvm-commits
mailing list