This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A relocation problem in shared objects for SH
- To: binutils at sourceware dot cygnus dot com
- Subject: Re: A relocation problem in shared objects for SH
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Sat, 16 Sep 2000 11:23:35 +0900
- References: <or4s3hjh73.fsf@guarana.lsd.ic.unicamp.br>
Alexandre Oliva <aoliva@redhat.com>
>On Sep 14, 2000, kaz Kojima <kkojima@rr.iij4u.or.jp> wrote:
>
>> We have a problem when making libc.so for sh-unknown-linux-gnu target. This
>> comes from that SH ELF uses both rela relocation and the implicit rel value
>> in memory (to support COFF, I think). The next lists and relocs show what
>> happened.
>
> I'd be interested in seeing a preprocessed source file that causes
> this behavior. Back when I was working on SH-PIC support, I had seen
> this hunk in your patches, and couldn't find any situation in which it
> would make any difference, even when linking shared libraries. It
> seems that I didn't try hard enough :-(
Yep. It's a rare case as you say. I could find such codes in very huge
functions only.
> I wonder whether this isn't some incorrectness in the code generated
> by the compiler.
It's just a guess but the compiler can avoid this relocation by generating
braf instruction instead of jmp in PIC case, though the current code itself
doesn't seem incorrect.
> Please send me, off line, the preprocessed source file, as well as the
> command lines used to compile this file and to create the shared
> library. Thanks!
ok. I'll send yout them ASAP.
Thanks you for replying.
kaz