[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: gold --incremental not producing DWARF such that nm can handle it,
From: |
Britton Kerin |
Subject: |
Fwd: gold --incremental not producing DWARF such that nm can handle it, internal error |
Date: |
Fri, 25 Mar 2016 11:22:45 -0800 |
I'm forwarding this because it sounds useful. I'd love to see nm and
addr2line work correctly with things produce using the gold linker.
On Thu, Mar 24, 2016 at 11:54 AM, Cary Coutant <address@hidden> wrote:
>> * --incremental gold produces binaries st nm --line-numbers complains like
>> this:
>>
>> $ nm --line-numbers instrument_test >/dev/null
>> nm: Dwarf Error: Bad abbrev number: 0.
>> nm: Dwarf Error: found dwarf version '0', this reader only
>> handles version 2, 3 and 4 information.
>> nm: Dwarf Error: found dwarf version '0', this reader only
>> handles version 2, 3 and 4 information.
>>
>> nm still coughs up the requested information but these are pretty
>> disturbing warnings.
>
> Gold adds padding to most sections during the first (full) incremental
> link. For .debug_info sections, it makes the padding look like an
> empty compilation unit, but other sections just get padded with
> zeroes. I believe nm here is trying to read the .debug_line section,
> assuming that it consists of one compilation unit after another. The
> padding is at the end, so it's already found what it needs to by the
> time it prints those messages. To work with incremental linking, nm
> (and addr2line) will probably have to start with the .debug_info
> section, which has pointers to each compilation unit's line number
> table.
Britton
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fwd: gold --incremental not producing DWARF such that nm can handle it, internal error,
Britton Kerin <=