Make linking mips-elf and mips-ecoff work. At least, better than it did.
authorKen Raeburn <raeburn@cygnus>
Tue, 23 May 1995 23:30:33 +0000 (23:30 +0000)
committerKen Raeburn <raeburn@cygnus>
Tue, 23 May 1995 23:30:33 +0000 (23:30 +0000)
commita16fcab31a308d6b5796e48c48d8e0f1aaea5614
treef9409c56d1b1d92c7790a3956c80e8fe26b7bf06
parent6e43bf824ca45f067214ffba0cd973ea445b5dc3
Make linking mips-elf and mips-ecoff work.  At least, better than it did.

* bfd.c (bfd_get_relocated_section_contents): Now a function, tries calling
routine from input bfd target vector for bfd_indirect_link_order.  Put a
declaration into the header file.
* bfd-in2.h: Regenerated.
* elf32-mips.c (gprel16_with_gp): New function, split out from
mips_elf_gprel16_reloc.
(mips_elf_gprel16_reloc): Call it.  If output bfd target vector isn't elf
flavoured, abort, since it's assumed to be elf in some of this code, including
the code that looks up the gp value.
(elf32_mips_get_relocated_section_contents): New function, modified from
bfd_generic_get_relocated_section_contents to deal with passing gp to
gprel16_with_gp.
(bfd_elf32_bfd_get_relocated_section_contents): New macro.
* elf32-target.h (bfd_elf32_bfd_get_relocated_section_contents): Don't define
if already defined.
bfd/elf32-mips.c
bfd/elf32-target.h