Hi Ben,
On 04/ 5/18 02:29 PM, ben.dunbobbin%
sony.com via Generic System V Application Binary Interface wrote:
> I enjoyed reading your blog posts. I am also a
> big fan of your? linker and libraries guide.
We really appreciate that. Rod and I write the linker and libraries guide,
and the manpages, so it's nice to hear.
A shameless plug: Oracle keeps moving and renaming our blog URLs, which plays
havoc with google searches, so I've recently created
www.linker-aliens.org as a
place to archive all of that old stuff in a stable place. It's hopefully the
same content, wherever it may be found.
You've undoubtedly seen them, but Ian's ELF blogs are great, and
very wide ranging:
https://www.airs.com/blog/archives/38
> I think that we have relatively rare requirements for dwarf. Most toolchains
> seem to be pretty happy with the situation because, as you stated, it is not
> allocatable. In fact I think that it is probable that no other elf toolchain
> implements the kind of comprehensive deadstripping of dwarf metadata that we
> do (and we probably implement more involved handling of the other metadata
> sections as well). It is very hard work, and requires extensions beyond the
> elf standard, but it is important to our users.
I don't understand DWARF well enough to judge if the requirements are rare,
but it's clear from the above that you've lived it, so I believe you.
As I'm sure you know all too well, the big risk in what you've done
isn't the up front hard work. It's the fragility going forward, when the
world changes, and you have to reconcile your extensions with whatever
new things come down the pike. I can understand why you're looking for
standards here.
FWIW, I think dwarf bloat is a problem for everyone. This just seems to
be one of those thorny problems that people tend to look at, and then
back away from, hoping that it will become easier in the future. In our
case, the ancillary objects were created because we had customers hitting
the 4GB limit on 32-bit ELF files. That's a lot of dwarf!
> I agree with this and Cary's statement that sections are the
> atomic unit in dwarf. I wonder if it would be possible to use some
> sort of delta encoding for representing a whole set of sections which
> are all very similar. This way you might be able to get the benefit of
> describing things with individual sections whilst eliminating some
> of the overhead?
The design of comdat groups lets you assume that different instances of
a given group are interchangeable, without actually having to compare them.
So ignoring the cost of I/O for the moment, that might be part of the answer.
You can ignore instances other than the first without processing them, so they
need not necessarily be tiny to be efficient.
I guess my main concern about delta encoding is that it imposes interpretation
costs to the link-editor (it has to "inflate things", much as with compression).
You'd have to prove that it was really faster --- it might not end up measuring
that way.
I don't know how desperate you are to solve this today, but assuming you
have some time to evolve to your desired end point, it sounds to me like it
would be a good thing for you to get involved with the DWARF-6 work that
Cary mentioned will start work later this year. Your real world experience
would be helpful.
- Ali