diff options
author | Nick Clifton <nickc@redhat.com> | 2001-08-28 09:35:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-08-28 09:35:16 +0000 |
commit | 42ef282fe77eb87eddcf893139b2f32a82c26343 (patch) | |
tree | 10889cb2aedf7738695b8282739154c59b605c15 /bfd | |
parent | 0152a4c6798660779bfd47147933283b1dda39c4 (diff) | |
download | gdb-42ef282fe77eb87eddcf893139b2f32a82c26343.zip gdb-42ef282fe77eb87eddcf893139b2f32a82c26343.tar.gz gdb-42ef282fe77eb87eddcf893139b2f32a82c26343.tar.bz2 |
Add missing prototypes
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 11 | ||||
-rw-r--r-- | bfd/coff-mcore.c | 7 | ||||
-rw-r--r-- | bfd/elf32-pj.c | 2 | ||||
-rw-r--r-- | bfd/nlm32-sparc.c | 252 | ||||
-rw-r--r-- | bfd/oasys.c | 32 | ||||
-rw-r--r-- | bfd/pdp11.c | 30 | ||||
-rw-r--r-- | bfd/pe-mips.c | 12 | ||||
-rw-r--r-- | bfd/riscix.c | 18 | ||||
-rw-r--r-- | bfd/sparclynx.c | 83 |
9 files changed, 250 insertions, 197 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d0e63e2..a08ac80 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,14 @@ +2001-08-28 Nick Clifton <nickc@cambridge.redhat.com> + + * sparclynx.c: Add missing prototypes. + * coff-mcore.c: Add missing prototypes. + * elf32-pj.c: Add missing prototypes. + * nlm32-sparc.c: Add missing prototypes. + * oasys.c: Add missing prototypes. + * pdp11.c: Add missing prototypes. + * pe-mips.c: Add missing prototypes. + * riscix.c: Add missing prototypes. + 2001-08-27 Daniel Jacobowitz <drow@mvista.com> * elf32-i386.c: Add missing prototypes. diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c index cd38044..0158eb2 100644 --- a/bfd/coff-mcore.c +++ b/bfd/coff-mcore.c @@ -52,6 +52,10 @@ static reloc_howto_type * mcore_coff_reloc_type_lookup static reloc_howto_type * coff_mcore_rtype_to_howto PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *)); +static void mcore_emit_base_file_entry + PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma)); +static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *)); +static struct bfd_link_hash_table * coff_mcore_link_hash_table_create PARAMS ((bfd *)); /* The NT loader points the toc register to &toc + 32768, in order to use the complete range of a 16-bit displacement. We have to adjust @@ -217,6 +221,7 @@ mcore_hash_table; ((mcore_hash_table *) ((info)->hash)) /* Create an MCore coff linker hash table. */ + static struct bfd_link_hash_table * coff_mcore_link_hash_table_create (abfd) bfd * abfd; @@ -244,6 +249,7 @@ coff_mcore_link_hash_table_create (abfd) } /* Add an entry to the base file. */ + static void mcore_emit_base_file_entry (info, output_bfd, input_section, reloc_offset) struct bfd_link_info * info; @@ -352,6 +358,7 @@ coff_mcore_rtype_to_howto (abfd, sec, rel, h, sym, addendp) /* Return true if this relocation should appear in the output .reloc section. This function is referenced in pe_mkobject in peicode.h. */ + static boolean in_reloc_p (abfd, howto) bfd * abfd ATTRIBUTE_UNUSED; diff --git a/bfd/elf32-pj.c b/bfd/elf32-pj.c index d98b1b3..4d48c8d 100644 --- a/bfd/elf32-pj.c +++ b/bfd/elf32-pj.c @@ -31,6 +31,8 @@ static reloc_howto_type *pj_elf_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); static void pj_elf_info_to_howto PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); +static void pj_elf_final_write_processing + PARAMS ((bfd *, boolean)); static reloc_howto_type pj_elf_howto_table[] = { diff --git a/bfd/nlm32-sparc.c b/bfd/nlm32-sparc.c index 154a962..6048cb5 100644 --- a/bfd/nlm32-sparc.c +++ b/bfd/nlm32-sparc.c @@ -1,21 +1,21 @@ /* Support for 32-bit SPARC NLM (NetWare Loadable Module) - Copyright 1993, 1994, 2000 Free Software Foundation, Inc. + Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -40,6 +40,8 @@ static boolean nlm_sparc_write_import PARAMS ((bfd *, asection *, arelent *)); static boolean nlm_sparc_write_external PARAMS ((bfd *, bfd_size_type, asymbol *, struct reloc_and_sec *)); +static boolean nlm_sparc_write_export + PARAMS ((bfd *, asymbol *, bfd_vma)); enum reloc_type { @@ -61,59 +63,60 @@ enum reloc_type #if 0 static CONST char *CONST reloc_type_names[] = -{ - "R_SPARC_NONE", - "R_SPARC_8", "R_SPARC_16", "R_SPARC_32", - "R_SPARC_DISP8", "R_SPARC_DISP16", "R_SPARC_DISP32", - "R_SPARC_WDISP30", "R_SPARC_WDISP22", - "R_SPARC_HI22", "R_SPARC_22", - "R_SPARC_13", "R_SPARC_LO10", - "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22", - "R_SPARC_PC10", "R_SPARC_PC22", - "R_SPARC_WPLT30", - "R_SPARC_COPY", - "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT", - "R_SPARC_RELATIVE", - "R_SPARC_UA32", -}; + { + "R_SPARC_NONE", + "R_SPARC_8", "R_SPARC_16", "R_SPARC_32", + "R_SPARC_DISP8", "R_SPARC_DISP16", "R_SPARC_DISP32", + "R_SPARC_WDISP30", "R_SPARC_WDISP22", + "R_SPARC_HI22", "R_SPARC_22", + "R_SPARC_13", "R_SPARC_LO10", + "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22", + "R_SPARC_PC10", "R_SPARC_PC22", + "R_SPARC_WPLT30", + "R_SPARC_COPY", + "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT", + "R_SPARC_RELATIVE", + "R_SPARC_UA32", + }; #endif static reloc_howto_type nlm32_sparc_howto_table[] = -{ - HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, 0,"R_SPARC_NONE", false,0,0x00000000,true), - HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,0,"R_SPARC_8", false,0,0x000000ff,true), - HOWTO(R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,0,"R_SPARC_16", false,0,0x0000ffff,true), - HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,0,"R_SPARC_32", false,0,0xffffffff,true), - HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP8", false,0,0x000000ff,true), - HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP16", false,0,0x0000ffff,true), - HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP32", false,0,0x00ffffff,true), - HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP30", false,0,0x3fffffff,true), - HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP22", false,0,0x003fffff,true), - HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, 0,"R_SPARC_HI22", false,0,0x003fffff,true), - HOWTO(R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_22", false,0,0x003fffff,true), - HOWTO(R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_13", false,0,0x00001fff,true), - HOWTO(R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, 0,"R_SPARC_LO10", false,0,0x000003ff,true), - HOWTO(R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT10", false,0,0x000003ff,true), - HOWTO(R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT13", false,0,0x00001fff,true), - HOWTO(R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT22", false,0,0x003fffff,true), - HOWTO(R_SPARC_PC10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_PC10", false,0,0x000003ff,true), - HOWTO(R_SPARC_PC22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_PC22", false,0,0x003fffff,true), - HOWTO(R_SPARC_WPLT30, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_WPLT30", false,0,0x00000000,true), - HOWTO(R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_COPY", false,0,0x00000000,true), - HOWTO(R_SPARC_GLOB_DAT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_GLOB_DAT",false,0,0x00000000,true), - HOWTO(R_SPARC_JMP_SLOT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_JMP_SLOT",false,0,0x00000000,true), - HOWTO(R_SPARC_RELATIVE,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_RELATIVE",false,0,0x00000000,true), - HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_UA32", false,0,0x00000000,true), + { + HOWTO (R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, 0,"R_SPARC_NONE", false,0,0x00000000,true), + HOWTO (R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,0,"R_SPARC_8", false,0,0x000000ff,true), + HOWTO (R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,0,"R_SPARC_16", false,0,0x0000ffff,true), + HOWTO (R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,0,"R_SPARC_32", false,0,0xffffffff,true), + HOWTO (R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP8", false,0,0x000000ff,true), + HOWTO (R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP16", false,0,0x0000ffff,true), + HOWTO (R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP32", false,0,0x00ffffff,true), + HOWTO (R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP30", false,0,0x3fffffff,true), + HOWTO (R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP22", false,0,0x003fffff,true), + HOWTO (R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, 0,"R_SPARC_HI22", false,0,0x003fffff,true), + HOWTO (R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_22", false,0,0x003fffff,true), + HOWTO (R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_13", false,0,0x00001fff,true), + HOWTO (R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, 0,"R_SPARC_LO10", false,0,0x000003ff,true), + HOWTO (R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT10", false,0,0x000003ff,true), + HOWTO (R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT13", false,0,0x00001fff,true), + HOWTO (R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT22", false,0,0x003fffff,true), + HOWTO (R_SPARC_PC10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_PC10", false,0,0x000003ff,true), + HOWTO (R_SPARC_PC22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_PC22", false,0,0x003fffff,true), + HOWTO (R_SPARC_WPLT30, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_WPLT30", false,0,0x00000000,true), + HOWTO (R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_COPY", false,0,0x00000000,true), + HOWTO (R_SPARC_GLOB_DAT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_GLOB_DAT",false,0,0x00000000,true), + HOWTO (R_SPARC_JMP_SLOT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_JMP_SLOT",false,0,0x00000000,true), + HOWTO (R_SPARC_RELATIVE,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_RELATIVE",false,0,0x00000000,true), + HOWTO (R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_UA32", false,0,0x00000000,true), }; /* Read a NetWare sparc reloc. */ -struct nlm32_sparc_reloc_ext { - unsigned char offset[4]; - unsigned char addend[4]; - unsigned char type[1]; - unsigned char pad1[3]; -}; +struct nlm32_sparc_reloc_ext + { + unsigned char offset[4]; + unsigned char addend[4]; + unsigned char type[1]; + unsigned char pad1[3]; + }; static boolean nlm_sparc_read_reloc (abfd, sym, secp, rel) @@ -147,10 +150,11 @@ nlm_sparc_read_reloc (abfd, sym, secp, rel) for (index = 0; index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type); index++) - if (nlm32_sparc_howto_table[index].type == type) { - rel->howto = &nlm32_sparc_howto_table[index]; - break; - } + if (nlm32_sparc_howto_table[index].type == type) + { + rel->howto = &nlm32_sparc_howto_table[index]; + break; + } #ifdef DEBUG fprintf (stderr, "%s: address = %08lx, addend = %08lx, type = %d, howto = %08lx\n", @@ -176,31 +180,31 @@ nlm_sparc_write_reloc (abfd, sec, rel) for (index = 0; index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type); - index++) { - tmp = &nlm32_sparc_howto_table[index]; - - if (tmp->rightshift == rel->howto->rightshift - && tmp->size == rel->howto->size - && tmp->bitsize == rel->howto->bitsize - && tmp->pc_relative == rel->howto->pc_relative - && tmp->bitpos == rel->howto->bitpos - && tmp->src_mask == rel->howto->src_mask - && tmp->dst_mask == rel->howto->dst_mask) { - type = tmp->type; - break; + index++) + { + tmp = &nlm32_sparc_howto_table[index]; + + if (tmp->rightshift == rel->howto->rightshift + && tmp->size == rel->howto->size + && tmp->bitsize == rel->howto->bitsize + && tmp->pc_relative == rel->howto->pc_relative + && tmp->bitpos == rel->howto->bitpos + && tmp->src_mask == rel->howto->src_mask + && tmp->dst_mask == rel->howto->dst_mask) + { + type = tmp->type; + break; + } } - } if (type == -1) abort (); - /* - * Netware wants a list of relocs for each address. - * Format is: - * long offset - * long addend - * char type - * That should be it. - */ + /* Netware wants a list of relocs for each address. + Format is: + long offset + long addend + char type + That should be it. */ /* The value we write out is the offset into the appropriate segment. This offset is the section vma, adjusted by the vma of @@ -240,30 +244,27 @@ nlm_sparc_mangle_relocs (abfd, sec, data, offset, count) return true; } -/* Read a NetWare sparc import record */ +/* Read a NetWare sparc import record. */ + static boolean nlm_sparc_read_import (abfd, sym) bfd *abfd; nlmNAME(symbol_type) *sym; { - struct nlm_relent *nlm_relocs; /* relocation records for symbol */ - bfd_size_type rcount; /* number of relocs */ - bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* temporary 32-bit value */ - unsigned char symlength; /* length of symbol name */ + struct nlm_relent *nlm_relocs; /* Relocation records for symbol. */ + bfd_size_type rcount; /* Number of relocs. */ + bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* Temporary 32-bit value. */ + unsigned char symlength; /* Length of symbol name. */ char *name; - /* - * First, read in the number of relocation - * entries for this symbol - */ + /* First, read in the number of relocation + entries for this symbol. */ if (bfd_read ((PTR) temp, 4, 1, abfd) != 4) return false; rcount = bfd_get_32 (abfd, temp); - /* - * Next, read in the length of the symbol - */ + /* Next, read in the length of the symbol. */ if (bfd_read ((PTR) &symlength, sizeof (symlength), 1, abfd) != sizeof (symlength)) @@ -273,9 +274,7 @@ nlm_sparc_read_import (abfd, sym) if (name == NULL) return false; - /* - * Then read in the symbol - */ + /* Then read in the symbol. */ if (bfd_read (name, symlength, 1, abfd) != symlength) return false; @@ -285,9 +284,7 @@ nlm_sparc_read_import (abfd, sym) sym -> symbol.value = 0; sym -> symbol.section = bfd_und_section_ptr; - /* - * Next, start reading in the relocs. - */ + /* Next, start reading in the relocs. */ nlm_relocs = ((struct nlm_relent *) bfd_alloc (abfd, rcount * sizeof (struct nlm_relent))); @@ -307,6 +304,7 @@ nlm_sparc_read_import (abfd, sym) nlm_relocs++; sym -> rcnt++; } + return true; } @@ -325,13 +323,13 @@ nlm_sparc_write_import (abfd, sec, rel) bss = bfd_get_section_by_name (abfd, NLM_UNINITIALIZED_DATA_NAME); symsec = (*rel->sym_ptr_ptr)->section; - if (symsec == code) { + if (symsec == code) base = 0; - } else if (symsec == data) { + else if (symsec == data) base = bfd_section_size (abfd, code); - } else if (symsec == bss) { + else if (symsec == bss) base = bfd_section_size (abfd, code) + bfd_section_size (abfd, data); - } else + else base = 0; #ifdef DEBUG @@ -411,29 +409,29 @@ nlm_sparc_write_export (abfd, sym, value) #include "nlmswap.h" static const struct nlm_backend_data nlm32_sparc_backend = -{ - "NetWare SPARC Module \032", - sizeof (Nlm32_sparc_External_Fixed_Header), - 0, /* optional_prefix_size */ - bfd_arch_sparc, - 0, - false, - 0, /* backend_object_p */ - 0, /* write_prefix_func */ - nlm_sparc_read_reloc, - nlm_sparc_mangle_relocs, - nlm_sparc_read_import, - nlm_sparc_write_import, - 0, /* set_public_section */ - 0, /* get_public_offset */ - nlm_swap_fixed_header_in, - nlm_swap_fixed_header_out, - nlm_sparc_write_external, - nlm_sparc_write_export -}; + { + "NetWare SPARC Module \032", + sizeof (Nlm32_sparc_External_Fixed_Header), + 0, /* optional_prefix_size */ + bfd_arch_sparc, + 0, + false, + 0, /* backend_object_p */ + 0, /* write_prefix_func */ + nlm_sparc_read_reloc, + nlm_sparc_mangle_relocs, + nlm_sparc_read_import, + nlm_sparc_write_import, + 0, /* set_public_section */ + 0, /* get_public_offset */ + nlm_swap_fixed_header_in, + nlm_swap_fixed_header_out, + nlm_sparc_write_external, + nlm_sparc_write_export + }; #define TARGET_BIG_NAME "nlm32-sparc" #define TARGET_BIG_SYM nlmNAME(sparc_vec) -#define TARGET_BACKEND_DATA &nlm32_sparc_backend +#define TARGET_BACKEND_DATA & nlm32_sparc_backend #include "nlm-target.h" diff --git a/bfd/oasys.c b/bfd/oasys.c index 02b0e22..ab836a5 100644 --- a/bfd/oasys.c +++ b/bfd/oasys.c @@ -3,21 +3,21 @@ Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define UNDERSCORE_HACK 1 #include "bfd.h" @@ -61,7 +61,10 @@ static boolean oasys_find_nearest_line static int oasys_generic_stat_arch_elt PARAMS ((bfd *, struct stat *)); static int oasys_sizeof_headers PARAMS ((bfd *, boolean)); -/* Read in all the section data and relocation stuff too */ +long oasys_get_symtab PARAMS ((bfd *, asymbol **)); +long oasys_canonicalize_reloc PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); + +/* Read in all the section data and relocation stuff too. */ PROTO (static boolean, oasys_slurp_section_data, (bfd * CONST abfd)); static boolean @@ -240,9 +243,6 @@ oasys_get_symtab_upper_bound (abfd) return (abfd->symcount + 1) * (sizeof (oasys_symbol_type *)); } -/* -*/ - extern const bfd_target oasys_vec; long diff --git a/bfd/pdp11.c b/bfd/pdp11.c index 3b60b03..7c95b87 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -1,21 +1,21 @@ /* BFD back-end for PDP-11 a.out binaries. Copyright 2001 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* BFD backend for PDP-11, running 2.11BSD in particular. @@ -363,6 +363,12 @@ static void adjust_o_magic PARAMS ((bfd *, struct internal_exec *)); static void adjust_z_magic PARAMS ((bfd *, struct internal_exec *)); static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *)); +static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *)); +void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, struct pdp11_aout_reloc_external *)); +void pdp11_aout_swap_reloc_in +PARAMS ((bfd *, struct pdp11_aout_reloc_external *, arelent *, + bfd_size_type, asymbol **, bfd_size_type)); + /* SUBSECTION Relocations diff --git a/bfd/pe-mips.c b/bfd/pe-mips.c index 62395ce..318d0bd 100644 --- a/bfd/pe-mips.c +++ b/bfd/pe-mips.c @@ -54,6 +54,15 @@ static void mips_adjust_reloc_in PARAMS ((bfd *, static void mips_adjust_reloc_out PARAMS ((bfd *, const arelent *, struct internal_reloc *)); #endif + +static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *)); +static reloc_howto_type * coff_mips_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); +static void mips_swap_reloc_in PARAMS ((bfd *, PTR, PTR)); +static unsigned int mips_swap_reloc_out PARAMS ((bfd *, PTR, PTR)); +static boolean coff_pe_mips_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + struct internal_reloc *, struct internal_syment *, asection **)); + #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) /* The page size is a guess based on ELF. */ @@ -169,7 +178,8 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, /* Return true if this relocation should appear in the output .reloc section. */ -static boolean in_reloc_p(abfd, howto) +static boolean +in_reloc_p (abfd, howto) bfd * abfd ATTRIBUTE_UNUSED; reloc_howto_type *howto; { diff --git a/bfd/riscix.c b/bfd/riscix.c index f5a9ec9..956ba47 100644 --- a/bfd/riscix.c +++ b/bfd/riscix.c @@ -143,6 +143,24 @@ riscix_fix_pcrel_26_done PARAMS ((bfd *, arelent *, asymbol *, PTR, static bfd_reloc_status_type riscix_fix_pcrel_26 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static const bfd_target * +MY (object_p) PARAMS ((bfd *)); + +reloc_howto_type * +riscix_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); + +void +riscix_swap_std_reloc_out PARAMS ((bfd *, arelent *, struct reloc_std_external *)); + +boolean +riscix_squirt_out_relocs PARAMS ((bfd *, asection *)); + +long +MY (canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); + +const bfd_target * +riscix_some_aout_object_p PARAMS ((bfd *, struct internal_exec *, const bfd_target *(*) (bfd *))); + static reloc_howto_type riscix_std_reloc_howto[] = { /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */ diff --git a/bfd/sparclynx.c b/bfd/sparclynx.c index 08f7a2f..3d98ff3 100644 --- a/bfd/sparclynx.c +++ b/bfd/sparclynx.c @@ -1,6 +1,6 @@ /* BFD support for Sparc binaries under LynxOS. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000 - Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, + 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif -#define MY(OP) CAT(sparclynx_aout_,OP) +#define MY(OP) CAT (sparclynx_aout_,OP) #define TARGETNAME "a.out-sparc-lynx" #include "bfd.h" @@ -43,6 +43,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "aout/stab_gnu.h" #include "aout/ar.h" +void NAME (lynx,set_arch_mach) PARAMS ((bfd *, int)); +static void choose_reloc_size PARAMS ((bfd *)); +static boolean NAME (aout,sparclynx_write_object_contents) PARAMS ((bfd *)); + /* This is needed to reject a NewsOS file, e.g. in gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com> I needed to add M_UNKNOWN to recognize a 68000 object, so this will @@ -52,30 +56,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ || (mtype) == M_68020 \ || (mtype) == M_SPARC) -/* -The file @code{aoutf1.h} contains the code for BFD's -a.out back end. Control over the generated back end is given by these -two preprocessor names: -@table @code -@item ARCH_SIZE -This value should be either 32 or 64, depending upon the size of an -int in the target format. It changes the sizes of the structs which -perform the memory/disk mapping of structures. - -The 64 bit backend may only be used if the host compiler supports 64 -ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}. -With this name defined, @emph{all} bfd operations are performed with 64bit -arithmetic, not just those to a 64bit target. - -@item TARGETNAME -The name put into the target vector. -@item -@end table - -*/ - -/*SUPPRESS558*/ -/*SUPPRESS529*/ +/* The file @code{aoutf1.h} contains the code for BFD's + a.out back end. Control over the generated back end is given by these + two preprocessor names: + @table @code + @item ARCH_SIZE + This value should be either 32 or 64, depending upon the size of an + int in the target format. It changes the sizes of the structs which + perform the memory/disk mapping of structures. + + The 64 bit backend may only be used if the host compiler supports 64 + ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}. + With this name defined, @emph{all} bfd operations are performed with 64bit + arithmetic, not just those to a 64bit target. + + @item TARGETNAME + The name put into the target vector. + @item + @end table */ void NAME(lynx,set_arch_mach) (abfd, machtype) @@ -85,9 +83,9 @@ NAME(lynx,set_arch_mach) (abfd, machtype) /* Determine the architecture and machine type of the object file. */ enum bfd_architecture arch; long machine; + switch (machtype) { - case M_UNKNOWN: /* Some Sun3s make magic numbers without cpu types in them, so we'll default to the 68000. */ @@ -140,7 +138,8 @@ NAME(lynx,set_arch_mach) (abfd, machtype) NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \ choose_reloc_size(ABFD); -/* Determine the size of a relocation entry, based on the architecture */ +/* Determine the size of a relocation entry, based on the architecture. */ + static void choose_reloc_size (abfd) bfd *abfd; @@ -206,6 +205,8 @@ NAME(aout,sparclynx_write_object_contents) (abfd) } #define MY_set_sizes sparclynx_set_sizes +static boolean sparclynx_set_sizes PARAMS ((bfd *)); + static boolean sparclynx_set_sizes (abfd) bfd *abfd; @@ -228,15 +229,15 @@ sparclynx_set_sizes (abfd) } static CONST struct aout_backend_data sparclynx_aout_backend = -{ - 0, 1, 0, 1, 0, sparclynx_set_sizes, 0, - 0, /* add_dynamic_symbols */ - 0, /* add_one_symbol */ - 0, /* link_dynamic_object */ - 0, /* write_dynamic_symbol */ - 0, /* check_dynamic_reloc */ - 0 /* finish_dynamic_link */ -}; + { + 0, 1, 0, 1, 0, sparclynx_set_sizes, 0, + 0, /* add_dynamic_symbols */ + 0, /* add_one_symbol */ + 0, /* link_dynamic_object */ + 0, /* write_dynamic_symbol */ + 0, /* check_dynamic_reloc */ + 0 /* finish_dynamic_link */ + }; #define MY_bfd_debug_info_start bfd_void @@ -251,10 +252,10 @@ static CONST struct aout_backend_data sparclynx_aout_backend = #ifdef LYNX_CORE -char *lynx_core_file_failing_command (); -int lynx_core_file_failing_signal (); +char * lynx_core_file_failing_command (); +int lynx_core_file_failing_signal (); boolean lynx_core_file_matches_executable_p (); -const bfd_target *lynx_core_file_p (); +const bfd_target * lynx_core_file_p (); #define MY_core_file_failing_command lynx_core_file_failing_command #define MY_core_file_failing_signal lynx_core_file_failing_signal |