This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc64-linux hack


On Mon, Aug 11, 2003 at 11:57:34AM -0700, Richard Henderson wrote:
> On Mon, Aug 11, 2003 at 08:59:52PM +0930, Alan Modra wrote:
> > +			   && strcmp (h->root.root.string,
> > +				      ".__libc_start_main") == 0)
> 
> You really should use a special branch relocation instead.
> This could be used elsewhere as well, no doubt.

Yeah, well, it didn't seem worth it.  The "right" fix in this instance
is to simply add a nop after the "bl .__libc_start_main" call in crt1.o.
It's not that the nop is needed as a placeholder to restore r2 because
we never return, but that the bl,nop sequence is used for extern calls
and is recognized by the linker.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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