aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-07-11 20:09:04 +0000
committerIan Lance Taylor <ian@airs.com>1999-07-11 20:09:04 +0000
commit87f2a3464bc56880619910126816120eeafdb1e2 (patch)
tree5889dc929e03609fc7e2ef7e6aaf04da15336f43 /ld
parent8622e41b9ffd432fc916f0dd2fc8227f27eea3a9 (diff)
downloadgdb-87f2a3464bc56880619910126816120eeafdb1e2.zip
gdb-87f2a3464bc56880619910126816120eeafdb1e2.tar.gz
gdb-87f2a3464bc56880619910126816120eeafdb1e2.tar.bz2
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate. Fill in structure initializations.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emultempl/elf32.em8
-rw-r--r--ld/ldcref.c6
-rw-r--r--ld/ldemul.c7
-rw-r--r--ld/ldexp.c7
-rw-r--r--ld/ldlang.c14
-rw-r--r--ld/ldmain.c18
7 files changed, 39 insertions, 26 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 55b0e4f..ab15633 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
1999-07-10 Ian Lance Taylor <ian@zembu.com>
* ldfile.c: Revert patch of 1999-07-08.
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 41073d2..fb4d85a 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -7,7 +7,8 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
- Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -1145,5 +1146,10 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL,
gld${EMULATION_NAME}_open_dynamic_archive,
gld${EMULATION_NAME}_place_orphan
+ NULL, /* set_symbols */
+ NULL, /* parse_args */
+ NULL, /* unrecognized_file */
+ NULL, /* list_options */
+ NULL /* recognized_file */
};
EOF
diff --git a/ld/ldcref.c b/ld/ldcref.c
index 96e0d2d..c75b8e6 100644
--- a/ld/ldcref.c
+++ b/ld/ldcref.c
@@ -1,5 +1,5 @@
/* ldcref.c -- output a cross reference table
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -151,7 +151,7 @@ add_cref (name, abfd, section, value)
const char *name;
bfd *abfd;
asection *section;
- bfd_vma value;
+ bfd_vma value ATTRIBUTE_UNUSED;
{
struct cref_hash_entry *h;
struct cref_ref *r;
@@ -354,7 +354,7 @@ check_nocrossrefs ()
static boolean
check_nocrossref (h, ignore)
struct cref_hash_entry *h;
- PTR ignore;
+ PTR ignore ATTRIBUTE_UNUSED;
{
struct bfd_link_hash_entry *hl;
asection *defsec;
diff --git a/ld/ldemul.c b/ld/ldemul.c
index eab0432..85a2894 100644
--- a/ld/ldemul.c
+++ b/ld/ldemul.c
@@ -1,5 +1,6 @@
/* ldemul.c -- clearing house for ld emulation states
- Copyright (C) 1991, 92, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -218,7 +219,7 @@ set_output_arch_default()
/*ARGSUSED*/
void
syslib_default(ignore)
- char *ignore;
+ char *ignore ATTRIBUTE_UNUSED;
{
info_msg (_("%S SYSLIB ignored\n"));
}
@@ -226,7 +227,7 @@ syslib_default(ignore)
/*ARGSUSED*/
void
hll_default(ignore)
- char *ignore;
+ char *ignore ATTRIBUTE_UNUSED;
{
info_msg (_("%S HLL ignored\n"));
}
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 6c9d726..121ed88 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -1,6 +1,7 @@
/* This module handles expression trees.
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
-Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
+ Written by Steve Chamberlain of Cygnus Support (sac@cygnus.com).
This file is part of GLD, the Gnu Linker.
@@ -967,7 +968,7 @@ exp_get_value_int (tree,def,name, allocation_done)
bfd_vma
exp_get_abs_int (tree, def, name, allocation_done)
etree_type *tree;
- int def;
+ int def ATTRIBUTE_UNUSED;
char *name;
lang_phase_type allocation_done;
{
diff --git a/ld/ldlang.c b/ld/ldlang.c
index d290391..8e7ae9d 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -155,7 +155,7 @@ static void walk_wild_file
/* EXPORTS */
lang_output_section_statement_type *abs_output_section;
lang_statement_list_type *stat_ptr = &statement_list;
-lang_statement_list_type file_chain = { 0 };
+lang_statement_list_type file_chain = { NULL, NULL };
const char *entry_symbol = NULL;
boolean entry_from_cmdline;
boolean lang_has_input_file = false;
@@ -1430,7 +1430,7 @@ wild (s, section, file, target, output)
lang_wild_statement_type *s;
const char *section;
const char *file;
- const char *target;
+ const char *target ATTRIBUTE_UNUSED;
lang_output_section_statement_type *output;
{
walk_wild (s, section, file, output_section_callback, (void *) output);
@@ -2292,7 +2292,7 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
lang_output_section_statement_type * output_section_statement;
fill_type fill;
bfd_vma dot;
- boolean relax;
+ boolean relax ATTRIBUTE_UNUSED;
{
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
@@ -3023,10 +3023,10 @@ lang_finish ()
static void
#ifdef ANSI_PROTOTYPES
-ignore_bfd_errors (const char *s, ...)
+ignore_bfd_errors (const char *s ATTRIBUTE_UNUSED, ...)
#else
ignore_bfd_errors (s)
- const char *s;
+ const char *s ATTRIBUTE_UNUSED;
#endif
{
/* Don't do anything. */
@@ -3526,8 +3526,8 @@ static void
gc_section_callback (ptr, section, file, data)
lang_wild_statement_type *ptr;
asection *section;
- lang_input_statement_type *file;
- void *data;
+ lang_input_statement_type *file ATTRIBUTE_UNUSED;
+ void *data ATTRIBUTE_UNUSED;
{
/* If the wild pattern was marked KEEP, the member sections
should be as well. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 7eef3e5..734bc32 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -705,7 +705,7 @@ add_keepsyms_file (filename)
/*ARGSUSED*/
static boolean
add_archive_element (info, abfd, name)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
bfd *abfd;
const char *name;
{
@@ -820,7 +820,7 @@ add_archive_element (info, abfd, name)
/*ARGSUSED*/
static boolean
multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *obfd;
asection *osec;
@@ -857,7 +857,7 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
/*ARGSUSED*/
static boolean
multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *obfd;
enum bfd_link_hash_type otype;
@@ -924,7 +924,7 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
/*ARGSUSED*/
static boolean
add_to_set (info, h, reloc, abfd, section, value)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
struct bfd_link_hash_entry *h;
bfd_reloc_code_real_type reloc;
bfd *abfd;
@@ -1023,7 +1023,7 @@ struct warning_callback_info
/*ARGSUSED*/
static boolean
warning_callback (info, warning, symbol, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *warning;
const char *symbol;
bfd *abfd;
@@ -1145,7 +1145,7 @@ warning_find_reloc (abfd, sec, iarg)
/*ARGSUSED*/
static boolean
undefined_symbol (info, name, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *abfd;
asection *section;
@@ -1217,7 +1217,7 @@ undefined_symbol (info, name, abfd, section, address)
/*ARGSUSED*/
static boolean
reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
const char *reloc_name;
bfd_vma addend;
@@ -1241,7 +1241,7 @@ reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
/*ARGSUSED*/
static boolean
reloc_dangerous (info, message, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *message;
bfd *abfd;
asection *section;
@@ -1261,7 +1261,7 @@ reloc_dangerous (info, message, abfd, section, address)
/*ARGSUSED*/
static boolean
unattached_reloc (info, name, abfd, section, address)
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
const char *name;
bfd *abfd;
asection *section;