mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00
gdb-index: Wire up str_offsets section to avoid incorrect error message about offsets_base
There's still a need for a deeper fix to the way libDebugInfoDWARF error messages are propagated up to lld - if lld had exited non-zero on this error message we would've found the issue sooner. llvm-svn: 368229
This commit is contained in:
parent
ac136fc51f
commit
8a480d2cbf
@ -38,6 +38,7 @@ template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *obj) {
|
|||||||
.Case(".debug_info", &infoSection)
|
.Case(".debug_info", &infoSection)
|
||||||
.Case(".debug_ranges", &rangesSection)
|
.Case(".debug_ranges", &rangesSection)
|
||||||
.Case(".debug_rnglists", &rnglistsSection)
|
.Case(".debug_rnglists", &rnglistsSection)
|
||||||
|
.Case(".debug_str_offsets", &strOffsetsSection)
|
||||||
.Case(".debug_line", &lineSection)
|
.Case(".debug_line", &lineSection)
|
||||||
.Default(nullptr)) {
|
.Default(nullptr)) {
|
||||||
m->Data = toStringRef(sec->data());
|
m->Data = toStringRef(sec->data());
|
||||||
|
@ -40,6 +40,10 @@ public:
|
|||||||
return rnglistsSection;
|
return rnglistsSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const llvm::DWARFSection &getStrOffsetsSection() const override {
|
||||||
|
return strOffsetsSection;
|
||||||
|
}
|
||||||
|
|
||||||
const llvm::DWARFSection &getLineSection() const override {
|
const llvm::DWARFSection &getLineSection() const override {
|
||||||
return lineSection;
|
return lineSection;
|
||||||
}
|
}
|
||||||
@ -79,6 +83,7 @@ private:
|
|||||||
LLDDWARFSection infoSection;
|
LLDDWARFSection infoSection;
|
||||||
LLDDWARFSection rangesSection;
|
LLDDWARFSection rangesSection;
|
||||||
LLDDWARFSection rnglistsSection;
|
LLDDWARFSection rnglistsSection;
|
||||||
|
LLDDWARFSection strOffsetsSection;
|
||||||
LLDDWARFSection lineSection;
|
LLDDWARFSection lineSection;
|
||||||
LLDDWARFSection addrSection;
|
LLDDWARFSection addrSection;
|
||||||
StringRef abbrevSection;
|
StringRef abbrevSection;
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
# REQUIRES: x86
|
# REQUIRES: x86
|
||||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
|
||||||
# RUN: ld.lld --gdb-index %t1.o -o %t
|
# RUN: ld.lld --gdb-index %t1.o -o %t 2>&1 | FileCheck --check-prefix=LLD %s
|
||||||
# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s
|
# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s
|
||||||
|
|
||||||
|
# FIXME: Remove this once lld correctly returns non-zero on errors like this
|
||||||
|
# There's no other behavior to test hidden behind this error - lld only parses
|
||||||
|
# the CU for the address ranges, it doesn't need to decode any strings.
|
||||||
|
# LLD-NOT: error:
|
||||||
|
|
||||||
## The code contains DWARF v5 sections .debug_rnglists and .debug_addr.
|
## The code contains DWARF v5 sections .debug_rnglists and .debug_addr.
|
||||||
## Check we are able to build the correct address
|
## Check we are able to build the correct address
|
||||||
## area using address range lists.
|
## area using address range lists.
|
||||||
|
Loading…
Reference in New Issue
Block a user