This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: R_MIPS_GOT16 error with --version-script option to ld in 2.10.1
- From: Jeff Baker <jbaker at qnx dot com>
- To: 'Daniel Jacobowitz' <drow at mvista dot com>
- Cc: "'Binutils (binutils at sources dot redhat dot com)'" <binutils at sources dot redhat dot com>
- Date: Wed, 4 Dec 2002 11:57:50 -0500
- Subject: RE: R_MIPS_GOT16 error with --version-script option to ld in 2.10.1
This is the function that is producing the assertions.
static bfd_vma
mips_elf_global_got_index (abfd, h)
bfd *abfd;
struct elf_link_hash_entry *h;
{
bfd_vma index;
asection *sgot;
struct mips_got_info *g;
g = mips_elf_got_info (abfd, &sgot);
/* Once we determine the global GOT entry with the lowest dynamic
symbol table index, we must put all dynamic symbols with greater
indices into the GOT. That makes it easy to calculate the GOT
offset. */
BFD_ASSERT (h->dynindx >= g->global_gotsym->dynindx);
index = ((h->dynindx - g->global_gotsym->dynindx + g->local_gotno)
* MIPS_ELF_GOT_SIZE (abfd));
BFD_ASSERT (index < sgot->_raw_size);
return index;
}
> On Tue, Dec 03, 2002 at 04:28:48PM -0500, Jeff Baker wrote:
> > I'm having a problem building shared objects for MIPS while using the
> > --version-script option in binutils 2.10.1. The problem no longer
> exists in
> > 2.12.1. Does anyone remember what the fix was for this specific
> problem?
>
> Well, what's the assertion? :)
>
> > Here's a snippet of the errors:
> >
> > __dn_comp.o(.text+0x28): relocation truncated to fit: R_MIPS_GOT16
> __dn_comp
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5353
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5356
> > __res_close.o: In function `res_close':
> > __res_close.o(.text+0x20): relocation truncated to fit: R_MIPS_GOT16
> > __res_close
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5353
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5356
> > __res_send.o: In function `res_send':
> > __res_send.o(.text+0x20): relocation truncated to fit: R_MIPS_GOT16
> > __res_send
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5353
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5356
> > connect.o: In function `connect':
> > connect.o(.text+0x90): relocation truncated to fit: R_MIPS_GOT16
> > __try_auto_connect
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5353
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5356
> > connect.o(.text+0xa0): relocation truncated to fit: R_MIPS_GOT16
> autoconnect
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5353
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5356
> > getaddrinfo.o: In function `getanswer':
> > getaddrinfo.o(.text+0x12d4): relocation truncated to fit: R_MIPS_GOT16
> > __res_hnok
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5353
> > /usr/bin/ntomips-ld: bfd assertion fail ../../bfd/elf32-mips.c:5356
> > getaddrinfo.o(.text+0x13b4): relocation truncated to fit: R_MIPS_GOT16
> > __res_hnok
> >
> >
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer