This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Remove startup_file
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Sun, 9 Jan 2011 09:18:51 -0800
- Subject: PATCH: Remove startup_file
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We don't need startup_file since we can use first_file->filename.
Any objections to remove it?
Thanks.
H.J.
---
2011-01-09 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (startup_file): Removed.
(lang_startup): Updated.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 097c390..5251804 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -55,7 +55,6 @@ static struct obstack map_obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-static const char *startup_file;
static const char *entry_symbol_default = "start";
static bfd_boolean placed_commons = FALSE;
static bfd_boolean stripped_excluded_sections = FALSE;
@@ -6705,15 +6704,13 @@ lang_add_attribute (enum statement_enum attribute)
void
lang_startup (const char *name)
{
- if (startup_file != NULL)
+ if (first_file->filename != NULL)
{
einfo (_("%P%F: multiple STARTUP files\n"));
}
first_file->filename = name;
first_file->local_sym_name = name;
first_file->real = TRUE;
-
- startup_file = name;
}
void