This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: release soonish
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 01 Feb 2012 10:22:35 -0800
- Subject: Re: release soonish
> No, and I guess it is more compliant than what is done now. It is just
> that just turning those symbols into SHN_ABS basically gives up on them.
> That might be the best we can do with the current ld design though :{
I'm not sure why you say that. They are symbols with names and addresses.
In a linked object, the section assignment is really just some ancillary
information and not intrinsically all that meaningful.
> It is correct in the sense that we have no better choice, but wrong in
> the sense that those symbol addresses really aren't "absolute".
Unless I'm missing something, there are three sensible options.
1. A preserved symbol in a discarded section becomes SHN_ABS.
2. A discarded section is not actually discarded, but assigned to one of
the adjacent output sections, so its symbols wind up in that section.
3. No orphan input section is discarded if it contains any symbols.
My impression is that gold just doesn't discard any sections at all,
instead producing empty output sections. I don't see any harm in that.
Thanks,
Roland