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]

Re: A relocation problem in shared objects for SH


On Sep 16, 2000, kaz Kojima <kkojima@rr.iij4u.or.jp> wrote:

> One point of this bug may be that it's exposed in the case of the
> relocateable object which is generated form several objects by ld -r
> command.

Right on the nail!  Indeed, this causes the bug to show up.

> So I think that our ugly patch for elf32-sh.c (or something else) is
> still needed.

Yep.  I'll keep looking for something else for a while :-)

I managed to reproduce the problem with the following pair of assembly
files:

.text
	nop
	nop
	nop
	nop
.text
	.long bar
bar:

Generating a shared library out of them like this causes relocations
to be correct:

ld -shared t.o v.o -o tv.so

but creating an intermediate relocatable object file breaks them:

ld -r t.o v.o -o w.o
ld -shared w.o -o w.so

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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