From: Ken Raeburn Date: Thu, 17 Nov 1994 22:46:22 +0000 (+0000) Subject: * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fca2b81b889bd762c39d781887d97ef5bfcb5e36;p=binutils-gdb.git * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL. * bfd-in2.h, libbfd.h: Rebuilt. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 50cf12a604c..77c1e142621 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 17 17:37:39 1994 Ken Raeburn + + * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL. + * bfd-in2.h, libbfd.h: Rebuilt. + Thu Nov 17 13:12:08 1994 Jeff Law (law@snake.cs.utah.edu) * bfd/elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 74cef228964..9beb9710255 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -545,11 +545,11 @@ extern boolean bfd_elf32_record_link_assignment extern boolean bfd_elf64_record_link_assignment PARAMS ((bfd *, struct bfd_link_info *, const char *)); extern boolean bfd_elf32_size_dynamic_sections - PARAMS ((bfd *, const char *, const char *, struct bfd_link_info *, - struct sec **)); + PARAMS ((bfd *, const char *, const char *, boolean, + struct bfd_link_info *, struct sec **)); extern boolean bfd_elf64_size_dynamic_sections - PARAMS ((bfd *, const char *, const char *, struct bfd_link_info *, - struct sec **)); + PARAMS ((bfd *, const char *, const char *, boolean, + struct bfd_link_info *, struct sec **)); extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); /* SunOS shared library support routines for the linker. */ @@ -1277,6 +1277,15 @@ bfd_perform_relocation bfd *output_bfd, char **error_message)); +bfd_reloc_status_type + +bfd_install_relocation + PARAMS ((bfd *abfd, + arelent *reloc_entry, + PTR data, bfd_vma data_start, + asection *input_section, + char **error_message)); + enum bfd_reloc_code_real { _dummy_first_bfd_reloc_code_real, @@ -1298,6 +1307,7 @@ The 24-bit relocation is used in some Intel 960 configurations. */ BFD_RELOC_32_PCREL, BFD_RELOC_24_PCREL, BFD_RELOC_16_PCREL, + BFD_RELOC_12_PCREL, BFD_RELOC_8_PCREL, /* Linkage-table relative. */ @@ -1308,11 +1318,12 @@ The 24-bit relocation is used in some Intel 960 configurations. */ /* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */ BFD_RELOC_8_FFnn, -/* These PC-relative relocations are stored as word displacements -- i.e., -byte displacements shifted right two bits. The 30-bit word displacement -(<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the SPARC. The signed -16-bit displacement is used on the MIPS, and the 23-bit displacement is -used on the Alpha. */ +/* These PC-relative relocations are stored as word displacements -- +i.e., byte displacements shifted right two bits. The 30-bit word +displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the +SPARC. (SPARC tools generally refer to this as <>.) The +signed 16-bit displacement is used on the MIPS, and the 23-bit +displacement is used on the Alpha. */ BFD_RELOC_32_PCREL_S2, BFD_RELOC_16_PCREL_S2, BFD_RELOC_23_PCREL_S2, @@ -1609,12 +1620,15 @@ typedef struct symbol_cache_entry /* A pointer to the section to which this symbol is relative. This will always be non NULL, there are special - sections for undefined and absolute symbols */ + sections for undefined and absolute symbols. */ struct sec *section; - /* Back end special data. This is being phased out in favour - of making this a union. */ - PTR udata; + /* Back end special data. */ + union + { + PTR p; + bfd_vma i; + } udata; } asymbol; #define bfd_get_symtab_upper_bound(abfd) \ @@ -2057,6 +2071,7 @@ CAT(NAME,_core_file_matches_executable_p) #define BFD_JUMP_TABLE_ARCHIVE(NAME)\ CAT(NAME,_slurp_armap),\ CAT(NAME,_slurp_extended_name_table),\ +CAT(NAME,_construct_extended_name_table),\ CAT(NAME,_truncate_arname),\ CAT(NAME,_write_armap),\ CAT(NAME,_openr_next_archived_file),\ @@ -2064,6 +2079,8 @@ CAT(NAME,_generic_stat_arch_elt),\ CAT(NAME,_update_armap_timestamp) boolean (*_bfd_slurp_armap) PARAMS ((bfd *)); boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *)); + boolean (*_bfd_construct_extended_name_table) + PARAMS ((bfd *, char **, bfd_size_type *, const char **)); void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *)); boolean (*write_armap) PARAMS ((bfd *arch, unsigned int elength, diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 5eddfaa287d..a9484ee2534 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -95,15 +95,12 @@ boolean bfd_slurp_bsd_armap_f2 PARAMS ((bfd *abfd)); #define bfd_slurp_bsd_armap bfd_slurp_armap #define bfd_slurp_coff_armap bfd_slurp_armap boolean _bfd_slurp_extended_name_table PARAMS ((bfd *abfd)); +extern boolean _bfd_construct_extended_name_table + PARAMS ((bfd *, boolean, char **, bfd_size_type *)); boolean _bfd_write_archive_contents PARAMS ((bfd *abfd)); bfd *_bfd_get_elt_at_filepos PARAMS ((bfd *archive, file_ptr filepos)); bfd * _bfd_new_bfd PARAMS ((void)); -#define DEFAULT_STRING_SPACE_SIZE 0x2000 -boolean bfd_add_to_string_table PARAMS ((char **table, char *new_string, - unsigned int *table_length, - char **free_ptr)); - boolean bfd_false PARAMS ((bfd *ignore)); boolean bfd_true PARAMS ((bfd *ignore)); PTR bfd_nullvoidptr PARAMS ((bfd *ignore)); @@ -167,6 +164,9 @@ extern boolean _bfd_nocore_core_file_matches_executable_p #define _bfd_noarchive_slurp_armap bfd_false #define _bfd_noarchive_slurp_extended_name_table bfd_false +#define _bfd_noarchive_construct_extended_name_table \ + ((boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \ + bfd_false) #define _bfd_noarchive_truncate_arname \ ((void (*) PARAMS ((bfd *, const char *, char *))) bfd_void) #define _bfd_noarchive_write_armap \ @@ -184,6 +184,8 @@ extern boolean _bfd_nocore_core_file_matches_executable_p #define _bfd_archive_bsd_slurp_armap bfd_slurp_bsd_armap #define _bfd_archive_bsd_slurp_extended_name_table \ _bfd_slurp_extended_name_table +extern boolean _bfd_archive_bsd_construct_extended_name_table + PARAMS ((bfd *, char **, bfd_size_type *, const char **)); #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname #define _bfd_archive_bsd_write_armap bsd_write_armap #define _bfd_archive_bsd_openr_next_archived_file \ @@ -198,6 +200,8 @@ extern boolean _bfd_archive_bsd_update_armap_timestamp PARAMS ((bfd *)); #define _bfd_archive_coff_slurp_armap bfd_slurp_coff_armap #define _bfd_archive_coff_slurp_extended_name_table \ _bfd_slurp_extended_name_table +extern boolean _bfd_archive_coff_construct_extended_name_table + PARAMS ((bfd *, char **, bfd_size_type *, const char **)); #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname #define _bfd_archive_coff_write_armap coff_write_armap #define _bfd_archive_coff_openr_next_archived_file \ @@ -446,11 +450,6 @@ bfd_open_file PARAMS ((bfd *abfd)); FILE * bfd_cache_lookup_worker PARAMS ((bfd *abfd)); -boolean -bfd_constructor_entry PARAMS ((bfd *abfd, - asymbol **symbol_ptr_ptr, - CONST char*type)); - #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", @@ -465,6 +464,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_32_PCREL", "BFD_RELOC_24_PCREL", "BFD_RELOC_16_PCREL", + "BFD_RELOC_12_PCREL", "BFD_RELOC_8_PCREL", "BFD_RELOC_32_BASEREL", "BFD_RELOC_16_BASEREL", @@ -546,6 +546,13 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_PPC_BA26", "BFD_RELOC_PPC_TOC16", "BFD_RELOC_CTOR", + "BFD_RELOC_ARM_PCREL_BRANCH", + "BFD_RELOC_ARM_IMMEDIATE", + "BFD_RELOC_ARM_OFFSET_IMM", + "BFD_RELOC_ARM_SHIFT_IMM", + "BFD_RELOC_ARM_SWI", + "BFD_RELOC_ARM_MULTI", + "BFD_RELOC_ARM_CP_OFF_IMM", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif diff --git a/bfd/reloc.c b/bfd/reloc.c index 24a5236a0f8..ade22e247f6 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -964,7 +964,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset, const reloc_howto_type *howto = reloc_entry->howto; asection *reloc_target_output_section; asymbol *symbol; - PTR data; + bfd_byte *data; symbol = *(reloc_entry->sym_ptr_ptr); if (bfd_is_abs_section (symbol->section)) @@ -1681,6 +1681,8 @@ ENUMX BFD_RELOC_24_PCREL ENUMX BFD_RELOC_16_PCREL +ENUMX + BFD_RELOC_12_PCREL ENUMX BFD_RELOC_8_PCREL ENUMDOC @@ -1711,11 +1713,12 @@ ENUMX ENUMX BFD_RELOC_23_PCREL_S2 ENUMDOC - These PC-relative relocations are stored as word displacements -- i.e., -byte displacements shifted right two bits. The 30-bit word displacement -(<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the SPARC. The signed -16-bit displacement is used on the MIPS, and the 23-bit displacement is -used on the Alpha. + These PC-relative relocations are stored as word displacements -- +i.e., byte displacements shifted right two bits. The 30-bit word +displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the +SPARC. (SPARC tools generally refer to this as <>.) The +signed 16-bit displacement is used on the MIPS, and the 23-bit +displacement is used on the Alpha. ENUM BFD_RELOC_HI22