Browse Source

* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED

as appropriate.  Fill in structure initializations.  Add variable
	initializations.  Add casts.
	* dwarf1.c (parse_line_table): Change eachLine to unsigned long.
	(dwarf1_unit_find_nearest_line): Change i to unsigned long.
gdb-premipsmulti-2000-06-06-branch
Ian Lance Taylor 27 years ago
parent
commit
7442e600c8
  1. 6
      bfd/ChangeLog
  2. 6
      bfd/aout-target.h
  3. 67
      bfd/aoutx.h
  4. 2
      bfd/archive.c
  5. 4
      bfd/bfd.c
  6. 12
      bfd/binary.c
  7. 12
      bfd/coffgen.c
  8. 8
      bfd/dwarf1.c
  9. 22
      bfd/dwarf2.c
  10. 38
      bfd/elf.c
  11. 10
      bfd/elf32-gen.c
  12. 40
      bfd/elf32-i386.c
  13. 4
      bfd/elflink.c
  14. 10
      bfd/elflink.h
  15. 4
      bfd/hash.c
  16. 5
      bfd/i386linux.c
  17. 6
      bfd/ihex.c
  18. 54
      bfd/libbfd.c
  19. 13
      bfd/linker.c
  20. 12
      bfd/reloc.c
  21. 16
      bfd/section.c
  22. 8
      bfd/srec.c
  23. 6
      bfd/stabs.c
  24. 46
      bfd/syms.c
  25. 13
      bfd/tekhex.c
  26. 21
      bfd/trad-core.c

6
bfd/ChangeLog

@ -1,5 +1,11 @@
1999-07-11 Ian Lance Taylor <ian@zembu.com> 1999-07-11 Ian Lance Taylor <ian@zembu.com>
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate. Fill in structure initializations. Add variable
initializations. Add casts.
* dwarf1.c (parse_line_table): Change eachLine to unsigned long.
(dwarf1_unit_find_nearest_line): Change i to unsigned long.
* elf.c (bfd_elf_hash): Change parameter from unsigned char * to * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
char *. char *.
* elf-bfd.h (bfd_elf_hash): Update declaration. * elf-bfd.h (bfd_elf_hash): Update declaration.

6
bfd/aout-target.h

@ -1,5 +1,5 @@
/* Define a target vector and some small routines for a variant of a.out. /* Define a target vector and some small routines for a variant of a.out.
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. 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.
@ -234,9 +234,9 @@ static boolean MY_bfd_copy_private_section_data
static boolean static boolean
MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec) MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd; bfd *ibfd;
asection *isec; asection *isec ATTRIBUTE_UNUSED;
bfd *obfd; bfd *obfd;
asection *osec; asection *osec ATTRIBUTE_UNUSED;
{ {
if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
&& bfd_get_flavour (obfd) == bfd_target_aout_flavour) && bfd_get_flavour (obfd) == bfd_target_aout_flavour)

67
bfd/aoutx.h

@ -1,5 +1,5 @@
/* BFD semi-generic back-end for a.out binaries. /* BFD semi-generic back-end for a.out binaries.
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -228,28 +228,35 @@ HOWTO( 7, 0, 4, 64, true, 0, complain_overflow_signed, 0,"DISP64", tr
HOWTO( 8, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"GOT_REL", false, 0,0x00000000, false), HOWTO( 8, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"GOT_REL", false, 0,0x00000000, false),
HOWTO( 9, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"BASE16", false,0xffffffff,0xffffffff, false), HOWTO( 9, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"BASE16", false,0xffffffff,0xffffffff, false),
HOWTO(10, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"BASE32", false,0xffffffff,0xffffffff, false), HOWTO(10, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"BASE32", false,0xffffffff,0xffffffff, false),
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
HOWTO(16, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false, 0,0x00000000, false), HOWTO(16, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false, 0,0x00000000, false),
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
HOWTO(32, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false), HOWTO(32, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false),
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ -1 }, { -1, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false), HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false),
}; };
@ -1072,7 +1079,7 @@ boolean
NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end) NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
bfd *abfd; bfd *abfd;
bfd_size_type *text_size; bfd_size_type *text_size;
file_ptr *text_end; file_ptr *text_end ATTRIBUTE_UNUSED;
{ {
struct internal_exec *execp = exec_hdr (abfd); struct internal_exec *execp = exec_hdr (abfd);
@ -2531,16 +2538,16 @@ NAME(aout,get_symtab_upper_bound) (abfd)
/*ARGSUSED*/ /*ARGSUSED*/
alent * alent *
NAME(aout,get_lineno) (ignore_abfd, ignore_symbol) NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *ignore_symbol; asymbol *ignore_symbol ATTRIBUTE_UNUSED;
{ {
return (alent *)NULL; return (alent *)NULL;
} }
/*ARGSUSED*/ /*ARGSUSED*/
void void
NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret) NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
symbol_info *ret; symbol_info *ret;
{ {
@ -2568,7 +2575,7 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
/*ARGSUSED*/ /*ARGSUSED*/
void void
NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how) NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile; PTR afile;
asymbol *symbol; asymbol *symbol;
bfd_print_symbol_type how; bfd_print_symbol_type how;
@ -2878,7 +2885,7 @@ NAME(aout,find_nearest_line)
int int
NAME(aout,sizeof_headers) (abfd, execable) NAME(aout,sizeof_headers) (abfd, execable)
bfd *abfd; bfd *abfd;
boolean execable; boolean execable ATTRIBUTE_UNUSED;
{ {
return adata(abfd).exec_bytes_size; return adata(abfd).exec_bytes_size;
} }
@ -4719,6 +4726,8 @@ aout_reloc_index_to_section (abfd, indx)
default: default:
abort (); abort ();
} }
/*NOTREACHED*/
return NULL;
} }
/* Relocate an a.out section using standard a.out relocs. */ /* Relocate an a.out section using standard a.out relocs. */
@ -5493,7 +5502,7 @@ aout_link_reloc_link_order (finfo, o, p)
int r_index; int r_index;
int r_extern; int r_extern;
reloc_howto_type *howto; reloc_howto_type *howto;
file_ptr *reloff_ptr; file_ptr *reloff_ptr = NULL;
struct reloc_std_external srel; struct reloc_std_external srel;
struct reloc_ext_external erel; struct reloc_ext_external erel;
PTR rel_ptr; PTR rel_ptr;

