Switched over to using new reloc types.

This commit is contained in:
Nick Clifton 1997-09-02 22:53:31 +00:00
parent 552c6220e0
commit def31039ac
6 changed files with 712 additions and 246 deletions

View File

@ -1,3 +1,12 @@
Tue Sep 2 15:45:45 1997 Nick Clifton <nickc@cygnus.com>
* cpu-v850.c: Use a macro to construct bfd_arch_info_type
entries.
* reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
Thu Aug 28 17:01:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
* cpu-v850.c: Remove "plain" from v850 printable name.

View File

@ -1948,14 +1948,19 @@ add3, load, and store instructions. */
/* This is a 22-bit reloc */
BFD_RELOC_V850_22_PCREL,
/* This is an offset from the short data area pointer.. */
BFD_RELOC_V850_SDA_OFFSET,
/* This is an offset from the zero data area pointer.. */
BFD_RELOC_V850_ZDA_OFFSET,
/* This is an offset from the tiny data area pointer.. */
BFD_RELOC_V850_TDA_OFFSET,
BFD_RELOC_V850_SDA_16_16_OFFSET, /* A 16 bit reloc in the small data area. */
BFD_RELOC_V850_SDA_15_16_OFFSET, /* A 16 bit reloc (of which only 15 bits are used) in the small data area. */
BFD_RELOC_V850_ZDA_16_16_OFFSET, /* A 16 bit reloc in the zero data area. */
BFD_RELOC_V850_ZDA_15_16_OFFSET, /* A 16 bit reloc (of which only 15 bits are used) in the zero data area. */
BFD_RELOC_V850_TDA_6_8_OFFSET, /* An 8 bit reloc (of which only 6 bits are used) in the tiny data area. */
BFD_RELOC_V850_TDA_7_8_OFFSET, /* An 8 bit reloc (of which only 7 bits are used) in the tiny data area. */
BFD_RELOC_V850_TDA_7_7_OFFSET, /* A 7 bit reloc in the tiny data area. */
/* start-sanitize-v850e */
BFD_RELOC_V850_TDA_4_5_OFFSET, /* A 5 bit reloc (of which only 4 bits are used) in the tiny data area. */
BFD_RELOC_V850_TDA_4_4_OFFSET, /* A 4 bit reloc in the tiny data area. */
BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, /* A 16 bit reloc (but the bits are not contiguous) in the small data area. */
BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, /* A 16 bit reloc (but the bits are not contiguous) in the zero data area. */
/* end-santize-v850e */
/* end-sanitize-v850 */

View File

@ -83,55 +83,18 @@ scan (info, string)
return true;
}
#define N(number, print, default, next) \
{ 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, bfd_default_compatible, scan, next }
static const bfd_arch_info_type arch_info_struct[2] =
{
/* start-sanitize-v850e */
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_v850,
bfd_mach_v850e,
"v850",
"v850e",
2,
false,
bfd_default_compatible,
scan,
& arch_info_struct[ 1 ],
},
N( bfd_mach_v850e, "v850e", false, & arch_info_struct[1] ),
/* end-sanitize-v850e */
/* start-sanitize-v850eq */
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_v850,
bfd_mach_v850eq,
"v850",
"v850eq",
2,
false,
bfd_default_compatible,
scan,
0,
}
N( bfd_mach_v850eq, "v850eq", false, NULL ),
/* end-sanitize-v850eq */
};
const bfd_arch_info_type bfd_v850_arch =
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_v850,
bfd_mach_v850,
"v850",
"v850",
2,
true, /* the default */
bfd_default_compatible,
scan ,
& arch_info_struct[ 0 ],
};
N( bfd_mach_v850, "v850", true, & arch_info_struct[0] );

File diff suppressed because it is too large Load Diff

View File

