(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-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.
{
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
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__"))
{
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))
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;
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);
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);
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,
}
}
-/* 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
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:
{
{
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");
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)
void
lang_process (void)
{
- lang_reasonable_defaults ();
current_target = default_target;
/* Open the output file. */
bfd_boolean loaded;
-#if 0
- unsigned int globals_in_this_file;
-#endif
const char *target;
bfd_boolean real;
} lang_input_statement_type;
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,
{
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
free (relocs);
/* Warning: the allocated symbols are remembered in BFD and
reused later, so don't free them! */
-#if 0
- free (symbol);
-#endif
}
}
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);
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)
{