This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Don't allow ia64 unwind section to point to section indifferent files
- From: David Mosberger <davidm at napali dot hpl dot hp dot com>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: "H. J. Lu" <hjl at lucon dot org>, David Mosberger <davidm at hpl dot hp dot com>,binutils at sources dot redhat dot com
- Date: Tue, 17 May 2005 13:51:53 -0700
- Subject: Re: PATCH: Don't allow ia64 unwind section to point to section indifferent files
- References: <CBDB88BFD06F7F408399DBCF8776B3DC0424E404@scsmsx403.amr.corp.intel.com><17029.3906.33841.302589@napali.hpl.hp.com><20050513205004.GB30928@lucon.org><17029.5402.827349.738563@napali.hpl.hp.com><20050513210111.GB31069@lucon.org><17029.5812.552722.635968@napali.hpl.hp.com><20050513214612.GA31765@lucon.org><1116362267.7961.46.camel@aretha.corp.specifixinc.com>
- Reply-to: davidm at hpl dot hp dot com
>>>>> On Tue, 17 May 2005 13:38:57 -0700, James E Wilson <wilson@specifixinc.com> said:
Jim> On Fri, 2005-05-13 at 14:46, H. J. Lu wrote:
>> When weak functions are used on ia64, part of the unwind section may
>> point to the strong definition in a different file. This will lead to
>> wrong unwind info. Basically, on ia64, we have to use comdat to get the
>> right unwind info. This patch will check it.
Jim> This doesn't look like the right fix to me.
Jim> I looked at the unwind info with old and new binutils, and noticed that
Jim> the relocs are different. In old binutils, we have
Jim> RELOCATION RECORDS FOR [.IA_64.unwind]:
Jim> OFFSET TYPE VALUE
Jim> 0000000000000000 SEGREL64LSB .text
Jim> in new binutils we have
Jim> RELOCATION RECORDS FOR [.IA_64.unwind]:
Jim> OFFSET TYPE VALUE
Jim> 0000000000000000 SEGREL64LSB _start
Jim> Since _start is at offset 0 in .text, these are the same value normally,
Jim> but they aren't if we have duplicate weak/strong functions. Since the
Jim> unwind info should always bind locally, I think it is wrong to have the
Jim> unresolved _start symbol here.
Ah, so it wasn't by coincidence that the old(er) binutils worked right.
It's encouraging to see that this problem is eminently fixable.
--david