This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Reject sh_link pointing to discarded section
On Fri, Apr 01, 2005 at 10:46:59AM +0930, Alan Modra wrote:
> On Thu, Mar 31, 2005 at 04:29:06PM -0800, H. J. Lu wrote:
> > I got 2 ia64 .o files with the same linkonce text section, one with
> > unwind section and the other without. I think the one without unwind
> > section is bad. When linker sees the one without unwind section first,
> > the linkonce text section in the other one will be discarded. But
> > its unwind section still points to the discarded section and linker
> > will crash when trying to set sh_link. This patch will try to use the
> > kept section if they have the same size, otherwise, reject it.
>
> OK.
>
BTW, The problem is real. The unwind information may not be generated,
depending on optimization. I am thinking to make linker to discard a
section if the section pointed to by SHF_LINK_ORDER is discarded. In
another word, all SHF_LINK_ORDER sections will be treated as a section
group with the section they are pointed to.
H.J.