-/* This table lists the relocation types for the TMS320C30. There are
- only a few relocations required, and all must be divided by 4 (>>
- 2) to get the 32-bit addresses in the format the TMS320C30 likes
- it. */
-reloc_howto_type tic30_aout_howto_table[] =
- {
- EMPTY_HOWTO (-1),
- HOWTO (1, 2, 1, 16, FALSE, 0, 0, tic30_aout_fix_16,
- "16", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE),
- HOWTO (2, 2, 2, 24, FALSE, 0, complain_overflow_bitfield, NULL,
- "24", FALSE, 0x00FFFFFF, 0x00FFFFFF, FALSE),
- HOWTO (3, 18, 3, 24, FALSE, 0, complain_overflow_bitfield, NULL,
- "LDP", FALSE, 0x00FF0000, 0x000000FF, FALSE),
- HOWTO (4, 2, 4, 32, FALSE, 0, complain_overflow_bitfield, tic30_aout_fix_32,
- "32", FALSE, 0xFFFFFFFF, 0xFFFFFFFF, FALSE),
- HOWTO (5, 2, 1, 16, TRUE, 0, complain_overflow_signed,
- tic30_aout_fix_pcrel_16, "PCREL", TRUE, 0x0000FFFF, 0x0000FFFF, TRUE),
- EMPTY_HOWTO (-1),
- EMPTY_HOWTO (-1),
- EMPTY_HOWTO (-1),
- EMPTY_HOWTO (-1),
- EMPTY_HOWTO (-1)
- };
-
-extern reloc_howto_type *NAME (aout, reloc_type_lookup)
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-reloc_howto_type *
-tic30_aout_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
-{
- switch (code)
- {
- case BFD_RELOC_8:
- case BFD_RELOC_TIC30_LDP:
- return &tic30_aout_howto_table[3];
- case BFD_RELOC_16:
- return &tic30_aout_howto_table[1];
- case BFD_RELOC_24:
- return &tic30_aout_howto_table[2];
- case BFD_RELOC_16_PCREL:
- return &tic30_aout_howto_table[5];
- case BFD_RELOC_32:
- return &tic30_aout_howto_table[4];
- default:
- return (reloc_howto_type *) NULL;
- }
-}