[PATCH] D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used
bd1976 llvm via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 03:51:46 PDT 2019
On Thu, Mar 21, 2019 at 9:20 PM Eric Christopher via Phabricator <
reviews at reviews.llvm.org> wrote:
> echristo added a comment.
>
> Oh, and as far as dwarf aware linking I'd arguably prefer a separate tool
> ala dsymutil or dwz rather than incorporating it into the linker. I do
> agree that such a tool is incredibly useful and should be part of our
> ongoing development plan around debug info.
>
>
dwz looks great. I was unaware that it existed. Thanks!
Is GNU compatibility an issue? I did some research on this a while ago:
GOLD:
Stripping (gc-sections):
.debug_info - patch low pc to 0
.debug_ranges - patch low address to 0 and high address to "size of
function + 1".
Deduplication (icf):
.debug_info - patch low pc to the address of the chosen function
.debug_ranges - patch the start and end addresses to the start and end
addresses of the chosen
function
COMDATs:
.debug_info - patch low pc to 0
.debug_ranges - patch the start and end addresses to the start and end
addresses of the chosen
function
GNU LD:
Stripping (gc-sections):
.debug_info - patch low pc to 0
.debug_ranges - patch the low and high address to 1 to make a size 0 range.
Deduplication (icf):
.debug_info - N/A
.debug_ranges - N/A
COMDATs:
.debug_info - patch low pc to 0
.debug_ranges - patch the start and end addresses to the start and end
addresses of the chosen
function
What does GDB make of -1/-2???
> CHANGES SINCE LAST ACTION
> https://reviews.llvm.org/D59553/new/
>
> https://reviews.llvm.org/D59553
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190322/a4f20970/attachment.html>
More information about the llvm-commits
mailing list