diff options
author | Ben Elliston <bje@au.ibm.com> | 2005-01-31 23:13:34 +0000 |
---|---|---|
committer | Ben Elliston <bje@au.ibm.com> | 2005-01-31 23:13:34 +0000 |
commit | 0e71e4955cd1a6ad7d03775dec5df49323204dec (patch) | |
tree | e01ba923b5a2ce31612afdf6f289bb0d614719a1 /bfd/coff-ppc.c | |
parent | 71143983c8f9437ad5bd813f1355305c6ab52ffd (diff) | |
download | gdb-0e71e4955cd1a6ad7d03775dec5df49323204dec.zip gdb-0e71e4955cd1a6ad7d03775dec5df49323204dec.tar.gz gdb-0e71e4955cd1a6ad7d03775dec5df49323204dec.tar.bz2 |
* aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
throughout. Similarly, collapse #if 1'd code.
Diffstat (limited to 'bfd/coff-ppc.c')
-rw-r--r-- | bfd/coff-ppc.c | 188 |
1 files changed, 0 insertions, 188 deletions
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c index 28d7985..7ca8b5a 100644 --- a/bfd/coff-ppc.c +++ b/bfd/coff-ppc.c @@ -326,15 +326,6 @@ static bfd_reloc_status_type ppc_refhi_reloc PARAMS ((bfd *abfd, asection *section, bfd *output_bfd, char **error)); -#if 0 -static bfd_reloc_status_type ppc_reflo_reloc PARAMS ((bfd *abfd, - arelent *reloc, - asymbol *symbol, - PTR data, - asection *section, - bfd *output_bfd, - char **error)); -#endif static bfd_reloc_status_type ppc_pair_reloc PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, @@ -351,15 +342,6 @@ static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd, bfd *output_bfd, char **error)); -#if 0 -static bfd_reloc_status_type ppc_addr32nb_reloc PARAMS ((bfd *abfd, - arelent *reloc, - asymbol *symbol, - PTR data, - asection *section, - bfd *output_bfd, - char **error)); -#endif static bfd_reloc_status_type ppc_section_reloc PARAMS ((bfd *abfd, arelent *reloc, asymbol *symbol, @@ -1005,67 +987,6 @@ static bfd_boolean in_reloc_p(abfd, howto) && (howto->type != IMAGE_REL_PPC_TOCREL16_DEFN) ; } -#if 0 - -/* This function is in charge of performing all the ppc PE relocations - Don't yet know if we want to do this this particular way ... (krk). */ -/* FIXME: (it is not yet enabled). */ - -static bfd_reloc_status_type -pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd, - error_message) - bfd *abfd; - arelent *reloc_entry; - asymbol *symbol_in; - PTR data; - asection *input_section; - bfd *output_bfd; - char **error_message; -{ - /* The consth relocation comes in two parts, we have to remember - the state between calls, in these variables. */ - static bfd_boolean part1_consth_active = FALSE; - static unsigned long part1_consth_value; - - unsigned long sym_value; - unsigned short r_type; - unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/ - - r_type = reloc_entry->howto->type; - - if (output_bfd) - { - /* Partial linking - do nothing. */ - reloc_entry->address += input_section->output_offset; - return bfd_reloc_ok; - } - - if (symbol_in != NULL - && bfd_is_und_section (symbol_in->section)) - { - /* Keep the state machine happy in case we're called again. */ - if (r_type == IMAGE_REL_PPC_REFHI) - { - part1_consth_active = TRUE; - part1_consth_value = 0; - } - return(bfd_reloc_undefined); - } - - if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR)) - { - part1_consth_active = FALSE; - *error_message = (char *) _("Missing PAIR"); - return(bfd_reloc_dangerous); - } - - sym_value = get_symbol_value(symbol_in); - - return(bfd_reloc_ok); -} - -#endif /* 0 */ - /* The reloc processing routine for the optimized COFF linker. */ static bfd_boolean @@ -1773,30 +1694,6 @@ ppc_refhi_reloc (abfd, reloc_entry, symbol, data, return bfd_reloc_undefined; } -#if 0 - -static bfd_reloc_status_type -ppc_reflo_reloc (abfd, reloc_entry, symbol, data, - input_section, output_bfd, error_message) - bfd *abfd; - arelent *reloc_entry; - asymbol *symbol; - PTR data; - asection *input_section; - bfd *output_bfd; - char **error_message; -{ - UN_IMPL("REFLO"); - DUMP_RELOC("REFLO",reloc_entry); - - if (output_bfd == (bfd *) NULL) - return bfd_reloc_continue; - - return bfd_reloc_undefined; -} - -#endif - static bfd_reloc_status_type ppc_pair_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) @@ -1837,31 +1734,6 @@ ppc_toc16_reloc (abfd, reloc_entry, symbol, data, return bfd_reloc_ok; } -#if 0 - -/* ADDR32NB : 32 bit address relative to the virtual origin. - (On the alpha, this is always a linker generated thunk) - (i.e. 32bit addr relative to the image base). */ - -static bfd_reloc_status_type -ppc_addr32nb_reloc (abfd, reloc_entry, symbol, data, - input_section, output_bfd, error_message) - bfd *abfd; - arelent *reloc_entry; - asymbol *symbol; - PTR data; - asection *input_section; - bfd *output_bfd; - char **error_message; -{ - UN_IMPL("ADDR32NB"); - DUMP_RELOC("ADDR32NB",reloc_entry); - - return bfd_reloc_ok; -} - -#endif - static bfd_reloc_status_type ppc_secrel_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) @@ -2108,10 +1980,6 @@ ppc_coff_reloc_type_lookup (abfd, code) #define coff_bfd_final_link ppc_bfd_coff_final_link #ifndef COFF_IMAGE_WITH_PE -/* FIXME: This no longer works. */ -#if 0 -#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook -#endif #endif #define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;} @@ -2140,62 +2008,6 @@ ppc_coff_reloc_type_lookup (abfd, code) #include "coffcode.h" #ifndef COFF_IMAGE_WITH_PE -/* FIXME: This no longer works. */ -#if 0 -/* FIXME: - What we're trying to do here is allocate a toc section (early), and attach - it to the last bfd to be processed. This avoids the problem of having a toc - written out before all files have been processed. This code allocates - a toc section for every file, and records the last one seen. There are - at least two problems with this approach: - 1. We allocate whole bunches of toc sections that are ignored, but at - at least we will not allocate a toc if no .toc is present. - 2. It's not clear to me that being the last bfd read necessarily means - that you are the last bfd closed. - 3. Doing it on a "swap in" hook depends on when the "swap in" is called, - and how often, etc. It's not clear to me that there isn't a hole here. */ -static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR)); - -static void -ppc_coff_swap_sym_in_hook (abfd, ext1, in1) - bfd *abfd; - PTR ext1 ATTRIBUTE_UNUSED; - PTR in1; -{ - struct internal_syment * in = (struct internal_syment *)in1; - - if (bfd_of_toc_owner != 0) /* We already have a toc, so go home. */ - return; - - if (strcmp (in->_n._n_name, ".toc") == 0) - { - flagword flags; - register asection *s; - - s = bfd_get_section_by_name (abfd, TOC_SECTION_NAME); - if (s != NULL) - return; - - flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY ; - - s = bfd_make_section (abfd, TOC_SECTION_NAME); - - if (s == NULL - || !bfd_set_section_flags (abfd, s, flags) - || !bfd_set_section_alignment (abfd, s, 2)) - /* FIXME: set appropriate bfd error. */ - abort (); - - /* Save the bfd for later allocation. */ - bfd_of_toc_owner = abfd; - } - - return; -} -#endif -#endif - -#ifndef COFF_IMAGE_WITH_PE static bfd_boolean ppc_do_last PARAMS ((bfd *)); static bfd *ppc_get_last PARAMS ((void)); |