binutils-gdb/bfd/elf32-m68hc1x.c

1491 lines
42 KiB
C
Raw Normal View History

* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Motorola 68HC11/HC12-specific support for 32-bit ELF
Copyright (C) 1999-2020 Free Software Foundation, Inc.
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
Contributed by Stephane Carrez (stcarrez@nerim.fr)
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 3 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., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
#include "sysdep.h"
PR 14072 * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * sysdep.h: Generate an error if included before config.h. * alpha-opc.c: Include sysdep.h before any other header file. * alpha-dis.c: Likewise. * avr-dis.c: Likewise. * cgen-opc.c: Likewise. * cr16-dis.c: Likewise. * cris-dis.c: Likewise. * crx-dis.c: Likewise. * d10v-dis.c: Likewise. * d10v-opc.c: Likewise. * d30v-dis.c: Likewise. * d30v-opc.c: Likewise. * h8500-dis.c: Likewise. * i370-dis.c: Likewise. * i370-opc.c: Likewise. * m10200-dis.c: Likewise. * m10300-dis.c: Likewise. * micromips-opc.c: Likewise. * mips-opc.c: Likewise. * mips61-opc.c: Likewise. * moxie-dis.c: Likewise. * or32-opc.c: Likewise. * pj-dis.c: Likewise. * ppc-dis.c: Likewise. * ppc-opc.c: Likewise. * s390-dis.c: Likewise. * sh-dis.c: Likewise. * sh64-dis.c: Likewise. * sparc-dis.c: Likewise. * sparc-opc.c: Likewise. * spu-dis.c: Likewise. * tic30-dis.c: Likewise. * tic54x-dis.c: Likewise. * tic80-dis.c: Likewise. * tic80-opc.c: Likewise. * tilegx-dis.c: Likewise. * tilepro-dis.c: Likewise. * v850-dis.c: Likewise. * v850-opc.c: Likewise. * vax-dis.c: Likewise. * w65-dis.c: Likewise. * xgate-dis.c: Likewise. * xtensa-dis.c: Likewise. * rl78-decode.opc: Likewise. * rl78-decode.c: Regenerate. * rx-decode.opc: Likewise. * rx-decode.c: Regenerate. * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * sysdep.h: Generate an error if included before config.h. * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * aclocal.m4: Regenerate. * bfd-in.h: Generate an error if included before config.h. * sysdep.h: Likewise. * bfd-in2.h: Regenerate. * compress.c: Remove #include "config.h". * plugin.c: Likewise. * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * xsymc.c: Likewise. * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * aclocal.m4: Regenerate. * Makefile.am: Use wrappers around C files generated by flex. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * itbl-lex-wrapper.c: New file. * config/bfin-lex-wrapper.c: New file. * cgen.c: Include as.h before setjmp.h. * config/tc-dlx.c: Include as.h before any other header. * config/tc-h8300.c: Likewise. * config/tc-lm32.c: Likewise. * config/tc-mep.c: Likewise. * config/tc-microblaze.c: Likewise. * config/tc-mmix.c: Likewise. * config/tc-msp430.c: Likewise. * config/tc-or32.c: Likewise. * config/tc-tic4x.c: Likewise. * config/tc-tic54x.c: Likewise. * config/tc-xtensa.c: Likewise. * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * unwind-ia64.h: Include config.h.
2012-05-17 17:13:28 +02:00
#include "alloca-conf.h"
#include "bfd.h"
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf32-m68hc1x.h"
#include "elf/m68hc11.h"
#include "opcode/m68hc11.h"
#include "libiberty.h"
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
#define m68hc12_stub_hash_lookup(table, string, create, copy) \
((struct elf32_m68hc11_stub_hash_entry *) \
bfd_hash_lookup ((table), (string), (create), (copy)))
static struct elf32_m68hc11_stub_hash_entry* m68hc12_add_stub
(const char *stub_name,
asection *section,
struct m68hc11_elf_link_hash_table *htab);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
static struct bfd_hash_entry *stub_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
static void m68hc11_elf_set_symbol (bfd* abfd, struct bfd_link_info *info,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
const char* name, bfd_vma value,
asection* sec);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
static bfd_boolean m68hc11_elf_export_one_stub
(struct bfd_hash_entry *gen_entry, void *in_arg);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
* aix386-core.c: Remove use of PTR and PARAMS macros. * archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise.
2012-07-13 16:22:50 +02:00
static void scan_sections_for_abi (bfd*, asection*, void *);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
struct m68hc11_scan_param
{
struct m68hc11_page_info* pinfo;
bfd_boolean use_memory_banks;
};
/* Destroy a 68HC11/68HC12 ELF linker hash table. */
Free linker hash table from bfd_close. Also tidies numerous error exit paths in various link_hash_table_create functions that failed to free memory. include/ * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. bfd/ * archive.c: Include bfdlink.h. (_bfd_archive_close_and_cleanup): Call linker hash_table_free. * bfd.c (struct bfd): Add is_linker_output field. * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype. * linker.c (_bfd_link_hash_table_init): Set up hash_table_free, link.hash and is_linker_output. (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Assert is_linker_output and link.hash, and clear them before exit. * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Hack is_linker_output and link.hash so we can free two linker hash tables. (elf32_mn10300_link_hash_table_create): Create static_hash_table first. Clean up on errors. Set hash_table_free pointer. * elf32-arm.c (elf32_arm_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. (elf32_arm_link_hash_table_create): Clean up on errors. Set hash_table_free pointer. * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c: Similarly. * simple.c (bfd_simple_get_relocated_section_contents): Save and clear link.next before creating linker hash table. Clean up on errors, and restore link.next on exit. * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete. * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete. * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete. * hash.c (bfd_hash_table_init_n): Free table on error. * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
2014-06-13 11:41:39 +02:00
static void
m68hc11_elf_bfd_link_hash_table_free (bfd *obfd)
{
struct m68hc11_elf_link_hash_table *ret
Free linker hash table from bfd_close. Also tidies numerous error exit paths in various link_hash_table_create functions that failed to free memory. include/ * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. bfd/ * archive.c: Include bfdlink.h. (_bfd_archive_close_and_cleanup): Call linker hash_table_free. * bfd.c (struct bfd): Add is_linker_output field. * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype. * linker.c (_bfd_link_hash_table_init): Set up hash_table_free, link.hash and is_linker_output. (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Assert is_linker_output and link.hash, and clear them before exit. * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Hack is_linker_output and link.hash so we can free two linker hash tables. (elf32_mn10300_link_hash_table_create): Create static_hash_table first. Clean up on errors. Set hash_table_free pointer. * elf32-arm.c (elf32_arm_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. (elf32_arm_link_hash_table_create): Clean up on errors. Set hash_table_free pointer. * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c: Similarly. * simple.c (bfd_simple_get_relocated_section_contents): Save and clear link.next before creating linker hash table. Clean up on errors, and restore link.next on exit. * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete. * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete. * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete. * hash.c (bfd_hash_table_init_n): Free table on error. * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
2014-06-13 11:41:39 +02:00
= (struct m68hc11_elf_link_hash_table *) obfd->link.hash;
bfd_hash_table_free (ret->stub_hash_table);
free (ret->stub_hash_table);
Free linker hash table from bfd_close. Also tidies numerous error exit paths in various link_hash_table_create functions that failed to free memory. include/ * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. bfd/ * archive.c: Include bfdlink.h. (_bfd_archive_close_and_cleanup): Call linker hash_table_free. * bfd.c (struct bfd): Add is_linker_output field. * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype. * linker.c (_bfd_link_hash_table_init): Set up hash_table_free, link.hash and is_linker_output. (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Assert is_linker_output and link.hash, and clear them before exit. * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Hack is_linker_output and link.hash so we can free two linker hash tables. (elf32_mn10300_link_hash_table_create): Create static_hash_table first. Clean up on errors. Set hash_table_free pointer. * elf32-arm.c (elf32_arm_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. (elf32_arm_link_hash_table_create): Clean up on errors. Set hash_table_free pointer. * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c: Similarly. * simple.c (bfd_simple_get_relocated_section_contents): Save and clear link.next before creating linker hash table. Clean up on errors, and restore link.next on exit. * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete. * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete. * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete. * hash.c (bfd_hash_table_init_n): Free table on error. * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
2014-06-13 11:41:39 +02:00
_bfd_elf_link_hash_table_free (obfd);
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Create a 68HC11/68HC12 ELF linker hash table. */
struct m68hc11_elf_link_hash_table*
m68hc11_elf_hash_table_create (bfd *abfd)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
struct m68hc11_elf_link_hash_table *ret;
bfd_size_type to size_t bfd_size_type was invented a long time ago in the K&R days. Many places in binutils ought to be using size_t instead (and there are lots of places that use long or unsigned long that really ought to use size_t too). Note that you can't change everything over to size_t: A 32-bit host needs a larger type than size_t to support reading and processing of 64-bit ELF object files. This patch just tidies some of the more obvious uses of bfd_size_type that could be size_t. There no doubt are more lurking in the source. Incidentally, practically all functions used for output of object files can use size_t and don't need to worry about overflow of size expressions. If you have something like symcount * sizeof (void *) when symcount is counting symbols already in memory then you know that this expression can't overflow since the size of a symbol in memory is larger by far than that of a pointer. * aix386-core.c (aix386_core_file_p): Use size_t for "amt". * aout-target.h (object_p): Likewise. * aout-tic30.c (tic30_aout_object_p): Likewise. * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol), (emit_stringtab, write_syms, link_hash_table_create), (aout_link_write_other_symbol): Likewise. * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p), (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents), (_bfd_compute_and_write_armap): Likewise. * archures.c (bfd_arch_list): Likewise. * bfd.c (bfd_record_phdr): Likewise. * binary.c (binary_canonicalize_symtab): Likewise. * cisco-core.c (cisco_core_file_validate): Likewise. * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue), (find_arm_glue, record_arm_to_thumb_glue), (record_thumb_to_arm_glue): Likewise. * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc), (ppc_allocate_toc_section): Likewise. * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise. * coff-sh.c (sh_relax_section): Likewise. * coff64-rs6000.c (xcoff64_archive_p): Likewise. * coffcode.h (handle_COMDAT, coff_new_section_hook), (coff_set_alignment_hook, coff_mkobject), (coff_compute_section_file_positions): Likewise. * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol), (coff_find_nearest_line_with_names), ( bfd_coff_set_symbol_class): Likewise. * cofflink.c (_bfd_coff_link_hash_table_create), (_bfd_coff_link_input_bfd): Likewise. * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise. * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info), (build_line_info_table, sort_line_sequences), (line_info_add_include_dir, line_info_add_file_name), (decode_line_info, scan_unit_for_symbols, parse_comp_unit), (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise. * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol), (_bfd_ecoff_find_nearest_line), (_bfd_ecoff_bfd_link_hash_table_create): Likewise. * ecofflink.c (bfd_ecoff_debug_init): Likewise. * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise. * elf-m10300.c (mn10300_elf_relax_section), (elf32_mn10300_link_hash_table_create): Likewise. * elf-strtab.c (_bfd_elf_strtab_init): Likewise. * elf.c (make_mapping, copy_elf_program_header): Likewise. * elf32-arm.c (elf32_arm_link_hash_table_create), (elf32_arm_setup_section_lists, elf32_arm_check_relocs), (elf32_arm_new_section_hook): Likewise. * elf32-avr.c (elf_avr_new_section_hook), (elf32_avr_link_hash_table_create, get_local_syms), (elf32_avr_setup_section_lists): Likewise. * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create), (bfin_link_hash_table_create): Likewise. * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. * elf32-csky.c (csky_elf_link_hash_table_create), (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise. * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise. * elf32-hppa.c (elf32_hppa_link_hash_table_create), (elf32_hppa_setup_section_lists, get_local_syms): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. * elf32-m32r.c (m32r_elf_link_hash_table_create), (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (m68hc11_elf_hash_table_create), (elf32_m68hc11_setup_section_lists), (elf32_m68hc11_size_stubs): Likewise. * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. * elf32-metag.c (elf_metag_link_hash_table_create), (elf_metag_setup_section_lists): Likewise. * elf32-microblaze.c (microblaze_elf_link_hash_table_create), (microblaze_elf_check_relocs): Likewise. * elf32-nds32.c (nds32_elf_link_hash_table_create), (nds32_elf_check_relocs): Likewise. * elf32-nios2.c (nios2_elf32_setup_section_lists), (get_local_syms, nios2_elf32_check_relocs), (nios2_elf32_link_hash_table_create): Likewise. * elf32-or1k.c (or1k_elf_link_hash_table_create), (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise. * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise. * elf32-s390.c (elf_s390_link_hash_table_create), (elf_s390_check_relocs): Likewise. * elf32-score.c (score_elf_create_got_section), (s3_elf32_score_new_section_hook), (elf32_score_link_hash_table_create): Likewise. * elf32-score7.c (score_elf_create_got_section), (s7_elf32_score_new_section_hook): Likewise. * elf32-sh.c (sh_elf_link_hash_table_create), (sh_elf_check_relocs): Likewise. * elf32-tic6x.c (elf32_tic6x_link_hash_table_create), (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise. * elf32-tilepro.c (tilepro_elf_link_hash_table_create), (tilepro_elf_check_relocs): Likewise. * elf32-v850.c (remember_hi16s_reloc): Likewise. * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. * elf32-xtensa.c (elf_xtensa_link_hash_table_create), (elf_xtensa_new_section_hook): Likewise. * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create), (get_got_entry, elf64_alpha_check_relocs): Likewise. * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise. * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise. * elf64-mmix.c (mmix_elf_new_section_hook): Likewise. * elf64-ppc.c (ppc64_elf_new_section_hook), (ppc64_elf_link_hash_table_create, update_local_sym_info), (update_plt_info, ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_link_hash_table_create), (elf_s390_check_relocs): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. * elflink.c (bfd_elf_link_record_local_dynamic_symbol), (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols), (elf_link_add_archive_symbols, compute_bucket_count), (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create), (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out), (bfd_elf_final_link): Likewise. * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create), (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs), (elfNN_aarch64_new_section_hook): Likewise. * elfnn-ia64.c (elfNN_ia64_object_p): Likewise. * elfnn-riscv.c (riscv_elf_link_hash_table_create), (riscv_elf_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_new_section_hook), (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs), (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents), (_bfd_mips_elf_link_hash_table_create): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create), (_bfd_sparc_elf_check_relocs), (_bfd_sparc_elf_new_section_hook): Likewise. * elfxx-tilegx.c (tilegx_elf_link_hash_table_create), (tilegx_elf_check_relocs): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise. * format.c (bfd_check_format_matches): Likewise. * hash.c (_bfd_stringtab_init): Likewise. * ihex.c (ihex_scan): Likewise. * irix-core.c (irix_core_core_file_p): Likewise. * linker.c (bfd_wrapped_link_hash_lookup), (_bfd_generic_link_hash_table_create), (_bfd_generic_reloc_link_order): Likewise. * lynx-core.c (lynx_core_file_p): Likewise. * netbsd-core.c (netbsd_core_file_p): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol), (link_hash_table_create, aout_link_write_other_symbol): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise. * peicode.h (pe_mkobject): Likewise. * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise. * ptrace-core.c (ptrace_unix_core_file_p): Likewise. * sco5-core.c (read_uarea): Likewise. * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers), (som_write_fixups, som_write_space_strings, som_write_symbol_strings), (som_finish_writing, som_canonicalize_symtab, som_new_section_hook), (som_bfd_copy_private_section_data, bfd_som_set_section_attributes), (bfd_som_attach_aux_hdr, som_write_armap): Likewise. * srec.c (srec_scan): Likewise. * syms.c (_bfd_generic_make_empty_symbol): Likewise. * targets.c (bfd_target_list): Likewise. * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise. * trad-core.c (trad_unix_core_file_p): Likewise. * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create), (vms_new_section_hook): Likewise. * wasm-module.c (wasm_make_empty_symbol): Likewise. * xcofflink.c (xcoff_get_section_contents), (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path), (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym), (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
2020-02-19 03:42:00 +01:00
size_t amt = sizeof (struct m68hc11_elf_link_hash_table);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
* coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc. * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise. * m68klinux.c (linux_link_hash_table_create): Likewise. * sparclinux.c (linux_link_hash_table_create): Likewise. * sunos.c (sunos_link_hash_table_create): Likewise. * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise. * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise. * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise. * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise. * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise. * elf32-i386.c (elf_i386_link_hash_table_create): Likewise. * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise. * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise. * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. * elf32-metag.c (elf_metag_link_hash_table_create): Likewise. * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise. * elf32-s390.c (elf_s390_link_hash_table_create): Likewise. * elf32-score.c (elf32_score_link_hash_table_create): Likewise. * elf32-spu.c (spu_elf_link_hash_table_create): Likewise. * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise. * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise. * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise. * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise. * elf64-s390.c (elf_s390_link_hash_table_create): Likewise. * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise. * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise. * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise. * elflink.c (_bfd_elf_link_hash_table_create): Likewise. (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
2013-02-10 05:36:33 +01:00
ret = (struct m68hc11_elf_link_hash_table *) bfd_zmalloc (amt);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (ret == (struct m68hc11_elf_link_hash_table *) NULL)
return NULL;
PR 2434 bfd/ * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete. (elf_link_add_object_symbols): Delete unnecessary locals. Rename hash_table -> htab. Formatting. Save entire symbol table before loading as-needed syms, and restore afterwards if lib not needed. Use bfd_hash_allocate rather than bfd_alloc for sym name. Free some buffers earlier. * bfd-in.h (struct bfd_hash_table): Add entsize. (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype. * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise * hash.c (bfd_hash_table_init_n): Add entsize param, save to hash table. (bfd_hash_table_init): Add param, adjust calls. * aoutx.h: Adjust all hash_table_init functions and calls. * bfd.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10300.c: Likewise. * elf-strtab.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * i386linux.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * libcoff-in.h: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * merge.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * sparclinux.c: Likewise. * stabs.c: Likewise. * sunos.c: Likewise. * vms.c: Likewise. * xcofflink.c: Likewise. * section.c (struct section_hash_entry): Move to.. * libbfd-in.h: ..here. * Makefile.am: Run "make dep-am" * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. binutils/ * ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls. * wrstabs.c (write_stabs_in_sections_debugging_info): Likewise. ld/ * ldcref.c (add_cref): Adjust bfd_hash_table_init calls. * ldlang.c (output_statement_table_init, lang_init): Likewise. * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise. (undefined_symbol): Likewise.
2006-03-16 13:20:16 +01:00
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
_bfd_elf_link_hash_newfunc,
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
sizeof (struct elf_link_hash_entry),
M68HC11_ELF_DATA))
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
free (ret);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return NULL;
}
/* Init the stub hash table too. */
amt = sizeof (struct bfd_hash_table);
ret->stub_hash_table = (struct bfd_hash_table*) bfd_malloc (amt);
if (ret->stub_hash_table == NULL)
{
Free linker hash table from bfd_close. Also tidies numerous error exit paths in various link_hash_table_create functions that failed to free memory. include/ * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. bfd/ * archive.c: Include bfdlink.h. (_bfd_archive_close_and_cleanup): Call linker hash_table_free. * bfd.c (struct bfd): Add is_linker_output field. * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype. * linker.c (_bfd_link_hash_table_init): Set up hash_table_free, link.hash and is_linker_output. (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Assert is_linker_output and link.hash, and clear them before exit. * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Hack is_linker_output and link.hash so we can free two linker hash tables. (elf32_mn10300_link_hash_table_create): Create static_hash_table first. Clean up on errors. Set hash_table_free pointer. * elf32-arm.c (elf32_arm_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. (elf32_arm_link_hash_table_create): Clean up on errors. Set hash_table_free pointer. * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c: Similarly. * simple.c (bfd_simple_get_relocated_section_contents): Save and clear link.next before creating linker hash table. Clean up on errors, and restore link.next on exit. * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete. * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete. * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete. * hash.c (bfd_hash_table_init_n): Free table on error. * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
2014-06-13 11:41:39 +02:00
_bfd_elf_link_hash_table_free (abfd);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return NULL;
}
PR 2434 bfd/ * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete. (elf_link_add_object_symbols): Delete unnecessary locals. Rename hash_table -> htab. Formatting. Save entire symbol table before loading as-needed syms, and restore afterwards if lib not needed. Use bfd_hash_allocate rather than bfd_alloc for sym name. Free some buffers earlier. * bfd-in.h (struct bfd_hash_table): Add entsize. (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype. * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise * hash.c (bfd_hash_table_init_n): Add entsize param, save to hash table. (bfd_hash_table_init): Add param, adjust calls. * aoutx.h: Adjust all hash_table_init functions and calls. * bfd.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10300.c: Likewise. * elf-strtab.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * i386linux.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * libcoff-in.h: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * merge.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * sparclinux.c: Likewise. * stabs.c: Likewise. * sunos.c: Likewise. * vms.c: Likewise. * xcofflink.c: Likewise. * section.c (struct section_hash_entry): Move to.. * libbfd-in.h: ..here. * Makefile.am: Run "make dep-am" * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. binutils/ * ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls. * wrstabs.c (write_stabs_in_sections_debugging_info): Likewise. ld/ * ldcref.c (add_cref): Adjust bfd_hash_table_init calls. * ldlang.c (output_statement_table_init, lang_init): Likewise. * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise. (undefined_symbol): Likewise.
2006-03-16 13:20:16 +01:00
if (!bfd_hash_table_init (ret->stub_hash_table, stub_hash_newfunc,
sizeof (struct elf32_m68hc11_stub_hash_entry)))
Free linker hash table from bfd_close. Also tidies numerous error exit paths in various link_hash_table_create functions that failed to free memory. include/ * bfdlink.h (struct bfd_link_hash_table): Add hash_table_free field. bfd/ * archive.c: Include bfdlink.h. (_bfd_archive_close_and_cleanup): Call linker hash_table_free. * bfd.c (struct bfd): Add is_linker_output field. * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype. * linker.c (_bfd_link_hash_table_init): Set up hash_table_free, link.hash and is_linker_output. (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Assert is_linker_output and link.hash, and clear them before exit. * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. Hack is_linker_output and link.hash so we can free two linker hash tables. (elf32_mn10300_link_hash_table_create): Create static_hash_table first. Clean up on errors. Set hash_table_free pointer. * elf32-arm.c (elf32_arm_link_hash_table_free): Replace bfd_link_hash_table* param with bfd*. (elf32_arm_link_hash_table_create): Clean up on errors. Set hash_table_free pointer. * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c: Similarly. * simple.c (bfd_simple_get_relocated_section_contents): Save and clear link.next before creating linker hash table. Clean up on errors, and restore link.next on exit. * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete. * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete. * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete. * hash.c (bfd_hash_table_init_n): Free table on error. * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
2014-06-13 11:41:39 +02:00
{
free (ret->stub_hash_table);
_bfd_elf_link_hash_table_free (abfd);
return NULL;
}
ret->root.root.hash_table_free = m68hc11_elf_bfd_link_hash_table_free;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return ret;
}
/* Assorted hash table functions. */
/* Initialize an entry in the stub hash table. */
static struct bfd_hash_entry *
stub_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
const char *string)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
if (entry == NULL)
{
entry = bfd_hash_allocate (table,
sizeof (struct elf32_m68hc11_stub_hash_entry));
if (entry == NULL)
return entry;
}
/* Call the allocation method of the superclass. */
entry = bfd_hash_newfunc (entry, table, string);
if (entry != NULL)
{
struct elf32_m68hc11_stub_hash_entry *eh;
/* Initialize the local fields. */
eh = (struct elf32_m68hc11_stub_hash_entry *) entry;
eh->stub_sec = NULL;
eh->stub_offset = 0;
eh->target_value = 0;
eh->target_section = NULL;
}
return entry;
}
/* Add a new stub entry to the stub hash. Not all fields of the new
stub entry are initialised. */
static struct elf32_m68hc11_stub_hash_entry *
m68hc12_add_stub (const char *stub_name, asection *section,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
struct m68hc11_elf_link_hash_table *htab)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
struct elf32_m68hc11_stub_hash_entry *stub_entry;
/* Enter this entry into the linker stub hash table. */
stub_entry = m68hc12_stub_hash_lookup (htab->stub_hash_table, stub_name,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
TRUE, FALSE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (stub_entry == NULL)
{
Add c-format tags to translatable strings with more than one argument-using formatting token. * aout-adobe.c: Add missing c-format tags for translatable strings. * aout-cris.c: Likewise. * aoutx.h: Likewise. * bfd.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * cpu-arm.c: Likewise. * dwarf2.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * ppcboot.c: Likewise. * reloc.c: Likewise. * sparclinux.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * xcofflink.c: Likewise.
2016-10-19 15:04:34 +02:00
/* xgettext:c-format */
Use %pA and %pB in messages rather than %A and %B First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise.
2018-02-19 05:51:40 +01:00
_bfd_error_handler (_("%pB: cannot create stub entry %s"),
Remove syntactic sugar Now that _bfd_error_handler is not a function pointer. * aout-adobe.c: Replace (*_bfd_error_handler) (...) with _bfd_error_handler (...) throughout. * aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c, * coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c, * ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c, * ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c, * mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c, * pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c, * rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c, * stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * xcofflink.c: Likewise.
2016-09-30 05:30:18 +02:00
section->owner, stub_name);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return NULL;
}
if (htab->stub_section == 0)
{
htab->stub_section = (*htab->add_stub_section) (".tramp",
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
htab->tramp_section);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
stub_entry->stub_sec = htab->stub_section;
stub_entry->stub_offset = 0;
return stub_entry;
}
/* Hook called by the linker routine which adds symbols from an object
file. We use it for identify far symbols and force a loading of
the trampoline handler. */
bfd_boolean
elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
Elf_Internal_Sym *sym,
const char **namep ATTRIBUTE_UNUSED,
flagword *flagsp ATTRIBUTE_UNUSED,
asection **secp ATTRIBUTE_UNUSED,
bfd_vma *valp ATTRIBUTE_UNUSED)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
if (sym->st_other & STO_M68HC12_FAR)
{
struct elf_link_hash_entry *h;
h = (struct elf_link_hash_entry *)
bfd_link_hash_lookup (info->hash, "__far_trampoline",
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
FALSE, FALSE, FALSE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (h == NULL)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
{
struct bfd_link_hash_entry* entry = NULL;
_bfd_generic_link_add_one_symbol (info, abfd,
"__far_trampoline",
BSF_GLOBAL,
bfd_und_section_ptr,
(bfd_vma) 0, (const char*) NULL,
FALSE, FALSE, &entry);
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
return TRUE;
}
/* Merge non-visibility st_other attributes, STO_M68HC12_FAR and
STO_M68HC12_INTERRUPT. */
void
elf32_m68hc11_merge_symbol_attribute (struct elf_link_hash_entry *h,
const Elf_Internal_Sym *isym,
bfd_boolean definition,
bfd_boolean dynamic ATTRIBUTE_UNUSED)
{
if (definition)
h->other = ((isym->st_other & ~ELF_ST_VISIBILITY (-1))
| ELF_ST_VISIBILITY (h->other));
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* External entry points for sizing and building linker stubs. */
/* Set up various things so that we can make a list of input sections
for each output section included in the link. Returns -1 on error,
0 when no stubs will be needed, and 1 on success. */
int
elf32_m68hc11_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
bfd *input_bfd;
unsigned int bfd_count;
unsigned int top_id, top_index;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
asection *section;
asection **input_list, **list;
bfd_size_type to size_t bfd_size_type was invented a long time ago in the K&R days. Many places in binutils ought to be using size_t instead (and there are lots of places that use long or unsigned long that really ought to use size_t too). Note that you can't change everything over to size_t: A 32-bit host needs a larger type than size_t to support reading and processing of 64-bit ELF object files. This patch just tidies some of the more obvious uses of bfd_size_type that could be size_t. There no doubt are more lurking in the source. Incidentally, practically all functions used for output of object files can use size_t and don't need to worry about overflow of size expressions. If you have something like symcount * sizeof (void *) when symcount is counting symbols already in memory then you know that this expression can't overflow since the size of a symbol in memory is larger by far than that of a pointer. * aix386-core.c (aix386_core_file_p): Use size_t for "amt". * aout-target.h (object_p): Likewise. * aout-tic30.c (tic30_aout_object_p): Likewise. * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol), (emit_stringtab, write_syms, link_hash_table_create), (aout_link_write_other_symbol): Likewise. * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p), (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents), (_bfd_compute_and_write_armap): Likewise. * archures.c (bfd_arch_list): Likewise. * bfd.c (bfd_record_phdr): Likewise. * binary.c (binary_canonicalize_symtab): Likewise. * cisco-core.c (cisco_core_file_validate): Likewise. * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue), (find_arm_glue, record_arm_to_thumb_glue), (record_thumb_to_arm_glue): Likewise. * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc), (ppc_allocate_toc_section): Likewise. * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise. * coff-sh.c (sh_relax_section): Likewise. * coff64-rs6000.c (xcoff64_archive_p): Likewise. * coffcode.h (handle_COMDAT, coff_new_section_hook), (coff_set_alignment_hook, coff_mkobject), (coff_compute_section_file_positions): Likewise. * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol), (coff_find_nearest_line_with_names), ( bfd_coff_set_symbol_class): Likewise. * cofflink.c (_bfd_coff_link_hash_table_create), (_bfd_coff_link_input_bfd): Likewise. * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise. * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info), (build_line_info_table, sort_line_sequences), (line_info_add_include_dir, line_info_add_file_name), (decode_line_info, scan_unit_for_symbols, parse_comp_unit), (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise. * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol), (_bfd_ecoff_find_nearest_line), (_bfd_ecoff_bfd_link_hash_table_create): Likewise. * ecofflink.c (bfd_ecoff_debug_init): Likewise. * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise. * elf-m10300.c (mn10300_elf_relax_section), (elf32_mn10300_link_hash_table_create): Likewise. * elf-strtab.c (_bfd_elf_strtab_init): Likewise. * elf.c (make_mapping, copy_elf_program_header): Likewise. * elf32-arm.c (elf32_arm_link_hash_table_create), (elf32_arm_setup_section_lists, elf32_arm_check_relocs), (elf32_arm_new_section_hook): Likewise. * elf32-avr.c (elf_avr_new_section_hook), (elf32_avr_link_hash_table_create, get_local_syms), (elf32_avr_setup_section_lists): Likewise. * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create), (bfin_link_hash_table_create): Likewise. * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. * elf32-csky.c (csky_elf_link_hash_table_create), (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise. * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise. * elf32-hppa.c (elf32_hppa_link_hash_table_create), (elf32_hppa_setup_section_lists, get_local_syms): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. * elf32-m32r.c (m32r_elf_link_hash_table_create), (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (m68hc11_elf_hash_table_create), (elf32_m68hc11_setup_section_lists), (elf32_m68hc11_size_stubs): Likewise. * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. * elf32-metag.c (elf_metag_link_hash_table_create), (elf_metag_setup_section_lists): Likewise. * elf32-microblaze.c (microblaze_elf_link_hash_table_create), (microblaze_elf_check_relocs): Likewise. * elf32-nds32.c (nds32_elf_link_hash_table_create), (nds32_elf_check_relocs): Likewise. * elf32-nios2.c (nios2_elf32_setup_section_lists), (get_local_syms, nios2_elf32_check_relocs), (nios2_elf32_link_hash_table_create): Likewise. * elf32-or1k.c (or1k_elf_link_hash_table_create), (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise. * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise. * elf32-s390.c (elf_s390_link_hash_table_create), (elf_s390_check_relocs): Likewise. * elf32-score.c (score_elf_create_got_section), (s3_elf32_score_new_section_hook), (elf32_score_link_hash_table_create): Likewise. * elf32-score7.c (score_elf_create_got_section), (s7_elf32_score_new_section_hook): Likewise. * elf32-sh.c (sh_elf_link_hash_table_create), (sh_elf_check_relocs): Likewise. * elf32-tic6x.c (elf32_tic6x_link_hash_table_create), (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise. * elf32-tilepro.c (tilepro_elf_link_hash_table_create), (tilepro_elf_check_relocs): Likewise. * elf32-v850.c (remember_hi16s_reloc): Likewise. * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. * elf32-xtensa.c (elf_xtensa_link_hash_table_create), (elf_xtensa_new_section_hook): Likewise. * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create), (get_got_entry, elf64_alpha_check_relocs): Likewise. * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise. * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise. * elf64-mmix.c (mmix_elf_new_section_hook): Likewise. * elf64-ppc.c (ppc64_elf_new_section_hook), (ppc64_elf_link_hash_table_create, update_local_sym_info), (update_plt_info, ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_link_hash_table_create), (elf_s390_check_relocs): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. * elflink.c (bfd_elf_link_record_local_dynamic_symbol), (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols), (elf_link_add_archive_symbols, compute_bucket_count), (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create), (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out), (bfd_elf_final_link): Likewise. * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create), (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs), (elfNN_aarch64_new_section_hook): Likewise. * elfnn-ia64.c (elfNN_ia64_object_p): Likewise. * elfnn-riscv.c (riscv_elf_link_hash_table_create), (riscv_elf_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_new_section_hook), (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs), (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents), (_bfd_mips_elf_link_hash_table_create): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create), (_bfd_sparc_elf_check_relocs), (_bfd_sparc_elf_new_section_hook): Likewise. * elfxx-tilegx.c (tilegx_elf_link_hash_table_create), (tilegx_elf_check_relocs): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise. * format.c (bfd_check_format_matches): Likewise. * hash.c (_bfd_stringtab_init): Likewise. * ihex.c (ihex_scan): Likewise. * irix-core.c (irix_core_core_file_p): Likewise. * linker.c (bfd_wrapped_link_hash_lookup), (_bfd_generic_link_hash_table_create), (_bfd_generic_reloc_link_order): Likewise. * lynx-core.c (lynx_core_file_p): Likewise. * netbsd-core.c (netbsd_core_file_p): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol), (link_hash_table_create, aout_link_write_other_symbol): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise. * peicode.h (pe_mkobject): Likewise. * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise. * ptrace-core.c (ptrace_unix_core_file_p): Likewise. * sco5-core.c (read_uarea): Likewise. * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers), (som_write_fixups, som_write_space_strings, som_write_symbol_strings), (som_finish_writing, som_canonicalize_symtab, som_new_section_hook), (som_bfd_copy_private_section_data, bfd_som_set_section_attributes), (bfd_som_attach_aux_hdr, som_write_armap): Likewise. * srec.c (srec_scan): Likewise. * syms.c (_bfd_generic_make_empty_symbol): Likewise. * targets.c (bfd_target_list): Likewise. * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise. * trad-core.c (trad_unix_core_file_p): Likewise. * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create), (vms_new_section_hook): Likewise. * wasm-module.c (wasm_make_empty_symbol): Likewise. * xcofflink.c (xcoff_get_section_contents), (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path), (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym), (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
2020-02-19 03:42:00 +01:00
size_t amt;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
asection *text_section;
struct m68hc11_elf_link_hash_table *htab;
htab = m68hc11_elf_hash_table (info);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
if (htab == NULL)
return -1;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
include/ * bfdlink.h (struct bfd_link_hash_table): Delete creator field. (struct bfd_link_info): Add output_bfd. bfd/ * elflink.c: Replace all accesses to hash->creator field with output_bfd->xvec. * cofflink.c: Likewise. * coff-h8300.c: Likewise. * ecoff.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-ppc.c: Likewise. * elf64-alpha.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sparc.c: Likewise. * elfxx-mips.c: Likewise. * i386linux.c: Likewise. * m68klinux.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * xcofflink.c: Likewise. * linker.c: Likewise. (_bfd_link_hash_table_init): Don't store creator. ld/ * ldmain.h (output_bfd): Delete. * ldmain.c (output_bfd): Delete. Replace all occurrences of output_bfd with link_info.output_bfd. * ldcref.c: Likewise. * ldctor.c: Likewise. * ldemul.c: Likewise. * ldexp.c: Likewise. * ldfile.c: Likewise. * ldlang.c: Likewise. * ldmisc.c: Likewise. * ldwrite.c: Likewise. * pe-dll.c: Likewise. * emultempl/aix.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/armcoff.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/irix.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * emultempl/z80.em: Likewise. * ldlang.c (open_output): Don't return output, instead write link_info_output_bfd directly. * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator with link_info.output_bfd->xvec. * emultempl/hppaelf.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/spuelf.em: Likewise.
2008-02-15 04:35:53 +01:00
if (bfd_get_flavour (info->output_bfd) != bfd_target_elf_flavour)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return 0;
/* Count the number of input BFDs and find the top input section id.
Also search for an existing ".tramp" section so that we know
where generated trampolines must go. Default to ".text" if we
can't find it. */
htab->tramp_section = 0;
text_section = 0;
for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
input_bfd != NULL;
input_bfd = input_bfd->link.next)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
bfd_count += 1;
for (section = input_bfd->sections;
section != NULL;
section = section->next)
{
bfd_section_* macros This large patch removes the unnecessary bfd parameter from various bfd section macros and functions. The bfd is hardly ever used and if needed for the bfd_set_section_* or bfd_rename_section functions can be found via section->owner except for the com, und, abs, and ind std_section special sections. Those sections shouldn't be modified anyway. The patch also removes various bfd_get_section_<field> macros, replacing their use with bfd_section_<field>, and adds bfd_set_section_lma. I've also fixed a minor bug in gas where compressed section renaming was done directly rather than calling bfd_rename_section. This would have broken bfd_get_section_by_name and similar functions, but that hardly mattered at such a late stage in gas processing. bfd/ * bfd-in.h (bfd_get_section_name, bfd_get_section_vma), (bfd_get_section_lma, bfd_get_section_alignment), (bfd_get_section_size, bfd_get_section_flags), (bfd_get_section_userdata): Delete. (bfd_section_name, bfd_section_size, bfd_section_vma), (bfd_section_lma, bfd_section_alignment): Lose bfd parameter. (bfd_section_flags, bfd_section_userdata): New. (bfd_is_com_section): Rename parameter. * section.c (bfd_set_section_userdata, bfd_set_section_vma), (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section), (bfd_set_section_size): Delete bfd parameter, rename section parameter. (bfd_set_section_lma): New. * bfd-in2.h: Regenerate. * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param, update callers. * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c, * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c, * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c, * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c, * xcofflink.c: Update throughout for bfd section macro and function changes. binutils/ * addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c, * objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c, * od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c, * resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update throughout for bfd section macro and function changes. gas/ * as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c, * read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c, * config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c, * config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c, * config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c, * config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c, * config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c, * config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c, * config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c, * config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c, * config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c, * config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c, * config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c, * config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c, * config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c, * config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c, * config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c, * config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c, * config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c, * config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for bfd section macro and function changes. * write.c (compress_debug): Use bfd_rename_section. gdb/ * aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c, * coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c, * dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c, * exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h, * hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c, * i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c, * maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c, * mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c, * objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c, * ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c, * rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c, * s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c, * solib-spu.c, * solib-svr4.c, * solib-target.c, * spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c, * symmisc.c, * symtab.c, * target.c, * windows-nat.c, * xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c, * mi/mi-interp.c: Update throughout for bfd section macro and function changes. * gcore (gcore_create_callback): Use bfd_set_section_lma. * spu-tdep.c (spu_overlay_new_objfile): Likewise. gprof/ * corefile.c, * symtab.c: Update throughout for bfd section macro and function changes. ld/ * ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/cr16elf.em, * emultempl/cskyelf.em, * emultempl/m68hc1xelf.em, * emultempl/m68kelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update throughout for bfd section macro and function changes. libctf/ * ctf-open-bfd.c: Update throughout for bfd section macro changes. opcodes/ * arc-ext.c: Update throughout for bfd section macro changes. sim/ * common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c, * erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c, * m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c, * rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c, * rx/trace.c: Update throughout for bfd section macro changes.
2019-09-16 12:55:17 +02:00
const char *name = bfd_section_name (section);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
if (!strcmp (name, ".tramp"))
htab->tramp_section = section;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
if (!strcmp (name, ".text"))
text_section = section;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (top_id < section->id)
top_id = section->id;
}
}
htab->bfd_count = bfd_count;
if (htab->tramp_section == 0)
htab->tramp_section = text_section;
/* We can't use output_bfd->section_count here to find the top output
section index as some sections may have been removed, and
bfd/ * section.c (struct bfd_section): Replace link_order_head and link_order_tail with map_head and map_tail union. (STD_SECTION): Update. (_bfd_strip_section_from_output): Delete. * aoutx.h: Update throughout for above changes. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * elf-eh-frame.c: Likewise. * elf-m10300.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-cris.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-vax.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * linker.c: Likewise. * merge.c: Likewise. * pdp11.c: Likewise. * xcofflink.c: Likewise. * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split out from bfd_elf_size_dynamic_sections. * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare. * bfd-in2.h: Regenerate. ld/ * ldemul.c: Include bfdlink.h. (ldemul_before_allocation): Assume before_allocation is non-zero. (before_allocation_default): Call strip_excluded_output_sections. * ldlang.c (stripped_excluded_sections): New variable. (lang_add_section): Build input section list for each output section, attached via map_head and map_tail pointers. (strip_excluded_output_sections): Make global. Traverse the input section lists to find which output sections can go. Clear link_order pointers and set stripped_excluded_sections. (lang_process): Call strip_excluded_output_sections. * ldlang.h (strip_excluded_output_sections): Declare. * ldwrite.c: Update throuhout for link_order_head -> map_head change. * emultempl/aix.em (before_allocation): Call strip_excluded_output_sections. * emultempl/armcoff.em (before_allocation): Likewise. * emultempl/beos.em (before_allocation): Likewise. * emultempl/linux.em (before_allocation): Likewise. * emultempl/pe.em (before_allocation): Likewise. * emultempl/sunos.em (before_allocation): Likewise. * emultempl/elf32.em (before_allocation): Likewise. Call bfd_elf_size_dynsym_hash_dynstr too. * emultempl/lnk960.em (lnk960_before_allocation): Delete. (ld_lnk960): Use before_allocation_default.
2005-05-04 13:00:28 +02:00
strip_excluded_output_sections doesn't renumber the indices. */
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
for (section = output_bfd->sections, top_index = 0;
section != NULL;
section = section->next)
{
if (top_index < section->index)
top_index = section->index;
}
htab->top_index = top_index;
amt = sizeof (asection *) * (top_index + 1);
input_list = (asection **) bfd_malloc (amt);
htab->input_list = input_list;
if (input_list == NULL)
return -1;
/* For sections we aren't interested in, mark their entries with a
value we can check later. */
list = input_list + top_index;
do
*list = bfd_abs_section_ptr;
while (list-- != input_list);
for (section = output_bfd->sections;
section != NULL;
section = section->next)
{
if ((section->flags & SEC_CODE) != 0)
input_list[section->index] = NULL;
}
return 1;
}
/* Determine and set the size of the stub section for a final link.
The basic idea here is to examine all the relocations looking for
PC-relative calls to a target that is unreachable with a "bl"
instruction. */
bfd_boolean
elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
struct bfd_link_info *info,
asection * (*add_stub_section) (const char*, asection*))
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
bfd *input_bfd;
asection *section;
Elf_Internal_Sym *local_syms, **all_local_syms;
unsigned int bfd_indx, bfd_count;
bfd_size_type to size_t bfd_size_type was invented a long time ago in the K&R days. Many places in binutils ought to be using size_t instead (and there are lots of places that use long or unsigned long that really ought to use size_t too). Note that you can't change everything over to size_t: A 32-bit host needs a larger type than size_t to support reading and processing of 64-bit ELF object files. This patch just tidies some of the more obvious uses of bfd_size_type that could be size_t. There no doubt are more lurking in the source. Incidentally, practically all functions used for output of object files can use size_t and don't need to worry about overflow of size expressions. If you have something like symcount * sizeof (void *) when symcount is counting symbols already in memory then you know that this expression can't overflow since the size of a symbol in memory is larger by far than that of a pointer. * aix386-core.c (aix386_core_file_p): Use size_t for "amt". * aout-target.h (object_p): Likewise. * aout-tic30.c (tic30_aout_object_p): Likewise. * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol), (emit_stringtab, write_syms, link_hash_table_create), (aout_link_write_other_symbol): Likewise. * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p), (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents), (_bfd_compute_and_write_armap): Likewise. * archures.c (bfd_arch_list): Likewise. * bfd.c (bfd_record_phdr): Likewise. * binary.c (binary_canonicalize_symtab): Likewise. * cisco-core.c (cisco_core_file_validate): Likewise. * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue), (find_arm_glue, record_arm_to_thumb_glue), (record_thumb_to_arm_glue): Likewise. * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc), (ppc_allocate_toc_section): Likewise. * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise. * coff-sh.c (sh_relax_section): Likewise. * coff64-rs6000.c (xcoff64_archive_p): Likewise. * coffcode.h (handle_COMDAT, coff_new_section_hook), (coff_set_alignment_hook, coff_mkobject), (coff_compute_section_file_positions): Likewise. * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol), (coff_find_nearest_line_with_names), ( bfd_coff_set_symbol_class): Likewise. * cofflink.c (_bfd_coff_link_hash_table_create), (_bfd_coff_link_input_bfd): Likewise. * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise. * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info), (build_line_info_table, sort_line_sequences), (line_info_add_include_dir, line_info_add_file_name), (decode_line_info, scan_unit_for_symbols, parse_comp_unit), (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise. * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol), (_bfd_ecoff_find_nearest_line), (_bfd_ecoff_bfd_link_hash_table_create): Likewise. * ecofflink.c (bfd_ecoff_debug_init): Likewise. * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise. * elf-m10300.c (mn10300_elf_relax_section), (elf32_mn10300_link_hash_table_create): Likewise. * elf-strtab.c (_bfd_elf_strtab_init): Likewise. * elf.c (make_mapping, copy_elf_program_header): Likewise. * elf32-arm.c (elf32_arm_link_hash_table_create), (elf32_arm_setup_section_lists, elf32_arm_check_relocs), (elf32_arm_new_section_hook): Likewise. * elf32-avr.c (elf_avr_new_section_hook), (elf32_avr_link_hash_table_create, get_local_syms), (elf32_avr_setup_section_lists): Likewise. * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create), (bfin_link_hash_table_create): Likewise. * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. * elf32-csky.c (csky_elf_link_hash_table_create), (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise. * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise. * elf32-hppa.c (elf32_hppa_link_hash_table_create), (elf32_hppa_setup_section_lists, get_local_syms): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. * elf32-m32r.c (m32r_elf_link_hash_table_create), (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (m68hc11_elf_hash_table_create), (elf32_m68hc11_setup_section_lists), (elf32_m68hc11_size_stubs): Likewise. * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. * elf32-metag.c (elf_metag_link_hash_table_create), (elf_metag_setup_section_lists): Likewise. * elf32-microblaze.c (microblaze_elf_link_hash_table_create), (microblaze_elf_check_relocs): Likewise. * elf32-nds32.c (nds32_elf_link_hash_table_create), (nds32_elf_check_relocs): Likewise. * elf32-nios2.c (nios2_elf32_setup_section_lists), (get_local_syms, nios2_elf32_check_relocs), (nios2_elf32_link_hash_table_create): Likewise. * elf32-or1k.c (or1k_elf_link_hash_table_create), (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise. * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise. * elf32-s390.c (elf_s390_link_hash_table_create), (elf_s390_check_relocs): Likewise. * elf32-score.c (score_elf_create_got_section), (s3_elf32_score_new_section_hook), (elf32_score_link_hash_table_create): Likewise. * elf32-score7.c (score_elf_create_got_section), (s7_elf32_score_new_section_hook): Likewise. * elf32-sh.c (sh_elf_link_hash_table_create), (sh_elf_check_relocs): Likewise. * elf32-tic6x.c (elf32_tic6x_link_hash_table_create), (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise. * elf32-tilepro.c (tilepro_elf_link_hash_table_create), (tilepro_elf_check_relocs): Likewise. * elf32-v850.c (remember_hi16s_reloc): Likewise. * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. * elf32-xtensa.c (elf_xtensa_link_hash_table_create), (elf_xtensa_new_section_hook): Likewise. * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create), (get_got_entry, elf64_alpha_check_relocs): Likewise. * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise. * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise. * elf64-mmix.c (mmix_elf_new_section_hook): Likewise. * elf64-ppc.c (ppc64_elf_new_section_hook), (ppc64_elf_link_hash_table_create, update_local_sym_info), (update_plt_info, ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_link_hash_table_create), (elf_s390_check_relocs): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. * elflink.c (bfd_elf_link_record_local_dynamic_symbol), (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols), (elf_link_add_archive_symbols, compute_bucket_count), (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create), (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out), (bfd_elf_final_link): Likewise. * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create), (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs), (elfNN_aarch64_new_section_hook): Likewise. * elfnn-ia64.c (elfNN_ia64_object_p): Likewise. * elfnn-riscv.c (riscv_elf_link_hash_table_create), (riscv_elf_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_new_section_hook), (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs), (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents), (_bfd_mips_elf_link_hash_table_create): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create), (_bfd_sparc_elf_check_relocs), (_bfd_sparc_elf_new_section_hook): Likewise. * elfxx-tilegx.c (tilegx_elf_link_hash_table_create), (tilegx_elf_check_relocs): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise. * format.c (bfd_check_format_matches): Likewise. * hash.c (_bfd_stringtab_init): Likewise. * ihex.c (ihex_scan): Likewise. * irix-core.c (irix_core_core_file_p): Likewise. * linker.c (bfd_wrapped_link_hash_lookup), (_bfd_generic_link_hash_table_create), (_bfd_generic_reloc_link_order): Likewise. * lynx-core.c (lynx_core_file_p): Likewise. * netbsd-core.c (netbsd_core_file_p): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol), (link_hash_table_create, aout_link_write_other_symbol): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise. * peicode.h (pe_mkobject): Likewise. * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise. * ptrace-core.c (ptrace_unix_core_file_p): Likewise. * sco5-core.c (read_uarea): Likewise. * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers), (som_write_fixups, som_write_space_strings, som_write_symbol_strings), (som_finish_writing, som_canonicalize_symtab, som_new_section_hook), (som_bfd_copy_private_section_data, bfd_som_set_section_attributes), (bfd_som_attach_aux_hdr, som_write_armap): Likewise. * srec.c (srec_scan): Likewise. * syms.c (_bfd_generic_make_empty_symbol): Likewise. * targets.c (bfd_target_list): Likewise. * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise. * trad-core.c (trad_unix_core_file_p): Likewise. * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create), (vms_new_section_hook): Likewise. * wasm-module.c (wasm_make_empty_symbol): Likewise. * xcofflink.c (xcoff_get_section_contents), (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path), (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym), (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
2020-02-19 03:42:00 +01:00
size_t amt;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
asection *stub_sec;
struct m68hc11_elf_link_hash_table *htab = m68hc11_elf_hash_table (info);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
if (htab == NULL)
return FALSE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Stash our params away. */
htab->stub_bfd = stub_bfd;
htab->add_stub_section = add_stub_section;
/* Count the number of input BFDs and find the top input section id. */
for (input_bfd = info->input_bfds, bfd_count = 0;
input_bfd != NULL;
input_bfd = input_bfd->link.next)
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
bfd_count += 1;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* We want to read in symbol extension records only once. To do this
we need to read in the local symbols in parallel and save them for
later use; so hold pointers to the local symbols in an array. */
amt = sizeof (Elf_Internal_Sym *) * bfd_count;
all_local_syms = (Elf_Internal_Sym **) bfd_zmalloc (amt);
if (all_local_syms == NULL)
return FALSE;
/* Walk over all the input BFDs, swapping in local symbols. */
for (input_bfd = info->input_bfds, bfd_indx = 0;
input_bfd != NULL;
input_bfd = input_bfd->link.next, bfd_indx++)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
Elf_Internal_Shdr *symtab_hdr;
/* We'll need the symbol table in a second. */
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
if (symtab_hdr->sh_info == 0)
continue;
/* We need an array of the local symbols attached to the input bfd. */
local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
if (local_syms == NULL)
{
local_syms = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
symtab_hdr->sh_info, 0,
NULL, NULL, NULL);
/* Cache them for elf_link_input_bfd. */
symtab_hdr->contents = (unsigned char *) local_syms;
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (local_syms == NULL)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
{
free (all_local_syms);
return FALSE;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
all_local_syms[bfd_indx] = local_syms;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
for (input_bfd = info->input_bfds, bfd_indx = 0;
input_bfd != NULL;
input_bfd = input_bfd->link.next, bfd_indx++)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry ** sym_hashes;
sym_hashes = elf_sym_hashes (input_bfd);
/* We'll need the symbol table in a second. */
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
if (symtab_hdr->sh_info == 0)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
continue;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
local_syms = all_local_syms[bfd_indx];
/* Walk over each section attached to the input bfd. */
for (section = input_bfd->sections;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
section != NULL;
section = section->next)
{
Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
/* If there aren't any relocs, then there's nothing more
to do. */
if ((section->flags & SEC_RELOC) == 0
|| section->reloc_count == 0)
continue;
/* If this section is a link-once section that will be
discarded, then don't create any stubs. */
if (section->output_section == NULL
|| section->output_section->owner != output_bfd)
continue;
/* Get the relocs. */
internal_relocs
= _bfd_elf_link_read_relocs (input_bfd, section, NULL,
* elflink.c (_bfd_elf_link_create_dynamic_sections): Move from elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align. (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align. (bfd_elf_record_link_assignment): Move from elflink.h. (_bfd_elf_merge_symbol): Likewise. (_bfd_elf_add_default_symbol): Likewise. (_bfd_elf_export_symbol): Likewise. (_bfd_elf_link_find_version_dependencies): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. (_bfd_elf_link_read_relocs): Likewise. (_bfd_elf_link_size_reloc_section): Likewise. (_bfd_elf_fix_symbol_flags): Likewise. (_bfd_elf_adjust_dynamic_symbol): Likewise. (_bfd_elf_link_sec_merge_syms): Likewise. (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel and bed->s->sizeof_rela. (_bfd_elf_link_output_relocs): Likewise. * elf-bfd.h (struct elf_size_info): Rename file_align to log_file_align. (struct elf_info_failed): Move from elflink.h. (struct elf_assign_sym_version_info): Likewise. (struct elf_find_verdep_info): Likewise. (_bfd_elf_create_dynamic_sections): Delete duplicate declaration. (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol, _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies, _bfd_elf_link_assign_sym_version, _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs, _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs, _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol, _bfd_elf_link_sec_merge_syms): Declare. (bfd_elf32_link_create_dynamic_sections): Don't declare. (_bfd_elf32_link_read_relocs): Likewise. (bfd_elf64_link_create_dynamic_sections): Likewise. (_bfd_elf64_link_read_relocs): Likewise. * elflink.h: Move lots o' stuff elsewhere. * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare. (bfd_elf64_record_link_assignment): Likewise. (bfd_elf_record_link_assignment): Declare. * bfd-in2.h: Regenerate. * elfcode.h (elf_link_create_dynamic_sections): Don't declare. (NAME(_bfd_elf,size_info)): Adjust for log_file_align. * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align. (assign_file_positions_for_segments): Likewise. (assign_file_positions_except_relocs): Likewise. (swap_out_syms, elfcore_write_note): Likewise. * elf-m10200.c: Adjust for changed function names. * elf-m10300.c: Likewise. * elf32-arm.h: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mips.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-v850.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align. * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align. * elf64-hppa.c (hppa64_elf_size_info): Likewise. * elf64-mips.c (mips_elf64_size_info): Likewise. * elf64-s390.c (s390_elf64_size_info): Likewise. * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2003-05-09 04:27:11 +02:00
(Elf_Internal_Rela *) NULL,
info->keep_memory);
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
if (internal_relocs == NULL)
goto error_ret_free_local;
/* Now examine each relocation. */
irela = internal_relocs;
irelaend = irela + section->reloc_count;
for (; irela < irelaend; irela++)
{
unsigned int r_type, r_indx;
struct elf32_m68hc11_stub_hash_entry *stub_entry;
asection *sym_sec;
bfd_vma sym_value;
struct elf_link_hash_entry *hash;
const char *stub_name;
Elf_Internal_Sym *sym;
r_type = ELF32_R_TYPE (irela->r_info);
/* Only look at 16-bit relocs. */
if (r_type != (unsigned int) R_M68HC11_16)
continue;
/* Now determine the call target, its name, value,
section. */
r_indx = ELF32_R_SYM (irela->r_info);
if (r_indx < symtab_hdr->sh_info)
{
/* It's a local symbol. */
Elf_Internal_Shdr *hdr;
bfd_boolean is_far;
sym = local_syms + r_indx;
is_far = (sym && (sym->st_other & STO_M68HC12_FAR));
if (!is_far)
continue;
include/elf/ PR 5900 * common.h (SHN_BAD): Delete. (SHN_LORESERVE .. SHN_HIRESERVE): Move to.. * external.h: ..here. * internal.h (SHN_LORESERVE, SHN_HIRESERVE): Define. (SHN_LOPROC, SHN_HIPROC, SHN_LOOS, SHN_HIOS): Define. (SHN_ABS, SHN_COMMON, SHN_XINDEX, SHN_BAD): Define. bfd/ PR 5900 * elf-bfd.h: Include elf/internal.h after elf/external.h. * elfcode.h (elf_swap_symbol_in): Map reserved shndx range. (elf_swap_symbol_out): Adjust SHN_XINDEX test. (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values seen in external structs. (valid_section_index_p): Delete. (elf_object_p): Don't increment section numbers over reserved range. Simplify test for valid sh_link, sh_info and e_shstrndx fields. (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values seen in external structs. Don't increment section numbers over reserved range. * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx. (bfd_section_from_shdr): Likewise. (group_signature): Range check before accessing elf_elfsections. (_bfd_elf_setup_sections): Likewise. (bfd_section_from_shdr): Likewise. (bfd_section_from_shdr): Don't increment section number over reserved sections. (assign_file_positions_for_non_load_sections): Likewise. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_write_object_contents): Likewise. (assign_section_numbers): Likewise. Adjust for changed SHN_*. (prep_headers): Delete unused variable. * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust for changed SHN_* values. (check_dynsym, elf_link_input_bfd): Likewise. (bfd_elf_final_link): Likewise. Don't skip over reserved section range. (elf_fixup_link_order): Check that sh_link field is valid. * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before accesssing elf_elfsections. * elf32-avr.c (elf32_avr_size_stubs): Likewise. * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise. * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed SHN_* defines. Test for SHN_BAD return from _bfd_elf_section_from_bfd_section binutils/ PR 5900 * readelf.c (SECTION_HEADER_INDEX, SECTION_HEADER_NUM): Delete. Remove use throughout file. (SECTION_HEADER): Likewise. (dump_relocations): Don't adjust st_shndx for reserved range. (process_file_header): Mask SHN_XINDEX to values seen in external elf structs. Simplify valid section index tests. (get_32bit_elf_symbols, get_64bit_elf_symbols): Mask SHN_XINDEX. Map reserved st_shndx to internal form. (process_section_groups): Test that group symbol st_shndx is in range, not just non-zero. Delete reserved range check. (get_symbol_index_type): Mask "type" to 16 bits when printing PRC, OS or RSV. gdb/ PR 5900 * elfread.c (elf_symtab_read): Make shndx an unsigned int. * mipsread.c: Include elf/internal.h. (read_alphacoff_dynamic_symtab): Map external reserved sym_shndx to internal range. ld/testsuite/ PR 5900 * ld-elf/sec64k.exp: Update.
2008-03-12 09:37:09 +01:00
if (sym->st_shndx >= elf_numsections (input_bfd))
sym_sec = NULL;
else
{
hdr = elf_elfsections (input_bfd)[sym->st_shndx];
sym_sec = hdr->bfd_section;
}
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
stub_name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link,
sym->st_name));
sym_value = sym->st_value;
hash = NULL;
}
else
{
/* It's an external symbol. */
int e_indx;
e_indx = r_indx - symtab_hdr->sh_info;
hash = (struct elf_link_hash_entry *)
(sym_hashes[e_indx]);
while (hash->root.type == bfd_link_hash_indirect
|| hash->root.type == bfd_link_hash_warning)
hash = ((struct elf_link_hash_entry *)
hash->root.u.i.link);
if (hash->root.type == bfd_link_hash_defined
|| hash->root.type == bfd_link_hash_defweak
|| hash->root.type == bfd_link_hash_new)
{
if (!(hash->other & STO_M68HC12_FAR))
continue;
}
else if (hash->root.type == bfd_link_hash_undefweak)
{
continue;
}
else if (hash->root.type == bfd_link_hash_undefined)
{
continue;
}
else
{
bfd_set_error (bfd_error_bad_value);
goto error_ret_free_internal;
}
sym_sec = hash->root.u.def.section;
sym_value = hash->root.u.def.value;
stub_name = hash->root.root.string;
}
if (!stub_name)
goto error_ret_free_internal;
stub_entry = m68hc12_stub_hash_lookup
(htab->stub_hash_table,
stub_name,
FALSE, FALSE);
if (stub_entry == NULL)
{
if (add_stub_section == 0)
continue;
stub_entry = m68hc12_add_stub (stub_name, section, htab);
if (stub_entry == NULL)
{
error_ret_free_internal:
if (elf_section_data (section)->relocs == NULL)
free (internal_relocs);
goto error_ret_free_local;
}
}
stub_entry->target_value = sym_value;
stub_entry->target_section = sym_sec;
}
/* We're done with the internal relocs, free them. */
if (elf_section_data (section)->relocs == NULL)
free (internal_relocs);
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
if (add_stub_section)
{
/* OK, we've added some stubs. Find out the new size of the
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
stub sections. */
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
for (stub_sec = htab->stub_bfd->sections;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
stub_sec != NULL;
stub_sec = stub_sec->next)
{
stub_sec->size = 0;
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
bfd_hash_traverse (htab->stub_hash_table, htab->size_one_stub, htab);
}
free (all_local_syms);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return TRUE;
error_ret_free_local:
free (all_local_syms);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return FALSE;
}
/* Export the trampoline addresses in the symbol table. */
static bfd_boolean
m68hc11_elf_export_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
struct bfd_link_info *info;
struct m68hc11_elf_link_hash_table *htab;
struct elf32_m68hc11_stub_hash_entry *stub_entry;
char* name;
bfd_boolean result;
info = (struct bfd_link_info *) in_arg;
htab = m68hc11_elf_hash_table (info);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
if (htab == NULL)
return FALSE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Massage our args to the form they really have. */
stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry;
/* Generate the trampoline according to HC11 or HC12. */
result = (* htab->build_one_stub) (gen_entry, in_arg);
/* Make a printable name that does not conflict with the real function. */
name = concat ("tramp.", stub_entry->root.string, NULL);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Export the symbol for debugging/disassembling. */
m68hc11_elf_set_symbol (htab->stub_bfd, info, name,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
stub_entry->stub_offset,
stub_entry->stub_sec);
free (name);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return result;
}
/* Export a symbol or set its value and section. */
static void
m68hc11_elf_set_symbol (bfd *abfd, struct bfd_link_info *info,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
const char *name, bfd_vma value, asection *sec)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
struct elf_link_hash_entry *h;
h = (struct elf_link_hash_entry *)
bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, FALSE);
if (h == NULL)
{
_bfd_generic_link_add_one_symbol (info, abfd,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
name,
BSF_GLOBAL,
sec,
value,
(const char*) NULL,
TRUE, FALSE, NULL);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
else
{
h->root.type = bfd_link_hash_defined;
h->root.u.def.value = value;
h->root.u.def.section = sec;
}
}
/* Build all the stubs associated with the current output file. The
stubs are kept in a hash table attached to the main linker hash
table. This function is called via m68hc12elf_finish in the
linker. */
bfd_boolean
elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
asection *stub_sec;
struct bfd_hash_table *table;
struct m68hc11_elf_link_hash_table *htab;
struct m68hc11_scan_param param;
m68hc11_elf_get_bank_parameters (info);
htab = m68hc11_elf_hash_table (info);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
if (htab == NULL)
return FALSE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
{
bfd_size_type size;
/* Allocate memory to hold the linker stubs. */
bfd/ * section.c (struct sec): Rename "_cooked_size" to "size". Rename "_raw_size" to "rawsize". (STD_SECTION): Adjust comments. (bfd_set_section_size, bfd_get_section_contents): Use size. (bfd_malloc_and_get_section): New function. * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size. * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early. Correctly free reloc and contents memory. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME and fake CIE now that we can shink section size to zero. (_bfd_elf_write_section_eh_frame): Likewise.. * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents. * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use _bfd_stab_section_offset. Use _bfd_elf_section_offset. * stabs.c (_bfd_stab_section_offset_): Remove unused args and unneeded indirection. * elf.c (_bfd_elf_section_offset): .. and update call. * libbfd-in.h (_bfd_stab_section_offset): Update prototype. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. Replace occurrences of "_raw_size" and "_cooked_size" in most places with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE sections. Use "rawsize", if non-zero, for bfd_get_section_contents calls if the section might be a stabs, eh_frame, or SEC_MERGE section. Similarly use "rawsize", if non-zero, in reloc functions to validate reloc addresses. Use new bfd_malloc_and_get_section in most places where bfd_get_section_contents was called. Expand all occurrences of bfd_section_size and bfd_get_section_size. Rename "raw_size" var in grok_prstatus and similar functions to "size". * aix386-core.c (aix386_core_file_p): .. * aix5ppc-core.c (xcoff64_core_p): .. * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents, aout_adobe_set_section_contents): .. * aout-target.h (callback): .. * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate, MY_bfd_final_link): .. * aoutf1.h (sunos4_core_file_p): .. * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic, adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags, final_link, aout_link_input_section): .. * binary.c (binary_object_p, binary_canonicalize_symtab, binary_set_section_contents): .. * bout.c (b_out_callback, b_out_write_object_contents, b_out_set_section_contents, b_out_bfd_relax_section, b_out_bfd_get_relocated_section_contents): .. * cisco-core.c (cisco_core_file_validate): .. * coff-alpha.c (alpha_ecoff_object_p, alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): .. * coff-arm.c (coff_arm_relocate_section, bfd_arm_allocate_interworking_sections): .. * coff-h8300.c (h8300_reloc16_extra_cases, h8300_bfd_link_add_symbols): .. * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): .. * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section, ppc_bfd_coff_final_link): .. * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): .. * coff-sh.c (sh_relax_section, sh_relax_delete_bytes, sh_align_loads, sh_coff_get_relocated_section_contents): .. * coff64-rs6000.c (xcoff64_write_object_contents, xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): .. * coffcode.h (coff_compute_section_file_positions, coff_write_object_contents): .. * coffgen.c (make_a_section_from_file, coff_write_symbols, coff_section_symbol, build_debug_section): .. * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link, process_embedded_commands, _bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): .. * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): .. * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): .. * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): .. * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info, _bfd_dwarf2_find_nearest_line): .. * ecoff.c (bfd_debug_section, ecoff_set_symbol_info, ecoff_compute_section_file_positions, _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): .. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame, _bfd_elf_discard_section_eh_frame_hdr, _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset, _bfd_elf_write_section_eh_frame, _bfd_elf_write_section_eh_frame_hdr): .. * elf-hppa.h (elf_hppa_sort_unwind): .. * elf-m10200.c (mn10200_elf_relax_section, mn10200_elf_relax_delete_bytes, mn10200_elf_get_relocated_section_contents): .. * elf-m10300.c (_bfd_mn10300_elf_create_got_section, mn10300_elf_check_relocs, mn10300_elf_relax_section, mn10300_elf_relax_delete_bytes, mn10300_elf_get_relocated_section_contents, _bfd_mn10300_elf_adjust_dynamic_symbol, _bfd_mn10300_elf_discard_copies, _bfd_mn10300_elf_size_dynamic_sections, _bfd_mn10300_elf_finish_dynamic_sections): .. * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list, _bfd_elf_make_section_from_phdr, elf_fake_sections, bfd_elf_set_group_contents, map_sections_to_segments, elf_sort_sections, assign_file_positions_for_segments, SECTION_SIZE, copy_private_bfd_data, _bfd_elf_get_dynamic_reloc_upper_bound, _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect, _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus, elfcore_grok_lwpstatus, elfcore_grok_win32pstatus, elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs, _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): .. * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect, bfd_elf32_arm_process_before_allocation, elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs, elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections, elf32_arm_write_section): .. * elf32-cris.c (cris_elf_grok_prstatus, elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook, elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol, cris_elf_check_relocs, elf_cris_size_dynamic_sections, elf_cris_discard_excess_dso_dynamics, elf_cris_discard_excess_program_dynamics): .. * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): .. * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): .. * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup, _frv_create_got_section, _frvfdpic_assign_plt_entries, elf32_frvfdpic_size_dynamic_sections, elf32_frvfdpic_modify_segment_map, elf32_frvfdpic_finish_dynamic_sections): .. * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes, elf32_h8_get_relocated_section_contents): .. * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub, elf32_hppa_adjust_dynamic_symbol, allocate_plt_static, allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections, elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs, elf32_hppa_finish_dynamic_sections): .. * elf32-i370.c (i370_elf_adjust_dynamic_symbol, i370_elf_size_dynamic_sections, i370_elf_check_relocs, i370_elf_finish_dynamic_sections): .. * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol, allocate_dynrelocs, elf_i386_size_dynamic_sections, elf_i386_relocate_section, elf_i386_finish_dynamic_sections): .. * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc, i860_howto_highadj_reloc, i860_howto_splitn_reloc): .. * elf32-ip2k.c (ip2k_is_switch_table_128, ip2k_relax_switch_table_128, ip2k_is_switch_table_256, ip2k_relax_switch_table_256, ip2k_elf_relax_section, adjust_all_relocations, ip2k_elf_relax_delete_bytes): .. * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc, m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol, allocate_dynrelocs, m32r_elf_size_dynamic_sections, m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections, m32r_elf_relax_section, m32r_elf_relax_delete_bytes, m32r_elf_get_relocated_section_contents): .. * elf32-m68hc11.c (m68hc11_elf_build_one_stub, m68hc11_elf_size_one_stub, m68hc11_elf_relax_section, m68hc11_elf_relax_delete_bytes): .. * elf32-m68hc12.c (m68hc12_elf_build_one_stub, m68hc12_elf_size_one_stub): .. * elf32-m68hc1x.c (elf32_m68hc11_size_stubs, elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): .. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook, elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections, elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): .. * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc, elf32_mips_grok_prstatus): .. * elf32-or32.c (or32_elf_consth_reloc): .. * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc, elf_create_pointer_linker_section, ppc_elf_create_linker_section, ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs, ppc_elf_size_dynamic_sections, ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus, ppc_elf_final_write_processing): .. * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol, allocate_dynrelocs, elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): .. * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section, sh_elf_relax_delete_bytes, sh_elf_align_loads, sh_elf_adjust_dynamic_symbol, allocate_dynrelocs, sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents, sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): .. * elf32-sh64-com.c (sh64_address_in_cranges, sh64_get_contents_type): .. * elf32-sh64.c (sh64_find_section_for_address, sh64_elf_final_write_processing): .. * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol, allocate_dynrelocs, elf32_sparc_size_dynamic_sections, elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): .. * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): .. * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol, elf_vax_size_dynamic_sections, elf_vax_discard_copies, elf_vax_instantiate_got_entries, elf_vax_relocate_section, elf_vax_finish_dynamic_sections): .. * elf32-xstormy16.c (xstormy16_elf_24_reloc, xstormy16_elf_check_relocs, xstormy16_relax_plt_check, xstormy16_elf_relax_section, xstormy16_elf_always_size_sections, xstormy16_elf_finish_dynamic_sections): .. * elf32-xtensa.c (xtensa_read_table_entries, elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc, bfd_elf_xtensa_reloc, elf_xtensa_relocate_section, elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections, elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus, get_relocation_opcode, retrieve_contents, find_relaxable_sections, collect_source_relocs, is_resolvable_asm_expansion, remove_literals, relax_section, shrink_dynamic_reloc_sections, relax_property_section, xtensa_callback_required_dependence): .. * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section, elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol, elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets, elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1, elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1, elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel, elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): .. * elf64-hppa.c (allocate_dynrel_entries, elf64_hppa_size_dynamic_sections, elf64_hppa_finish_dynamic_sections): .. * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc, mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table, elf64_mips_grok_prstatus): .. * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc, mmix_elf_relocate_section, mmix_elf_final_link, mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation, mmix_elf_relax_section, mmix_elf_get_section_contents): .. * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus, ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust, ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd, allocate_dynrelocs, ppc64_elf_size_dynamic_sections, ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section, toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs, ppc64_elf_build_stubs, ppc64_elf_relocate_section, ppc64_elf_finish_dynamic_sections): .. * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol, allocate_dynrelocs, elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_sections): .. * elf64-sh64.c (sh_elf64_get_relocated_section_contents, sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections, sh64_elf64_finish_dynamic_sections): .. * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc, sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section, sparc64_elf_finish_dynamic_symbol, sparc64_elf_finish_dynamic_sections): .. * elf64-x86-64.c (elf64_x86_64_grok_prstatus, elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs, elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section, elf64_x86_64_finish_dynamic_sections): .. * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): .. * elfcode.h (elf_slurp_reloc_table): .. * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag, elf_finalize_dynstr, elf_link_add_object_symbols, bfd_elf_size_dynamic_sections, elf_link_sort_relocs, elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): .. * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc, elf32_mips_grok_prstatus): .. * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries, elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc, elfNN_ia64_choose_gp, elfNN_ia64_final_link, elfNN_ia64_finish_dynamic_sections): .. * elfxx-mips.c (mips_elf_create_procedure_table, mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp, _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc, mips_elf_global_got_index, mips_elf_multi_got, mips_elf_create_compact_rel_section, mips_elf_calculate_relocation, mips_elf_allocate_dynamic_relocations, mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections, _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol, _bfd_mips_elf_always_size_sections, _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_finish_dynamic_symbol, _bfd_mips_elf_finish_dynamic_sections, _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info, _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents, _bfd_elf_mips_get_relocated_section_contents, _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): .. * hp300hpux.c (callback): .. * hppabsd-core.c (make_bfd_asection): .. * hpux-core.c (make_bfd_asection): .. * i386linux.c (linux_link_create_dynamic_sections, bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): .. * i386msdos.c (msdos_write_object_contents): .. * i386os9k.c (os9k_callback, os9k_write_object_contents, os9k_set_section_contents): .. * ieee.c (parse_expression, ieee_slurp_external_symbols, ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data, ieee_write_section_part, do_with_relocs, do_as_repeat, do_without_relocs, ieee_write_debug_part, init_for_output, ieee_set_section_contents): .. * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): .. * irix-core.c (do_sections, make_bfd_asection): .. * libaout.h (aout_section_merge_with_text_p): .. * libbfd.c (_bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window): .. * linker.c (default_indirect_link_order): .. * lynx-core.c (make_bfd_asection): .. * m68klinux.c (linux_link_create_dynamic_sections, bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): .. * mach-o.c (bfd_mach_o_make_bfd_section, bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib, bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab, bfd_mach_o_scan_read_segment): .. * merge.c (_bfd_add_merge_section, record_section, merge_strings, _bfd_merge_sections): .. * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc, mmo_map_set_sizes, mmo_canonicalize_symtab, mmo_internal_write_section, mmo_write_object_contents): .. * netbsd-core.c (netbsd_core_file_p): .. * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import, nlm_alpha_set_public_section): .. * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): .. * nlm32-sparc.c (nlm_sparc_write_import): .. * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in, nlm_compute_section_file_positions): .. * oasys.c (oasys_object_p, oasys_slurp_section_data, oasys_write_sections, oasys_write_data, oasys_set_section_contents): .. * opncls.c (get_debug_link_info): .. * osf-core.c (make_bfd_asection): .. * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic, adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs, final_link, aout_link_input_section): .. * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out, pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): .. * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section, bfd_pef_scan_start_address, bfd_pef_parse_symbols): .. * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): .. * ptrace-core.c (ptrace_unix_core_file_p): .. * reloc.c (bfd_perform_relocation, bfd_install_relocation, _bfd_final_link_relocate, bfd_generic_relax_section, bfd_generic_get_relocated_section_contents): .. * reloc16.c (bfd_coff_reloc16_relax_section, bfd_coff_reloc16_get_relocated_section_c): .. * riscix.c (riscix_some_aout_object_p): .. * rs6000-core.c (read_hdr, make_bfd_asection): .. * sco5-core.c (make_bfd_asection): .. * simple.c (bfd_simple_get_relocated_section_contents): .. * som.c (som_object_setup, setup_sections, som_prep_headers, som_write_fixups, som_begin_writing, bfd_section_from_som_symbol, som_set_reloc_info, som_get_section_contents, som_bfd_link_split_section): .. * sparclinux.c (linux_link_create_dynamic_sections, bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): .. * srec.c (srec_scan, srec_read_section, srec_get_section_contents): .. * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs, _bfd_write_stab_strings, _bfd_stab_section_offset): .. * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections, bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs, sunos_scan_ext_relocs, sunos_scan_dynamic_symbol, sunos_write_dynamic_symbol, sunos_check_dynamic_reloc, sunos_finish_dynamic_link): .. * syms.c (_bfd_stab_section_find_nearest_line): .. * tekhex.c (first_phase, tekhex_set_section_contents, tekhex_write_object_contents): .. * trad-core.c (trad_unix_core_file_p): .. * versados.c (process_esd, process_otr, process_otr): .. * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): .. * vms-misc.c (add_new_contents): .. * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): .. * vms.c (vms_set_section_contents): .. * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols, xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms, _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): .. * xsym.c (bfd_sym_scan): .. See above. binutils/ * objcopy.c (copy_section): Don't set _cooked_size. include/ * bfdlink.h (struct bfd_link_order): Update comment. ld/ * ldlang.c (print_output_section_statement): Don't print size before relaxation. (IGNORE_SECTION): Remove bfd arg. Update all callers. * ldexp.c (fold_name): .. See below. * ldlang.c (section_already_linked, print_output_section_statement, print_input_section, insert_pad, size_input_section, lang_check_section_addresses, lang_size_sections_1, lang_size_sections, lang_do_assignments_1, lang_set_startof, lang_one_common, lang_reset_memory_regions, lang_process, lang_abs_symbol_at_end_of, lang_do_version_exports_section): .. * ldwrite.c (build_link_order, clone_section, ds, split_sections): .. * pe-dll.c (process_def_file, generate_reloc): .. * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment, gld${EMULATION_NAME}_before_allocation): .. * emultempl/mmix-elfnmmo.em (mmix_after_allocation): .. * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation, sh64_elf_${EMULATION_NAME}_after_allocation): .. * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): .. * emultempl/xtensaelf.em (ld_assign_relative_paged_dot, ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use "size" instead of "_raw_size" and "_cooked_size". Expand bfd_section_size macro invocations.
2004-06-24 06:46:28 +02:00
size = stub_sec->size;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL && size != 0)
return FALSE;
bfd/ * section.c (struct sec): Rename "_cooked_size" to "size". Rename "_raw_size" to "rawsize". (STD_SECTION): Adjust comments. (bfd_set_section_size, bfd_get_section_contents): Use size. (bfd_malloc_and_get_section): New function. * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size. * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early. Correctly free reloc and contents memory. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME and fake CIE now that we can shink section size to zero. (_bfd_elf_write_section_eh_frame): Likewise.. * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents. * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use _bfd_stab_section_offset. Use _bfd_elf_section_offset. * stabs.c (_bfd_stab_section_offset_): Remove unused args and unneeded indirection. * elf.c (_bfd_elf_section_offset): .. and update call. * libbfd-in.h (_bfd_stab_section_offset): Update prototype. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. Replace occurrences of "_raw_size" and "_cooked_size" in most places with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE sections. Use "rawsize", if non-zero, for bfd_get_section_contents calls if the section might be a stabs, eh_frame, or SEC_MERGE section. Similarly use "rawsize", if non-zero, in reloc functions to validate reloc addresses. Use new bfd_malloc_and_get_section in most places where bfd_get_section_contents was called. Expand all occurrences of bfd_section_size and bfd_get_section_size. Rename "raw_size" var in grok_prstatus and similar functions to "size". * aix386-core.c (aix386_core_file_p): .. * aix5ppc-core.c (xcoff64_core_p): .. * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents, aout_adobe_set_section_contents): .. * aout-target.h (callback): .. * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate, MY_bfd_final_link): .. * aoutf1.h (sunos4_core_file_p): .. * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic, adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags, final_link, aout_link_input_section): .. * binary.c (binary_object_p, binary_canonicalize_symtab, binary_set_section_contents): .. * bout.c (b_out_callback, b_out_write_object_contents, b_out_set_section_contents, b_out_bfd_relax_section, b_out_bfd_get_relocated_section_contents): .. * cisco-core.c (cisco_core_file_validate): .. * coff-alpha.c (alpha_ecoff_object_p, alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): .. * coff-arm.c (coff_arm_relocate_section, bfd_arm_allocate_interworking_sections): .. * coff-h8300.c (h8300_reloc16_extra_cases, h8300_bfd_link_add_symbols): .. * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): .. * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section, ppc_bfd_coff_final_link): .. * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): .. * coff-sh.c (sh_relax_section, sh_relax_delete_bytes, sh_align_loads, sh_coff_get_relocated_section_contents): .. * coff64-rs6000.c (xcoff64_write_object_contents, xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): .. * coffcode.h (coff_compute_section_file_positions, coff_write_object_contents): .. * coffgen.c (make_a_section_from_file, coff_write_symbols, coff_section_symbol, build_debug_section): .. * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link, process_embedded_commands, _bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): .. * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): .. * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): .. * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): .. * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info, _bfd_dwarf2_find_nearest_line): .. * ecoff.c (bfd_debug_section, ecoff_set_symbol_info, ecoff_compute_section_file_positions, _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): .. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame, _bfd_elf_discard_section_eh_frame_hdr, _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset, _bfd_elf_write_section_eh_frame, _bfd_elf_write_section_eh_frame_hdr): .. * elf-hppa.h (elf_hppa_sort_unwind): .. * elf-m10200.c (mn10200_elf_relax_section, mn10200_elf_relax_delete_bytes, mn10200_elf_get_relocated_section_contents): .. * elf-m10300.c (_bfd_mn10300_elf_create_got_section, mn10300_elf_check_relocs, mn10300_elf_relax_section, mn10300_elf_relax_delete_bytes, mn10300_elf_get_relocated_section_contents, _bfd_mn10300_elf_adjust_dynamic_symbol, _bfd_mn10300_elf_discard_copies, _bfd_mn10300_elf_size_dynamic_sections, _bfd_mn10300_elf_finish_dynamic_sections): .. * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list, _bfd_elf_make_section_from_phdr, elf_fake_sections, bfd_elf_set_group_contents, map_sections_to_segments, elf_sort_sections, assign_file_positions_for_segments, SECTION_SIZE, copy_private_bfd_data, _bfd_elf_get_dynamic_reloc_upper_bound, _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect, _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus, elfcore_grok_lwpstatus, elfcore_grok_win32pstatus, elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs, _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): .. * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect, bfd_elf32_arm_process_before_allocation, elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs, elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections, elf32_arm_write_section): .. * elf32-cris.c (cris_elf_grok_prstatus, elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook, elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol, cris_elf_check_relocs, elf_cris_size_dynamic_sections, elf_cris_discard_excess_dso_dynamics, elf_cris_discard_excess_program_dynamics): .. * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): .. * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): .. * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup, _frv_create_got_section, _frvfdpic_assign_plt_entries, elf32_frvfdpic_size_dynamic_sections, elf32_frvfdpic_modify_segment_map, elf32_frvfdpic_finish_dynamic_sections): .. * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes, elf32_h8_get_relocated_section_contents): .. * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub, elf32_hppa_adjust_dynamic_symbol, allocate_plt_static, allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections, elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs, elf32_hppa_finish_dynamic_sections): .. * elf32-i370.c (i370_elf_adjust_dynamic_symbol, i370_elf_size_dynamic_sections, i370_elf_check_relocs, i370_elf_finish_dynamic_sections): .. * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol, allocate_dynrelocs, elf_i386_size_dynamic_sections, elf_i386_relocate_section, elf_i386_finish_dynamic_sections): .. * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc, i860_howto_highadj_reloc, i860_howto_splitn_reloc): .. * elf32-ip2k.c (ip2k_is_switch_table_128, ip2k_relax_switch_table_128, ip2k_is_switch_table_256, ip2k_relax_switch_table_256, ip2k_elf_relax_section, adjust_all_relocations, ip2k_elf_relax_delete_bytes): .. * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc, m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol, allocate_dynrelocs, m32r_elf_size_dynamic_sections, m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections, m32r_elf_relax_section, m32r_elf_relax_delete_bytes, m32r_elf_get_relocated_section_contents): .. * elf32-m68hc11.c (m68hc11_elf_build_one_stub, m68hc11_elf_size_one_stub, m68hc11_elf_relax_section, m68hc11_elf_relax_delete_bytes): .. * elf32-m68hc12.c (m68hc12_elf_build_one_stub, m68hc12_elf_size_one_stub): .. * elf32-m68hc1x.c (elf32_m68hc11_size_stubs, elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): .. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook, elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections, elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): .. * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc, elf32_mips_grok_prstatus): .. * elf32-or32.c (or32_elf_consth_reloc): .. * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc, elf_create_pointer_linker_section, ppc_elf_create_linker_section, ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs, ppc_elf_size_dynamic_sections, ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus, ppc_elf_final_write_processing): .. * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol, allocate_dynrelocs, elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): .. * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section, sh_elf_relax_delete_bytes, sh_elf_align_loads, sh_elf_adjust_dynamic_symbol, allocate_dynrelocs, sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents, sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): .. * elf32-sh64-com.c (sh64_address_in_cranges, sh64_get_contents_type): .. * elf32-sh64.c (sh64_find_section_for_address, sh64_elf_final_write_processing): .. * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol, allocate_dynrelocs, elf32_sparc_size_dynamic_sections, elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): .. * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): .. * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol, elf_vax_size_dynamic_sections, elf_vax_discard_copies, elf_vax_instantiate_got_entries, elf_vax_relocate_section, elf_vax_finish_dynamic_sections): .. * elf32-xstormy16.c (xstormy16_elf_24_reloc, xstormy16_elf_check_relocs, xstormy16_relax_plt_check, xstormy16_elf_relax_section, xstormy16_elf_always_size_sections, xstormy16_elf_finish_dynamic_sections): .. * elf32-xtensa.c (xtensa_read_table_entries, elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc, bfd_elf_xtensa_reloc, elf_xtensa_relocate_section, elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections, elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus, get_relocation_opcode, retrieve_contents, find_relaxable_sections, collect_source_relocs, is_resolvable_asm_expansion, remove_literals, relax_section, shrink_dynamic_reloc_sections, relax_property_section, xtensa_callback_required_dependence): .. * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section, elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol, elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets, elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1, elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1, elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel, elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): .. * elf64-hppa.c (allocate_dynrel_entries, elf64_hppa_size_dynamic_sections, elf64_hppa_finish_dynamic_sections): .. * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc, mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table, elf64_mips_grok_prstatus): .. * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc, mmix_elf_relocate_section, mmix_elf_final_link, mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation, mmix_elf_relax_section, mmix_elf_get_section_contents): .. * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus, ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust, ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd, allocate_dynrelocs, ppc64_elf_size_dynamic_sections, ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section, toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs, ppc64_elf_build_stubs, ppc64_elf_relocate_section, ppc64_elf_finish_dynamic_sections): .. * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol, allocate_dynrelocs, elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_sections): .. * elf64-sh64.c (sh_elf64_get_relocated_section_contents, sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections, sh64_elf64_finish_dynamic_sections): .. * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc, sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section, sparc64_elf_finish_dynamic_symbol, sparc64_elf_finish_dynamic_sections): .. * elf64-x86-64.c (elf64_x86_64_grok_prstatus, elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs, elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section, elf64_x86_64_finish_dynamic_sections): .. * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): .. * elfcode.h (elf_slurp_reloc_table): .. * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag, elf_finalize_dynstr, elf_link_add_object_symbols, bfd_elf_size_dynamic_sections, elf_link_sort_relocs, elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): .. * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc, elf32_mips_grok_prstatus): .. * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries, elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc, elfNN_ia64_choose_gp, elfNN_ia64_final_link, elfNN_ia64_finish_dynamic_sections): .. * elfxx-mips.c (mips_elf_create_procedure_table, mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp, _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc, mips_elf_global_got_index, mips_elf_multi_got, mips_elf_create_compact_rel_section, mips_elf_calculate_relocation, mips_elf_allocate_dynamic_relocations, mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections, _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol, _bfd_mips_elf_always_size_sections, _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_finish_dynamic_symbol, _bfd_mips_elf_finish_dynamic_sections, _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info, _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents, _bfd_elf_mips_get_relocated_section_contents, _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): .. * hp300hpux.c (callback): .. * hppabsd-core.c (make_bfd_asection): .. * hpux-core.c (make_bfd_asection): .. * i386linux.c (linux_link_create_dynamic_sections, bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): .. * i386msdos.c (msdos_write_object_contents): .. * i386os9k.c (os9k_callback, os9k_write_object_contents, os9k_set_section_contents): .. * ieee.c (parse_expression, ieee_slurp_external_symbols, ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data, ieee_write_section_part, do_with_relocs, do_as_repeat, do_without_relocs, ieee_write_debug_part, init_for_output, ieee_set_section_contents): .. * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): .. * irix-core.c (do_sections, make_bfd_asection): .. * libaout.h (aout_section_merge_with_text_p): .. * libbfd.c (_bfd_generic_get_section_contents, _bfd_generic_get_section_contents_in_window): .. * linker.c (default_indirect_link_order): .. * lynx-core.c (make_bfd_asection): .. * m68klinux.c (linux_link_create_dynamic_sections, bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): .. * mach-o.c (bfd_mach_o_make_bfd_section, bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib, bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab, bfd_mach_o_scan_read_segment): .. * merge.c (_bfd_add_merge_section, record_section, merge_strings, _bfd_merge_sections): .. * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc, mmo_map_set_sizes, mmo_canonicalize_symtab, mmo_internal_write_section, mmo_write_object_contents): .. * netbsd-core.c (netbsd_core_file_p): .. * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import, nlm_alpha_set_public_section): .. * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): .. * nlm32-sparc.c (nlm_sparc_write_import): .. * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in, nlm_compute_section_file_positions): .. * oasys.c (oasys_object_p, oasys_slurp_section_data, oasys_write_sections, oasys_write_data, oasys_set_section_contents): .. * opncls.c (get_debug_link_info): .. * osf-core.c (make_bfd_asection): .. * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic, adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs, final_link, aout_link_input_section): .. * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out, pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): .. * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section, bfd_pef_scan_start_address, bfd_pef_parse_symbols): .. * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): .. * ptrace-core.c (ptrace_unix_core_file_p): .. * reloc.c (bfd_perform_relocation, bfd_install_relocation, _bfd_final_link_relocate, bfd_generic_relax_section, bfd_generic_get_relocated_section_contents): .. * reloc16.c (bfd_coff_reloc16_relax_section, bfd_coff_reloc16_get_relocated_section_c): .. * riscix.c (riscix_some_aout_object_p): .. * rs6000-core.c (read_hdr, make_bfd_asection): .. * sco5-core.c (make_bfd_asection): .. * simple.c (bfd_simple_get_relocated_section_contents): .. * som.c (som_object_setup, setup_sections, som_prep_headers, som_write_fixups, som_begin_writing, bfd_section_from_som_symbol, som_set_reloc_info, som_get_section_contents, som_bfd_link_split_section): .. * sparclinux.c (linux_link_create_dynamic_sections, bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): .. * srec.c (srec_scan, srec_read_section, srec_get_section_contents): .. * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs, _bfd_write_stab_strings, _bfd_stab_section_offset): .. * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections, bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs, sunos_scan_ext_relocs, sunos_scan_dynamic_symbol, sunos_write_dynamic_symbol, sunos_check_dynamic_reloc, sunos_finish_dynamic_link): .. * syms.c (_bfd_stab_section_find_nearest_line): .. * tekhex.c (first_phase, tekhex_set_section_contents, tekhex_write_object_contents): .. * trad-core.c (trad_unix_core_file_p): .. * versados.c (process_esd, process_otr, process_otr): .. * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): .. * vms-misc.c (add_new_contents): .. * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): .. * vms.c (vms_set_section_contents): .. * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols, xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms, _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): .. * xsym.c (bfd_sym_scan): .. See above. binutils/ * objcopy.c (copy_section): Don't set _cooked_size. include/ * bfdlink.h (struct bfd_link_order): Update comment. ld/ * ldlang.c (print_output_section_statement): Don't print size before relaxation. (IGNORE_SECTION): Remove bfd arg. Update all callers. * ldexp.c (fold_name): .. See below. * ldlang.c (section_already_linked, print_output_section_statement, print_input_section, insert_pad, size_input_section, lang_check_section_addresses, lang_size_sections_1, lang_size_sections, lang_do_assignments_1, lang_set_startof, lang_one_common, lang_reset_memory_regions, lang_process, lang_abs_symbol_at_end_of, lang_do_version_exports_section): .. * ldwrite.c (build_link_order, clone_section, ds, split_sections): .. * pe-dll.c (process_def_file, generate_reloc): .. * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment, gld${EMULATION_NAME}_before_allocation): .. * emultempl/mmix-elfnmmo.em (mmix_after_allocation): .. * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation, sh64_elf_${EMULATION_NAME}_after_allocation): .. * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): .. * emultempl/xtensaelf.em (ld_assign_relative_paged_dot, ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use "size" instead of "_raw_size" and "_cooked_size". Expand bfd_section_size macro invocations.
2004-06-24 06:46:28 +02:00
stub_sec->size = 0;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
/* Build the stubs as directed by the stub hash table. */
table = htab->stub_hash_table;
bfd_hash_traverse (table, m68hc11_elf_export_one_stub, info);
Remove trailing white spaces in bfd * aout0.c: Remove trailing white spaces. * archive.c: Likewise. * archures.c: Likewise. * bfd-in.h: Likewise. * bfd-in2.h: Likewise. * coff-alpha.c: Likewise. * coff-i860.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff-z80.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * compress.c: Likewise. * corefile.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-crx.c: Likewise. * cpu-h8300.c: Likewise. * cpu-i386.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m68k.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-sh.c: Likewise. * cpu-xc16x.c: Likewise. * dwarf2.c: Likewise. * ecofflink.c: Likewise. * ecoffswap.h: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-vxworks.c: Likewise. * elf32-avr.c: Likewise. * elf32-avr.h: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.h: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-v850.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * libcoff.h: Likewise. * libpei.h: Likewise. * libxcoff.h: Likewise. * linker.c: Likewise. * mach-o-i386.c: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mach-o.h: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c: Likewise. * pef-traceback.h: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * plugin.c: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * section.c: Likewise. * som.c: Likewise. * syms.c: Likewise. * tekhex.c: Likewise. * ticoff.h: Likewise. * vaxbsd.c: Likewise. * xcofflink.c: Likewise. * xtensa-isa.c: Likewise.
2013-01-10 21:03:55 +01:00
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Scan the output sections to see if we use the memory banks.
If so, export the symbols that define how the memory banks
are mapped. This is used by gdb and the simulator to obtain
the information. It can be used by programs to burn the eprom
at the good addresses. */
param.use_memory_banks = FALSE;
param.pinfo = &htab->pinfo;
bfd_map_over_sections (abfd, scan_sections_for_abi, &param);
if (param.use_memory_banks)
{
m68hc11_elf_set_symbol (abfd, info, BFD_M68HC11_BANK_START_NAME,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
htab->pinfo.bank_physical,
bfd_abs_section_ptr);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
m68hc11_elf_set_symbol (abfd, info, BFD_M68HC11_BANK_VIRTUAL_NAME,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
htab->pinfo.bank_virtual,
bfd_abs_section_ptr);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
m68hc11_elf_set_symbol (abfd, info, BFD_M68HC11_BANK_SIZE_NAME,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
htab->pinfo.bank_size,
bfd_abs_section_ptr);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
return TRUE;
}
void
m68hc11_elf_get_bank_parameters (struct bfd_link_info *info)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
unsigned i;
struct m68hc11_page_info *pinfo;
struct bfd_link_hash_entry *h;
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
struct m68hc11_elf_link_hash_table *htab;
htab = m68hc11_elf_hash_table (info);
if (htab == NULL)
return;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
pinfo = & htab->pinfo;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (pinfo->bank_param_initialized)
return;
pinfo->bank_virtual = M68HC12_BANK_VIRT;
pinfo->bank_mask = M68HC12_BANK_MASK;
pinfo->bank_physical = M68HC12_BANK_BASE;
pinfo->bank_shift = M68HC12_BANK_SHIFT;
pinfo->bank_size = 1 << M68HC12_BANK_SHIFT;
h = bfd_link_hash_lookup (info->hash, BFD_M68HC11_BANK_START_NAME,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
FALSE, FALSE, TRUE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (h != (struct bfd_link_hash_entry*) NULL
&& h->type == bfd_link_hash_defined)
pinfo->bank_physical = (h->u.def.value
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
h = bfd_link_hash_lookup (info->hash, BFD_M68HC11_BANK_VIRTUAL_NAME,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
FALSE, FALSE, TRUE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (h != (struct bfd_link_hash_entry*) NULL
&& h->type == bfd_link_hash_defined)
pinfo->bank_virtual = (h->u.def.value
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
h = bfd_link_hash_lookup (info->hash, BFD_M68HC11_BANK_SIZE_NAME,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
FALSE, FALSE, TRUE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (h != (struct bfd_link_hash_entry*) NULL
&& h->type == bfd_link_hash_defined)
pinfo->bank_size = (h->u.def.value
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
pinfo->bank_shift = 0;
for (i = pinfo->bank_size; i != 0; i >>= 1)
pinfo->bank_shift++;
pinfo->bank_shift--;
pinfo->bank_mask = (1 << pinfo->bank_shift) - 1;
pinfo->bank_physical_end = pinfo->bank_physical + pinfo->bank_size;
pinfo->bank_param_initialized = 1;
h = bfd_link_hash_lookup (info->hash, "__far_trampoline", FALSE,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
FALSE, TRUE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (h != (struct bfd_link_hash_entry*) NULL
&& h->type == bfd_link_hash_defined)
pinfo->trampoline_addr = (h->u.def.value
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
/* Return 1 if the address is in banked memory.
This can be applied to a virtual address and to a physical address. */
int
m68hc11_addr_is_banked (struct m68hc11_page_info *pinfo, bfd_vma addr)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
if (addr >= pinfo->bank_virtual)
return 1;
if (addr >= pinfo->bank_physical && addr <= pinfo->bank_physical_end)
return 1;
return 0;
}
/* Return the physical address seen by the processor, taking
into account banked memory. */
bfd_vma
m68hc11_phys_addr (struct m68hc11_page_info *pinfo, bfd_vma addr)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
if (addr < pinfo->bank_virtual)
return addr;
/* Map the address to the memory bank. */
addr -= pinfo->bank_virtual;
addr &= pinfo->bank_mask;
addr += pinfo->bank_physical;
return addr;
}
/* Return the page number corresponding to an address in banked memory. */
bfd_vma
m68hc11_phys_page (struct m68hc11_page_info *pinfo, bfd_vma addr)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
if (addr < pinfo->bank_virtual)
return 0;
/* Map the address to the memory bank. */
addr -= pinfo->bank_virtual;
addr >>= pinfo->bank_shift;
addr &= 0x0ff;
return addr;
}
/* This function is used for relocs which are only used for relaxing,
which the linker should otherwise ignore. */
bfd_reloc_status_type
m68hc11_elf_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
arelent *reloc_entry,
asymbol *symbol ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED,
asection *input_section,
bfd *output_bfd,
char **error_message ATTRIBUTE_UNUSED)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
if (output_bfd != NULL)
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
bfd_reloc_status_type
m68hc11_elf_special_reloc (bfd *abfd ATTRIBUTE_UNUSED,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
arelent *reloc_entry,
asymbol *symbol,
void *data ATTRIBUTE_UNUSED,
asection *input_section,
bfd *output_bfd,
char **error_message ATTRIBUTE_UNUSED)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (! reloc_entry->howto->partial_inplace
|| reloc_entry->addend == 0))
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
if (output_bfd != NULL)
return bfd_reloc_continue;
* bfd-in.h (bfd_get_section_limit): Define. * reloc.c (bfd_perform_relocation, bfd_install_relocation) (_bfd_final_link_relocate): Use bfd_get_section_limit. * aout-tic30.c (tic30_aout_final_link_relocate): Likewise. * coff-arm.c (coff_arm_relocate_section): Likewise. * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise. * cpu-ns32k.c (do_ns32k_reloc): Likewise. (bfd_ns32k_final_link_relocate): Likewise. * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise. * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise. * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc) (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise. * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc) (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise. * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise. * elf32-or32.c (or32_elf_consth_reloc): Likewise. * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise. * elf32-s390.c (s390_elf_ldisp_reloc): Likewise. * elf32-sh.c (sh_elf_reloc_loop): Likewise. * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise. (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise. * elf32-v850.c (v850_elf_reloc): Likewise. * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise. * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise. * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise. * elf64-mips.c (mips_elf64_gprel32_reloc) (mips16_gprel_reloc): Likewise. * elf64-mmix.c (mmix_elf_reloc): Likewise. * elf64-s390.c (s390_elf_ldisp_reloc): Likewise. * elf64-sparc.c (init_insn_reloc): Likewise. * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise. * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp) (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc) (_bfd_mips_elf_generic_reloc): Likewise. * bfd-in2.h: Regenerate.
2004-06-29 15:46:34 +02:00
if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return bfd_reloc_outofrange;
abort();
}
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
bfd_boolean
elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
asection *sec, const Elf_Internal_Rela *relocs)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
Elf_Internal_Shdr * symtab_hdr;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
struct elf_link_hash_entry ** sym_hashes;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
const Elf_Internal_Rela * rel;
const Elf_Internal_Rela * rel_end;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
Add output_type to bfd_link_info The "shared" field in bfd_link_info is set for both DSO and and PIE. There are separate fields for executable and relocatable outputs. This patch adds an "output_type" field: enum output_type { type_unknown = 0, type_executable, type_dll, type_relocatable }; and a "pic" field to bfd_link_info to replace shared, executable and relocatable fields so that we can use the "output_type" field to check for output type and the "pic" field check if output is PIC. Macros, bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie, are provided to check for output features. bfd/ * bfd/aoutx.h: Replace shared, executable, relocatable and pie fields with bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie. * bfd/bout.c: Likewise. * bfd/coff-alpha.c: Likewise. * bfd/coff-arm.c: Likewise. * bfd/coff-i386.c: Likewise. * bfd/coff-i960.c: Likewise. * bfd/coff-m68k.c: Likewise. * bfd/coff-mcore.c: Likewise. * bfd/coff-mips.c: Likewise. * bfd/coff-ppc.c: Likewise. * bfd/coff-rs6000.c: Likewise. * bfd/coff-sh.c: Likewise. * bfd/coff-tic80.c: Likewise. * bfd/coff-x86_64.c: Likewise. * bfd/coff64-rs6000.c: Likewise. * bfd/coffgen.c: Likewise. * bfd/cofflink.c: Likewise. * bfd/ecoff.c: Likewise. * bfd/ecofflink.c: Likewise. * bfd/elf-bfd.h: Likewise. * bfd/elf-eh-frame.c: Likewise. * bfd/elf-ifunc.c: Likewise. * bfd/elf-m10200.c: Likewise. * bfd/elf-m10300.c: Likewise. * bfd/elf-s390-common.c: Likewise. * bfd/elf-vxworks.c: Likewise. * bfd/elf.c: Likewise. * bfd/elf32-arm.c: Likewise. * bfd/elf32-avr.c: Likewise. * bfd/elf32-bfin.c: Likewise. * bfd/elf32-cr16.c: Likewise. * bfd/elf32-cr16c.c: Likewise. * bfd/elf32-cris.c: Likewise. * bfd/elf32-crx.c: Likewise. * bfd/elf32-d10v.c: Likewise. * bfd/elf32-dlx.c: Likewise. * bfd/elf32-epiphany.c: Likewise. * bfd/elf32-fr30.c: Likewise. * bfd/elf32-frv.c: Likewise. * bfd/elf32-ft32.c: Likewise. * bfd/elf32-h8300.c: Likewise. * bfd/elf32-hppa.c: Likewise. * bfd/elf32-i370.c: Likewise. * bfd/elf32-i386.c: Likewise. * bfd/elf32-i860.c: Likewise. * bfd/elf32-ip2k.c: Likewise. * bfd/elf32-iq2000.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-m32c.c: Likewise. * bfd/elf32-m32r.c: Likewise. * bfd/elf32-m68hc11.c: Likewise. * bfd/elf32-m68hc1x.c: Likewise. * bfd/elf32-m68k.c: Likewise. * bfd/elf32-mcore.c: Likewise. * bfd/elf32-mep.c: Likewise. * bfd/elf32-metag.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-moxie.c: Likewise. * bfd/elf32-msp430.c: Likewise. * bfd/elf32-mt.c: Likewise. * bfd/elf32-nds32.c: Likewise. * bfd/elf32-nios2.c: Likewise. * bfd/elf32-or1k.c: Likewise. * bfd/elf32-ppc.c: Likewise. * bfd/elf32-rl78.c: Likewise. * bfd/elf32-rx.c: Likewise. * bfd/elf32-s390.c: Likewise. * bfd/elf32-score.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-sh-symbian.c: Likewise. * bfd/elf32-sh.c: Likewise. * bfd/elf32-sh64.c: Likewise. * bfd/elf32-spu.c: Likewise. * bfd/elf32-tic6x.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elf32-v850.c: Likewise. * bfd/elf32-vax.c: Likewise. * bfd/elf32-visium.c: Likewise. * bfd/elf32-xc16x.c: Likewise. * bfd/elf32-xstormy16.c: Likewise. * bfd/elf32-xtensa.c: Likewise. * bfd/elf64-alpha.c: Likewise. * bfd/elf64-hppa.c: Likewise. * bfd/elf64-ia64-vms.c: Likewise. * bfd/elf64-mmix.c: Likewise. * bfd/elf64-ppc.c: Likewise. * bfd/elf64-s390.c: Likewise. * bfd/elf64-sh64.c: Likewise. * bfd/elf64-x86-64.c: Likewise. * bfd/elflink.c: Likewise. * bfd/elfnn-aarch64.c: Likewise. * bfd/elfnn-ia64.c: Likewise. * bfd/elfxx-mips.c: Likewise. * bfd/elfxx-sparc.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/i386linux.c: Likewise. * bfd/linker.c: Likewise. * bfd/m68klinux.c: Likewise. * bfd/pdp11.c: Likewise. * bfd/pe-mips.c: Likewise. * bfd/peXXigen.c: Likewise. * bfd/reloc.c: Likewise. * bfd/reloc16.c: Likewise. * bfd/sparclinux.c: Likewise. * bfd/sunos.c: Likewise. * bfd/vms-alpha.c: Likewise. * bfd/xcofflink.c: Likewise. include/ * include/bfdlink.h (output_type): New enum. (bfd_link_executable): New macro. (bfd_link_dll): Likewise. (bfd_link_relocatable): Likewise. (bfd_link_pic): Likewise. (bfd_link_pie): Likewise. (bfd_link_info): Remove shared, executable, pie and relocatable. Add output_type and pic. ld/ * ld/ldctor.c: Replace shared, executable, relocatable and pie fields with bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie. * ld/ldemul.c: Likewise. * ld/ldfile.c: Likewise. * ld/ldlang.c: Likewise. * ld/ldmain.c: Likewise. * ld/ldwrite.c: Likewise. * ld/lexsup.c: Likewise. * ld/pe-dll.c: Likewise. * ld/plugin.c: Likewise. * ld/emultempl/aarch64elf.em: Likewise. * ld/emultempl/aix.em: Likewise. * ld/emultempl/alphaelf.em: Likewise. * ld/emultempl/armcoff.em: Likewise. * ld/emultempl/armelf.em: Likewise. * ld/emultempl/avrelf.em: Likewise. * ld/emultempl/beos.em: Likewise. * ld/emultempl/cr16elf.em: Likewise. * ld/emultempl/elf-generic.em: Likewise. * ld/emultempl/elf32.em: Likewise. * ld/emultempl/genelf.em: Likewise. * ld/emultempl/generic.em: Likewise. * ld/emultempl/gld960.em: Likewise. * ld/emultempl/gld960c.em: Likewise. * ld/emultempl/hppaelf.em: Likewise. * ld/emultempl/irix.em: Likewise. * ld/emultempl/linux.em: Likewise. * ld/emultempl/lnk960.em: Likewise. * ld/emultempl/m68hc1xelf.em: Likewise. * ld/emultempl/m68kcoff.em: Likewise. * ld/emultempl/m68kelf.em: Likewise. * ld/emultempl/metagelf.em: Likewise. * ld/emultempl/mipself.em: Likewise. * ld/emultempl/mmo.em: Likewise. * ld/emultempl/msp430.em: Likewise. * ld/emultempl/nds32elf.em: Likewise. * ld/emultempl/needrelax.em: Likewise. * ld/emultempl/nios2elf.em: Likewise. * ld/emultempl/pe.em: Likewise. * ld/emultempl/pep.em: Likewise. * ld/emultempl/ppc32elf.em: Likewise. * ld/emultempl/ppc64elf.em: Likewise. * ld/emultempl/sh64elf.em: Likewise. * ld/emultempl/solaris2.em: Likewise. * ld/emultempl/spuelf.em: Likewise. * ld/emultempl/sunos.em: Likewise. * ld/emultempl/tic6xdsbt.em: Likewise. * ld/emultempl/ticoff.em: Likewise. * ld/emultempl/v850elf.em: Likewise. * ld/emultempl/vms.em: Likewise. * ld/emultempl/vxworks.em: Likewise.
2015-08-18 14:51:03 +02:00
if (bfd_link_relocatable (info))
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return TRUE;
symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
struct elf_link_hash_entry * h;
unsigned long r_symndx;
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
h = NULL;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
else
2005-06-20 20:12:11 +02:00
{
h = sym_hashes [r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
switch (ELF32_R_TYPE (rel->r_info))
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
{
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
case R_M68HC11_GNU_VTINHERIT:
if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return FALSE;
break;
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_M68HC11_GNU_VTENTRY:
Check corrupt VTENTRY entry in bfd_elf_gc_record_vtentry Instead of BFD_ASSERT (h != NULL) with ld: BFD ... assertion fail .../bfd/elf64-x86-64.c:2562 ld: bad.o: invalid string offset 50331648 >= 371 for section `nterp' check corrupt VTENTRY entry in bfd_elf_gc_record_vtentry with ld: bad.o: section 'g': corrupt VTENTRY entry * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of "h != NULL". Don't check "h != NULL" before calling. bfd_elf_gc_record_vtentry. * elf32-arm.c (elf32_arm_check_relocs): Likewise. * elf32-bfin.c (bfin_check_relocs): Likewise. * elf32-cris.c (cris_elf_check_relocs): Likewise. * elf32-csky.c (csky_elf_check_relocs): Likewise. * elf32-d10v.c (elf32_d10v_check_relocs): Likewise. * elf32-dlx.c (elf32_dlx_check_relocs): Likewise. * elf32-fr30.c (fr30_elf_check_relocs): Likewise. * elf32-frv.c (elf32_frv_check_relocs): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-mcore.c (mcore_elf_check_relocs): Likewise. * elf32-metag.c (elf_metag_check_relocs): Likewise. * elf32-or1k.c (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_check_relocs): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise. * elf64-mmix.c (mmix_elf_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. * elf64-x86-64.c (elf_s390_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt VTENTRY entry.
2019-04-11 15:44:53 +02:00
if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
return FALSE;
break;
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}
return TRUE;
}
static bfd_boolean ATTRIBUTE_PRINTF (6, 7)
reloc_warning (struct bfd_link_info *info, const char *name, bfd *input_bfd,
asection *input_section, const Elf_Internal_Rela *rel,
const char *fmt, ...)
{
va_list ap;
char *buf;
int ret;
va_start (ap, fmt);
ret = vasprintf (&buf, fmt, ap);
va_end (ap);
if (ret < 0)
{
bfd_set_error (bfd_error_no_memory);
return FALSE;
}
info->callbacks->warning (info, buf, name, input_bfd, input_section,
rel->r_offset);
free (buf);
return TRUE;
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Relocate a 68hc11/68hc12 ELF section. */
bfd_boolean
elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
struct bfd_link_info *info,
bfd *input_bfd, asection *input_section,
bfd_byte *contents, Elf_Internal_Rela *relocs,
Elf_Internal_Sym *local_syms,
asection **local_sections)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
const char *name = NULL;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
struct m68hc11_page_info *pinfo;
const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
struct m68hc11_elf_link_hash_table *htab;
unsigned long e_flags;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
e_flags = elf_elfheader (input_bfd)->e_flags;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
htab = m68hc11_elf_hash_table (info);
if (htab == NULL)
return FALSE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Get memory bank parameters. */
m68hc11_elf_get_bank_parameters (info);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
pinfo = & htab->pinfo;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
rel = relocs;
relend = relocs + input_section->reloc_count;
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
for (; rel < relend; rel++)
{
int r_type;
arelent arel;
reloc_howto_type *howto;
unsigned long r_symndx;
Elf_Internal_Sym *sym;
asection *sec;
bfd_vma relocation = 0;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
bfd_reloc_status_type r = bfd_reloc_undefined;
bfd_vma phys_page;
bfd_vma phys_addr;
bfd_vma insn_addr;
bfd_vma insn_page;
bfd_boolean is_far = FALSE;
bfd_boolean is_xgate_symbol = FALSE;
bfd_boolean is_section_symbol = FALSE;
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
struct elf_link_hash_entry *h;
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
bfd_vma val;
const char *msg;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
if (r_type == R_M68HC11_GNU_VTENTRY
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
|| r_type == R_M68HC11_GNU_VTINHERIT)
continue;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
Have info_to_howto functions return a success/fail status. Check this result. Stop strip from completeing if one of these functions fails. bfd PR 22875 * elf-bfd.h (struct elf_backend_data): Change the return type of the elf_info_to_howto and elf_info_to_howto_rel function pointers to bfd_boolean. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed. * elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function. (elf32_h8_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. (riscv_elf_relocate_section): Likewise. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to bfd_boolean. Issue an error message, set an error value and return FALSE if the reloc is not recognized. (elf_hppa_info_to_howto_rel): Likewise. * elf-m10200.c (mn10200_info_to_howto): Likewise. * elf-m10300.c (mn10300_info_to_howto): Likewise. * elf.c (_bfd_elf_no_info_to_howto): Likewise. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-arm.c (elf32_arm_info_to_howto): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-bfin.c (bfin_info_to_howto): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise. * elf32-cris.c (elf_cr16c_info_to_howto_rel, cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto, elf32_dlx_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela, frvfdpic_info_to_howto_rel): Likewise. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise. * elf32-gen.c (elf_generic_info_to_howto, elf_generic_info_to_howto_rel): Likewise. * elf32-h8300.c (elf32_h8_info_to_howto, elf32_h8_info_to_howto_rel): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup, elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68k.c (rtype_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-pru.c (pru_elf32_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-s390.c (elf_s390_info_to_howto): Likewise. * elf32-score.c (s3_bfd_score_info_to_howto, _bfd_score_info_to_howto): Likewise. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-tic6x.c (elf32_tic6x_info_to_howto, elf32_tic6x_info_to_howto_rel): Likewise. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel, v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto, elf32_wasm32_info_to_howto_rela): Likewise. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-gen.c (elf_generic_info_to_howto, elf_generic_info_to_howto_rel): Likewise. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL. binutils PR 22875 * objcopy.c (copy_object): Check the error status after marking symbols used in relocations. * testsuite/binutils-all/strip-13.s: New test source file. * testsuite/binutils-all/strip-13.s: New test driver file. * testsuite/binutils-all/objcopy.exp: Run the new test.
2018-02-27 11:15:13 +01:00
if (! (*ebd->elf_info_to_howto_rel) (input_bfd, &arel, rel))
continue;
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
howto = arel.howto;
h = NULL;
sym = NULL;
sec = NULL;
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
is_far = (sym && (sym->st_other & STO_M68HC12_FAR));
is_xgate_symbol = (sym && (sym->st_target_internal));
is_section_symbol = ELF_ST_TYPE (sym->st_info) & STT_SECTION;
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
}
else
{
Pass ignored unresolved relocations to ld backend bfd/ PR ld/4409 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for error ignored. * elf-m10200.c (mn10200_elf_relocate_section): Updated. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-metag.c (elf_metag_relocate_section): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Skip if error from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored. ld/testsuite/ PR ld/4409 * ld-ia64/error1.d: New file. * ld-ia64/error1.s: Likewise. * ld-ia64/error2.d: Likewise. * ld-ia64/error3.d: Likewise.
2013-11-05 19:29:44 +01:00
bfd_boolean unresolved_reloc, warned, ignored;
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation, unresolved_reloc,
Pass ignored unresolved relocations to ld backend bfd/ PR ld/4409 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for error ignored. * elf-m10200.c (mn10200_elf_relocate_section): Updated. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-metag.c (elf_metag_relocate_section): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Skip if error from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored. ld/testsuite/ PR ld/4409 * ld-ia64/error1.d: New file. * ld-ia64/error1.s: Likewise. * ld-ia64/error2.d: Likewise. * ld-ia64/error3.d: Likewise.
2013-11-05 19:29:44 +01:00
warned, ignored);
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
is_far = (h && (h->other & STO_M68HC12_FAR));
is_xgate_symbol = (h && (h->target_internal));
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
}
PR ld/13991 bfd/ * bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as _bfd_generic_link_just_syms. * bfd/elflink.c (_bfd_elf_link_just_syms): Delete. * bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type. * bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section. * bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. * bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c, * bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c, * bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c, * bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c, * bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c, * bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c, * bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c, * bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c, * bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c, * bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c, * bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c, * bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c, * bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c, * bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c, * bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c, * bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c, * bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c, * bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c, * bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c, * bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c, * bfd/reloc.c: Update all references. * bfd/bfd-in2.h: Regenerate. ld/ * ld/ldlang.c (size_input_section): Use sec_info_type rather than usrdata->flags.just_syms. * ld/ldwrite.c (build_link_order): Likewise. * ld/emultempl/hppaelf.em (build_section_lists): Likewise. * ld/emultempl/ppc64elf.em (build_toc_list): Likewise. * ld/emultempl/armelf.em (build_section_lists): Likewise. (after_allocation): Update for renamed sec_info_type value. * ld/emultempl/tic6xdsbt.em: Likewise.
2012-04-24 07:12:40 +02:00
if (sec != NULL && discarded_section (sec))
bfd/ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call _bfd_clear_contents. Pass it the input section. * libbfd-in.h (_bfd_clear_contents): Add input_section argument. * libbfd.h: Regenerate. * reloc.c (_bfd_clear_contents): Take input_section argument. Use non-zero for .debug_ranges. (bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents call. * elf32-arm.c (elf32_arm_relocate_section): Use RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. ld/testsuite/ * ld-discard/zero-range.d, ld-discard/zero-range.s: New files.
2010-10-25 17:54:16 +02:00
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound relocations. * elfxx-mips.c (mips_reloc_against_discarded_section): New function. (_bfd_mips_elf_relocate_section): Call it, in place of RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Update arguments to RELOC_AGAINST_DISCARDED_SECTION. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2012-05-07 05:27:52 +02:00
rel, 1, relend, howto, 0, contents);
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
Add output_type to bfd_link_info The "shared" field in bfd_link_info is set for both DSO and and PIE. There are separate fields for executable and relocatable outputs. This patch adds an "output_type" field: enum output_type { type_unknown = 0, type_executable, type_dll, type_relocatable }; and a "pic" field to bfd_link_info to replace shared, executable and relocatable fields so that we can use the "output_type" field to check for output type and the "pic" field check if output is PIC. Macros, bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie, are provided to check for output features. bfd/ * bfd/aoutx.h: Replace shared, executable, relocatable and pie fields with bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie. * bfd/bout.c: Likewise. * bfd/coff-alpha.c: Likewise. * bfd/coff-arm.c: Likewise. * bfd/coff-i386.c: Likewise. * bfd/coff-i960.c: Likewise. * bfd/coff-m68k.c: Likewise. * bfd/coff-mcore.c: Likewise. * bfd/coff-mips.c: Likewise. * bfd/coff-ppc.c: Likewise. * bfd/coff-rs6000.c: Likewise. * bfd/coff-sh.c: Likewise. * bfd/coff-tic80.c: Likewise. * bfd/coff-x86_64.c: Likewise. * bfd/coff64-rs6000.c: Likewise. * bfd/coffgen.c: Likewise. * bfd/cofflink.c: Likewise. * bfd/ecoff.c: Likewise. * bfd/ecofflink.c: Likewise. * bfd/elf-bfd.h: Likewise. * bfd/elf-eh-frame.c: Likewise. * bfd/elf-ifunc.c: Likewise. * bfd/elf-m10200.c: Likewise. * bfd/elf-m10300.c: Likewise. * bfd/elf-s390-common.c: Likewise. * bfd/elf-vxworks.c: Likewise. * bfd/elf.c: Likewise. * bfd/elf32-arm.c: Likewise. * bfd/elf32-avr.c: Likewise. * bfd/elf32-bfin.c: Likewise. * bfd/elf32-cr16.c: Likewise. * bfd/elf32-cr16c.c: Likewise. * bfd/elf32-cris.c: Likewise. * bfd/elf32-crx.c: Likewise. * bfd/elf32-d10v.c: Likewise. * bfd/elf32-dlx.c: Likewise. * bfd/elf32-epiphany.c: Likewise. * bfd/elf32-fr30.c: Likewise. * bfd/elf32-frv.c: Likewise. * bfd/elf32-ft32.c: Likewise. * bfd/elf32-h8300.c: Likewise. * bfd/elf32-hppa.c: Likewise. * bfd/elf32-i370.c: Likewise. * bfd/elf32-i386.c: Likewise. * bfd/elf32-i860.c: Likewise. * bfd/elf32-ip2k.c: Likewise. * bfd/elf32-iq2000.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-m32c.c: Likewise. * bfd/elf32-m32r.c: Likewise. * bfd/elf32-m68hc11.c: Likewise. * bfd/elf32-m68hc1x.c: Likewise. * bfd/elf32-m68k.c: Likewise. * bfd/elf32-mcore.c: Likewise. * bfd/elf32-mep.c: Likewise. * bfd/elf32-metag.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-moxie.c: Likewise. * bfd/elf32-msp430.c: Likewise. * bfd/elf32-mt.c: Likewise. * bfd/elf32-nds32.c: Likewise. * bfd/elf32-nios2.c: Likewise. * bfd/elf32-or1k.c: Likewise. * bfd/elf32-ppc.c: Likewise. * bfd/elf32-rl78.c: Likewise. * bfd/elf32-rx.c: Likewise. * bfd/elf32-s390.c: Likewise. * bfd/elf32-score.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-sh-symbian.c: Likewise. * bfd/elf32-sh.c: Likewise. * bfd/elf32-sh64.c: Likewise. * bfd/elf32-spu.c: Likewise. * bfd/elf32-tic6x.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elf32-v850.c: Likewise. * bfd/elf32-vax.c: Likewise. * bfd/elf32-visium.c: Likewise. * bfd/elf32-xc16x.c: Likewise. * bfd/elf32-xstormy16.c: Likewise. * bfd/elf32-xtensa.c: Likewise. * bfd/elf64-alpha.c: Likewise. * bfd/elf64-hppa.c: Likewise. * bfd/elf64-ia64-vms.c: Likewise. * bfd/elf64-mmix.c: Likewise. * bfd/elf64-ppc.c: Likewise. * bfd/elf64-s390.c: Likewise. * bfd/elf64-sh64.c: Likewise. * bfd/elf64-x86-64.c: Likewise. * bfd/elflink.c: Likewise. * bfd/elfnn-aarch64.c: Likewise. * bfd/elfnn-ia64.c: Likewise. * bfd/elfxx-mips.c: Likewise. * bfd/elfxx-sparc.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/i386linux.c: Likewise. * bfd/linker.c: Likewise. * bfd/m68klinux.c: Likewise. * bfd/pdp11.c: Likewise. * bfd/pe-mips.c: Likewise. * bfd/peXXigen.c: Likewise. * bfd/reloc.c: Likewise. * bfd/reloc16.c: Likewise. * bfd/sparclinux.c: Likewise. * bfd/sunos.c: Likewise. * bfd/vms-alpha.c: Likewise. * bfd/xcofflink.c: Likewise. include/ * include/bfdlink.h (output_type): New enum. (bfd_link_executable): New macro. (bfd_link_dll): Likewise. (bfd_link_relocatable): Likewise. (bfd_link_pic): Likewise. (bfd_link_pie): Likewise. (bfd_link_info): Remove shared, executable, pie and relocatable. Add output_type and pic. ld/ * ld/ldctor.c: Replace shared, executable, relocatable and pie fields with bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie. * ld/ldemul.c: Likewise. * ld/ldfile.c: Likewise. * ld/ldlang.c: Likewise. * ld/ldmain.c: Likewise. * ld/ldwrite.c: Likewise. * ld/lexsup.c: Likewise. * ld/pe-dll.c: Likewise. * ld/plugin.c: Likewise. * ld/emultempl/aarch64elf.em: Likewise. * ld/emultempl/aix.em: Likewise. * ld/emultempl/alphaelf.em: Likewise. * ld/emultempl/armcoff.em: Likewise. * ld/emultempl/armelf.em: Likewise. * ld/emultempl/avrelf.em: Likewise. * ld/emultempl/beos.em: Likewise. * ld/emultempl/cr16elf.em: Likewise. * ld/emultempl/elf-generic.em: Likewise. * ld/emultempl/elf32.em: Likewise. * ld/emultempl/genelf.em: Likewise. * ld/emultempl/generic.em: Likewise. * ld/emultempl/gld960.em: Likewise. * ld/emultempl/gld960c.em: Likewise. * ld/emultempl/hppaelf.em: Likewise. * ld/emultempl/irix.em: Likewise. * ld/emultempl/linux.em: Likewise. * ld/emultempl/lnk960.em: Likewise. * ld/emultempl/m68hc1xelf.em: Likewise. * ld/emultempl/m68kcoff.em: Likewise. * ld/emultempl/m68kelf.em: Likewise. * ld/emultempl/metagelf.em: Likewise. * ld/emultempl/mipself.em: Likewise. * ld/emultempl/mmo.em: Likewise. * ld/emultempl/msp430.em: Likewise. * ld/emultempl/nds32elf.em: Likewise. * ld/emultempl/needrelax.em: Likewise. * ld/emultempl/nios2elf.em: Likewise. * ld/emultempl/pe.em: Likewise. * ld/emultempl/pep.em: Likewise. * ld/emultempl/ppc32elf.em: Likewise. * ld/emultempl/ppc64elf.em: Likewise. * ld/emultempl/sh64elf.em: Likewise. * ld/emultempl/solaris2.em: Likewise. * ld/emultempl/spuelf.em: Likewise. * ld/emultempl/sunos.em: Likewise. * ld/emultempl/tic6xdsbt.em: Likewise. * ld/emultempl/ticoff.em: Likewise. * ld/emultempl/v850elf.em: Likewise. * ld/emultempl/vms.em: Likewise. * ld/emultempl/vxworks.em: Likewise.
2015-08-18 14:51:03 +02:00
if (bfd_link_relocatable (info))
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
2003-06-25 08:40:27 +02:00
/* This is a relocatable link. We don't have to change
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
if (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
rel->r_addend += sec->output_offset;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
continue;
}
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
if (h != NULL)
name = h->root.root.string;
else
{
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
bfd_section_* macros This large patch removes the unnecessary bfd parameter from various bfd section macros and functions. The bfd is hardly ever used and if needed for the bfd_set_section_* or bfd_rename_section functions can be found via section->owner except for the com, und, abs, and ind std_section special sections. Those sections shouldn't be modified anyway. The patch also removes various bfd_get_section_<field> macros, replacing their use with bfd_section_<field>, and adds bfd_set_section_lma. I've also fixed a minor bug in gas where compressed section renaming was done directly rather than calling bfd_rename_section. This would have broken bfd_get_section_by_name and similar functions, but that hardly mattered at such a late stage in gas processing. bfd/ * bfd-in.h (bfd_get_section_name, bfd_get_section_vma), (bfd_get_section_lma, bfd_get_section_alignment), (bfd_get_section_size, bfd_get_section_flags), (bfd_get_section_userdata): Delete. (bfd_section_name, bfd_section_size, bfd_section_vma), (bfd_section_lma, bfd_section_alignment): Lose bfd parameter. (bfd_section_flags, bfd_section_userdata): New. (bfd_is_com_section): Rename parameter. * section.c (bfd_set_section_userdata, bfd_set_section_vma), (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section), (bfd_set_section_size): Delete bfd parameter, rename section parameter. (bfd_set_section_lma): New. * bfd-in2.h: Regenerate. * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param, update callers. * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c, * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c, * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c, * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c, * xcofflink.c: Update throughout for bfd section macro and function changes. binutils/ * addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c, * objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c, * od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c, * resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update throughout for bfd section macro and function changes. gas/ * as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c, * read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c, * config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c, * config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c, * config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c, * config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c, * config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c, * config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c, * config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c, * config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c, * config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c, * config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c, * config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c, * config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c, * config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c, * config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c, * config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c, * config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c, * config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c, * config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for bfd section macro and function changes. * write.c (compress_debug): Use bfd_rename_section. gdb/ * aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c, * coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c, * dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c, * exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h, * hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c, * i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c, * maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c, * mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c, * objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c, * ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c, * rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c, * s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c, * solib-spu.c, * solib-svr4.c, * solib-target.c, * spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c, * symmisc.c, * symtab.c, * target.c, * windows-nat.c, * xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c, * mi/mi-interp.c: Update throughout for bfd section macro and function changes. * gcore (gcore_create_callback): Use bfd_set_section_lma. * spu-tdep.c (spu_overlay_new_objfile): Likewise. gprof/ * corefile.c, * symtab.c: Update throughout for bfd section macro and function changes. ld/ * ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/cr16elf.em, * emultempl/cskyelf.em, * emultempl/m68hc1xelf.em, * emultempl/m68kelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update throughout for bfd section macro and function changes. libctf/ * ctf-open-bfd.c: Update throughout for bfd section macro changes. opcodes/ * arc-ext.c: Update throughout for bfd section macro changes. sim/ * common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c, * erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c, * m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c, * rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c, * rx/trace.c: Update throughout for bfd section macro changes.
2019-09-16 12:55:17 +02:00
name = bfd_section_name (sec);
PR 3958 bfd/ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link. (elf_discarded_section): Move.. * bfd-in.h: ..to here. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols from discarded sections before relocate_section has done its job. * reloc.c (bfd_generic_get_relocated_section_contents): Handle relocs against symbols from discarded sections. * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on SECREL32. (elf_hppa_relocate_section): Handle relocatable link after setting sec, sym, h etc. for final link. Squash error messages for relocatable link. Clear section contents for relocs against symbols in discarded sections, and zero reloc. Remove existing zero r_symndx code. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Always adjust section symbols for relocatable link. Don't use always-zero st_value. (elf_backend_rela_normal): Don't define. * elf32-bfin.c (bfinfdpic_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE section symbol adjustments with same for relocatable link. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move.. (elf32_m68hc11_check_relocs): ..to here. * elf32-score.c (score_elf_final_link_relocate): Remove zero r_symndx code. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. ld/testsuite/ * ld-elf/linkonce1.d: New. * ld-elf/linkonce1a.s: New. * ld-elf/linkonce1b.s: New. * ld-elf/linkonce2.d: New. * ld-i386/pcrel16abs.d: New. * ld-i386/pcrel16abs.s: New. * ld-i386/i386.exp: Run it.
2007-03-07 09:54:35 +01:00
}
if (is_far && ELF32_R_TYPE (rel->r_info) == R_M68HC11_16)
{
struct elf32_m68hc11_stub_hash_entry* stub;
stub = m68hc12_stub_hash_lookup (htab->stub_hash_table,
name, FALSE, FALSE);
if (stub)
{
relocation = stub->stub_offset
+ stub->stub_sec->output_section->vma
+ stub->stub_sec->output_offset;
is_far = FALSE;
}
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Do the memory bank mapping. */
phys_addr = m68hc11_phys_addr (pinfo, relocation + rel->r_addend);
phys_page = m68hc11_phys_page (pinfo, relocation + rel->r_addend);
switch (r_type)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
{
case R_M68HC12_LO8XG:
/* This relocation is specific to XGATE IMM16 calls and will precede
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
a HI8. tc-m68hc11 only generates them in pairs.
Leave the relocation to the HI8XG step. */
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
r = bfd_reloc_ok;
r_type = R_M68HC11_NONE;
break;
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
case R_M68HC12_HI8XG:
/* This relocation is specific to XGATE IMM16 calls and must follow
a LO8XG. Does not actually check that it was a LO8XG.
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
Adjusts high and low bytes. */
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
relocation = phys_addr;
if ((e_flags & E_M68HC11_XGATE_RAMOFFSET)
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
&& (relocation >= 0x2000))
relocation += 0xc000; /* HARDCODED RAM offset for XGATE. */
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* Fetch 16 bit value including low byte in previous insn. */
val = (bfd_get_8 (input_bfd, (bfd_byte*) contents + rel->r_offset) << 8)
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
| bfd_get_8 (input_bfd, (bfd_byte*) contents + rel->r_offset - 2);
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* Add on value to preserve carry, then write zero to high byte. */
relocation += val;
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* Write out top byte. */
bfd_put_8 (input_bfd, (relocation >> 8) & 0xff,
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
(bfd_byte*) contents + rel->r_offset);
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* Write out low byte to previous instruction. */
bfd_put_8 (input_bfd, relocation & 0xff,
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
(bfd_byte*) contents + rel->r_offset - 2);
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* Mark as relocation completed. */
r = bfd_reloc_ok;
r_type = R_M68HC11_NONE;
break;
/* The HI8 and LO8 relocs are generated by %hi(expr) %lo(expr)
assembler directives. %hi does not support carry. */
case R_M68HC11_HI8:
case R_M68HC11_LO8:
relocation = phys_addr;
break;
case R_M68HC11_24:
/* Reloc used by 68HC12 call instruction. */
bfd_put_16 (input_bfd, phys_addr,
(bfd_byte*) contents + rel->r_offset);
bfd_put_8 (input_bfd, phys_page,
(bfd_byte*) contents + rel->r_offset + 2);
r = bfd_reloc_ok;
r_type = R_M68HC11_NONE;
break;
case R_M68HC11_NONE:
r = bfd_reloc_ok;
break;
case R_M68HC11_LO16:
/* Reloc generated by %addr(expr) gas to obtain the
address as mapped in the memory bank window. */
relocation = phys_addr;
break;
case R_M68HC11_PAGE:
/* Reloc generated by %page(expr) gas to obtain the
page number associated with the address. */
relocation = phys_page;
break;
case R_M68HC11_16:
if (is_far)
{
if (!reloc_warning (info, name, input_bfd, input_section, rel,
_("reference to the far symbol `%s' using a "
"wrong relocation may result in incorrect "
"execution"), name))
return FALSE;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* Get virtual address of instruction having the relocation. */
insn_addr = input_section->output_section->vma
+ input_section->output_offset
+ rel->r_offset;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
insn_page = m68hc11_phys_page (pinfo, insn_addr);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* If we are linking an S12 instruction against an XGATE symbol, we
need to change the offset of the symbol value so that it's correct
from the S12's perspective. */
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
if (is_xgate_symbol)
{
/* The ram in the global space is mapped to 0x2000 in the 16-bit
address space for S12 and 0xE000 in the 16-bit address space
for XGATE. */
if (relocation >= 0xE000)
{
/* We offset the address by the difference
between these two mappings. */
relocation -= 0xC000;
break;
}
else
{
if (!reloc_warning (info, name, input_bfd, input_section, rel,
_("XGATE address (%lx) is not within "
"shared RAM(0xE000-0xFFFF), therefore "
"you must manually offset the address, "
"and possibly manage the page, in your "
"code."), (long) phys_addr))
return FALSE;
break;
}
}
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
if (m68hc11_addr_is_banked (pinfo, relocation + rel->r_addend)
&& m68hc11_addr_is_banked (pinfo, insn_addr)
&& phys_page != insn_page
&& !(e_flags & E_M68HC11_NO_BANK_WARNING))
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
{
if (!reloc_warning (info, name, input_bfd, input_section, rel,
_("banked address [%lx:%04lx] (%lx) is not "
"in the same bank as current banked "
"address [%lx:%04lx] (%lx)"),
(long) phys_page, (long) phys_addr,
(long) (relocation + rel->r_addend),
(long) insn_page,
(long) m68hc11_phys_addr (pinfo, insn_addr),
(long) insn_addr))
return FALSE;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
break;
}
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
if (phys_page != 0 && insn_page == 0)
{
if (!reloc_warning (info, name, input_bfd, input_section, rel,
_("reference to a banked address [%lx:%04lx] "
"in the normal address space at %04lx"),
(long) phys_page, (long) phys_addr,
(long) insn_addr))
return FALSE;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
relocation = phys_addr;
break;
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
/* If this is a banked address use the phys_addr so that
we stay in the banked window. */
if (m68hc11_addr_is_banked (pinfo, relocation + rel->r_addend))
relocation = phys_addr;
break;
}
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
/* If we are linking an XGATE instruction against an S12 symbol, we
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
need to change the offset of the symbol value so that it's correct
from the XGATE's perspective. */
if (!strcmp (howto->name, "R_XGATE_IMM8_LO")
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
|| !strcmp (howto->name, "R_XGATE_IMM8_HI"))
{
/* We can only offset S12 addresses that lie within the non-paged
area of RAM. */
if (!is_xgate_symbol && !is_section_symbol)
{
/* The ram in the global space is mapped to 0x2000 and stops at
0x4000 in the 16-bit address space for S12 and 0xE000 in the
16-bit address space for XGATE. */
if (relocation >= 0x2000 && relocation < 0x4000)
/* We offset the address by the difference
between these two mappings. */
relocation += 0xC000;
else
{
if (!reloc_warning (info, name, input_bfd, input_section, rel,
_("S12 address (%lx) is not within "
"shared RAM(0x2000-0x4000), therefore "
"you must manually offset the address "
"in your code"), (long) phys_addr))
return FALSE;
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
break;
}
}
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (r_type != R_M68HC11_NONE)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
{
if ((r_type == R_M68HC12_PCREL_9) || (r_type == R_M68HC12_PCREL_10))
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation - 2, rel->r_addend);
else
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation, rel->r_addend);
}
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (r != bfd_reloc_ok)
{
switch (r)
{
case bfd_reloc_overflow:
Return void from linker callbacks The ldmain.c implementation of these linker callback functions always return true, so any code handling a false return is dead. What's more, some of the bfd backends abort if ever a false return is seen, and there seems to be some confusion in gdb's compile-object-load.c. The return value was never meant to be "oh yes, a multiple_definition error occurred", but rather "out of memory or other catastrophic failure". This patch removes the status return on the callbacks that always return true. I kept the return status for "notice" because that one does happen to need to return "out of memory". include/ * bfdlink.h (struct bfd_link_callbacks): Update comments. Return void from multiple_definition, multiple_common, add_to_set, constructor, warning, undefined_symbol, reloc_overflow, reloc_dangerous and unattached_reloc. bfd/ * aoutx.h: Adjust linker callback calls throughout file, removing dead code. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i960.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. * coff64-rs6000.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * elf-bfd.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-ft32.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * simple.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. * elf32-rx.c: (get_symbol_value, get_gp, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. ld/ * ldmain.c (multiple_definition, multiple_common, add_to_set, constructor_callback, warning_callback, undefined_symbol, reloc_overflow, reloc_dangerous, unattached_reloc): Return void. * emultempl/elf32.em: Adjust callback calls. gdb/ * compile/compile-object-load.c (link_callbacks_multiple_definition, link_callbacks_warning, link_callbacks_undefined_symbol, link_callbacks_undefined_symbol, link_callbacks_reloc_overflow, link_callbacks_reloc_dangerous, link_callbacks_unattached_reloc): Return void.
2016-05-27 09:50:55 +02:00
(*info->callbacks->reloc_overflow)
(info, NULL, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
break;
case bfd_reloc_undefined:
Return void from linker callbacks The ldmain.c implementation of these linker callback functions always return true, so any code handling a false return is dead. What's more, some of the bfd backends abort if ever a false return is seen, and there seems to be some confusion in gdb's compile-object-load.c. The return value was never meant to be "oh yes, a multiple_definition error occurred", but rather "out of memory or other catastrophic failure". This patch removes the status return on the callbacks that always return true. I kept the return status for "notice" because that one does happen to need to return "out of memory". include/ * bfdlink.h (struct bfd_link_callbacks): Update comments. Return void from multiple_definition, multiple_common, add_to_set, constructor, warning, undefined_symbol, reloc_overflow, reloc_dangerous and unattached_reloc. bfd/ * aoutx.h: Adjust linker callback calls throughout file, removing dead code. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i960.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. * coff64-rs6000.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * elf-bfd.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-ft32.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * simple.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. * elf32-rx.c: (get_symbol_value, get_gp, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. ld/ * ldmain.c (multiple_definition, multiple_common, add_to_set, constructor_callback, warning_callback, undefined_symbol, reloc_overflow, reloc_dangerous, unattached_reloc): Return void. * emultempl/elf32.em: Adjust callback calls. gdb/ * compile/compile-object-load.c (link_callbacks_multiple_definition, link_callbacks_warning, link_callbacks_undefined_symbol, link_callbacks_undefined_symbol, link_callbacks_reloc_overflow, link_callbacks_reloc_dangerous, link_callbacks_unattached_reloc): Return void.
2016-05-27 09:50:55 +02:00
(*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
break;
case bfd_reloc_outofrange:
msg = _ ("internal error: out of range error");
goto common_error;
case bfd_reloc_notsupported:
msg = _ ("internal error: unsupported relocation error");
goto common_error;
case bfd_reloc_dangerous:
msg = _ ("internal error: dangerous error");
goto common_error;
default:
msg = _ ("internal error: unknown error");
/* fall through */
common_error:
Return void from linker callbacks The ldmain.c implementation of these linker callback functions always return true, so any code handling a false return is dead. What's more, some of the bfd backends abort if ever a false return is seen, and there seems to be some confusion in gdb's compile-object-load.c. The return value was never meant to be "oh yes, a multiple_definition error occurred", but rather "out of memory or other catastrophic failure". This patch removes the status return on the callbacks that always return true. I kept the return status for "notice" because that one does happen to need to return "out of memory". include/ * bfdlink.h (struct bfd_link_callbacks): Update comments. Return void from multiple_definition, multiple_common, add_to_set, constructor, warning, undefined_symbol, reloc_overflow, reloc_dangerous and unattached_reloc. bfd/ * aoutx.h: Adjust linker callback calls throughout file, removing dead code. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i960.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. * coff64-rs6000.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * elf-bfd.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-ft32.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * simple.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. * elf32-rx.c: (get_symbol_value, get_gp, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. ld/ * ldmain.c (multiple_definition, multiple_common, add_to_set, constructor_callback, warning_callback, undefined_symbol, reloc_overflow, reloc_dangerous, unattached_reloc): Return void. * emultempl/elf32.em: Adjust callback calls. gdb/ * compile/compile-object-load.c (link_callbacks_multiple_definition, link_callbacks_warning, link_callbacks_undefined_symbol, link_callbacks_undefined_symbol, link_callbacks_reloc_overflow, link_callbacks_reloc_dangerous, link_callbacks_unattached_reloc): Return void.
2016-05-27 09:50:55 +02:00
(*info->callbacks->warning) (info, msg, name, input_bfd,
input_section, rel->r_offset);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
break;
}
}
}
return TRUE;
}
/* Set and control ELF flags in ELF header. */
bfd_boolean
_bfd_m68hc11_elf_set_private_flags (bfd *abfd, flagword flags)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
BFD_ASSERT (!elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
elf_elfheader (abfd)->e_flags = flags;
elf_flags_init (abfd) = TRUE;
return TRUE;
}
/* Merge backend specific data from an object file to the output
object file when linking. */
bfd_boolean
Pass link_info to _bfd_merge_private_bfd_data Most BFD linker functions take a bfd_link_info param, which reinforces the fact that they are linker functions and allow access to linker callbacks, eg. einfo for printing errors. I was going to use einfo for --fatal-warnings support before I decided a better way was the patch commit 4519d071. bfd/ * targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace obfd param with struct bfd_link_info param. Update all callers. * linker.c (bfd_merge_private_bfd_data): Likewise. (_bfd_generic_verify_endian_match): Likewise. * aoutf1.h (sunos_merge_private_bfd_data): Likewise. * coff-arm.c (coff_arm_merge_private_bfd_data): Likewise. * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise. * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise. (_bfd_elf_merge_object_attributes): Likewise. * elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise. * elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise. * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise. (elf32_arm_merge_private_bfd_data): Likewise. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise. * elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. * elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise. * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise. * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise. * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise. * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise. * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise. * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise. * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise. (elf32_msp430_merge_private_bfd_data): Likewise. * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise. * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. * elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise. * elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise. (ppc_elf_merge_obj_attributes): Likewise. (ppc_elf_merge_private_bfd_data): Likewise. * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise. * elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise. * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. (elf32_score_merge_private_bfd_data): Likewise. * elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise. * elf32-sh64.c (sh64_elf_merge_private_data): Likewise. * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise. * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. (elf32_tic6x_merge_private_bfd_data): Likewise. * elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise. * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise. * elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise. * elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise. * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise. * elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise. * elf64-sh64.c (sh_elf64_merge_private_data): Likewise. * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise. * elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise. * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise. (mips_elf_merge_obj_attributes): Likewise. (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. * elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. ld/ * ldlang.c (lang_check): Update bfd_merge_private_bfd_data call.
2016-09-30 01:14:50 +02:00
_bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
Pass link_info to _bfd_merge_private_bfd_data Most BFD linker functions take a bfd_link_info param, which reinforces the fact that they are linker functions and allow access to linker callbacks, eg. einfo for printing errors. I was going to use einfo for --fatal-warnings support before I decided a better way was the patch commit 4519d071. bfd/ * targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace obfd param with struct bfd_link_info param. Update all callers. * linker.c (bfd_merge_private_bfd_data): Likewise. (_bfd_generic_verify_endian_match): Likewise. * aoutf1.h (sunos_merge_private_bfd_data): Likewise. * coff-arm.c (coff_arm_merge_private_bfd_data): Likewise. * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise. * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise. (_bfd_elf_merge_object_attributes): Likewise. * elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise. * elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise. * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise. (elf32_arm_merge_private_bfd_data): Likewise. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise. * elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. * elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise. * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise. * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise. * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise. * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise. * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise. * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise. * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise. (elf32_msp430_merge_private_bfd_data): Likewise. * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise. * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. * elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise. * elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise. (ppc_elf_merge_obj_attributes): Likewise. (ppc_elf_merge_private_bfd_data): Likewise. * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise. * elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise. * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. (elf32_score_merge_private_bfd_data): Likewise. * elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise. * elf32-sh64.c (sh64_elf_merge_private_data): Likewise. * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise. * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. (elf32_tic6x_merge_private_bfd_data): Likewise. * elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise. * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise. * elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise. * elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise. * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise. * elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise. * elf64-sh64.c (sh_elf64_merge_private_data): Likewise. * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise. * elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise. * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise. (mips_elf_merge_obj_attributes): Likewise. (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. * elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. ld/ * ldlang.c (lang_check): Update bfd_merge_private_bfd_data call.
2016-09-30 01:14:50 +02:00
bfd *obfd = info->output_bfd;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
flagword old_flags;
flagword new_flags;
bfd_boolean ok = TRUE;
2011-06-02 15:43:24 +02:00
/* Check if we have the same endianness */
Pass link_info to _bfd_merge_private_bfd_data Most BFD linker functions take a bfd_link_info param, which reinforces the fact that they are linker functions and allow access to linker callbacks, eg. einfo for printing errors. I was going to use einfo for --fatal-warnings support before I decided a better way was the patch commit 4519d071. bfd/ * targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace obfd param with struct bfd_link_info param. Update all callers. * linker.c (bfd_merge_private_bfd_data): Likewise. (_bfd_generic_verify_endian_match): Likewise. * aoutf1.h (sunos_merge_private_bfd_data): Likewise. * coff-arm.c (coff_arm_merge_private_bfd_data): Likewise. * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise. * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise. (_bfd_elf_merge_object_attributes): Likewise. * elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise. * elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise. * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise. (elf32_arm_merge_private_bfd_data): Likewise. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise. * elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. * elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise. * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise. * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise. * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise. * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise. * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise. * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise. * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise. (elf32_msp430_merge_private_bfd_data): Likewise. * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise. * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. * elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise. * elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise. (ppc_elf_merge_obj_attributes): Likewise. (ppc_elf_merge_private_bfd_data): Likewise. * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise. * elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise. * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. (elf32_score_merge_private_bfd_data): Likewise. * elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise. * elf32-sh64.c (sh64_elf_merge_private_data): Likewise. * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise. * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. (elf32_tic6x_merge_private_bfd_data): Likewise. * elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise. * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise. * elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise. * elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise. * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise. * elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise. * elf64-sh64.c (sh_elf64_merge_private_data): Likewise. * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise. * elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise. * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise. (mips_elf_merge_obj_attributes): Likewise. (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. * elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. ld/ * ldlang.c (lang_check): Update bfd_merge_private_bfd_data call.
2016-09-30 01:14:50 +02:00
if (!_bfd_generic_verify_endian_match (ibfd, info))
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
return FALSE;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
new_flags = elf_elfheader (ibfd)->e_flags;
elf_elfheader (obfd)->e_flags |= new_flags & EF_M68HC11_ABI;
old_flags = elf_elfheader (obfd)->e_flags;
if (! elf_flags_init (obfd))
{
elf_flags_init (obfd) = TRUE;
elf_elfheader (obfd)->e_flags = new_flags;
elf_elfheader (obfd)->e_ident[EI_CLASS]
= elf_elfheader (ibfd)->e_ident[EI_CLASS];
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
&& bfd_get_arch_info (obfd)->the_default)
{
if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
bfd_get_mach (ibfd)))
return FALSE;
}
return TRUE;
}
/* Check ABI compatibility. */
if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
{
Remove syntactic sugar Now that _bfd_error_handler is not a function pointer. * aout-adobe.c: Replace (*_bfd_error_handler) (...) with _bfd_error_handler (...) throughout. * aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c, * coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c, * ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c, * ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c, * mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c, * pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c, * rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c, * stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * xcofflink.c: Likewise.
2016-09-30 05:30:18 +02:00
_bfd_error_handler
Use %pA and %pB in messages rather than %A and %B First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise.
2018-02-19 05:51:40 +01:00
(_("%pB: linking files compiled for 16-bit integers (-mshort) "
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
"and others for 32-bit integers"), ibfd);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
ok = FALSE;
}
if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
{
Remove syntactic sugar Now that _bfd_error_handler is not a function pointer. * aout-adobe.c: Replace (*_bfd_error_handler) (...) with _bfd_error_handler (...) throughout. * aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c, * coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c, * ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c, * ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c, * mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c, * pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c, * rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c, * stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * xcofflink.c: Likewise.
2016-09-30 05:30:18 +02:00
_bfd_error_handler
Use %pA and %pB in messages rather than %A and %B First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise.
2018-02-19 05:51:40 +01:00
(_("%pB: linking files compiled for 32-bit double (-fshort-double) "
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
"and others for 64-bit double"), ibfd);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
ok = FALSE;
}
/* Processor compatibility. */
if (!EF_M68HC11_CAN_MERGE_MACH (new_flags, old_flags))
{
Remove syntactic sugar Now that _bfd_error_handler is not a function pointer. * aout-adobe.c: Replace (*_bfd_error_handler) (...) with _bfd_error_handler (...) throughout. * aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c, * coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c, * ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c, * ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c, * mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c, * pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c, * rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c, * stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * xcofflink.c: Likewise.
2016-09-30 05:30:18 +02:00
_bfd_error_handler
Use %pA and %pB in messages rather than %A and %B First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise.
2018-02-19 05:51:40 +01:00
(_("%pB: linking files compiled for HCS12 with "
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
"others compiled for HC12"), ibfd);
ok = FALSE;
}
new_flags = ((new_flags & ~EF_M68HC11_MACH_MASK)
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
| (EF_M68HC11_MERGE_MACH (new_flags, old_flags)));
elf_elfheader (obfd)->e_flags = new_flags;
new_flags &= ~(EF_M68HC11_ABI | EF_M68HC11_MACH_MASK);
old_flags &= ~(EF_M68HC11_ABI | EF_M68HC11_MACH_MASK);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Warn about any other mismatches */
if (new_flags != old_flags)
{
Remove syntactic sugar Now that _bfd_error_handler is not a function pointer. * aout-adobe.c: Replace (*_bfd_error_handler) (...) with _bfd_error_handler (...) throughout. * aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c, * coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c, * ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c, * ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c, * mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c, * pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c, * rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c, * stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * xcofflink.c: Likewise.
2016-09-30 05:30:18 +02:00
_bfd_error_handler
Add c-format tags to translatable strings with more than one argument-using formatting token. * aout-adobe.c: Add missing c-format tags for translatable strings. * aout-cris.c: Likewise. * aoutx.h: Likewise. * bfd.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * cpu-arm.c: Likewise. * dwarf2.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * ppcboot.c: Likewise. * reloc.c: Likewise. * sparclinux.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * xcofflink.c: Likewise.
2016-10-19 15:04:34 +02:00
/* xgettext:c-format */
Use %pA and %pB in messages rather than %A and %B First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise.
2018-02-19 05:51:40 +01:00
(_("%pB: uses different e_flags (%#x) fields than previous modules (%#x)"),
bfd_error_handler bfd_vma and bfd_size_type args This patch uses the new %L _bfd_error_handler support for printing bfd_vma arguments, and fixes a many other format and/or argument errors in error messages. bfd/ * binary.c (binary_set_section_contents): Don't print filepos in error message. (coff_write_object_contents): Cast size_t for error message. (coff_slurp_line_table): Don't use bfd_vma symndx. (coff_slurp_reloc_table): Remove unneeded cast. * dwarf2.c (read_section): Cast bfd_int64_t to long long for error message. (find_abstract_instance_name): Likewise. * elf32-arm.c (arm_type_of_stub): Correct error arg order. (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg. (elf32_arm_check_relocs): Make r_symndx an int. * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in format string. * elf32-metag.c (elf_metag_relocate_section): Delete extra error message arg. * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus error message. * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int. * elf32-s390.c (elf_s390_check_relocs): Likewise. * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise. * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise. * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args and use %lu for error message. * elflink.c (elf_link_adjust_relocs): Delete extra error message arg. * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for error message. * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args in error message. (elf32_arm_final_link_relocate): Likewise. * coff-arm.c (bfd_arm_process_before_allocation): Likewise. * coffcode.h (styp_to_sec_flags): Likewise. * cofflink.c (_bfd_coff_write_global_sym): Likewise. * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise. * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise. * elf32-bfin.c (bfinfdpic_check_relocs): Likewise. (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise. (i370_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise. * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise. * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise. * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise. * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise. (_bfd_mips_elf_merge_private_bfd_data): Likewise. * ieee.c (ieee_write_id, read_id): Likewise. * mach-o.c (bfd_mach_o_write_contents): Likewise. (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise. (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise. (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise. * stabs.c (_bfd_link_section_stabs): Likewise. * coff-arm.c (coff_arm_relocate_section): Use L modifier in error format. * coff-mcore.c (coff_mcore_relocate_section): Likewise. * coff-ppc.c (coff_ppc_relocate_section): Likewise. * coff-rs6000.c (xcoff_reloc_type_toc): Likewise. * coff-sh.c (sh_relax_section): Likewise. (sh_relax_delete_bytes, sh_swap_insns): Likewise. * coff-tic80.c (coff_tic80_relocate_section): Likewise. * coffcode.h (coff_slurp_reloc_table): Likewise. * coffgen.c (_bfd_coff_get_external_symbols): Likewise. (_bfd_coff_read_string_table): Likewise. * cofflink.c (_bfd_coff_generic_relocate_section): Likewise. * compress.c (bfd_get_full_section_contents): Likewise. * dwarf2.c (read_formatted_entries, decode_line_info): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf.c (bfd_elf_string_from_elf_section): Likewise. * elf32-arc.c (arc_special_overflow_checks): Likewise. * elf32-arm.c (elf32_arm_tls_relax): Likewise. (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise. (elf32_arm_write_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-hppa.c (hppa_build_one_stub): Likewise. (final_link_relocate, elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_tls_transition): Likewise. (elf_i386_relocate_section): Likewise. * elf32-ip2k.c (ip2k_final_link_relocate): Likewise. * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-metag.c (elf_metag_relocate_section): Likewise. * elf32-nds32.c (unrecognized_reloc_msg): Likewise. (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise. (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise. (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise. (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise. (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise. (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise. (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise. (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise. * elf32-rx.c (UNSAFE_FOR_PID): Likewise. * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise. * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise. * elf32-sh.c (sh_elf_relax_section): Likewise. (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise. (sh_elf_relocate_section): Likewise. * elf32-sh64.c (shmedia_prepare_reloc): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relax_section): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. (elf_vax_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise. (compute_text_actions, compute_ebb_proposed_actions): Likewise. (do_fix_for_relocatable_link): Likewise. * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise. (elf64_alpha_relax_with_lituse): Likewise. * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise. (elf_hppa_final_link_relocate): Likewise. * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise. (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise. (elf64_vms_link_add_object_symbols): Likewise. * elf64-mmix.c (mmix_elf_perform_relocation): Likewise. (mmix_final_link_relocate): Likewise. * elf64-s390.c (invalid_tls_insn): Likewise. (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. (elf_x86_64_relocate_section): Likewise. * elfcode.h (elf_slurp_symbol_table): Likewise. * elfcore.h (elf_core_file_p): Likewise. * elflink.c (elf_link_read_relocs_from_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise. (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. (_bfd_mips_elf_relocate_section): Likewise. (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. * ieee.c (ieee_slurp_external_symbols): Likewise. * ihex.c (ihex_write_object_content): Likewise. * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise. * merge.c (_bfd_merged_section_offset): Likewise. * mmo.c (mmo_write_loc_chunk): Likewise. (mmo_write_object_contents): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise. * stabs.c (_bfd_link_section_stabs): Likewise. * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise. ld/ * testsuite/ld-arc/nps-1b.err: Update. * testsuite/ld-x86-64/ilp32-11.d: Update.
2017-07-09 15:41:32 +02:00
ibfd, new_flags, old_flags);
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
ok = FALSE;
}
if (! ok)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
return TRUE;
}
bfd_boolean
_bfd_m68hc11_elf_print_private_bfd_data (bfd *abfd, void *ptr)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
FILE *file = (FILE *) ptr;
BFD_ASSERT (abfd != NULL && ptr != NULL);
/* Print normal ELF private data. */
_bfd_elf_print_private_bfd_data (abfd, ptr);
/* xgettext:c-format */
fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
if (elf_elfheader (abfd)->e_flags & E_M68HC11_I32)
fprintf (file, _("[abi=32-bit int, "));
else
fprintf (file, _("[abi=16-bit int, "));
if (elf_elfheader (abfd)->e_flags & E_M68HC11_F64)
fprintf (file, _("64-bit double, "));
else
fprintf (file, _("32-bit double, "));
if (strcmp (bfd_get_target (abfd), "elf32-m68hc11") == 0)
fprintf (file, _("cpu=HC11]"));
else if (elf_elfheader (abfd)->e_flags & EF_M68HCS12_MACH)
fprintf (file, _("cpu=HCS12]"));
else
Remove trailing white spaces in bfd * aout0.c: Remove trailing white spaces. * archive.c: Likewise. * archures.c: Likewise. * bfd-in.h: Likewise. * bfd-in2.h: Likewise. * coff-alpha.c: Likewise. * coff-i860.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff-z80.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * compress.c: Likewise. * corefile.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-crx.c: Likewise. * cpu-h8300.c: Likewise. * cpu-i386.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m68k.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-sh.c: Likewise. * cpu-xc16x.c: Likewise. * dwarf2.c: Likewise. * ecofflink.c: Likewise. * ecoffswap.h: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-vxworks.c: Likewise. * elf32-avr.c: Likewise. * elf32-avr.h: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.h: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-v850.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * libcoff.h: Likewise. * libpei.h: Likewise. * libxcoff.h: Likewise. * linker.c: Likewise. * mach-o-i386.c: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mach-o.h: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c: Likewise. * pef-traceback.h: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * plugin.c: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * section.c: Likewise. * som.c: Likewise. * syms.c: Likewise. * tekhex.c: Likewise. * ticoff.h: Likewise. * vaxbsd.c: Likewise. * xcofflink.c: Likewise. * xtensa-isa.c: Likewise.
2013-01-10 21:03:55 +01:00
fprintf (file, _("cpu=HC12]"));
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (elf_elfheader (abfd)->e_flags & E_M68HC12_BANKS)
fprintf (file, _(" [memory=bank-model]"));
else
fprintf (file, _(" [memory=flat]"));
* config/tc-m68hc11.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Tweak target flags to match other tools. (i.e. -m m68hc11). * doc/as.texinfo: Mention new options. * doc/c-m68hc11.texi: Document new options. * NEWS: Mention new support. * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * gas/m68hc11/insns9s12x.s: New * gas/m68hc11/insns9s12x.d: New * gas/m68hc11/hexprefix.s: New * gas/m68hc11/hexprefix.d: New * gas/m68hc11/9s12x-exg-sex-tfr.s: New * gas/m68hc11/9s12x-exg-sex-tfr.d: New * gas/m68hc11/insns9s12xg.s: New * gas/m68hc11/insns9s12xg.d: New * gas/m68hc11/9s12x-mov.s: New * gas/m68hc11/9s12x-mov.d: New * gas/m68hc11/m68hc11.exp: Updated * gas/m68hc11/*.d: Brought in line with changed objdump output. * gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3. * gas/elf/elf.exp: XFAIL all hc11/12 targets for redef. * gas/elf/dwarf2-1.d: Skip for hc11/12 targets. * gas/elf/dwarf2-2.d: Likewise. * ld-m68hc11/xgate-link.s: New. * ld-m68hc11/xgate-link.d: New. * ld-m68hc11/xgate-offset.s: New. * ld-m68hc11/xgate-offset.d: New. * ld-m68hc11/xgate1.s: New. * ld-m68hc11/xgate1.d: New. * ld-m68hc11/xgate2.s: New. * ld-m68hc11/m68hc11.exp: Updated. * ld-m68hc11/*.d: Brought in line with changed objdump output. * ld-gc/gc.exp: Update CFLAGS for m68hc11. * ld-plugin/plugin.exp: Likewise. * ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12. * configure.in: Add S12X and XGATE co-processor support to m68hc11 target. * disassemble.c: Likewise. * configure: Regenerate. * m68hc11-dis.c: Make objdump output more consistent, use hex instead of decimal and use 0x prefix for hex. * m68hc11-opc.c: Add S12X and XGATE opcodes. * dis-asm.h (print_insn_m9s12x): Prototype. (print_insn_m9s12xg): Prototype. * m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10) R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations. (E_M68HC11_XGATE_RAMOFFSET): Define. * m68hc11.h: Add XGate definitions. (struct m68hc11_opcode): Add xg_mask field.
2012-05-15 14:55:51 +02:00
if (elf_elfheader (abfd)->e_flags & E_M68HC11_XGATE_RAMOFFSET)
fprintf (file, _(" [XGATE RAM offsetting]"));
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
fputc ('\n', file);
return TRUE;
}
static void scan_sections_for_abi (bfd *abfd ATTRIBUTE_UNUSED,
BFD whitespace fixes Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-12-05 23:56:00 +01:00
asection *asect, void *arg)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
struct m68hc11_scan_param* p = (struct m68hc11_scan_param*) arg;
if (asect->vma >= p->pinfo->bank_virtual)
p->use_memory_banks = TRUE;
}
Remove trailing white spaces in bfd * aout0.c: Remove trailing white spaces. * archive.c: Likewise. * archures.c: Likewise. * bfd-in.h: Likewise. * bfd-in2.h: Likewise. * coff-alpha.c: Likewise. * coff-i860.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff-z80.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * compress.c: Likewise. * corefile.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-crx.c: Likewise. * cpu-h8300.c: Likewise. * cpu-i386.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m68k.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-sh.c: Likewise. * cpu-xc16x.c: Likewise. * dwarf2.c: Likewise. * ecofflink.c: Likewise. * ecoffswap.h: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-vxworks.c: Likewise. * elf32-avr.c: Likewise. * elf32-avr.h: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.h: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-v850.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * libcoff.h: Likewise. * libpei.h: Likewise. * libxcoff.h: Likewise. * linker.c: Likewise. * mach-o-i386.c: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mach-o.h: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c: Likewise. * pef-traceback.h: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * plugin.c: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * section.c: Likewise. * som.c: Likewise. * syms.c: Likewise. * tekhex.c: Likewise. * ticoff.h: Likewise. * vaxbsd.c: Likewise. * xcofflink.c: Likewise. * xtensa-isa.c: Likewise.
2013-01-10 21:03:55 +01:00
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
/* Tweak the OSABI field of the elf header. */
elf_backend_init_file_header This patch renames elf_backend_post_process_headers and moves the prep_headers code into the new function. Naming the backend functions elf_backend_init_file_header and elf_backend_modify_headers makes it clear which function is called first. * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>): Rename from elf_backend_post_process_headers. (_bfd_elf_post_process_headers): Delete. (_bfd_elf_init_file_header): Declare. * elf.c (_bfd_elf_compute_section_file_positions): Call new function in place of prep_headers and elf_backend_post_process_headers. (_bfd_elf_init_file_header): Renamed from prep_headers with updated args and made global. Delete dead code. (_bfd_elf_post_process_headers): Delete. * elf32-arm.c (elf32_arm_init_file_header): Rename from elf32_arm_post_process_headers and call _bfd_elf_init_file_header. Return status. (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly. * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly. * elf32-metag.c (elf_metag_init_file_header): Similarly. * elf32-spu.c (spu_elf_init_file_header * elf32-visium.c (visium_elf_init_file_header * elf64-alpha.c (elf64_alpha_fbsd_init_file_header * elf64-hppa.c (elf64_hppa_init_file_header * elf64-ia64-vms.c (elf64_vms_init_file_header * elfnn-aarch64.c (elfNN_aarch64_init_file_header * elfnn-ia64.c (elfNN_hpux_init_file_header * elfxx-mips.c (_bfd_mips_init_file_header * elfxx-mips.h (_bfd_mips_post_process_headers): Delete. (_bfd_mips_init_file_header): Declare. (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define. * elfxx-target.h (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define and use. * elf32-m68hc12.c (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete. (elf32_m68hc11_init_file_header): Declare. * elf32-ppc.c (elf_backend_post_process_headers): Remove unnecessary undef.
2019-11-18 07:39:40 +01:00
bfd_boolean
elf32_m68hc11_init_file_header (bfd *abfd, struct bfd_link_info *link_info)
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
{
struct m68hc11_scan_param param;
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
struct m68hc11_elf_link_hash_table *htab;
elf_backend_init_file_header This patch renames elf_backend_post_process_headers and moves the prep_headers code into the new function. Naming the backend functions elf_backend_init_file_header and elf_backend_modify_headers makes it clear which function is called first. * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>): Rename from elf_backend_post_process_headers. (_bfd_elf_post_process_headers): Delete. (_bfd_elf_init_file_header): Declare. * elf.c (_bfd_elf_compute_section_file_positions): Call new function in place of prep_headers and elf_backend_post_process_headers. (_bfd_elf_init_file_header): Renamed from prep_headers with updated args and made global. Delete dead code. (_bfd_elf_post_process_headers): Delete. * elf32-arm.c (elf32_arm_init_file_header): Rename from elf32_arm_post_process_headers and call _bfd_elf_init_file_header. Return status. (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly. * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly. * elf32-metag.c (elf_metag_init_file_header): Similarly. * elf32-spu.c (spu_elf_init_file_header * elf32-visium.c (visium_elf_init_file_header * elf64-alpha.c (elf64_alpha_fbsd_init_file_header * elf64-hppa.c (elf64_hppa_init_file_header * elf64-ia64-vms.c (elf64_vms_init_file_header * elfnn-aarch64.c (elfNN_aarch64_init_file_header * elfnn-ia64.c (elfNN_hpux_init_file_header * elfxx-mips.c (_bfd_mips_init_file_header * elfxx-mips.h (_bfd_mips_post_process_headers): Delete. (_bfd_mips_init_file_header): Declare. (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define. * elfxx-target.h (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define and use. * elf32-m68hc12.c (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete. (elf32_m68hc11_init_file_header): Declare. * elf32-ppc.c (elf_backend_post_process_headers): Remove unnecessary undef.
2019-11-18 07:39:40 +01:00
if (!_bfd_elf_init_file_header (abfd, link_info))
return FALSE;
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
if (link_info == NULL)
elf_backend_init_file_header This patch renames elf_backend_post_process_headers and moves the prep_headers code into the new function. Naming the backend functions elf_backend_init_file_header and elf_backend_modify_headers makes it clear which function is called first. * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>): Rename from elf_backend_post_process_headers. (_bfd_elf_post_process_headers): Delete. (_bfd_elf_init_file_header): Declare. * elf.c (_bfd_elf_compute_section_file_positions): Call new function in place of prep_headers and elf_backend_post_process_headers. (_bfd_elf_init_file_header): Renamed from prep_headers with updated args and made global. Delete dead code. (_bfd_elf_post_process_headers): Delete. * elf32-arm.c (elf32_arm_init_file_header): Rename from elf32_arm_post_process_headers and call _bfd_elf_init_file_header. Return status. (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly. * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly. * elf32-metag.c (elf_metag_init_file_header): Similarly. * elf32-spu.c (spu_elf_init_file_header * elf32-visium.c (visium_elf_init_file_header * elf64-alpha.c (elf64_alpha_fbsd_init_file_header * elf64-hppa.c (elf64_hppa_init_file_header * elf64-ia64-vms.c (elf64_vms_init_file_header * elfnn-aarch64.c (elfNN_aarch64_init_file_header * elfnn-ia64.c (elfNN_hpux_init_file_header * elfxx-mips.c (_bfd_mips_init_file_header * elfxx-mips.h (_bfd_mips_post_process_headers): Delete. (_bfd_mips_init_file_header): Declare. (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define. * elfxx-target.h (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define and use. * elf32-m68hc12.c (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete. (elf32_m68hc11_init_file_header): Declare. * elf32-ppc.c (elf_backend_post_process_headers): Remove unnecessary undef.
2019-11-18 07:39:40 +01:00
return TRUE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
htab = m68hc11_elf_hash_table (link_info);
if (htab == NULL)
elf_backend_init_file_header This patch renames elf_backend_post_process_headers and moves the prep_headers code into the new function. Naming the backend functions elf_backend_init_file_header and elf_backend_modify_headers makes it clear which function is called first. * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>): Rename from elf_backend_post_process_headers. (_bfd_elf_post_process_headers): Delete. (_bfd_elf_init_file_header): Declare. * elf.c (_bfd_elf_compute_section_file_positions): Call new function in place of prep_headers and elf_backend_post_process_headers. (_bfd_elf_init_file_header): Renamed from prep_headers with updated args and made global. Delete dead code. (_bfd_elf_post_process_headers): Delete. * elf32-arm.c (elf32_arm_init_file_header): Rename from elf32_arm_post_process_headers and call _bfd_elf_init_file_header. Return status. (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly. * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly. * elf32-metag.c (elf_metag_init_file_header): Similarly. * elf32-spu.c (spu_elf_init_file_header * elf32-visium.c (visium_elf_init_file_header * elf64-alpha.c (elf64_alpha_fbsd_init_file_header * elf64-hppa.c (elf64_hppa_init_file_header * elf64-ia64-vms.c (elf64_vms_init_file_header * elfnn-aarch64.c (elfNN_aarch64_init_file_header * elfnn-ia64.c (elfNN_hpux_init_file_header * elfxx-mips.c (_bfd_mips_init_file_header * elfxx-mips.h (_bfd_mips_post_process_headers): Delete. (_bfd_mips_init_file_header): Declare. (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define. * elfxx-target.h (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define and use. * elf32-m68hc12.c (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete. (elf32_m68hc11_init_file_header): Declare. * elf32-ppc.c (elf_backend_post_process_headers): Remove unnecessary undef.
2019-11-18 07:39:40 +01:00
return TRUE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
m68hc11_elf_get_bank_parameters (link_info);
param.use_memory_banks = FALSE;
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
param.pinfo = & htab->pinfo;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
bfd_map_over_sections (abfd, scan_sections_for_abi, &param);
* elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-02-04 10:16:43 +01:00
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
if (param.use_memory_banks)
{
Elf_Internal_Ehdr * i_ehdrp;
i_ehdrp = elf_elfheader (abfd);
i_ehdrp->e_flags |= E_M68HC12_BANKS;
}
elf_backend_init_file_header This patch renames elf_backend_post_process_headers and moves the prep_headers code into the new function. Naming the backend functions elf_backend_init_file_header and elf_backend_modify_headers makes it clear which function is called first. * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>): Rename from elf_backend_post_process_headers. (_bfd_elf_post_process_headers): Delete. (_bfd_elf_init_file_header): Declare. * elf.c (_bfd_elf_compute_section_file_positions): Call new function in place of prep_headers and elf_backend_post_process_headers. (_bfd_elf_init_file_header): Renamed from prep_headers with updated args and made global. Delete dead code. (_bfd_elf_post_process_headers): Delete. * elf32-arm.c (elf32_arm_init_file_header): Rename from elf32_arm_post_process_headers and call _bfd_elf_init_file_header. Return status. (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly. * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly. * elf32-metag.c (elf_metag_init_file_header): Similarly. * elf32-spu.c (spu_elf_init_file_header * elf32-visium.c (visium_elf_init_file_header * elf64-alpha.c (elf64_alpha_fbsd_init_file_header * elf64-hppa.c (elf64_hppa_init_file_header * elf64-ia64-vms.c (elf64_vms_init_file_header * elfnn-aarch64.c (elfNN_aarch64_init_file_header * elfnn-ia64.c (elfNN_hpux_init_file_header * elfxx-mips.c (_bfd_mips_init_file_header * elfxx-mips.h (_bfd_mips_post_process_headers): Delete. (_bfd_mips_init_file_header): Declare. (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define. * elfxx-target.h (elf_backend_post_process_headers): Delete. (elf_backend_init_file_header): Define and use. * elf32-m68hc12.c (elf_backend_init_file_header): Define. (elf_backend_post_process_headers): Don't define. * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete. (elf32_m68hc11_init_file_header): Declare. * elf32-ppc.c (elf_backend_post_process_headers): Remove unnecessary undef.
2019-11-18 07:39:40 +01:00
return TRUE;
* elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (m68hc11_elf_hash_table_create): New function. (elf32_m68hc11_link_hash_table_free): New function. (stub_hash_newfunc): New function. (m68hc11_add_stub): New function. (elf32_m68hc11_add_symbol_hook): New function. (elf32_m68hc11_setup_section_lists): New function. (elf32_m68hc11_next_input_section): New function. (elf32_m68hc11_size_stubs): New function. (elf32_m68hc11_build_stubs): New function. (m68hc11_get_relocation_value): New function. (elf32_m68hc11_relocate_section): Call the above to redirect some relocations to the trampoline code. (m68hc11_elf_export_one_stub): New function. (m68hc11_elf_set_symbol): New function. (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse. (m68hc11_elf_get_bank_parameters): Get parameters only when the info is not yet initialized. * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c) (elf32_m68hc11_stub_hash_entry): New struct. (m68hc11_page_info): Add trampoline handler address. (m68hc11_elf_link_hash_table): Add stubs generation members. (elf32_m68hc11_add_symbol_hook): Declare. (elf32_m68hc11_setup_section_lists): Declare. (elf32_m68hc11_size_stubs): Declare. (elf32_m68hc11_build_stubs): Declare. * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto. (_bfd_m68hc11_elf_set_private_flags): Ditto. (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto. (_bfd_m68hc11_elf_print_private_bfd_data): Ditto. (bfd_elf32_bfd_link_hash_table_create): Define. (elf_backend_add_symbol_hook): Define. (m68hc11_elf_bfd_link_hash_table_create): New function. (m68hc11_elf_build_one_stub): New function. (m68hc11_elf_size_one_stub): New function. (m68hc11_elf_bfd_link_hash_table_create): Install the above. (bfd_elf32_bfd_link_hash_table_create): Define. * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove. (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked. (m68hc12_phys_addr): Ditto. (m68hc12_phys_page): Ditto. (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c. (elf32_m68hc11_gc_mark_hook): Likewise. (elf32_m68hc11_gc_sweep_hook): Likewise. (elf32_m68hc11_check_relocs): Likewise. (elf32_m68hc11_relocate_section): Likewise. (_bfd_m68hc12_elf_set_private_flags): Likewise. (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise. (_bfd_m68hc12_elf_print_private_bfd_data): Likewise. (m68hc12_elf_build_one_stub): New function. (m68hc12_elf_size_one_stub): New function. (m68hc12_elf_bfd_link_hash_table_create): New function, use the above. (elf_backend_add_symbol_hook): Define. (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2003-04-21 15:22:14 +02:00
}