2000-09-29 Kazu Hirata <kazu@hxi.com>

* ldcref.c: Fix formatting.
	* ldctor.c: Likewise.
	* ldemul.c: Likewise.
	* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
This commit is contained in:
Kazu Hirata 2000-09-29 11:18:18 +00:00
parent ef6acf5b5f
commit 4de2d33d1b
7 changed files with 129 additions and 149 deletions

View file

@ -1,3 +1,12 @@
2000-09-29 Kazu Hirata <kazu@hxi.com>
* ldcref.c: Fix formatting.
* ldctor.c: Likewise.
* ldemul.c: Likewise.
* ldexp.c: Likewise.
* ldfile.c: Likewise.
* ldlang.c: Likewise.
2000-09-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
* pe-dll.c (process_def_file): Uninitialized data wasn't

View file

@ -145,7 +145,6 @@ cref_hash_newfunc (entry, table, string)
/* Add a symbol to the cref hash table. This is called for every
symbol that is seen during the link. */
/*ARGSUSED*/
void
add_cref (name, abfd, section, value)
const char *name;
@ -242,7 +241,7 @@ output_cref (fp)
len = strlen (msg);
while (len < FILECOL)
{
putc (' ' , fp);
putc (' ', fp);
++len;
}
fprintf (fp, _("File\n"));
@ -350,7 +349,6 @@ check_nocrossrefs ()
/* Check one symbol to see if it is a prohibited cross reference. */
/*ARGSUSED*/
static boolean
check_nocrossref (h, ignore)
struct cref_hash_entry *h;

View file

@ -1,5 +1,5 @@
/* ldctor.c -- constructor support routines
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 2000
Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
@ -86,7 +86,8 @@ ldctor_add_set_entry (h, reloc, name, section, value)
{
if (p->reloc != reloc)
{
einfo (_("%P%X: Different relocs used in set %s\n"), h->root.string);
einfo (_("%P%X: Different relocs used in set %s\n"),
h->root.string);
return;
}
@ -136,7 +137,7 @@ ctor_prio (name)
while (*name == '_')
++name;
if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
return -1;
name += sizeof "GLOBAL_" - 1;
@ -365,7 +366,7 @@ ldctor_build_sets ()
minfo ("%G\n", e->section->owner, e->section, e->value);
}
/* Need SEC_KEEP for --gc-sections */
/* Need SEC_KEEP for --gc-sections. */
if (! bfd_is_abs_section (e->section))
e->section->flags |= SEC_KEEP;

View file

