This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dwarf2 debug dependent upon GAS?
- To: wilson at cygnus dot com (Jim Wilson)
- Subject: Re: dwarf2 debug dependent upon GAS?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 25 Feb 1999 12:05:03 -0800
- Cc: egcs at cygnus dot com, Robert Lipe <robertl at sco dot com>, jason at cygnus dot com
- References: <19990221144644.M8783.cygnus.egcs@rjlhome.sco.com> <199902230124.RAA24440.cygnus.egcs@rtl.cygnus.com>
>>>>> Jim Wilson <wilson@cygnus.com> writes:
>> I'm seeing EGCS (current trunk) generate refences to symbols that don't
>> exist. There are SECTIONS of that name, but no symbols. Apparently
>> GAS treat them interchangably. Is it the intent for these to reference
>> the beginning of the section in this file (i.e. local labels) or the
>> beginning of that section once linked? (without making them global, I
>> don't know how I would synthesize that.)
> The latter, sort of. The dwarf2 standard says that some fields are
> offsets relative to the address of the final linked section. This means
> that we can't compute these offsets until link time.
Actually, it's a lot simpler than that. The references are not to the
beginning of the section in the executable, but to the offset from there to
the beginning of the info for the particular translation unit. Since the
beginning of the section is at 0, this simplifies to the address of the
beginning of the section in question for the current translation unit. In
GNU as, SGI as and Sun as, referring to a section name as a symbol gives us
that. If SCO doesn't support this feature (which I assumed was standard
SVR4), it would be simple enough to emit some random symbol at the
beginning of the assembly output and refer to that instead.
Jason