This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: MIPS/ELF linker
- To: ralf@gnu.org
- Subject: Re: MIPS/ELF linker
- From: Mark Mitchell <mark@codesourcery.com>
- Date: Sat, 31 Jul 1999 15:28:42 -0700
- Cc: binutils@sourceware.cygnus.com, thockin@cobaltnet.com
- Organization: CodeSourcery, LLC
- References: <19990731233150.Q12249@uni-koblenz.de>
Thanks for trying the MIPS backend out. I'm eager to shake out the
bugs. It seems pretty solid on IRIX6, now, but I'm sure there are
issues remaining on other platforms.
+ /* Assume no jalx is required */
+ *require_jalxp = false;
+
REQUIRE_JALXP is set unconditionally a few lines down. Why doesn't
that do the trick? The caller should not be looking at the value of
require_jalx unless calculate_relocation returns a successful error
code.
@@ -5870,6 +5873,12 @@
else
symbol = h->root.root.u.def.value;
}
+ else if ((h->root.root.type == bfd_link_hash_undefweak)
+ || (info->shared && !info->symbolic && !info->no_undefined))
+ {
+ sec = bfd_und_section_ptr;
+ symbol = 0;
+ }
else
{
(*info->callbacks->undefined_symbol)
This looks right to me. I thought I had already fixed this, but I
guess not. Ian should give final approval, of course.
/usr/bin/mips-linux-ld: not enough GOT space for local GOT entries
Probably some relocation is requiring a local GOT entry, but we're not
allocating it. Look for this code in check_relocs:
if (!h && (r_type == R_MIPS_CALL_LO16
|| r_type == R_MIPS_GOT_LO16
|| r_type == R_MIPS_GOT_DISP))
{
/* We may need a local GOT entry for this relocation. We
don't count R_MIPS_HI16 or R_MIPS_GOT16 relocations
because they are always followed by a R_MIPS_LO16
relocation for the value. We don't R_MIPS_GOT_PAGE
because we can estimate the maximum number of pages
needed by looking at the size of the segment.
This estimation is very conservative since we can merge
duplicate entries in the GOT. In order to be less
conservative, we could actually build the GOT here,
rather than in relocate_section. */
g->local_gotno++;
sgot->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
}
Probably this code is not firing in some case where it should be
firing. Therefore, we're not adding enough GOT space. That might
help track down the bug.
If not, feel free to send me the files on your link-line in a giant
tar-ball, together with how your configuring binutils, and I'll try to
duplicate and fix your problem.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com