[PATCH] D92904: [lld-macho] Don't attempt to emit rebase opcodes for debug sections
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 06:31:45 PST 2020
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.
This looks like a much nicer design, thanks!
================
Comment at: lld/MachO/Dwarf.cpp:24
+ for (InputSection *isec : obj->debugSections) {
+ if (StringRef *s = StringSwitch<StringRef *>(isec->name)
+ .Case("__debug_info", &dObj->infoSection.Data)
----------------
I would find a comment here helpful why these are the `isDebugSection` sections that get a DwarfObject. It's not obvious to me why `__debug_line` and `__debug_ranges` aren't listed here (or why we do any filtering at all). I don't know much debug information and I can believe that it's obvious to domain experts :)
================
Comment at: lld/test/MachO/stabs.s:141
#--- foo.s
.text
----------------
Does this have "interesting enough" debug info? The `.o` file rom comment 8 in http://llvm.org/pr48392 :
```
$ out/gn/bin/llvm-objdump -h test.o | grep debug
4 __debug_abbrev 000000ae 0000000000000078 DATA
5 __debug_info 00000108 0000000000000126 DATA
6 __debug_ranges 00000040 000000000000022e DATA
7 __debug_str 0000009c 000000000000026e DATA
13 __debug_line 00000066 0000000000000540 DATA
```
This file:
```
$ out/gn/bin/llvm-objdump -h out/gn/obj/lld/test/MachO/Output/stabs.s.tmp/foo.o | grep debug
1 __debug_str 00000009 0000000000000001 DATA
2 __debug_abbrev 0000000c 000000000000000a DATA
3 __debug_info 00000021 0000000000000016 DATA
4 __debug_line 00000000 0000000000000037 DATA
```
(ie no `__debug_ranges`)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92904/new/
https://reviews.llvm.org/D92904
More information about the llvm-commits
mailing list