@ -15,8 +15,9 @@ 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 GLD; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
along with GLD; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@ -33,29 +34,29 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307
ld_emulation_xfer_type *ld_emulation;
void
ldemul_hll(name)
ldemul_hll (name)
char *name;
{
ld_emulation->hll(name);
}
void ldemul_syslib(name)
char *name;
{
ld_emulation->syslib(name);
ld_emulation->hll (name);
}
void
ldemul_after_parse()
ldemul_syslib (name)
char *name;
{
ld_emulation->after_parse();
ld_emulation->syslib (name);
}
void
ldemul_before_parse()
ldemul_after_parse ()
{
ld_emulation->before_parse();
ld_emulation->after_parse ();
}
void
ldemul_before_parse ()
{
ld_emulation->before_parse ();
}
void
@ -65,51 +66,50 @@ ldemul_after_open ()
}
void
ldemul_after_allocation()
ldemul_after_allocation ()
{
ld_emulation->after_allocation();
ld_emulation->after_allocation ();
}
void
ldemul_before_allocation()
ldemul_before_allocation ()
{
if (ld_emulation->before_allocation)
ld_emulation->before_allocation();
ld_emulation->before_allocation ();
}
void
ldemul_set_output_arch()
ldemul_set_output_arch ()
{
ld_emulation->set_output_arch();
ld_emulation->set_output_arch ();
}
void
ldemul_finish()
ldemul_finish ()
{
if (ld_emulation->finish)
ld_emulation->finish();
ld_emulation->finish ();
}
void
ldemul_set_symbols()
ldemul_set_symbols ()
{
if (ld_emulation->set_symbols)
ld_emulation->set_symbols();
ld_emulation->set_symbols ();
}
void
ldemul_create_output_section_statements()
ldemul_create_output_section_statements ()
{
if (ld_emulation->create_output_section_statements)
ld_emulation->create_output_section_statements();
ld_emulation->create_output_section_statements ();
}
char *
ldemul_get_script(isfile)
ldemul_get_script (isfile)
int *isfile;
{
return ld_emulation->get_script(isfile);
return ld_emulation->get_script (isfile);
}
boolean
@ -138,7 +138,7 @@ ldemul_parse_args (argc, argv)
int argc;
char **argv;
{
/* Try and use the emulation parser if there is one. */
/* Try and use the emulation parser if there is one. */
if (ld_emulation->parse_args)
{
return ld_emulation->parse_args (argc, argv);
@ -169,24 +169,24 @@ ldemul_recognized_file (entry)
}
char *
ldemul_choose_target()
ldemul_choose_target ()
{
return ld_emulation->choose_target();
return ld_emulation->choose_target ();
}
/* The default choose_target function. */
char *
ldemul_default_target()
ldemul_default_target ()
{
char *from_outside = getenv (TARGET_ENVIRON);
if (from_outside != (char *)NULL)
if (from_outside != (char *) NULL)
return from_outside;
return ld_emulation->target_name;
}
void
after_parse_default()
after_parse_default ()
{
}
@ -197,37 +197,35 @@ after_open_default ()
}
void
after_allocation_default()
after_allocation_default ()
{
}
void
before_allocation_default()
before_allocation_default ()
{
}
void
set_output_arch_default()
set_output_arch_default ()
{
/* Set the output architecture and machine if possible */
bfd_set_arch_mach(output_bfd,
ldfile_output_architecture, ldfile_output_machine);
/* Set the output architecture and machine if possible. */
bfd_set_arch_mach (output_bfd,
ldfile_output_architecture, ldfile_output_machine);
}
/*ARGSUSED*/
void
syslib_default(ignore)
char *ignore ATTRIBUTE_UNUSED;
syslib_default (ignore)
char *ignore ATTRIBUTE_UNUSED;
{
info_msg (_("%S SYSLIB ignored\n"));
}
/*ARGSUSED*/
void
hll_default(ignore)
char *ignore ATTRIBUTE_UNUSED;
hll_default (ignore)
char *ignore ATTRIBUTE_UNUSED;
{
info_msg (_("%S HLL ignored\n"));
}
@ -235,25 +233,25 @@ hll_default(ignore)
ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST };
void
ldemul_choose_mode(target)
ldemul_choose_mode (target)
char *target;
{
ld_emulation_xfer_type **eptr = ld_emulations;
/* Ignore "gld" prefix. */
if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd')
target += 3;
for (; *eptr; eptr++)
{
if (strcmp(target, (*eptr)->emulation_name) == 0)
{
ld_emulation = *eptr;
return;
}
}
einfo (_("%P: unrecognised emulation mode: %s\n"), target);
einfo (_("Supported emulations: "));
ldemul_list_emulations (stderr);
einfo ("%F\n");
ld_emulation_xfer_type **eptr = ld_emulations;
/* Ignore "gld" prefix. */
if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd')
target += 3;
for (; *eptr; eptr++)
{
if (strcmp (target, (*eptr)->emulation_name) == 0)
{
ld_emulation = *eptr;
return;
}
}
einfo (_("%P: unrecognised emulation mode: %s\n"), target);
einfo (_("Supported emulations: "));
ldemul_list_emulations (stderr);
einfo ("%F\n");
}
void
@ -275,14 +273,14 @@ ldemul_list_emulations (f)
void
ldemul_list_emulation_options (f)
FILE * f;
FILE *f;
{
ld_emulation_xfer_type ** eptr;
ld_emulation_xfer_type **eptr;
int options_found = 0;
for (eptr = ld_emulations; * eptr; eptr ++)
for (eptr = ld_emulations; *eptr; eptr++)
{
ld_emulation_xfer_type * emul = * eptr;
ld_emulation_xfer_type *emul = *eptr;
if (emul->list_options)
{
@ -300,8 +298,8 @@ ldemul_list_emulation_options (f)
int
ldemul_find_potential_libraries (name, entry)
char * name;
lang_input_statement_type * entry;
char *name;
lang_input_statement_type *entry;
{
if (ld_emulation->find_potential_libraries)
return ld_emulation->find_potential_libraries (name, entry);

View file

@ -29,7 +29,6 @@ contains a value, a section to which it is relative and a valid bit.
*/
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
@ -744,7 +743,6 @@ exp_trinop (code, cond, lhs, rhs)
return new;
}
etree_type *
exp_unop (code, child)
int code;
@ -766,7 +764,6 @@ exp_unop (code, child)
return new;
}
etree_type *
exp_nameop (code, name)
int code;
@ -778,7 +775,6 @@ exp_nameop (code, name)
value.name.name = name;
value.name.type.node_class = etree_name;
r = exp_fold_tree_no_dot(&value,
(lang_output_section_statement_type *)NULL,
lang_first_phase_enum);
@ -791,9 +787,6 @@ exp_nameop (code, name)
}
etree_type *
exp_assop (code, dst, src)
int code;
@ -804,7 +797,6 @@ exp_assop (code, dst, src)
value.assign.type.node_code = code;
value.assign.src = src;
value.assign.dst = dst;
value.assign.type.node_class = etree_assign;
@ -965,7 +957,6 @@ exp_get_value_int (tree,def,name, allocation_done)
return (int)exp_get_vma(tree,(bfd_vma)def,name, allocation_done);
}
bfd_vma
exp_get_abs_int (tree, def, name, allocation_done)
etree_type *tree;

