Open kmod opened 2 years ago
@llvm/issue-subscribers-bolt
@llvm/issue-subscribers-debuginfo
@kmod My apologies I missed this. Can you try with latest bolt? There were some things fixed recently.
@ayermolo Still having the same issue, unfortunately
@kmod OK, I'll take a look. Are there a smaller binaries that exhibit this behavior? Also how was the binary build?
Ah ok. So issue is we re-write .debug_info so offsets of dies change. Apparently there is DW_OP_GNU_parameter_ref, which can reference another die from location expression. We don't handle this at the moment. Looking at llvm code, neither does it. llvm-dwarfdump just returns decoding error.
I also found an issue with updating debug information when icf=1 is used. It results with DW_AT_location pointing to the wrong location within .debug_loc section. FYI. We are looking into why.
We're currently having an issue where if you run
dwz
(DWARF info optimizer) on our bolt-optimized binary it fails. Runningdwz
on the pre-bolt binary completes successfully.Running
readelf -wi
on either the pre-bolt or post-bolt binary gives a number of errors:so it's possible that this was an issue with the pre-bolt binary, but I do get different ultimate errors depending on the version of bolt I use.
Pre-bolt binary Post-bolt binary
I created the post-bolt binary using:
Our project currently uses a version of bolt from two months ago, and that version of bolt leads to this error:
I just tested bolt from current trunk (d329dfd0) and that version leads to this error: