aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/ChangeLog24
-rw-r--r--ld/emultempl/hppaelf.em12
-rw-r--r--ld/emultempl/pe.em8
-rw-r--r--ld/emultempl/xtensaelf.em10
-rw-r--r--ld/ldexp.c11
-rw-r--r--ld/ldlang.c59
-rw-r--r--ld/ldlang.h3
-rw-r--r--ld/mri.c16
-rw-r--r--ld/pe-dll.c18
9 files changed, 30 insertions, 131 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index a04c2fb..92f10a8 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,27 @@
+2005-01-21 Ben Elliston <bje@au.ibm.com>
+
+ * ldlang.c (lang_reasonable_defaults): Remove.
+ (lang_process): Don't call lang_reasonable_defaults.
+
+ * ldexp.c (exp_assop): Remove #if 0'd code.
+ (exp_print_tree): Likewise.
+ * ldlang.c (lang_memory_region_lookup): Likewise.
+ (open_output): Likewise.
+ (lang_do_assignments_1): Likewise.
+ (lang_place_orphans): Likewise.
+ (lang_enter_output_section_statement): Likewise.
+ (lang_reasonable_defaults): Likewise.
+ * ldlang.h (struct lang_input_statement_struct): Likewise.
+ * mri.c (mri_draw_tree): Likewise.
+ (mri_load): Likewise.
+ * pe-dll.c (generate_reloc): Likewise.
+ (make_import_fixup_entry): Likewise.
+ (pe_as16): Likewise.
+ * emultempl/beos.em (set_pe_subsystem): Likewise.
+ * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
+ * emultempl/pe.em: Likewise.
+ * emultempl/xtensaelf.em (xtensa_colocate_literals): Likewise.
+
2005-01-20 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.am (ALL_EMULATIONS): Add earmelfb_linux_eabi.o.
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
index 89fdfd0..2b03fbe 100644
--- a/ld/emultempl/hppaelf.em
+++ b/ld/emultempl/hppaelf.em
@@ -52,12 +52,12 @@ hppaelf_after_parse (void)
{
if (link_info.relocatable)
lang_add_unique (".text");
-#if 0 /* Enable this once we split millicode stuff from libgcc. */
- else
- lang_add_input_file ("milli",
- lang_input_file_is_l_enum,
- NULL);
-#endif
+
+ /* Enable this once we split millicode stuff from libgcc:
+ lang_add_input_file ("milli",
+ lang_input_file_is_l_enum,
+ NULL);
+ */
}
/* This is called before the input files are opened. We create a new
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index ccbda5c..0b0242b 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1362,14 +1362,6 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
exp_assop ('=', "__image_base__", exp_intop (pe.ImageBase));
}
-#if 0
- /* Not sure if these *should* be set. */
- if (pe_def_file->version_major != -1)
- {
- pe.MajorImageVersion = pe_def_file->version_major;
- pe.MinorImageVersion = pe_def_file->version_minor;
- }
-#endif
if (pe_def_file->stack_reserve != -1
&& ! saw_option ("__size_of_stack_reserve__"))
{
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
index b29ec49..b796578 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
@@ -873,16 +873,6 @@ xtensa_colocate_literals (reloc_deps_graph *deps,
if (deps->count == 0)
return;
-#if 0
- ld_assign_relative_paged_dot (0x100000, statement, deps,
- xtensa_use_literal_pages);
-
- if (!ld_local_file_relocations_fit (statement, deps))
- fprintf (stderr, "initial relocation placement does not fit\n");
-
- lang_for_each_statement_worker (xtensa_ldlang_clear_addresses, statement);
-#endif
-
iter_stack_create (stack_p, statement);
while (!iter_stack_empty (stack_p))
diff --git a/ld/ldexp.c b/ld/ldexp.c
index f971ecf..8336f52 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -935,10 +935,6 @@ exp_assop (int code, const char *dst, etree_type *src)
value.assign.dst = dst;
value.assign.type.node_class = etree_assign;
-#if 0
- if (exp_fold_tree_no_dot (&value, &result))
- return exp_intop (result);
-#endif
new = stat_alloc (sizeof (new->assign));
memcpy (new, &value, sizeof (new->assign));
return new;
@@ -997,13 +993,6 @@ exp_print_tree (etree_type *tree)
minfo ("%s+0x%v", tree->rel.section->name, tree->rel.value);
return;
case etree_assign:
-#if 0
- if (tree->assign.dst->sdefs != NULL)
- fprintf (config.map_file, "%s (%x) ", tree->assign.dst->name,
- tree->assign.dst->sdefs->value);
- else
- fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name);
-#endif
fprintf (config.map_file, "%s", tree->assign.dst);
exp_print_token (tree->type.node_code, TRUE);
exp_print_tree (tree->assign.src);
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 322d234..b33ee15 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -553,20 +553,6 @@ lang_memory_region_lookup (const char *const name, bfd_boolean create)
return p;
}
-#if 0
- /* This code used to always use the first region in the list as the
- default region. I changed it to instead use a region
- encompassing all of memory as the default region. This permits
- NOLOAD sections to work reasonably without requiring a region.
- People should specify what region they mean, if they really want
- a region. */
- if (strcmp (name, DEFAULT_MEMORY_REGION) == 0)
- {
- if (lang_memory_region_list != NULL)
- return lang_memory_region_list;
- }
-#endif
-
if (!create && strcmp (name, DEFAULT_MEMORY_REGION))
einfo (_("%P:%S: warning: memory region %s not declared\n"), name);
@@ -2157,10 +2143,6 @@ open_output (const char *name)
delete_output_file_on_failure = TRUE;
-#if 0
- output->flags |= D_PAGED;
-#endif
-
if (! bfd_set_format (output, bfd_object))
einfo (_("%P%F:%s: can not make object file: %E\n"), name);
if (! bfd_set_arch_mach (output,
@@ -2308,31 +2290,6 @@ open_input_bfds (lang_statement_union_type *s, bfd_boolean force)
}
}
-/* If there are [COMMONS] statements, put a wild one into the bss
- section. */
-
-static void
-lang_reasonable_defaults (void)
-{
-#if 0
- lang_output_section_statement_lookup (".text");
- lang_output_section_statement_lookup (".data");
-
- default_common_section = lang_output_section_statement_lookup (".bss");
-
- if (!placed_commons)
- {
- lang_wild_statement_type *new =
- new_stat (lang_wild_statement,
- &default_common_section->children);
-
- new->section_name = "COMMON";
- new->filename = NULL;
- lang_list_init (&new->children);
- }
-#endif
-}
-
/* Add a symbol to a hash of symbols used in DEFINED (NAME) expressions. */
void
@@ -3987,9 +3944,6 @@ lang_do_assignments_1
case lang_object_symbols_statement_enum:
case lang_output_statement_enum:
case lang_target_statement_enum:
-#if 0
- case lang_common_statement_enum:
-#endif
break;
case lang_data_statement_enum:
{
@@ -4455,13 +4409,6 @@ lang_place_orphans (void)
{
if (default_common_section == NULL)
{
-#if 0
- /* This message happens when using the
- svr3.ifile linker script, so I have
- disabled it. */
- info_msg (_("%P: no [COMMON] command,"
- " defaulting to .bss\n"));
-#endif
default_common_section =
lang_output_section_statement_lookup (".bss");
@@ -4630,11 +4577,6 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
lang_output_section_statement_lookup_1 (output_section_statement_name,
constraint);
- /* Add this statement to tree. */
-#if 0
- add_statement (lang_output_section_statement_enum,
- output_section_statement);
-#endif
/* Make next things chain into subchain of this. */
if (os->addr_tree == NULL)
@@ -4779,7 +4721,6 @@ lang_gc_sections (void)
void
lang_process (void)
{
- lang_reasonable_defaults ();
current_target = default_target;
/* Open the output file. */
diff --git a/ld/ldlang.h b/ld/ldlang.h
index 0862191..b870882 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -279,9 +279,6 @@ typedef struct lang_input_statement_struct
bfd_boolean loaded;
-#if 0
- unsigned int globals_in_this_file;
-#endif
const char *target;
bfd_boolean real;
} lang_input_statement_type;
diff --git a/ld/mri.c b/ld/mri.c
index aa344f6..9ed4ca5 100644
--- a/ld/mri.c
+++ b/ld/mri.c
@@ -120,19 +120,6 @@ mri_draw_tree (void)
if (done_tree)
return;
-#if 0 /* We don't bother with memory regions. */
- /* Create the regions. */
- {
- lang_memory_region_type *r;
-
- r = lang_memory_region_lookup("long");
- r->current = r->origin = exp_get_vma (base, (bfd_vma)0, "origin",
- lang_first_phase_enum);
- r->length = (bfd_size_type) exp_get_vma (0, ~(bfd_vma) 0, "length",
- lang_first_phase_enum);
- }
-#endif
-
/* Now build the statements for the ldlang machine. */
/* Attach the addresses of any which have addresses,
@@ -255,9 +242,6 @@ mri_load (const char *name)
{
base = 0;
lang_add_input_file (name, lang_input_file_is_file_enum, NULL);
-#if 0
- lang_leave_output_section_statement (0, "*default*");
-#endif
}
void
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 46b0a13..47c1466 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1178,9 +1178,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
free (relocs);
/* Warning: the allocated symbols are remembered in BFD and
reused later, so don't free them! */
-#if 0
- free (symbol);
-#endif
}
}
@@ -2037,9 +2034,6 @@ make_import_fixup_entry (const char *name,
symtab = xmalloc (6 * sizeof (asymbol *));
id3 = quick_section (abfd, ".idata$3", SEC_HAS_CONTENTS, 2);
-#if 0
- quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
-#endif
quick_symbol (abfd, U ("_nm_thnk_"), name, "", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, "", fixup_name, "", UNDSEC, BSF_GLOBAL, 0);
@@ -2418,18 +2412,6 @@ pe_get32 (bfd *abfd, int where)
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
-#if 0 /* This is not currently used. */
-
-static unsigned int
-pe_as16 (void *ptr)
-{
- unsigned char *b = ptr;
-
- return b[0] + (b[1] << 8);
-}
-
-#endif
-
static unsigned int
pe_as32 (void *ptr)
{