[LLVMdev] [patch] DwarfDebug problem with line section
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Aug 17 07:09:59 PDT 2010
On 30 Jun 2010, at 18:40, Devang Patel wrote:
> On Wed, Jun 30, 2010 at 1:57 AM, Artur Pietrek <pietreka at gmail.com>
> wrote:
>> The problem is that you put difference between two labels
>> .Lset7 = .Lsection_line_begin-.Lsection_line ## DW_AT_stmt_list
>> and that will be evaluated by assembler to a constant. It has to be
>> a label,
>> not a constant, because it is the linker who knows the correct
>> offset.
>
> How will linker translate a label into correct offset ?
Sorry for reviving an old thread (I'm going through my 10000 message
backlog from llvmdev), but it seems this hasn't been changed yet in
the the mean time.
On ELF platforms (at least Linux and FreeBSD) and on Windows, both of
the following are labels (i.e., absolute addresses to be relocated by
the linker) as opposed to offsets relative to the relevant section's
start, even though the DWARF standard says they are offsets:
* address of the abbreviation table
* DW_AT_stmt_list
At least that's what I learned when I looked at what GCC and GNU AS
generated, and changing them into offsets (I tried that in our
compiler) results in GDB not understanding the debug information.
Jonas
More information about the llvm-dev
mailing list