From 279e75dcef1313cc67233e11c43ec6538cb8706f Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Thu, 28 Apr 2005 23:54:33 +0000 Subject: [PATCH] * ldgram.y (lang_memory_region_type): Make static. (ldgram_want_filename): Likewise. * ldemul.c (ld_emulation): Make static. * ldfile.h (ldfile_find_command_file): Remove extern. * ldfile.c (ldfile_find_command_file): Make static. * ldlang.h (unique_section_list): Remove extern declaration. * ldlang.c (unique_section_list): Make static. * mri.h (symbol_truncate): Remove extern declaration. * mri.c (symbol_truncate): Make static. (order, only_load, address, alias): Likewise. (alignment, subalignment): Likewise. --- ld/ChangeLog | 14 ++++++++++++++ ld/ldemul.c | 2 +- ld/ldfile.c | 8 ++++---- ld/ldfile.h | 2 -- ld/ldgram.y | 5 ++--- ld/ldlang.c | 2 +- ld/ldlang.h | 2 -- ld/mri.c | 16 ++++++++-------- ld/mri.h | 2 -- 9 files changed, 30 insertions(+), 23 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index cd6e7ce17e..80536ca603 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,17 @@ +2005-04-29 Ben Elliston + + * ldgram.y (lang_memory_region_type): Make static. + (ldgram_want_filename): Likewise. + * ldemul.c (ld_emulation): Make static. + * ldfile.h (ldfile_find_command_file): Remove extern. + * ldfile.c (ldfile_find_command_file): Make static. + * ldlang.h (unique_section_list): Remove extern declaration. + * ldlang.c (unique_section_list): Make static. + * mri.h (symbol_truncate): Remove extern declaration. + * mri.c (symbol_truncate): Make static. + (order, only_load, address, alias): Likewise. + (alignment, subalignment): Likewise. + 2005-04-27 H.J. Lu * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): diff --git a/ld/ldemul.c b/ld/ldemul.c index 45869d8770..abd48fecd8 100644 --- a/ld/ldemul.c +++ b/ld/ldemul.c @@ -34,7 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ldmain.h" #include "ldemul-list.h" -ld_emulation_xfer_type *ld_emulation; +static ld_emulation_xfer_type *ld_emulation; void ldemul_hll (char *name) diff --git a/ld/ldfile.c b/ld/ldfile.c index 372f79e098..13021d81e5 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -45,12 +45,12 @@ enum bfd_architecture ldfile_output_architecture; search_dirs_type * search_head; #ifdef VMS -char * slash = ""; +static char * slash = ""; #else #if defined (_WIN32) && ! defined (__CYGWIN32__) -char * slash = "\\"; +static char * slash = "\\"; #else -char * slash = "/"; +static char * slash = "/"; #endif #endif @@ -462,7 +462,7 @@ try_open (const char *name, const char *exten) /* Try to open NAME; if that fails, look for it in any directories specified with -L, without and with EXTEND appended. */ -FILE * +static FILE * ldfile_find_command_file (const char *name, const char *extend) { search_dirs_type *search; diff --git a/ld/ldfile.h b/ld/ldfile.h index 6d5f09d118..228b267fdc 100644 --- a/ld/ldfile.h +++ b/ld/ldfile.h @@ -54,8 +54,6 @@ extern void ldfile_open_file (struct lang_input_statement_struct *); extern bfd_boolean ldfile_try_open_bfd (const char *, struct lang_input_statement_struct *); -extern FILE *ldfile_find_command_file - (const char *name, const char *extend); extern void ldfile_set_output_arch (const char *, enum bfd_architecture); extern bfd_boolean ldfile_open_file_search diff --git a/ld/ldgram.y b/ld/ldgram.y index 23151d8f6b..fefd7bc134 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -46,10 +46,9 @@ #endif static enum section_type sectype; +static lang_memory_region_type *region; -lang_memory_region_type *region; - -bfd_boolean ldgram_want_filename = TRUE; +static bfd_boolean ldgram_want_filename = TRUE; FILE *saved_script_handle = NULL; bfd_boolean force_make_executable = FALSE; diff --git a/ld/ldlang.c b/ld/ldlang.c index 3e7a78cd0a..2568feda9d 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -97,7 +97,7 @@ bfd_boolean had_output_filename = FALSE; bfd_boolean lang_float_flag = FALSE; bfd_boolean delete_output_file_on_failure = FALSE; struct lang_nocrossrefs *nocrossref_list; -struct unique_sections *unique_section_list; +static struct unique_sections *unique_section_list; static bfd_boolean ldlang_sysrooted_script = FALSE; int lang_statement_iteration = 0; diff --git a/ld/ldlang.h b/ld/ldlang.h index 7b399e314c..2cf8259c45 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -432,8 +432,6 @@ struct orphan_save { lang_output_section_statement_type **os_tail; }; -extern struct unique_sections *unique_section_list; - extern lang_output_section_statement_type *abs_output_section; extern lang_statement_list_type lang_output_section_statement; extern bfd_boolean lang_has_input_file; diff --git a/ld/mri.c b/ld/mri.c index 65e1a2ec61..3b4e89b0aa 100644 --- a/ld/mri.c +++ b/ld/mri.c @@ -44,14 +44,14 @@ struct section_name_struct { int ok_to_load; }; -unsigned int symbol_truncate = 10000; -struct section_name_struct *order; -struct section_name_struct *only_load; -struct section_name_struct *address; -struct section_name_struct *alias; - -struct section_name_struct *alignment; -struct section_name_struct *subalignment; +static unsigned int symbol_truncate = 10000; +static struct section_name_struct *order; +static struct section_name_struct *only_load; +static struct section_name_struct *address; +static struct section_name_struct *alias; + +static struct section_name_struct *alignment; +static struct section_name_struct *subalignment; static struct section_name_struct ** lookup (const char *name, struct section_name_struct **list) diff --git a/ld/mri.h b/ld/mri.h index b430d20a05..02a48cd4db 100644 --- a/ld/mri.h +++ b/ld/mri.h @@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MRI_H #define MRI_H -extern unsigned int symbol_truncate; - extern void mri_output_section (const char *, etree_type *); extern void mri_only_load (const char *); extern void mri_base (etree_type *); -- 2.34.1