diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-02-09 17:53:16 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-02-09 17:53:16 +0000 |
commit | 069f40e56f8ac85845312a4366afff828b026b7a (patch) | |
tree | 2f39b4868931243c702f5f2aaa377bfb332a15c5 /bfd | |
parent | eadfa8abf1138d72fc1de3c37be9161ad3fdfbff (diff) | |
download | gdb-069f40e56f8ac85845312a4366afff828b026b7a.zip gdb-069f40e56f8ac85845312a4366afff828b026b7a.tar.gz gdb-069f40e56f8ac85845312a4366afff828b026b7a.tar.bz2 |
* elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf64-sparc.c | 23 |
2 files changed, 26 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0a61d2e..2ce1c3c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2001-02-09 Jakub Jelinek <jakub@redhat.com> + * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function. + +2001-02-09 Jakub Jelinek <jakub@redhat.com> + * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count. (sparc64_elf_relocate_section): Likewise. diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c index 59e9f49..77fc7e2 100644 --- a/bfd/elf64-sparc.c +++ b/bfd/elf64-sparc.c @@ -63,6 +63,8 @@ static boolean sparc64_elf_add_symbol_hook 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 *)); @@ -2895,6 +2897,24 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info) /* 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. */ @@ -3116,7 +3136,8 @@ const struct elf_size_info sparc64_elf_size_info = 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 |