This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: duplicate dwarf2 reduction via comdat
- To: David B Anderson <davea at quasar dot engr dot sgi dot com>, Jason Merrill <jason at redhat dot com>
- Subject: Re: duplicate dwarf2 reduction via comdat
- From: David B Anderson <davea at quasar dot engr dot sgi dot com>
- Date: Thu, 1 Feb 2001 08:52:17 -0800 (PST)
- Cc: BRENDER at gemevn dot zko dot dec dot com, DWARF2 at corp dot sgi dot com
- References: <200101311959.LAA61606@quasar.engr.sgi.com>
- Reply-To: David B Anderson <davea at quasar dot engr dot sgi dot com>
>
>>>>>> "David" == David B Anderson <davea@quasar.engr.sgi.com> writes:
>
>> The 'internal' references Jason mentions have to
>> be implemented as relocations with section offsets.
>> (ie, as unnamed offsets relative to a section , where the
>> section name is a global). Right?
>
>Yes.
>
>> The Elf COMDAT (aka SECTION GROUP) rules forbid relocations
>> which are offsets into a COMDAT section.
>
>Why? Arrgh.
Because 'to the byte identical everywhere' is not required
for section groups with the same name. So one
cannot be sure that blind (internal) section relative relocations
work right. (well that's my guess, not having been part of
the deliberations).
>Jason
Relocations to a particular external name are fine as these
will work right even if the name is not at the identical byte in.
This problem, and the fact that there will be
lots of relocations for the linker to do, is what lead
me to go to 'debug-time-linking' using names only checked
by the debugger. And, too, these names are specific
to a target (as the debug-time-link scheme involved
a true global (required by section groups,
and needed in my scheme) and a 'local' name).
My scheme thus works ok (like Jason's it does depend
on a checksum at the comdat level) even for C and
header files defined differently to different CUs
as the 'type' linking-up is done by a name at debug time,
not a section offset.
davea@sgi.com