aboutsummaryrefslogtreecommitdiff
path: root/bfd/mipsbsd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-09-18 09:57:26 +0000
committerAlan Modra <amodra@gmail.com>2001-09-18 09:57:26 +0000
commitdc810e3900d47ab2eea86d50231ff2e70b596847 (patch)
tree13fc3d267fb99c450380f08a0775b2dff076b8d7 /bfd/mipsbsd.c
parent417412a27c87b0e738a21122a38d48aa35317eb8 (diff)
downloadgdb-dc810e3900d47ab2eea86d50231ff2e70b596847.zip
gdb-dc810e3900d47ab2eea86d50231ff2e70b596847.tar.gz
gdb-dc810e3900d47ab2eea86d50231ff2e70b596847.tar.bz2
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become bfd_bread and bfd_bwrite. o bfd_*alloc now all take a bfd_size_type arg, and will error if size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files or bugs in linker scripts etc. o file_ptr becomes a bfd_signed_vma. Besides matching sizes with various other types involved in handling sections, this should make it easier for bfd to support a 64 bit off_t on 32 bit hosts that provide it. o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*) generally available. They now cast their args to bfd_vma and bfd_byte * as appropriate, which removes a swag of casts from the source. o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and aout-encap.c. o Zillions of formatting and -Wconversion fixes.
Diffstat (limited to 'bfd/mipsbsd.c')
-rw-r--r--bfd/mipsbsd.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/bfd/mipsbsd.c b/bfd/mipsbsd.c
index bbdb379..442b40d 100644
--- a/bfd/mipsbsd.c
+++ b/bfd/mipsbsd.c
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SET_ARCH_MACH(ABFD, EXEC) \
MY(set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
MY(choose_reloc_size) (ABFD);
-static void MY(set_arch_mach) PARAMS ((bfd *abfd, int machtype));
+static void MY(set_arch_mach) PARAMS ((bfd *abfd, unsigned long machtype));
static void MY(choose_reloc_size) PARAMS ((bfd *abfd));
#define MY_write_object_contents MY(write_object_contents)
@@ -67,18 +67,21 @@ static boolean MY(write_object_contents) PARAMS ((bfd *abfd));
#include "aout-target.h"
-static bfd_reloc_status_type mips_fix_jmp_addr PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *, bfd *));
-static reloc_howto_type * MY(reloc_howto_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
+static bfd_reloc_status_type mips_fix_jmp_addr
+ PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+ bfd *, char **));
+static reloc_howto_type *MY(reloc_howto_type_lookup)
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
long MY(canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
static void
MY(set_arch_mach) (abfd, machtype)
bfd *abfd;
- int machtype;
+ unsigned long machtype;
{
enum bfd_architecture arch;
- long machine;
+ unsigned int machine;
/* Determine the architecture and machine type of the object file. */
switch (machtype)
@@ -194,13 +197,15 @@ MY (write_object_contents) (abfd)
program counter, then we need to signal an error. */
static bfd_reloc_status_type
-mips_fix_jmp_addr (abfd,reloc_entry,symbol,data,input_section,output_bfd)
+mips_fix_jmp_addr (abfd, reloc_entry, symbol, data, input_section, output_bfd,
+ error_message)
bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
struct symbol_cache_entry *symbol;
PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
{
bfd_vma relocation, pc;
@@ -378,7 +383,7 @@ MY(canonicalize_reloc) (abfd, section, relptr, symbols)
return section->reloc_count;
}
-static CONST struct aout_backend_data MY(backend_data) = {
+static const struct aout_backend_data MY(backend_data) = {
0, /* zmagic contiguous */
1, /* text incl header */
0, /* entry is text address */