* elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
(_bfd_mips_elf_copy_private_bfd_data): Removed.
* elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
the ELF header.
* elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
(bfd_elf??_bfd_copy_private_bfd_data): Removed.
* elf32-m32r.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-mcore.c: Likewise.
* elf32-mips.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-v850.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-sparc.c: Likewise.
* elfxx-ia64.c: Likewise.
* elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
* elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
to _bfd_elf_copy_private_bfd_data.
+2001-12-18 H.J. Lu <hjl@gnu.org>
+
+ * elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
+ (_bfd_mips_elf_copy_private_bfd_data): Removed.
+
+ * elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
+ the ELF header.
+
+ * elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
+ (bfd_elf??_bfd_copy_private_bfd_data): Removed.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+
+ * elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
+
+ * elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
+ to _bfd_elf_copy_private_bfd_data.
+
2001-12-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
* elf32-s390 (elf_s390_check_relocs): Pass addend to
extern char *bfd_elf_get_str_section
PARAMS ((bfd *, unsigned));
+extern boolean _bfd_elf_copy_private_bfd_data
+ PARAMS ((bfd *, bfd *));
extern boolean _bfd_elf_print_private_bfd_data
PARAMS ((bfd *, PTR));
extern void bfd_elf_print_symbol
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
extern boolean _bfd_mips_elf_set_private_flags
PARAMS ((bfd *, flagword));
-extern boolean _bfd_mips_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
extern boolean _bfd_mips_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
extern boolean _bfd_mips_elf_find_nearest_line
\f
/* Print out the program headers. */
+boolean
+_bfd_elf_copy_private_bfd_data (ibfd, obfd)
+ bfd *ibfd;
+ bfd *obfd;
+{
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return true;
+
+ BFD_ASSERT (!elf_flags_init (obfd)
+ || (elf_elfheader (obfd)->e_flags
+ == elf_elfheader (ibfd)->e_flags));
+
+ elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+ elf_flags_init (obfd) = true;
+ return true;
+}
+
boolean
_bfd_elf_print_private_bfd_data (abfd, farg)
bfd *abfd;
return i370_elf_howto_table[ (int)i370_reloc ];
};
-static boolean i370_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *));
static boolean i370_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
static boolean i370_elf_relocate_section PARAMS ((bfd *,
return true;
}
-/* Copy backend specific data from one object module to another */
-static boolean
-i370_elf_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
-{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking */
static boolean
#define bfd_elf32_bfd_reloc_type_lookup i370_elf_reloc_type_lookup
#define bfd_elf32_bfd_set_private_flags i370_elf_set_private_flags
-#define bfd_elf32_bfd_copy_private_bfd_data i370_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data i370_elf_merge_private_bfd_data
#define elf_backend_relocate_section i370_elf_relocate_section
PARAMS ((bfd *, boolean));
static boolean m32r_elf_set_private_flags
PARAMS ((bfd *, flagword));
-static boolean m32r_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean m32r_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean m32r_elf_print_private_bfd_data
return true;
}
-/* Copy backend specific data from one object module to another */
-static boolean
-m32r_elf_copy_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_gp (obfd) = elf_gp (ibfd);
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
static boolean
#define elf_backend_object_p m32r_elf_object_p
#define elf_backend_final_write_processing m32r_elf_final_write_processing
-#define bfd_elf32_bfd_copy_private_bfd_data m32r_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data m32r_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags m32r_elf_set_private_flags
#define bfd_elf32_bfd_print_private_bfd_data m32r_elf_print_private_bfd_data
static boolean elf32_m68k_set_private_flags
PARAMS ((bfd *, flagword));
-static boolean elf32_m68k_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean elf32_m68k_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean elf32_m68k_print_private_bfd_data
return true;
}
-/* Copy m68k-specific data from one module to another */
-static boolean
-elf32_m68k_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
-{
- flagword in_flags;
-
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- in_flags = elf_elfheader (ibfd)->e_flags;
-
- elf_elfheader (obfd)->e_flags = in_flags;
- elf_flags_init (obfd) = true;
-
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
static boolean
elf_m68k_finish_dynamic_sections
#define elf_backend_gc_mark_hook elf_m68k_gc_mark_hook
#define elf_backend_gc_sweep_hook elf_m68k_gc_sweep_hook
-#define bfd_elf32_bfd_copy_private_bfd_data \
- elf32_m68k_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data \
elf32_m68k_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags \
PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
static boolean mcore_elf_set_private_flags
PARAMS ((bfd *, flagword));
-static boolean mcore_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean mcore_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static bfd_reloc_status_type mcore_elf_unsupported_reloc
return true;
}
-/* Copy backend specific data from one object module to another. */
-static boolean
-mcore_elf_copy_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (! elf_flags_init (obfd)
- || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
static boolean
#define elf_info_to_howto mcore_elf_info_to_howto
#define elf_info_to_howto_rel NULL
-#define bfd_elf32_bfd_copy_private_bfd_data mcore_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data mcore_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags mcore_elf_set_private_flags
#define bfd_elf32_bfd_reloc_type_lookup mcore_elf_reloc_type_lookup
return true;
}
-/* Copy backend specific data from one object module to another */
-
-boolean
-_bfd_mips_elf_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
-{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_gp (obfd) = elf_gp (ibfd);
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
#define bfd_elf32_bfd_link_hash_table_create \
_bfd_mips_elf_link_hash_table_create
#define bfd_elf32_bfd_final_link _bfd_mips_elf_final_link
-#define bfd_elf32_bfd_copy_private_bfd_data \
- _bfd_mips_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data \
_bfd_mips_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags _bfd_mips_elf_set_private_flags
static bfd_reloc_status_type ppc_elf_addr16_ha_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean ppc_elf_set_private_flags PARAMS ((bfd *, flagword));
-static boolean ppc_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *));
static boolean ppc_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
static int ppc_elf_additional_program_headers PARAMS ((bfd *));
return true;
}
-/* Copy backend specific data from one object module to another */
-static boolean
-ppc_elf_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
-{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking */
static boolean
#define elf_backend_got_header_size 12
#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
-#define bfd_elf32_bfd_copy_private_bfd_data ppc_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data ppc_elf_merge_private_bfd_data
#define bfd_elf32_bfd_relax_section ppc_elf_relax_section
#define bfd_elf32_bfd_reloc_type_lookup ppc_elf_reloc_type_lookup
PARAMS ((bfd *, boolean));
static boolean v850_elf_set_private_flags
PARAMS ((bfd *, flagword));
-static boolean v850_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean v850_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean v850_elf_print_private_bfd_data
return true;
}
-/* Copy backend specific data from one object module to another. */
-
-static boolean
-v850_elf_copy_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_gp (obfd) = elf_gp (ibfd);
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
-
- return true;
-}
-
/* Merge backend specific data from an object file
to the output object file when linking. */
static boolean
#define bfd_elf32_bfd_is_local_label_name v850_elf_is_local_label_name
#define bfd_elf32_bfd_reloc_type_lookup v850_elf_reloc_type_lookup
-#define bfd_elf32_bfd_copy_private_bfd_data v850_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data v850_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags v850_elf_set_private_flags
#define bfd_elf32_bfd_print_private_bfd_data v850_elf_print_private_bfd_data
#define bfd_elf64_bfd_link_hash_table_create \
mips_elf64_link_hash_table_create
#define bfd_elf64_bfd_final_link mips_elf64_final_link
-#define bfd_elf64_bfd_copy_private_bfd_data \
- _bfd_mips_elf_copy_private_bfd_data
#define bfd_elf64_bfd_merge_private_bfd_data \
_bfd_mips_elf_merge_private_bfd_data
#define bfd_elf64_bfd_set_private_flags _bfd_mips_elf_set_private_flags
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean ppc64_elf_set_private_flags
PARAMS ((bfd *, flagword));
-static boolean ppc64_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean ppc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean ppc64_elf_section_from_shdr
return true;
}
-/* Copy backend specific data from one object module to another. */
-static boolean
-ppc64_elf_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
-{
- if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
static boolean
#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
#define bfd_elf64_bfd_set_private_flags ppc64_elf_set_private_flags
-#define bfd_elf64_bfd_copy_private_bfd_data ppc64_elf_copy_private_bfd_data
#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
#define bfd_elf64_bfd_final_link ppc64_elf_final_link
static void sparc64_elf_symbol_processing
PARAMS ((bfd *, asymbol *));
-static boolean sparc64_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean sparc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
\f
/* Functions for dealing with the e_flags field. */
-/* Copy backend specific data from one object module to another */
-static boolean
-sparc64_elf_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd, *obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
sparc64_elf_print_symbol_all
#define elf_backend_output_arch_syms \
sparc64_elf_output_arch_syms
-#define bfd_elf64_bfd_copy_private_bfd_data \
- sparc64_elf_copy_private_bfd_data
#define bfd_elf64_bfd_merge_private_bfd_data \
sparc64_elf_merge_private_bfd_data
PARAMS ((bfd *abfd, struct bfd_link_info *info));
static boolean elfNN_ia64_set_private_flags
PARAMS ((bfd *abfd, flagword flags));
-static boolean elfNN_ia64_copy_private_bfd_data
- PARAMS ((bfd *ibfd, bfd *obfd));
static boolean elfNN_ia64_merge_private_bfd_data
PARAMS ((bfd *ibfd, bfd *obfd));
static boolean elfNN_ia64_print_private_bfd_data
return true;
}
-/* Copy backend specific data from one object module to another */
-static boolean
-elfNN_ia64_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd, *obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
static boolean
#define bfd_elfNN_bfd_final_link \
elfNN_ia64_final_link
-#define bfd_elfNN_bfd_copy_private_bfd_data \
- elfNN_ia64_copy_private_bfd_data
#define bfd_elfNN_bfd_merge_private_bfd_data \
elfNN_ia64_merge_private_bfd_data
#define bfd_elfNN_bfd_set_private_flags \
#endif
#ifndef bfd_elfNN_bfd_copy_private_bfd_data
#define bfd_elfNN_bfd_copy_private_bfd_data \
- ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+ _bfd_elf_copy_private_bfd_data
#endif
#ifndef bfd_elfNN_bfd_print_private_bfd_data
#define bfd_elfNN_bfd_print_private_bfd_data \