A relocation problem in shared objects for SH

Alexandre Oliva aoliva@redhat.com
Sat Sep 16 00:49:00 GMT 2000


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).

Which version of the assembler are you using?  I can't reproduce this
problem with current binutils.  In fact, the symptoms look very
similar to those of the bug fixed with:

2000-09-01  Alexandre Oliva  <aoliva@redhat.com>
	* config/tc-sh.c (md_apply_fix): Map 32-bit relocations that
	become PC-relative to BFD_RELOC_32_PCREL.  Reject 16- or 8-bit
	similar relocs.

Anyway, there is a bug, but it is in GCC.  It isn't generating PIC
code for computed goto, which glibc's vfprintf uses.

Here's a patch that fixes this problem in GCC.  Ok to install?



More information about the Binutils mailing list