@ -770,10 +770,21 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M32R_SDA16",
/* start-sanitize-v850 */
"BFD_RELOC_V850_9_PCREL",
"BFD_RELOC_V850_16_PCREL",
"BFD_RELOC_V850_22_PCREL",
"BFD_RELOC_V850_SDA_OFFSET",
"BFD_RELOC_V850_ZDA_OFFSET",
"BFD_RELOC_V850_TDA_OFFSET",
"BFD_RELOC_V850_SDA_16_16_OFFSET",
"BFD_RELOC_V850_SDA_15_16_OFFSET",
"BFD_RELOC_V850_ZDA_16_16_OFFSET",
"BFD_RELOC_V850_ZDA_15_16_OFFSET",
"BFD_RELOC_V850_TDA_6_8_OFFSET",
"BFD_RELOC_V850_TDA_7_8_OFFSET",
"BFD_RELOC_V850_TDA_7_7_OFFSET",
/* start-sanitize-v850e */
"BFD_RELOC_V850_TDA_4_5_OFFSET",
"BFD_RELOC_V850_TDA_4_4_OFFSET",
"BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET",
"BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET",
/* end-santize-v850e */
/* end-sanitize-v850 */
"BFD_RELOC_MN10300_32_PCREL",

View File

@ -983,6 +983,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
if (howto->special_function)
{
bfd_reloc_status_type cont;
/* XXX - The special_function calls haven't been fixed up to deal
with creating new relocations and section contents. */
cont = howto->special_function (abfd, reloc_entry, symbol,
@ -1007,7 +1008,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
else
relocation = symbol->value;
reloc_target_output_section = symbol->section->output_section;
/* Convert input-section-relative symbol value to absolute. */
@ -2355,22 +2355,63 @@ ENUM
BFD_RELOC_V850_9_PCREL
ENUMDOC
This is a 9-bit reloc
ENUM
BFD_RELOC_V850_16_PCREL
ENUMDOC
This is a 16-bit reloc
ENUM
BFD_RELOC_V850_22_PCREL
ENUMDOC
This is a 22-bit reloc
ENUM
BFD_RELOC_V850_SDA_OFFSET
BFD_RELOC_V850_SDA_16_16_OFFSET,
ENUMDOC
This is an offset from the short data area pointer..
This is a 16 bit offset from the short data area pointer..
ENUM
BFD_RELOC_V850_ZDA_OFFSET
BFD_RELOC_V850_SDA_15_16_OFFSET,
ENUMDOC
This is an offset from the zero data area pointer..
This is a 16 bit offset (of which only 15 bits are used) from the short data area pointer..
ENUM
BFD_RELOC_V850_TDA_OFFSET
BFD_RELOC_V850_ZDA_16_16_OFFSET,
ENUMDOC
This is an offset from the tiny data area pointer..
This is a 16 bit offset from the zero data area pointer..
ENUM
BFD_RELOC_V850_ZDA_15_16_OFFSET,
ENUMDOC
This is a 16 bit offset (of which only 15 bits are used) from the zero data area pointer..
ENUM
BFD_RELOC_V850_TDA_6_8_OFFSET,
ENUMDOC
This is an 8 bit offset (of which only 6 bits are used) from the tiny data area pointer..
ENUM
BFD_RELOC_V850_TDA_7_8_OFFSET,
ENUMDOC
This is an 8bit offset (of which only 7 bits are used) from the tiny data area pointer..
ENUM
BFD_RELOC_V850_TDA_7_7_OFFSET,
ENUMDOC
This is a 7 bit offset from the tiny data area pointer..
COMMENT
{* start-sanitize-v850e *}
ENUM
BFD_RELOC_V850_TDA_4_5_OFFSET,
ENUMDOC
This is a 5 bit offset (of which only 4 bits are used) from the tiny data area pointer..
ENUM
BFD_RELOC_V850_TDA_4_4_OFFSET,
ENUMDOC
This is a 4 bit offset from the tiny data area pointer..
ENUM
BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
ENUMDOC
This is a 16 bit offset from the short data area pointer, with the bits placed non-contigously in the instruction..
ENUM
BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
ENUMDOC
This is a 16 bit offset from the zero data area pointer, with the bits placed non-contigously in the instruction..
COMMENT
{* end-santize-v850e *}
COMMENT
{* end-sanitize-v850 *}