This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


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

Re: Modifies vs. Replaces


Ron 603-884-2088 wrote:
> 
> Michael Eager writes:
> >So far, I've heard rumors of this complicated general case, or of
> >conjectured hypothetical optimizations which would make updating
> >the global location incorrect, but there have been no examples presented.
> 
> The "hypothetical optimizations which would make updating the global
> location incorrect" is just the possibility that the global location
> may be used for some other purpose during that range of addresses where
> the real value is only available elsewhere (eg in a register).
> 
> Jim and I have both indicated this is probably rare-but neither is
> saying that it impossible to occur or unreasonable for a compiler
> to employ (ie, it is not "bad code generation" to do this, of itself).
> 
> Because it is rare but possible, we prefer a DWARF specification that
> does not precluding describing it if it does occur.

I think that what you describe as rare is what I would describe as
nonexistent.  I'll agree that many things are possible, but that
seems to be more of a theological distinction than a technical one.

Dwarf tries to be practical.  No one has claimed that Dwarf can or 
should attempt to describe all of the behaviors of existing compilers,
let alone describe all of the possible behaviors of what have been 
described as "perverse optimizers".

As a committee, we value reducing the size and complexity of Dwarf
whenever possible.  So it strikes me as strange that there is this
passionate support for larger Dwarf files, with duplicated information
and more relocations, all justified by the desire to support the 
hypothesized behaviors of nonexistent compilers.

As I see it, the code which Ron presents is extremely common and 
not at all unusual.  Using his method would mean that location
information would need to be duplicated for virtually every use 
of a global variable.  Instead of one relocation entry for the
definition of a global variable, there would be one or more for
each use of a global variable.

-- 
Michael Eager	 Eager Consulting     eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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