From 18d6a79d3527acd718cc8acd9395d1bf4cc4ce0a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 22 Dec 2014 10:45:13 +1030 Subject: Move support code for linker script DEFINED to ldexp.c This moves support code for DEFINED to ldexp.c where it is used, losing the lang_ prefix on identifiers. Two new functions are needed to initialize and clean up to hash table, but other than that there are no functional changes here. * ldexp.c (struct definedness_hash_entry, definedness_table) (definedness_newfunc, symbol_defined, update_definedness): Move and rename from.. * ldlang.h (struct lang_definedness_hash_entry): ..here,.. * ldlang.c (lang_definedness_table, lang_definedness_newfunc) (lang_symbol_defined, lang_update_definedness): ..and here. * ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from.. * ldlang.c (lang_init, lang_finish): ..here. * ldexp.h (ldexp_init, ldexp_finish): Declare. * ldlang.h (lang_symbol_defined, lang_update_definedness): Delete. * ldmain.c (main): Call ldexp_init and ldexp_finish. --- ld/ldlang.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'ld/ldlang.h') diff --git a/ld/ldlang.h b/ld/ldlang.h index 5f6faae..87409cf 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -470,17 +470,6 @@ struct unique_sections const char *name; }; -/* This structure records symbols for which we need to keep track of - definedness for use in the DEFINED () test. */ - -struct lang_definedness_hash_entry -{ - struct bfd_hash_entry root; - unsigned int by_object : 1; - unsigned int by_script : 1; - unsigned int iteration : 1; -}; - /* Used by place_orphan to keep track of orphan sections and statements. */ struct orphan_save @@ -683,10 +672,6 @@ extern void lang_add_unique (const char *); extern const char *lang_get_output_target (void); -extern struct lang_definedness_hash_entry *lang_symbol_defined (const char *); -extern void lang_update_definedness - (const char *, struct bfd_link_hash_entry *); - extern void add_excluded_libs (const char *); extern bfd_boolean load_symbols (lang_input_statement_type *, lang_statement_list_type *); -- cgit v1.1