diff options
author | Alan Modra <amodra@gmail.com> | 2008-02-15 03:35:53 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-02-15 03:35:53 +0000 |
commit | f13a99db51c0ca487f4a0a41b14dc255d386c4ff (patch) | |
tree | c5941da40d8747eeb0ded9455c971313d8d2db5f /ld/emultempl/sh64elf.em | |
parent | 54aff08f3b1f29d1a6b262b3143475409909d7b9 (diff) | |
download | gdb-f13a99db51c0ca487f4a0a41b14dc255d386c4ff.zip gdb-f13a99db51c0ca487f4a0a41b14dc255d386c4ff.tar.gz gdb-f13a99db51c0ca487f4a0a41b14dc255d386c4ff.tar.bz2 |
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.
Diffstat (limited to 'ld/emultempl/sh64elf.em')
-rw-r--r-- | ld/emultempl/sh64elf.em | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/ld/emultempl/sh64elf.em b/ld/emultempl/sh64elf.em index 0433cf9..d8cce23 100644 --- a/ld/emultempl/sh64elf.em +++ b/ld/emultempl/sh64elf.em @@ -1,5 +1,6 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2000, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. +# Copyright 2000, 2001, 2002, 2003, 2004, 2007, 2008 +# Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -53,7 +54,8 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void) /* Call main function; we're just extending it. */ gld${EMULATION_NAME}_before_allocation (); - cranges = bfd_get_section_by_name (output_bfd, SH64_CRANGES_SECTION_NAME); + cranges = bfd_get_section_by_name (link_info.output_bfd, + SH64_CRANGES_SECTION_NAME); if (cranges != NULL) { @@ -117,7 +119,7 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void) /* For each non-empty input section in each output section, check if it has the same SH64-specific flags. If some input section differs, we need a .cranges section. */ - for (osec = output_bfd->sections; + for (osec = link_info.output_bfd->sections; osec != NULL; osec = osec->next) { @@ -125,13 +127,13 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void) bfd_vma oflags_isa = 0; bfd_vma iflags_isa = 0; - if (bfd_get_flavour (output_bfd) != bfd_target_elf_flavour) + if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) einfo (_("%FError: non-ELF output formats are not supported by this target's linker.\n")); sh64_sec_data = sh64_elf_section_data (osec)->sh64_info; /* Omit excluded or garbage-collected sections. */ - if (bfd_get_section_flags (output_bfd, osec) & SEC_EXCLUDE) + if (bfd_get_section_flags (link_info.output_bfd, osec) & SEC_EXCLUDE) continue; /* Make sure we have the target section data initialized. */ @@ -201,10 +203,10 @@ sh64_elf_${EMULATION_NAME}_before_allocation (void) sh64_elf_section_data; no need to set it specifically here. */ cranges - = bfd_make_section (output_bfd, + = bfd_make_section (link_info.output_bfd, SH64_CRANGES_SECTION_NAME); if (cranges == NULL - || !bfd_set_section_flags (output_bfd, + || !bfd_set_section_flags (link_info.output_bfd, cranges, SEC_LINKER_CREATED | SEC_KEEP @@ -245,8 +247,8 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) asection *osec; bfd_byte *crangesp; - asection *cranges - = bfd_get_section_by_name (output_bfd, SH64_CRANGES_SECTION_NAME); + asection *cranges = bfd_get_section_by_name (link_info.output_bfd, + SH64_CRANGES_SECTION_NAME); /* If this ever starts doing something, we will pick it up. */ after_allocation_default (); @@ -261,7 +263,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) first non-discarded section. For each input section in osec, we check if it has the same flags. If it does not, we set flags to mark a mixed section (and exit the loop early). */ - for (osec = output_bfd->sections; + for (osec = link_info.output_bfd->sections; osec != NULL; osec = osec->next) { @@ -269,7 +271,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) bfd_boolean need_check_cranges = FALSE; /* Omit excluded or garbage-collected sections. */ - if (bfd_get_section_flags (output_bfd, osec) & SEC_EXCLUDE) + if (bfd_get_section_flags (link_info.output_bfd, osec) & SEC_EXCLUDE) continue; /* First find an input section so we have flags to compare with; the @@ -408,7 +410,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) /* Now pass over the sections again, and make reloc orders for the new .cranges entries. Constants are set as we go. */ - for (osec = output_bfd->sections; + for (osec = link_info.output_bfd->sections; osec != NULL; osec = osec->next) { @@ -419,7 +421,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) /* Omit excluded or garbage-collected sections, and output sections which were not marked as needing further processing. */ - if ((bfd_get_section_flags (output_bfd, osec) & SEC_EXCLUDE) != 0 + if ((bfd_get_section_flags (link_info.output_bfd, osec) & SEC_EXCLUDE) != 0 || (sh64_elf_section_data (osec)->sh64_info->contents_flags != SHF_SH5_ISA32_MIXED)) continue; @@ -477,7 +479,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) == osec->vma + isec->output_offset)) { last_cr_size += cr_size; - bfd_put_32 (output_bfd, last_cr_size, + bfd_put_32 (link_info.output_bfd, last_cr_size, crangesp - SH64_CRANGE_SIZE + SH64_CRANGE_CR_SIZE_OFFSET); @@ -494,7 +496,7 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) would leave us free to do some optimizations later. */ cr_addr_order - = bfd_new_link_order (output_bfd, cranges); + = bfd_new_link_order (link_info.output_bfd, cranges); if (cr_addr_order == NULL) { @@ -518,12 +520,12 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) "partial inplace" REL-like relocation for this, we put the addend in the contents and specify 0 for the reloc. */ - bfd_put_32 (output_bfd, isec->output_offset, + bfd_put_32 (link_info.output_bfd, isec->output_offset, crangesp + SH64_CRANGE_CR_ADDR_OFFSET); cr_addr_order->u.reloc.p->addend = 0; } else - bfd_put_32 (output_bfd, + bfd_put_32 (link_info.output_bfd, osec->vma + isec->output_offset, crangesp + SH64_CRANGE_CR_ADDR_OFFSET); @@ -531,10 +533,10 @@ sh64_elf_${EMULATION_NAME}_after_allocation (void) it, but we would have to have a symbol for the size of the _input_ section and there's no way to generate that. */ - bfd_put_32 (output_bfd, cr_size, + bfd_put_32 (link_info.output_bfd, cr_size, crangesp + SH64_CRANGE_CR_SIZE_OFFSET); - bfd_put_16 (output_bfd, cr_type, + bfd_put_16 (link_info.output_bfd, cr_type, crangesp + SH64_CRANGE_CR_TYPE_OFFSET); last_cr_type = cr_type; |