mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-25 13:09:48 +00:00
1e2f5b6e6b
examining to gc_mark_hook, rather than the bfd. (elf_gc_sections): Adjust. * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise. * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise. * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise. * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise. * elf32-cris.c (cris_elf_gc_mark_hook): Likewise. * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise. * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise. * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise. * elf32-i386.c (elf_i386_gc_mark_hook): Likewise. * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise. * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise. * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise. * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise. * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise. * elf32-s390.c (elf_s390_gc_mark_hook): Likewise. * elf32-sh.c (sh_elf_gc_mark_hook): Likewise. * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise. * elf32-v850.c (v850_elf_gc_mark_hook): Likewise. * elf32-vax.c (elf_vax_gc_mark_hook): Likewise. * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise. * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise. * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise. * elf64-s390.c (elf_s390_gc_mark_hook): Likewise. * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise. * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise. * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove redundant local sym tests. * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry. (link_hash_newfunc): Init is_entry. (ppc64_elf_copy_indirect_symbol): Copy is_entry. (ppc64_elf_link_hash_table_create): Init all_local_syms. (create_linkage_sections): Use bfd_make_section_anyway rather than bfd_make_section. (ppc64_elf_mark_entry_syms): New function. (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set up opd entry to function section map. (ppc64_elf_gc_mark_hook): Special case opd section relocs, and relocs that reference the opd section. (edit_opd): New function. (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd. (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here. (get_local_syms): Do so here. Exit if we already have local syms. Remove bogus comment imported from elf32-hppa.c. Don't attempt to read local syms on non-ELF input. (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather than duplicating it's function here. Adjust free of internal relocs to suit. (ppc64_elf_relocate_section): Adjust local syms in opd section. * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare. * elf32-hppa.c (elf32_hppa_size_stubs): Call _bfd_elf32_link_read_relocs rather than duplicating it's function here. Adjust free of internal relocs to suit.
103 lines
4.6 KiB
C
103 lines
4.6 KiB
C
/* MIPS ELF specific backend routines.
|
|
Copyright 2002 Free Software Foundation, Inc.
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
#include "elf/common.h"
|
|
#include "elf/internal.h"
|
|
|
|
extern void _bfd_mips_elf_symbol_processing
|
|
PARAMS ((bfd *, asymbol *));
|
|
extern boolean _bfd_mips_elf_section_processing
|
|
PARAMS ((bfd *, Elf_Internal_Shdr *));
|
|
extern boolean _bfd_mips_elf_section_from_shdr
|
|
PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
|
|
extern boolean _bfd_mips_elf_fake_sections
|
|
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
|
|
extern boolean _bfd_mips_elf_section_from_bfd_section
|
|
PARAMS ((bfd *, asection *, int *));
|
|
extern boolean _bfd_mips_elf_add_symbol_hook
|
|
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
|
|
const char **, flagword *, asection **, bfd_vma *));
|
|
extern boolean _bfd_mips_elf_link_output_symbol_hook
|
|
PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
|
|
asection *));
|
|
extern boolean _bfd_mips_elf_create_dynamic_sections
|
|
PARAMS ((bfd *, struct bfd_link_info *));
|
|
extern boolean _bfd_mips_elf_check_relocs
|
|
PARAMS ((bfd *, struct bfd_link_info *, asection *,
|
|
const Elf_Internal_Rela *));
|
|
extern boolean _bfd_mips_elf_adjust_dynamic_symbol
|
|
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
|
|
extern boolean _bfd_mips_elf_always_size_sections
|
|
PARAMS ((bfd *, struct bfd_link_info *));
|
|
extern boolean _bfd_mips_elf_size_dynamic_sections
|
|
PARAMS ((bfd *, struct bfd_link_info *));
|
|
extern boolean _bfd_mips_elf_relocate_section
|
|
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
|
|
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
|
|
extern boolean _bfd_mips_elf_finish_dynamic_symbol
|
|
PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
|
|
Elf_Internal_Sym *));
|
|
extern boolean _bfd_mips_elf_finish_dynamic_sections
|
|
PARAMS ((bfd *, struct bfd_link_info *));
|
|
extern void _bfd_mips_elf_final_write_processing
|
|
PARAMS ((bfd *, boolean));
|
|
extern int _bfd_mips_elf_additional_program_headers
|
|
PARAMS ((bfd *));
|
|
extern boolean _bfd_mips_elf_modify_segment_map
|
|
PARAMS ((bfd *));
|
|
extern asection * _bfd_mips_elf_gc_mark_hook
|
|
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
|
|
struct elf_link_hash_entry *, Elf_Internal_Sym *));
|
|
extern boolean _bfd_mips_elf_gc_sweep_hook
|
|
PARAMS ((bfd *, struct bfd_link_info *, asection *,
|
|
const Elf_Internal_Rela *));
|
|
extern void _bfd_mips_elf_copy_indirect_symbol
|
|
PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
|
|
extern void _bfd_mips_elf_hide_symbol
|
|
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
|
|
extern boolean _bfd_mips_elf_ignore_discarded_relocs
|
|
PARAMS ((asection *));
|
|
extern boolean _bfd_mips_elf_find_nearest_line
|
|
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
|
|
const char **, unsigned int *));
|
|
extern boolean _bfd_mips_elf_set_section_contents
|
|
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
|
|
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
|
|
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
|
|
bfd_byte *, boolean, asymbol **));
|
|
extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create
|
|
PARAMS ((bfd *));
|
|
extern boolean _bfd_mips_elf_final_link
|
|
PARAMS ((bfd *, struct bfd_link_info *));
|
|
extern boolean _bfd_mips_elf_merge_private_bfd_data
|
|
PARAMS ((bfd *, bfd *));
|
|
extern boolean _bfd_mips_elf_set_private_flags
|
|
PARAMS ((bfd *, flagword));
|
|
extern boolean _bfd_mips_elf_print_private_bfd_data
|
|
PARAMS ((bfd *, PTR));
|
|
|
|
extern boolean _bfd_mips_elf_read_ecoff_info
|
|
PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
|
|
extern bfd_reloc_status_type _bfd_mips_elf_gprel16_with_gp
|
|
PARAMS ((bfd *, asymbol *, arelent *, asection *, boolean, PTR, bfd_vma));
|
|
extern bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc
|
|
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
|
|
extern unsigned long _bfd_elf_mips_mach
|
|
PARAMS ((flagword));
|