Commit Graph

12 Commits

Author SHA1 Message Date
Jeff Law 7b951eed4d * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
somewhat.
        (mn10200_elf_relax_section): Correctly compute a symbol's value
        when the symbol is local, but not in the same section as we are
        relaxing.  Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
        relaxing.
Another 1.3% size reduction for hello world.  Only relaxing left todo is
imm16 -> imm8 and d16 -> d8 where applicable.
1997-02-21 23:19:34 +00:00
Jeff Law 7c49f021ca Twiddle some comments to more accurately reflect reality. 1997-02-21 07:21:32 +00:00
Jeff Law c17db7cfb4 Remove debugging printf. 1997-02-21 07:18:35 +00:00
Jeff Law fd39566111 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
(mn10200_elf_relax_delete_bytes): Likewise.
        (mn10200_elf_symbol_address_p): Likewise.
        (mn10200_elf_get_relocated_section_contents): Likewise.
        (bfd_elf32_bfd_relax_section): Define.
        (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
First cut at relaxing linker for the mn10200:

	jsr:24 -> jsr:16
	jmp:24 -> jmp:16
	jmp:16 -> bra:8
	bCC .+4;bra:8 -> bCC':8


Reduces code size by about 2.5% for hello world.
1997-02-21 07:14:30 +00:00
Jeff Law 64af667971 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
(mn10200_elf_relocate_section): Likewise.
        (elf_backend_relocate_section): Define.
New style linker for the mn10200.
1997-02-20 20:54:28 +00:00
Jeff Law 1a2faf1f1e * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
(elf_mn10200_howto_table): Likewise.
        (mn10200_reloc_map): Likewise.
How did I miss the 16bit pc-relative relocs?!?
1997-01-29 07:02:22 +00:00
Jeff Law 4013169286 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
Use bfd_elf_generic_reloc as special function for all relocs.
        (bfd_elf32_mn10200_reloc): Remove unnecessary function.
Working on relocs for the mn10200.
1997-01-06 22:20:38 +00:00
Jeff Law 483e1b9161 * elf32-mn10200.c (elf_mn10200_howto): Set partial_inplace for
24bit pc-relative reloc.
1997-01-06 20:33:53 +00:00
Jeff Law b3ef389468 * reloc.c: Add BFD_RELOC_24.
* elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
        (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
        * bfd-in2.h, libbfd.h: Rebuilt.
Starting on relocs for the mn10200.
1997-01-04 00:02:12 +00:00
Jeff Law 8d16fe5cdb * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
32 bit relocs.
        (elf_mn10200_howto_table): Likewise.
        (mn10200_reloc_map): Likewise.
To keep the assembler quiet.
1996-12-18 17:09:59 +00:00
Jeff Law e14af8fc41 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
variants.
        (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
        (bfd_elf32_mn10300_reloc): Write data in little endian format.
        * reloc.c: Remove mn10300 big endian relocs.
        * bfd-in2.h, libbfd.h: Rebuilt.

        * elf32-mn10200.c: Update from elf32-mn10300.c.
1996-12-11 06:31:23 +00:00
Jeff Law ae1b99e42d Grrr. The mn10200 and mn10300 are _not_ similar enough to easily support
with a single generic configuration.  So break them up into two different
configurations.  See the individual ChangeLogs for additional detail.
1996-10-03 16:42:22 +00:00