This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dwarf2 debug dependent upon GAS?


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]