2
bfd/archive.c

@ -1178,7 +1178,7 @@ normalize (abfd, file)
#else #else
static const char * static const char *
normalize (abfd, file) normalize (abfd, file)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
const char *file; const char *file;
{ {
const char *filename = strrchr (file, '/'); const char *filename = strrchr (file, '/');

4
bfd/bfd.c

@ -1,5 +1,5 @@
/* Generic BFD library interface and support routines. /* Generic BFD library interface and support routines.
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -618,7 +618,7 @@ DESCRIPTION
/*ARGSUSED*/ /*ARGSUSED*/
void void
bfd_set_reloc (ignore_abfd, asect, location, count) bfd_set_reloc (ignore_abfd, asect, location, count)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
sec_ptr asect; sec_ptr asect;
arelent **location; arelent **location;
unsigned int count; unsigned int count;

12
bfd/binary.c

@ -58,7 +58,7 @@ static int binary_sizeof_headers PARAMS ((bfd *, boolean));
static boolean static boolean
binary_mkobject (abfd) binary_mkobject (abfd)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
{ {
return true; return true;
} }
@ -112,7 +112,7 @@ binary_object_p (abfd)
static boolean static boolean
binary_get_section_contents (abfd, section, location, offset, count) binary_get_section_contents (abfd, section, location, offset, count)
bfd *abfd; bfd *abfd;
asection *section; asection *section ATTRIBUTE_UNUSED;
PTR location; PTR location;
file_ptr offset; file_ptr offset;
bfd_size_type count; bfd_size_type count;
@ -127,7 +127,7 @@ binary_get_section_contents (abfd, section, location, offset, count)
static long static long
binary_get_symtab_upper_bound (abfd) binary_get_symtab_upper_bound (abfd)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
{ {
return (BIN_SYMS + 1) * sizeof (asymbol *); return (BIN_SYMS + 1) * sizeof (asymbol *);
} }
@ -222,7 +222,7 @@ binary_make_empty_symbol (abfd)
static void static void
binary_get_symbol_info (ignore_abfd, symbol, ret) binary_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
symbol_info *ret; symbol_info *ret;
{ {
@ -318,8 +318,8 @@ binary_set_section_contents (abfd, sec, data, offset, size)
static int static int
binary_sizeof_headers (abfd, exec) binary_sizeof_headers (abfd, exec)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
boolean exec; boolean exec ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }

12
bfd/coffgen.c

@ -1,5 +1,5 @@
/* Support for the generic parts of COFF, for BFD. /* Support for the generic parts of COFF, for BFD.
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -559,7 +559,7 @@ coff_count_linenumbers (abfd)
/*ARGSUSED*/ /*ARGSUSED*/
coff_symbol_type * coff_symbol_type *
coff_symbol_from (ignore_abfd, symbol) coff_symbol_from (ignore_abfd, symbol)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
{ {
if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour) if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour)
@ -1351,7 +1351,7 @@ coff_write_linenumbers (abfd)
/*ARGSUSED */ /*ARGSUSED */
alent * alent *
coff_get_lineno (ignore_abfd, symbol) coff_get_lineno (ignore_abfd, symbol)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
{ {
return coffsymbol (symbol)->lineno; return coffsymbol (symbol)->lineno;
@ -1857,8 +1857,8 @@ coff_make_empty_symbol (abfd)
asymbol * asymbol *
coff_bfd_make_debug_symbol (abfd, ptr, sz) coff_bfd_make_debug_symbol (abfd, ptr, sz)
bfd *abfd; bfd *abfd;
PTR ptr; PTR ptr ATTRIBUTE_UNUSED;
unsigned long sz; unsigned long sz ATTRIBUTE_UNUSED;
{ {
coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type)); coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type));
if (new == NULL) if (new == NULL)
@ -2105,7 +2105,7 @@ coff_print_symbol (abfd, filep, symbol, how)
boolean boolean
_bfd_coff_is_local_label_name (abfd, name) _bfd_coff_is_local_label_name (abfd, name)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
const char *name; const char *name;
{ {
return name[0] == '.' && name[1] == 'L'; return name[0] == '.' && name[1] == 'L';

8
bfd/dwarf1.c

@ -1,5 +1,5 @@
/* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line). /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
Copyright 1998 Free Software Foundation, Inc. Copyright 1998, 1999 Free Software Foundation, Inc.
Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com). Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
@ -291,7 +291,7 @@ parse_line_table (stash, aUnit)
xptr = stash->line_section + aUnit->stmt_list_offset; xptr = stash->line_section + aUnit->stmt_list_offset;
if (xptr < stash->line_section_end) if (xptr < stash->line_section_end)
{ {
int eachLine; unsigned long eachLine;
char* tblend; char* tblend;
unsigned long base; unsigned long base;
@ -398,7 +398,7 @@ dwarf1_unit_find_nearest_line (stash, aUnit, addr,
{ {
if (aUnit->has_stmt_list) if (aUnit->has_stmt_list)
{ {
int i; unsigned long i;
struct dwarf1_func* eachFunc; struct dwarf1_func* eachFunc;
if (! aUnit->linenumber_table) if (! aUnit->linenumber_table)
@ -454,7 +454,7 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
filename_ptr, functionname_ptr, linenumber_ptr) filename_ptr, functionname_ptr, linenumber_ptr)
bfd *abfd; bfd *abfd;
asection *section; asection *section;
asymbol **symbols; asymbol **symbols ATTRIBUTE_UNUSED;
bfd_vma offset; bfd_vma offset;
const char **filename_ptr; const char **filename_ptr;
const char **functionname_ptr; const char **functionname_ptr;

22
bfd/dwarf2.c

@ -1,5 +1,5 @@
/* DWARF 2 support. /* DWARF 2 support.
Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
(gavin@cygnus.com). (gavin@cygnus.com).
@ -170,7 +170,7 @@ struct comp_unit {
static unsigned int static unsigned int
read_1_byte (abfd, buf) read_1_byte (abfd, buf)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
char *buf; char *buf;
{ {
return bfd_get_8 (abfd, (bfd_byte *) buf); return bfd_get_8 (abfd, (bfd_byte *) buf);
@ -178,7 +178,7 @@ read_1_byte (abfd, buf)
static int static int
read_1_signed_byte (abfd, buf) read_1_signed_byte (abfd, buf)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
char *buf; char *buf;
{ {
return bfd_get_signed_8 (abfd, (bfd_byte *) buf); return bfd_get_signed_8 (abfd, (bfd_byte *) buf);
@ -238,9 +238,9 @@ read_8_bytes (abfd, buf)
static char * static char *
read_n_bytes (abfd, buf, size) read_n_bytes (abfd, buf, size)
bfd * abfd; bfd *abfd ATTRIBUTE_UNUSED;
char *buf; char *buf;
unsigned int size; unsigned int size ATTRIBUTE_UNUSED;
{ {
/* If the size of a host char is 8 bits, we can return a pointer /* If the size of a host char is 8 bits, we can return a pointer
to the buffer, otherwise we have to copy the data to a buffer to the buffer, otherwise we have to copy the data to a buffer
@ -250,7 +250,7 @@ read_n_bytes (abfd, buf, size)
static char * static char *
read_string (abfd, buf, bytes_read_ptr) read_string (abfd, buf, bytes_read_ptr)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
char *buf; char *buf;
unsigned int *bytes_read_ptr; unsigned int *bytes_read_ptr;
{ {
@ -268,7 +268,7 @@ read_string (abfd, buf, bytes_read_ptr)
static unsigned int static unsigned int
read_unsigned_leb128 (abfd, buf, bytes_read_ptr) read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
char *buf; char *buf;
unsigned int *bytes_read_ptr; unsigned int *bytes_read_ptr;
{ {
@ -298,8 +298,8 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
static int static int
read_signed_leb128 (abfd, buf, bytes_read_ptr) read_signed_leb128 (abfd, buf, bytes_read_ptr)
bfd * abfd; bfd *abfd ATTRIBUTE_UNUSED;
char * buf; char *buf;
unsigned int * bytes_read_ptr; unsigned int * bytes_read_ptr;
{ {
int result; int result;
@ -1236,7 +1236,7 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length)
struct comp_unit* unit; struct comp_unit* unit;
unsigned short version; unsigned short version;
unsigned int abbrev_offset; unsigned int abbrev_offset = 0;
unsigned char addr_size; unsigned char addr_size;
struct abbrev_info** abbrevs; struct abbrev_info** abbrevs;
@ -1457,7 +1457,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
addr_size) addr_size)
bfd *abfd; bfd *abfd;
asection *section; asection *section;
asymbol **symbols; asymbol **symbols ATTRIBUTE_UNUSED;
bfd_vma offset; bfd_vma offset;
const char **filename_ptr; const char **filename_ptr;
const char **functionname_ptr; const char **functionname_ptr;

38
bfd/elf.c

@ -505,13 +505,13 @@ bfd_elf_generic_reloc (abfd,
input_section, input_section,
output_bfd, output_bfd,
error_message) error_message)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry; arelent *reloc_entry;
asymbol *symbol; asymbol *symbol;
PTR data; PTR data ATTRIBUTE_UNUSED;
asection *input_section; asection *input_section;
bfd *output_bfd; bfd *output_bfd;
char **error_message; char **error_message ATTRIBUTE_UNUSED;
{ {
if (output_bfd != (bfd *) NULL if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0 && (symbol->flags & BSF_SECTION_SYM) == 0
@ -946,7 +946,7 @@ bfd_elf_set_dt_needed_name (abfd, name)
struct bfd_link_needed_list * struct bfd_link_needed_list *
bfd_elf_get_needed_list (abfd, info) bfd_elf_get_needed_list (abfd, info)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info; struct bfd_link_info *info;
{ {
if (info->hash->creator->flavour != bfd_target_elf_flavour) if (info->hash->creator->flavour != bfd_target_elf_flavour)
@ -4193,7 +4193,7 @@ _bfd_elf_get_dynamic_symtab_upper_bound (abfd)
long long
_bfd_elf_get_reloc_upper_bound (abfd, asect) _bfd_elf_get_reloc_upper_bound (abfd, asect)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr asect; sec_ptr asect;
{ {
return (asect->reloc_count + 1) * sizeof (arelent *); return (asect->reloc_count + 1) * sizeof (arelent *);
@ -4524,7 +4524,7 @@ _bfd_elf_make_empty_symbol (abfd)
void void
_bfd_elf_get_symbol_info (ignore_abfd, symbol, ret) _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
symbol_info *ret; symbol_info *ret;
{ {
@ -4537,7 +4537,7 @@ _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
boolean boolean
_bfd_elf_is_local_label_name (abfd, name) _bfd_elf_is_local_label_name (abfd, name)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
const char *name; const char *name;
{ {
/* Normal local symbols start with ``.L''. */ /* Normal local symbols start with ``.L''. */
@ -4563,8 +4563,8 @@ _bfd_elf_is_local_label_name (abfd, name)
alent * alent *
_bfd_elf_get_lineno (ignore_abfd, symbol) _bfd_elf_get_lineno (ignore_abfd, symbol)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
return NULL; return NULL;
@ -4714,9 +4714,9 @@ _bfd_elf_set_section_contents (abfd, section, location, offset, count)
void void
_bfd_elf_no_info_to_howto (abfd, cache_ptr, dst) _bfd_elf_no_info_to_howto (abfd, cache_ptr, dst)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr; arelent *cache_ptr ATTRIBUTE_UNUSED;
Elf_Internal_Rela *dst; Elf_Internal_Rela *dst ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
} }
@ -4850,13 +4850,13 @@ _bfd_elf_close_and_cleanup (abfd)
bfd_reloc_status_type bfd_reloc_status_type
_bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg) _bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *re; arelent *re ATTRIBUTE_UNUSED;
struct symbol_cache_entry *symbol; struct symbol_cache_entry *symbol ATTRIBUTE_UNUSED;
PTR data; PTR data ATTRIBUTE_UNUSED;
asection *is; asection *is ATTRIBUTE_UNUSED;
bfd *obfd; bfd *obfd ATTRIBUTE_UNUSED;
char **errmsg; char **errmsg ATTRIBUTE_UNUSED;
{ {
return bfd_reloc_ok; return bfd_reloc_ok;
} }

10
bfd/elf32-gen.c

@ -1,5 +1,5 @@
/* Generic support for 32-bit ELF /* Generic support for 32-bit ELF
Copyright 1993, 1995, 1998 Free Software Foundation, Inc. Copyright 1993, 1995, 1998, 1999 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.
@ -42,18 +42,18 @@ static reloc_howto_type dummy =
static void static void
elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc) elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *bfd_reloc; arelent *bfd_reloc;
Elf32_Internal_Rela *elf_reloc; Elf32_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
{ {
bfd_reloc->howto = &dummy; bfd_reloc->howto = &dummy;
} }
static void static void
elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *bfd_reloc; arelent *bfd_reloc;
Elf32_Internal_Rel *elf_reloc; Elf32_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED;
{ {
bfd_reloc->howto = &dummy; bfd_reloc->howto = &dummy;
} }

40
bfd/elf32-i386.c

@ -67,15 +67,15 @@ static reloc_howto_type elf_howto_table[]=
HOWTO(R_386_RELATIVE, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_RELATIVE", true,0xffffffff,0xffffffff,false), HOWTO(R_386_RELATIVE, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_RELATIVE", true,0xffffffff,0xffffffff,false),
HOWTO(R_386_GOTOFF, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTOFF", true,0xffffffff,0xffffffff,false), HOWTO(R_386_GOTOFF, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTOFF", true,0xffffffff,0xffffffff,false),
HOWTO(R_386_GOTPC, 0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTPC", true,0xffffffff,0xffffffff,true), HOWTO(R_386_GOTPC, 0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTPC", true,0xffffffff,0xffffffff,true),
{ 11 }, { 11, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 12 }, { 12, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 13 }, { 13, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 14 }, { 14, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 15 }, { 15, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 16 }, { 16, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 17 }, { 17, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 18 }, { 18, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
{ 19 }, { 19, 0, 0, 0, false, 0, complain_overflow_dont, NULL, NULL, false, 0, 0, false },
/* The remaining relocs are a GNU extension. */ /* The remaining relocs are a GNU extension. */
HOWTO(R_386_16, 0,1,16,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_16", true,0xffff,0xffff,false), HOWTO(R_386_16, 0,1,16,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_16", true,0xffff,0xffff,false),
HOWTO(R_386_PC16, 0,1,16,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC16", true,0xffff,0xffff,true), HOWTO(R_386_PC16, 0,1,16,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC16", true,0xffff,0xffff,true),
@ -123,7 +123,7 @@ static reloc_howto_type elf32_i386_vtentry_howto =
static reloc_howto_type * static reloc_howto_type *
elf_i386_reloc_type_lookup (abfd, code) elf_i386_reloc_type_lookup (abfd, code)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code; bfd_reloc_code_real_type code;
{ {
switch (code) switch (code)
@ -211,16 +211,16 @@ elf_i386_reloc_type_lookup (abfd, code)
static void static void
elf_i386_info_to_howto (abfd, cache_ptr, dst) elf_i386_info_to_howto (abfd, cache_ptr, dst)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr; arelent *cache_ptr ATTRIBUTE_UNUSED;
Elf32_Internal_Rela *dst; Elf32_Internal_Rela *dst ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
} }
static void static void
elf_i386_info_to_howto_rel (abfd, cache_ptr, dst) elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr; arelent *cache_ptr;
Elf32_Internal_Rel *dst; Elf32_Internal_Rel *dst;
{ {
@ -714,7 +714,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
static asection * static asection *
elf_i386_gc_mark_hook (abfd, info, rel, h, sym) elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
bfd *abfd; bfd *abfd;
struct bfd_link_info *info; struct bfd_link_info *info ATTRIBUTE_UNUSED;
Elf_Internal_Rela *rel; Elf_Internal_Rela *rel;
struct elf_link_hash_entry *h; struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym; Elf_Internal_Sym *sym;
@ -760,10 +760,10 @@ elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
static boolean static boolean
elf_i386_gc_sweep_hook (abfd, info, sec, relocs) elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info; struct bfd_link_info *info ATTRIBUTE_UNUSED;
asection *sec; asection *sec ATTRIBUTE_UNUSED;
const Elf_Internal_Rela *relocs; const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{ {
/* ??? It would seem that the existing i386 code does no sort /* ??? It would seem that the existing i386 code does no sort
of reference counting or whatnot on its GOT and PLT entries, of reference counting or whatnot on its GOT and PLT entries,
@ -1139,7 +1139,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
static boolean static boolean
elf_i386_discard_copies (h, ignore) elf_i386_discard_copies (h, ignore)
struct elf_i386_link_hash_entry *h; struct elf_i386_link_hash_entry *h;
PTR ignore; PTR ignore ATTRIBUTE_UNUSED;
{ {
struct elf_i386_pcrel_relocs_copied *s; struct elf_i386_pcrel_relocs_copied *s;

4
bfd/elflink.c

@ -1,5 +1,5 @@
/* ELF linking support for BFD. /* ELF linking support for BFD.
Copyright 1995, 1996, 1997, 1999 Free Software Foundation, Inc. Copyright 1995, 1996, 1997, 1998, 1999 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.
@ -100,7 +100,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
flagword flags, pltflags; flagword flags, pltflags;
register asection *s; register asection *s;
struct elf_backend_data *bed = get_elf_backend_data (abfd); struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign; int ptralign = 0;
switch (bed->s->arch_size) switch (bed->s->arch_size)
{ {

10
bfd/elflink.h

@ -2237,7 +2237,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs,
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide) NAME(bfd_elf,record_link_assignment) (output_bfd, info, name, provide)
bfd *output_bfd; bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info; struct bfd_link_info *info;
const char *name; const char *name;
boolean provide; boolean provide;
@ -2356,7 +2356,7 @@ compute_bucket_count (info)
struct bfd_link_info *info; struct bfd_link_info *info;
{ {
size_t dynsymcount = elf_hash_table (info)->dynsymcount; size_t dynsymcount = elf_hash_table (info)->dynsymcount;
size_t best_size; size_t best_size = 0;
unsigned long int *hashcodes; unsigned long int *hashcodes;
unsigned long int *hashcodesp; unsigned long int *hashcodesp;
unsigned long int i; unsigned long int i;
@ -4849,7 +4849,7 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
Elf_Internal_Rela *irelaend; Elf_Internal_Rela *irelaend;
Elf_Internal_Shdr *output_rel_hdr; Elf_Internal_Shdr *output_rel_hdr;
asection *output_section; asection *output_section;
unsigned int *rel_countp; unsigned int *rel_countp = NULL;
output_section = input_section->output_section; output_section = input_section->output_section;
output_rel_hdr = NULL; output_rel_hdr = NULL;
@ -6183,8 +6183,8 @@ win:
boolean boolean
elf_gc_record_vtentry (abfd, sec, h, addend) elf_gc_record_vtentry (abfd, sec, h, addend)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *sec; asection *sec ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *h; struct elf_link_hash_entry *h;
bfd_vma addend; bfd_vma addend;
{ {

4
bfd/hash.c

@ -1,5 +1,5 @@
/* hash.c -- hash table routines for BFD /* hash.c -- hash table routines for BFD
Copyright (C) 1993, 94, 95, 1997 Free Software Foundation, Inc. Copyright (C) 1993, 94, 95, 97, 1999 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com> Written by Steve Chamberlain <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.
@ -450,7 +450,7 @@ struct bfd_hash_entry *
bfd_hash_newfunc (entry, table, string) bfd_hash_newfunc (entry, table, string)
struct bfd_hash_entry *entry; struct bfd_hash_entry *entry;
struct bfd_hash_table *table; struct bfd_hash_table *table;
const char *string; const char *string ATTRIBUTE_UNUSED;
{ {
if (entry == (struct bfd_hash_entry *) NULL) if (entry == (struct bfd_hash_entry *) NULL)
entry = ((struct bfd_hash_entry *) entry = ((struct bfd_hash_entry *)

5
bfd/i386linux.c

@ -1,5 +1,6 @@
/* BFD back-end for linux flavored i386 a.out binaries. /* BFD back-end for linux flavored i386 a.out binaries.
Copyright (C) 1992, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc. Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
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.
@ -297,7 +298,7 @@ new_fixup (info, h, value, builtin)
static boolean static boolean
linux_link_create_dynamic_sections (abfd, info) linux_link_create_dynamic_sections (abfd, info)
bfd *abfd; bfd *abfd;
struct bfd_link_info *info; struct bfd_link_info *info ATTRIBUTE_UNUSED;
{ {
flagword flags; flagword flags;
register asection *s; register asection *s;

6
bfd/ihex.c

@ -1,5 +1,5 @@
/* BFD back-end for Intel Hex objects. /* BFD back-end for Intel Hex objects.
Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>. Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library. This file is part of BFD, the Binary File Descriptor library.
@ -947,8 +947,8 @@ ihex_set_arch_mach (abfd, arch, mach)
/*ARGSUSED*/ /*ARGSUSED*/
static int static int
ihex_sizeof_headers (abfd, exec) ihex_sizeof_headers (abfd, exec)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
boolean exec; boolean exec ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }

54
bfd/libbfd.c

@ -1,5 +1,5 @@
/* Assorted BFD support routines, only used internally. /* Assorted BFD support routines, only used internally.
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -45,7 +45,7 @@ DESCRIPTION
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
bfd_false (ignore) bfd_false (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return false; return false;
@ -57,7 +57,7 @@ bfd_false (ignore)
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
bfd_true (ignore) bfd_true (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
return true; return true;
} }
@ -68,7 +68,7 @@ bfd_true (ignore)
/*ARGSUSED*/ /*ARGSUSED*/
PTR PTR
bfd_nullvoidptr (ignore) bfd_nullvoidptr (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return NULL; return NULL;
@ -77,7 +77,7 @@ bfd_nullvoidptr (ignore)
/*ARGSUSED*/ /*ARGSUSED*/
int int
bfd_0 (ignore) bfd_0 (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
@ -85,7 +85,7 @@ bfd_0 (ignore)
/*ARGSUSED*/ /*ARGSUSED*/
unsigned int unsigned int
bfd_0u (ignore) bfd_0u (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
@ -93,7 +93,7 @@ bfd_0u (ignore)
/*ARGUSED*/ /*ARGUSED*/
long long
bfd_0l (ignore) bfd_0l (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
@ -104,7 +104,7 @@ bfd_0l (ignore)
/*ARGSUSED*/ /*ARGSUSED*/
long long
_bfd_n1 (ignore_abfd) _bfd_n1 (ignore_abfd)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return -1; return -1;
@ -113,15 +113,15 @@ _bfd_n1 (ignore_abfd)
/*ARGSUSED*/ /*ARGSUSED*/
void void
bfd_void (ignore) bfd_void (ignore)
bfd *ignore; bfd *ignore ATTRIBUTE_UNUSED;
{ {
} }
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
_bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd) _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
bfd *ignore_core_bfd; bfd *ignore_core_bfd ATTRIBUTE_UNUSED;
bfd *ignore_exec_bfd; bfd *ignore_exec_bfd ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return false; return false;
@ -133,7 +133,7 @@ _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
/*ARGSUSED*/ /*ARGSUSED*/
char * char *
_bfd_nocore_core_file_failing_command (ignore_abfd) _bfd_nocore_core_file_failing_command (ignore_abfd)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return (char *)NULL; return (char *)NULL;
@ -145,7 +145,7 @@ _bfd_nocore_core_file_failing_command (ignore_abfd)
/*ARGSUSED*/ /*ARGSUSED*/
int int
_bfd_nocore_core_file_failing_signal (ignore_abfd) _bfd_nocore_core_file_failing_signal (ignore_abfd)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return 0; return 0;
@ -154,7 +154,7 @@ _bfd_nocore_core_file_failing_signal (ignore_abfd)
/*ARGSUSED*/ /*ARGSUSED*/
const bfd_target * const bfd_target *
_bfd_dummy_target (ignore_abfd) _bfd_dummy_target (ignore_abfd)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
{ {
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return 0; return 0;
@ -1003,7 +1003,7 @@ bfd_getl_signed_32 (addr)
bfd_vma bfd_vma
bfd_getb64 (addr) bfd_getb64 (addr)
register const bfd_byte *addr; register const bfd_byte *addr ATTRIBUTE_UNUSED;
{ {
#ifdef BFD64 #ifdef BFD64
bfd_vma low, high; bfd_vma low, high;
@ -1027,7 +1027,7 @@ bfd_getb64 (addr)
bfd_vma bfd_vma
bfd_getl64 (addr) bfd_getl64 (addr)
register const bfd_byte *addr; register const bfd_byte *addr ATTRIBUTE_UNUSED;
{ {
#ifdef BFD64 #ifdef BFD64
bfd_vma low, high; bfd_vma low, high;
@ -1051,7 +1051,7 @@ bfd_getl64 (addr)
bfd_signed_vma bfd_signed_vma
bfd_getb_signed_64 (addr) bfd_getb_signed_64 (addr)
register const bfd_byte *addr; register const bfd_byte *addr ATTRIBUTE_UNUSED;
{ {
#ifdef BFD64 #ifdef BFD64
bfd_vma low, high; bfd_vma low, high;
@ -1075,7 +1075,7 @@ bfd_getb_signed_64 (addr)
bfd_signed_vma bfd_signed_vma
bfd_getl_signed_64 (addr) bfd_getl_signed_64 (addr)
register const bfd_byte *addr; register const bfd_byte *addr ATTRIBUTE_UNUSED;
{ {
#ifdef BFD64 #ifdef BFD64
bfd_vma low, high; bfd_vma low, high;
@ -1120,8 +1120,8 @@ bfd_putl32 (data, addr)
void void
bfd_putb64 (data, addr) bfd_putb64 (data, addr)
bfd_vma data; bfd_vma data ATTRIBUTE_UNUSED;
register bfd_byte *addr; register bfd_byte *addr ATTRIBUTE_UNUSED;
{ {
#ifdef BFD64 #ifdef BFD64
addr[0] = (bfd_byte)(data >> (7*8)); addr[0] = (bfd_byte)(data >> (7*8));
@ -1139,8 +1139,8 @@ bfd_putb64 (data, addr)
void void
bfd_putl64 (data, addr) bfd_putl64 (data, addr)
bfd_vma data; bfd_vma data ATTRIBUTE_UNUSED;
register bfd_byte *addr; register bfd_byte *addr ATTRIBUTE_UNUSED;
{ {
#ifdef BFD64 #ifdef BFD64
addr[7] = (bfd_byte)(data >> (7*8)); addr[7] = (bfd_byte)(data >> (7*8));
@ -1177,11 +1177,11 @@ _bfd_generic_get_section_contents (abfd, section, location, offset, count)
boolean boolean
_bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count) _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr section; sec_ptr section ATTRIBUTE_UNUSED;
bfd_window *w; bfd_window *w ATTRIBUTE_UNUSED;
file_ptr offset; file_ptr offset ATTRIBUTE_UNUSED;
bfd_size_type count; bfd_size_type count ATTRIBUTE_UNUSED;
{ {
#ifdef USE_MMAP #ifdef USE_MMAP
if (count == 0) if (count == 0)

13
bfd/linker.c

@ -1,5 +1,6 @@
/* linker.c -- BFD linker routines /* linker.c -- BFD linker routines
Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. Copyright (C) 1993, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
This file is part of BFD, the Binary File Descriptor library. This file is part of BFD, the Binary File Descriptor library.
@ -1748,8 +1749,8 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
case MDEF: case MDEF:
/* Handle a multiple definition. */ /* Handle a multiple definition. */
{ {
asection *msec; asection *msec = NULL;
bfd_vma mval; bfd_vma mval = 0;
switch (h->type) switch (h->type)
{ {
@ -2602,7 +2603,7 @@ _bfd_default_link_order (abfd, info, sec, link_order)
static boolean static boolean
default_fill_link_order (abfd, info, sec, link_order) default_fill_link_order (abfd, info, sec, link_order)
bfd *abfd; bfd *abfd;
struct bfd_link_info *info; struct bfd_link_info *info ATTRIBUTE_UNUSED;
asection *sec; asection *sec;
struct bfd_link_order *link_order; struct bfd_link_order *link_order;
{ {
@ -2797,8 +2798,8 @@ DESCRIPTION
boolean boolean
_bfd_generic_link_split_section (abfd, sec) _bfd_generic_link_split_section (abfd, sec)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *sec; asection *sec ATTRIBUTE_UNUSED;
{ {
return false; return false;
} }

12
bfd/reloc.c

@ -1405,7 +1405,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
bfd_byte *location; bfd_byte *location;
{ {
int size; int size;
bfd_vma x; bfd_vma x = 0;
boolean overflow; boolean overflow;
unsigned int rightshift = howto->rightshift; unsigned int rightshift = howto->rightshift;
unsigned int bitpos = howto->bitpos; unsigned int bitpos = howto->bitpos;
@ -2701,9 +2701,9 @@ DESCRIPTION
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
bfd_generic_relax_section (abfd, section, link_info, again) bfd_generic_relax_section (abfd, section, link_info, again)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *section; asection *section ATTRIBUTE_UNUSED;
struct bfd_link_info *link_info; struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
boolean *again; boolean *again;
{ {
*again = false; *again = false;
@ -2726,8 +2726,8 @@ DESCRIPTION
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
bfd_generic_gc_sections (abfd, link_info) bfd_generic_gc_sections (abfd, link_info)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *link_info; struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
{ {
return true; return true;
} }

16
bfd/section.c

@ -1,5 +1,5 @@
/* Object file "section" support for the BFD library. /* Object file "section" support for the BFD library.
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -486,10 +486,14 @@ CODE_FRAGMENT
static const asymbol global_syms[] = static const asymbol global_syms[] =
{ {
/* the_bfd, name, value, attr, section [, udata] */ /* the_bfd, name, value, attr, section [, udata] */
{0, BFD_COM_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_com_section}, {0, BFD_COM_SECTION_NAME, 0, BSF_SECTION_SYM,
{0, BFD_UND_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_und_section}, (asection *) &bfd_com_section, { 0 }},
{0, BFD_ABS_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_abs_section}, {0, BFD_UND_SECTION_NAME, 0, BSF_SECTION_SYM,
{0, BFD_IND_SECTION_NAME, 0, BSF_SECTION_SYM, (asection *) &bfd_ind_section}, (asection *) &bfd_und_section, { 0 }},
{0, BFD_ABS_SECTION_NAME, 0, BSF_SECTION_SYM,
(asection *) &bfd_abs_section, { 0 }},
{0, BFD_IND_SECTION_NAME, 0, BSF_SECTION_SYM,
(asection *) &bfd_ind_section, { 0 }},
}; };
#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ #define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
@ -737,7 +741,7 @@ DESCRIPTION
/*ARGSUSED*/ /*ARGSUSED*/
boolean boolean
bfd_set_section_flags (abfd, section, flags) bfd_set_section_flags (abfd, section, flags)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr section; sec_ptr section;
flagword flags; flagword flags;
{ {

8
bfd/srec.c

@ -1139,8 +1139,8 @@ symbolsrec_write_object_contents (abfd)
/*ARGSUSED*/ /*ARGSUSED*/
static int static int
srec_sizeof_headers (abfd, exec) srec_sizeof_headers (abfd, exec)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
boolean exec; boolean exec ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
@ -1209,7 +1209,7 @@ srec_get_symtab (abfd, alocation)
/*ARGSUSED*/ /*ARGSUSED*/
static void static void
srec_get_symbol_info (ignore_abfd, symbol, ret) srec_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
symbol_info *ret; symbol_info *ret;
{ {
@ -1219,7 +1219,7 @@ srec_get_symbol_info (ignore_abfd, symbol, ret)
/*ARGSUSED*/ /*ARGSUSED*/
static void static void
srec_print_symbol (ignore_abfd, afile, symbol, how) srec_print_symbol (ignore_abfd, afile, symbol, how)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile; PTR afile;
asymbol *symbol; asymbol *symbol;
bfd_print_symbol_type how; bfd_print_symbol_type how;

6
bfd/stabs.c

@ -1,5 +1,5 @@
/* Stabs in sections linking support. /* Stabs in sections linking support.
Copyright 1996, 1997, 1998 Free Software Foundation, Inc. Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support. Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library. This file is part of BFD, the Binary File Descriptor library.
@ -619,8 +619,8 @@ _bfd_write_stab_strings (output_bfd, psinfo)
bfd_vma bfd_vma
_bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset) _bfd_stab_section_offset (output_bfd, psinfo, stabsec, psecinfo, offset)
bfd *output_bfd; bfd *output_bfd ATTRIBUTE_UNUSED;
PTR *psinfo; PTR *psinfo ATTRIBUTE_UNUSED;
asection *stabsec; asection *stabsec;
PTR *psecinfo; PTR *psecinfo;
bfd_vma offset; bfd_vma offset;

46
bfd/syms.c

@ -1,5 +1,5 @@
/* Generic symbol-table support for the BFD library. /* Generic symbol-table support for the BFD library.
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -698,10 +698,10 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
/*ARGSUSED*/ /*ARGSUSED*/
asymbol * asymbol *
_bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym) _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
boolean dynamic; boolean dynamic ATTRIBUTE_UNUSED;
const PTR minisym; const PTR minisym;
asymbol *sym; asymbol *sym ATTRIBUTE_UNUSED;
{ {
return *(asymbol **) minisym; return *(asymbol **) minisym;
} }
@ -796,7 +796,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{ {
struct stab_find_info *info; struct stab_find_info *info;
bfd_size_type stabsize, strsize; bfd_size_type stabsize, strsize;
bfd_byte *stab, *str, *last_stab; bfd_byte *stab, *str;
bfd_byte *last_stab = NULL;
bfd_size_type stroff; bfd_size_type stroff;
struct indexentry *indexentry; struct indexentry *indexentry;
char *directory_name, *file_name; char *directory_name, *file_name;
@ -1032,23 +1033,24 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
file_name = NULL; file_name = NULL;
saw_fun = 1; saw_fun = 1;
} }
else { else
last_stab = stab; {
if (stab + STABSIZE >= info->stabs + stabsize last_stab = stab;
|| *(stab + STABSIZE + TYPEOFF) != N_SO) if (stab + STABSIZE >= info->stabs + stabsize
{ || *(stab + STABSIZE + TYPEOFF) != N_SO)
directory_name = NULL; {
} directory_name = NULL;
else }
{ else
/* Two consecutive N_SOs are a directory and a file {
name. */ /* Two consecutive N_SOs are a directory and a
stab += STABSIZE; file name. */
directory_name = file_name; stab += STABSIZE;
file_name = ((char *) str directory_name = file_name;
+ bfd_get_32 (abfd, stab + STRDXOFF)); file_name = ((char *) str
} + bfd_get_32 (abfd, stab + STRDXOFF));
} }
}
break; break;
case N_SOL: case N_SOL:

13
bfd/tekhex.c

@ -1,5 +1,6 @@
/* BFD backend for Extended Tektronix Hex Format objects. /* BFD backend for Extended Tektronix Hex Format objects.
Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>. 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.
@ -599,7 +600,7 @@ move_section_contents (abfd, section, locationp, offset, count, get)
bfd *abfd; bfd *abfd;
asection *section; asection *section;
PTR locationp; PTR locationp;
file_ptr offset; file_ptr offset ATTRIBUTE_UNUSED;
bfd_size_type count; bfd_size_type count;
boolean get; boolean get;
{ {
@ -928,8 +929,8 @@ tekhex_write_object_contents (abfd)
static int static int
tekhex_sizeof_headers (abfd, exec) tekhex_sizeof_headers (abfd, exec)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
boolean exec; boolean exec ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
@ -951,7 +952,7 @@ tekhex_make_empty_symbol (abfd)
static void static void
tekhex_get_symbol_info (ignore_abfd, symbol, ret) tekhex_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol; asymbol *symbol;
symbol_info *ret; symbol_info *ret;
{ {
@ -960,7 +961,7 @@ tekhex_get_symbol_info (ignore_abfd, symbol, ret)
static void static void
tekhex_print_symbol (ignore_abfd, filep, symbol, how) tekhex_print_symbol (ignore_abfd, filep, symbol, how)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR filep; PTR filep;
asymbol *symbol; asymbol *symbol;
bfd_print_symbol_type how; bfd_print_symbol_type how;

21
bfd/trad-core.c

@ -1,5 +1,5 @@
/* BFD back end for traditional Unix core files (U-area and raw sections) /* BFD back end for traditional Unix core files (U-area and raw sections)
Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 1998 Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 1999
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by John Gilmore of Cygnus Support. Written by John Gilmore of Cygnus Support.
@ -105,22 +105,24 @@ trad_unix_core_file_p (abfd)
bfd_set_error (bfd_error_system_call); bfd_set_error (bfd_error_system_call);
return 0; return 0;
} }
if (NBPG * (UPAGES + u.u_dsize if ((unsigned long) (NBPG * (UPAGES + u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- u.u_tsize - u.u_tsize
#endif #endif
+ u.u_ssize) > statbuf.st_size) + u.u_ssize))
> (unsigned long) statbuf.st_size)
{ {
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
return 0; return 0;
} }
#ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE #ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE
if (NBPG * (UPAGES + u.u_dsize + u.u_ssize) if ((unsigned long) (NBPG * (UPAGES + u.u_dsize + u.u_ssize)
#ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED #ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED
/* Some systems write the file too big. */ /* Some systems write the file too big. */
+ TRAD_CORE_EXTRA_SIZE_ALLOWED + TRAD_CORE_EXTRA_SIZE_ALLOWED
#endif #endif
< statbuf.st_size) )
< (unsigned long) statbuf.st_size)
{ {
/* The file is too big. Maybe it's not a core file /* The file is too big. Maybe it's not a core file
or we otherwise have bad values for u_dsize and u_ssize). */ or we otherwise have bad values for u_dsize and u_ssize). */
@ -239,7 +241,7 @@ trad_unix_core_file_failing_command (abfd)
/* ARGSUSED */ /* ARGSUSED */
int int
trad_unix_core_file_failing_signal (ignore_abfd) trad_unix_core_file_failing_signal (ignore_abfd)
bfd *ignore_abfd; bfd *ignore_abfd ATTRIBUTE_UNUSED;
{ {
#ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL #ifdef TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd); return TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(ignore_abfd);
@ -251,7 +253,8 @@ trad_unix_core_file_failing_signal (ignore_abfd)
/* ARGSUSED */ /* ARGSUSED */
boolean boolean
trad_unix_core_file_matches_executable_p (core_bfd, exec_bfd) trad_unix_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd, *exec_bfd; bfd *core_bfd ATTRIBUTE_UNUSED;
bfd *exec_bfd ATTRIBUTE_UNUSED;
{ {
return true; /* FIXME, We have no way of telling at this point */ return true; /* FIXME, We have no way of telling at this point */
} }

Loading…
Cancel
Save