? doc/bfd.info Index: elfxx-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elfxx-mips.c,v retrieving revision 1.169 diff -c -p -r1.169 elfxx-mips.c *** elfxx-mips.c 22 May 2006 15:06:22 -0000 1.169 --- elfxx-mips.c 7 Jun 2006 22:58:04 -0000 *************** static bfd *reldyn_sorting_bfd; *** 631,642 **** ((ABI_64_P (abfd) \ ? 0x03e0782d /* daddu t7,ra */ \ : 0x03e07821)) /* addu t7,ra */ #define STUB_JALR 0x0320f809 /* jalr t9,ra */ ! #define STUB_LI16(abfd) \ ! ((ABI_64_P (abfd) \ ! ? 0x64180000 /* daddiu t8,zero,0 */ \ ! : 0x24180000)) /* addiu t8,zero,0 */ ! #define MIPS_FUNCTION_STUB_SIZE (16) /* The name of the dynamic interpreter. This is put in the .interp section. */ --- 631,640 ---- ((ABI_64_P (abfd) \ ? 0x03e0782d /* daddu t7,ra */ \ : 0x03e07821)) /* addu t7,ra */ + #define STUB_LUI 0x3c180000 /* lui t8,0 */ #define STUB_JALR 0x0320f809 /* jalr t9,ra */ ! #define STUB_LI16 0x34180000 /* ori t8,zero,0 */ ! #define MIPS_FUNCTION_STUB_SIZE (20) /* The name of the dynamic interpreter. This is put in the .interp section. */ *************** _bfd_mips_elf_finish_dynamic_symbol (bfd *** 8013,8027 **** MIPS_ELF_STUB_SECTION_NAME (dynobj)); BFD_ASSERT (s != NULL); - /* FIXME: Can h->dynindx be more than 64K? */ - if (h->dynindx & 0xffff0000) - return FALSE; - /* Fill the stub. */ bfd_put_32 (output_bfd, STUB_LW (output_bfd), stub); bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), stub + 4); ! bfd_put_32 (output_bfd, STUB_JALR, stub + 8); ! bfd_put_32 (output_bfd, STUB_LI16 (output_bfd) + h->dynindx, stub + 12); BFD_ASSERT (h->plt.offset <= s->size); memcpy (s->contents + h->plt.offset, stub, MIPS_FUNCTION_STUB_SIZE); --- 8011,8023 ---- MIPS_ELF_STUB_SECTION_NAME (dynobj)); BFD_ASSERT (s != NULL); /* Fill the stub. */ bfd_put_32 (output_bfd, STUB_LW (output_bfd), stub); bfd_put_32 (output_bfd, STUB_MOVE (output_bfd), stub + 4); ! bfd_put_32 (output_bfd, STUB_LUI + ((h->dynindx >> 16 ) & 0xffff), ! stub + 8); ! bfd_put_32 (output_bfd, STUB_JALR, stub + 12); ! bfd_put_32 (output_bfd, STUB_LI16 + (h->dynindx & 0xffff), stub + 16); BFD_ASSERT (h->plt.offset <= s->size); memcpy (s->contents + h->plt.offset, stub, MIPS_FUNCTION_STUB_SIZE);