A relocation problem in shared objects for SH
kaz Kojima
kkojima@rr.iij4u.or.jp
Fri Sep 15 19:21:00 GMT 2000
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
More information about the Binutils
mailing list