2003-04-21 15:22:14 +02:00
|
|
|
/* Motorola 68HC11/68HC12-specific support for 32-bit ELF
|
2020-01-01 08:57:01 +01:00
|
|
|
Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
2003-04-21 15:22:14 +02:00
|
|
|
Contributed by Stephane Carrez (stcarrez@nerim.fr)
|
|
|
|
|
2007-07-03 16:26:43 +02:00
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2007-07-03 16:26:43 +02:00
|
|
|
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.
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2007-07-03 16:26:43 +02:00
|
|
|
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.
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2007-07-03 16:26:43 +02:00
|
|
|
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. */
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
#ifndef _ELF32_M68HC1X_H
|
|
|
|
#define _ELF32_M68HC1X_H
|
|
|
|
|
|
|
|
#include "elf-bfd.h"
|
|
|
|
#include "bfdlink.h"
|
|
|
|
#include "elf/m68hc11.h"
|
|
|
|
|
|
|
|
/* Name of symbols exported by HC11/HC12 linker when there is a memory
|
|
|
|
bank window. */
|
|
|
|
#define BFD_M68HC11_BANK_START_NAME "__bank_start"
|
|
|
|
#define BFD_M68HC11_BANK_SIZE_NAME "__bank_size"
|
|
|
|
#define BFD_M68HC11_BANK_VIRTUAL_NAME "__bank_virtual"
|
|
|
|
|
|
|
|
/* Set and control ELF flags in ELF header. */
|
2016-09-30 01:14:50 +02:00
|
|
|
extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data
|
|
|
|
(bfd *, struct bfd_link_info *);
|
2003-10-04 23:02:53 +02:00
|
|
|
extern bfd_boolean _bfd_m68hc11_elf_set_private_flags (bfd*,flagword);
|
|
|
|
extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
/* This hash entry is used to record a trampoline that must be generated
|
|
|
|
to call a far function using a normal calling convention ('jsr').
|
|
|
|
The trampoline is used when a pointer to a far function is used.
|
|
|
|
It takes care of installing the proper memory bank as well as creating
|
|
|
|
the 'call/rtc' calling convention. */
|
* 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 elf32_m68hc11_stub_hash_entry
|
|
|
|
{
|
2003-04-21 15:22:14 +02:00
|
|
|
/* Base hash table entry structure. */
|
|
|
|
struct bfd_hash_entry root;
|
|
|
|
|
|
|
|
/* The stub section. */
|
|
|
|
asection *stub_sec;
|
|
|
|
|
|
|
|
/* Offset within stub_sec of the beginning of this stub. */
|
|
|
|
bfd_vma stub_offset;
|
|
|
|
|
|
|
|
/* Given the symbol's value and its section we can determine its final
|
|
|
|
value when building the stubs (so the stub knows where to jump. */
|
|
|
|
bfd_vma target_value;
|
|
|
|
asection *target_section;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Placeholder for the parameters to compute memory page and physical address.
|
|
|
|
The following formulas are used:
|
|
|
|
|
|
|
|
sym > bank_virtual =>
|
|
|
|
%addr(sym) = (((sym - bank_virtual) & bank_mask) + bank_physical
|
|
|
|
%page(sym) = (((sym - bank_virtual) >> bank_shift) % 256
|
|
|
|
|
|
|
|
sym < bank_virtual =>
|
|
|
|
%addr(sym) = sym
|
|
|
|
%page(sym) = 0
|
|
|
|
|
|
|
|
|
|
|
|
These parameters are obtained from the symbol table by looking
|
|
|
|
at the following:
|
|
|
|
|
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
|
|
|
__bank_start Symbol marking the start of memory bank window
|
|
|
|
(bank_physical)
|
|
|
|
__bank_virtual Logical address of symbols for which the transformation
|
|
|
|
must be computed
|
|
|
|
__bank_page_size Size in bytes of page size (this is *NOT* the memory
|
|
|
|
bank window size and the window size is always
|
|
|
|
less or equal to the page size)
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
For 68HC12, the window is at 0x8000 and the page size is 16K (full window).
|
* 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
|
|
|
For 68HC11 this is board specific (implemented by external hardware). */
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
struct m68hc11_page_info
|
|
|
|
{
|
|
|
|
bfd_vma bank_virtual;
|
|
|
|
bfd_vma bank_physical;
|
|
|
|
bfd_vma bank_physical_end;
|
|
|
|
bfd_vma bank_mask;
|
|
|
|
bfd_vma bank_size;
|
|
|
|
int bank_shift;
|
|
|
|
int bank_param_initialized;
|
|
|
|
bfd_vma trampoline_addr;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct m68hc11_elf_link_hash_table
|
|
|
|
{
|
|
|
|
struct elf_link_hash_table root;
|
|
|
|
struct m68hc11_page_info pinfo;
|
|
|
|
|
|
|
|
/* The stub hash table. */
|
|
|
|
struct bfd_hash_table* stub_hash_table;
|
|
|
|
|
|
|
|
/* Linker stub bfd. */
|
|
|
|
bfd *stub_bfd;
|
|
|
|
|
|
|
|
asection* stub_section;
|
|
|
|
asection* tramp_section;
|
|
|
|
|
|
|
|
/* Linker call-backs. */
|
* 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
|
|
|
asection * (*add_stub_section) (const char *, asection *);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
/* Assorted information used by elf32_hppa_size_stubs. */
|
|
|
|
unsigned int bfd_count;
|
|
|
|
int top_index;
|
|
|
|
asection **input_list;
|
|
|
|
|
2009-06-18 16:18:29 +02:00
|
|
|
/* Small local sym cache. */
|
|
|
|
struct sym_cache sym_cache;
|
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
|
|
|
bfd_boolean (* size_one_stub) (struct bfd_hash_entry*, void*);
|
|
|
|
bfd_boolean (* build_one_stub) (struct bfd_hash_entry*, void*);
|
2003-04-21 15:22:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Get the Sparc64 ELF linker hash table from a link_info structure. */
|
|
|
|
|
|
|
|
#define m68hc11_elf_hash_table(p) \
|
* 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
|
|
|
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
|
|
|
|
== M68HC11_ELF_DATA ? ((struct m68hc11_elf_link_hash_table *) ((p)->hash)) : NULL)
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
/* Create a 68HC11/68HC12 ELF linker hash table. */
|
|
|
|
|
|
|
|
extern struct m68hc11_elf_link_hash_table* m68hc11_elf_hash_table_create
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd*);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2003-10-04 23:02:53 +02:00
|
|
|
extern void m68hc11_elf_get_bank_parameters (struct bfd_link_info*);
|
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. */
|
2003-10-04 23:02:53 +02:00
|
|
|
extern int m68hc11_addr_is_banked (struct m68hc11_page_info*, bfd_vma);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
/* Return the physical address seen by the processor, taking
|
|
|
|
into account banked memory. */
|
2003-10-04 23:02:53 +02:00
|
|
|
extern bfd_vma m68hc11_phys_addr (struct m68hc11_page_info*, bfd_vma);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
/* Return the page number corresponding to an address in banked memory. */
|
2003-10-04 23:02:53 +02:00
|
|
|
extern bfd_vma m68hc11_phys_page (struct m68hc11_page_info*, bfd_vma);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
bfd_reloc_status_type m68hc11_elf_ignore_reloc
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd *abfd, arelent *reloc_entry,
|
|
|
|
asymbol *symbol, void *data, asection *input_section,
|
|
|
|
bfd *output_bfd, char **error_message);
|
2003-04-21 15:22:14 +02:00
|
|
|
bfd_reloc_status_type m68hc11_elf_special_reloc
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd *abfd, arelent *reloc_entry,
|
|
|
|
asymbol *symbol, void *data, asection *input_section,
|
|
|
|
bfd *output_bfd, char **error_message);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
bfd_boolean elf32_m68hc11_check_relocs
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd * abfd, struct bfd_link_info * info,
|
|
|
|
asection * sec, const Elf_Internal_Rela * relocs);
|
2003-04-21 15:22:14 +02:00
|
|
|
bfd_boolean elf32_m68hc11_relocate_section
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd *output_bfd, 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);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
bfd_boolean elf32_m68hc11_add_symbol_hook
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd *abfd, struct bfd_link_info *info,
|
2004-03-26 07:13:40 +01:00
|
|
|
Elf_Internal_Sym *sym, const char **namep,
|
2003-10-04 23:02:53 +02:00
|
|
|
flagword *flagsp, asection **secp,
|
|
|
|
bfd_vma *valp);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2012-02-13 03:29:51 +01:00
|
|
|
void elf32_m68hc11_merge_symbol_attribute
|
|
|
|
(struct elf_link_hash_entry *, const Elf_Internal_Sym *,
|
|
|
|
bfd_boolean, bfd_boolean);
|
|
|
|
|
2003-04-21 15:22:14 +02:00
|
|
|
/* Tweak the OSABI field of the elf header. */
|
|
|
|
|
2019-11-18 07:39:40 +01:00
|
|
|
extern bfd_boolean elf32_m68hc11_init_file_header (bfd*, struct bfd_link_info*);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2003-10-04 23:02:53 +02:00
|
|
|
int elf32_m68hc11_setup_section_lists (bfd *, struct bfd_link_info *);
|
2003-04-21 15:22:14 +02:00
|
|
|
|
|
|
|
bfd_boolean elf32_m68hc11_size_stubs
|
2003-10-04 23:02:53 +02:00
|
|
|
(bfd *, bfd *, struct bfd_link_info *,
|
|
|
|
asection * (*) (const char *, asection *));
|
2003-04-21 15:22:14 +02:00
|
|
|
|
2003-10-04 23:02:53 +02:00
|
|
|
bfd_boolean elf32_m68hc11_build_stubs (bfd* abfd, struct bfd_link_info *);
|
2003-04-21 15:22:14 +02:00
|
|
|
#endif
|