This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips branches broken between 2002-09-05 and 2002-09-06
On Tue, Sep 10, 2002 at 07:22:10PM +0930, Alan Modra wrote:
> >
> > As a result of the changes in that time period:
> >
> > (a) branches to global symbols (in the same file) are now
> > relocated against the actual target symbols,
>
> I believe that is correct. For ELF shared libraries, ld.so must be
> able to override global symbols. So that, for example, a call to a
> global "foo" in the current file may in fact end up going to a totally
> different shared library. The same goes for variables. Now, you may
> argue that the MIPS ABI only supports symbol overriding when a call is
> via the plt, which would be a reasonable argument, but I'd raised the
> issue of branches to global syms on the mailing list and got no
> response. I guess your email is the response I was after, except that
> I'd like people to think about what really is the correct behaviour,
> rather than just reporting that some part of a testsuite fails.
I fixed this bug for Linux/MIPS. For some targets, they prefer the
"broken" way. But whatever you do, don't change it for Linux/MIPS.
Linux/MIPS has to be able to override any global symbols.
>
> > (b) I suspect as a result of (a) and mishandling the offset in
> > the instructions, the the instructions/relocs in the .o files
> > are likely incorrect, and
> >
> > (c) as a result, the offsets in the final link end up being
> > incorrect.
>
> Obviously, if a final link fails I need to help you in fixing it..
> Also, I'm fairly certain that we can restore the old mips backend
> behaviour regarding global syms if that is correct.
As for as global symobls is concerned, Linux/MIPS behaves the same as
today.
H.J.