View file

@ -364,7 +364,6 @@ gnu960_map_archname (name)
};
struct tabentry *tp;
for (tp = arch_tab; tp->cmd_switch != NULL; tp++)
{
if (! strcmp (name,tp->cmd_switch))
@ -384,7 +383,6 @@ ldfile_add_arch (name)
search_arch_type *new =
(search_arch_type *)xmalloc ((bfd_size_type)(sizeof (search_arch_type)));
if (*name != '\0')
{
if (ldfile_output_machine_name[0] != '\0')
@ -404,7 +402,6 @@ ldfile_add_arch (name)
#else /* not GNU960 */
void
ldfile_add_arch (in_name)
CONST char * in_name;

View file

@ -45,7 +45,6 @@ static lang_statement_union_type *new_statement PARAMS ((enum statement_enum,
size_t,
lang_statement_list_type*));
/* LOCALS */
static struct obstack stat_obstack;
@ -192,7 +191,6 @@ struct lang_nocrossrefs *nocrossref_list;
etree_type *base; /* Relocation base - or null */
#if defined(__STDC__) || defined(ALMOST_STDC)
#define cat(a,b) a##b
#else
@ -226,7 +224,7 @@ walk_wild_section (ptr, section, file, callback, data)
callback_t callback;
PTR data;
{
/* Don't process sections from files which were excluded. */
/* Don't process sections from files which were excluded. */
if (ptr->exclude_filename_list != NULL)
{
struct name_list *list_tmp;
@ -637,7 +635,6 @@ lang_memory_region_lookup (name)
}
}
static lang_memory_region_type *
lang_memory_default (section)
asection *section;
@ -913,7 +910,6 @@ struct already_linked
static struct bfd_hash_table already_linked_table;
/*ARGSUSED*/
static void
section_already_linked (abfd, sec, data)
bfd *abfd;
@ -1214,7 +1210,7 @@ wild_doit (ptr, section, output, file)
if (section->flags & SEC_BLOCK)
{
section->output_section->flags |= SEC_BLOCK;
/* FIXME: This value should really be obtained from the bfd... */
/* FIXME: This value should really be obtained from the bfd... */
output->block_value = 128;
}
}
@ -1524,8 +1520,6 @@ load_symbols (entry, place)
entry->loaded = true;
}
/* Handle a wild statement. SECTION or FILE or both may be NULL,
indicating that it is a wildcard. Separate lang_input_section
statements are created for each part of the expansion; they are
@ -1672,7 +1666,7 @@ closest_target_match (target, data)
}
/* Oh dear, we now have two potential candidates for a successful match.
Compare their names and choose the better one. */
Compare their names and choose the better one. */
if (name_compare (target->name, original->name) > name_compare (winner->name, original->name))
winner = target;
@ -1930,7 +1924,6 @@ lang_reasonable_defaults ()
default_common_section =
lang_output_section_statement_lookup (".bss");
if (placed_commons == false)
{
lang_wild_statement_type *new =
@ -2010,7 +2003,6 @@ map_input_to_output_sections (s, target, output_section_statement)
switch (s->header.type)
{
case lang_wild_statement_enum:
wild (&s->wild_statement, s->wild_statement.section_name,
s->wild_statement.filename, target,
@ -2607,7 +2599,6 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
new->padding_statement.size = alignment_needed * opb;
}
/* Remember the most restrictive alignment */
if (power > output_section_statement->alignment_power)
{
@ -3179,7 +3170,7 @@ lang_do_assignments (s, output_section_statement, fill, dot)
if (os->load_base)
{
/* If nothing has been placed into the output section then
it won't have a bfd_section. */
it won't have a bfd_section. */
if (os->bfd_section)
{
os->bfd_section->lma
@ -3678,7 +3669,6 @@ lang_place_orphans ()
}
}
void
lang_set_flags (ptr, flags, invert)
lang_memory_region_type *ptr;
@ -3821,7 +3811,6 @@ lang_add_output (name, from_script)
}
}
static lang_output_section_statement_type *current_section;
static int
@ -3862,8 +3851,6 @@ lang_enter_output_section_statement (output_section_statement_name,
os =
lang_output_section_statement_lookup (output_section_statement_name);
/* Add this statement to tree */
/* add_statement(lang_output_section_statement_enum,
output_section_statement);*/
@ -4067,7 +4054,6 @@ lang_process ()
map_input_to_output_sections (statement_list.head, (char *) NULL,
(lang_output_section_statement_type *) NULL);
/* Find any sections not attached explicitly and handle them */
lang_place_orphans ();