diff options
author | Alan Modra <amodra@gmail.com> | 2014-12-22 10:45:13 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-12-23 23:36:50 +1030 |
commit | 18d6a79d3527acd718cc8acd9395d1bf4cc4ce0a (patch) | |
tree | 3d5d9f25649d4f778e08723f808a3783e0e2b7a7 /ld/ldmain.c | |
parent | 175a3e5098a30af882cfe28d3351b6d882a1456b (diff) | |
download | gdb-18d6a79d3527acd718cc8acd9395d1bf4cc4ce0a.zip gdb-18d6a79d3527acd718cc8acd9395d1bf4cc4ce0a.tar.gz gdb-18d6a79d3527acd718cc8acd9395d1bf4cc4ce0a.tar.bz2 |
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.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index bc24957..818d108 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -297,6 +297,7 @@ main (int argc, char **argv) config.maxpagesize = bfd_emul_get_maxpagesize (default_target); config.commonpagesize = bfd_emul_get_commonpagesize (default_target); lang_init (); + ldexp_init (); ldemul_before_parse (); lang_has_input_file = FALSE; parse_args (argc, argv); @@ -440,6 +441,7 @@ main (int argc, char **argv) fprintf (stderr, "lookup = %p val %lx\n", h, h ? h->u.def.value : 1); } #endif + ldexp_finish (); lang_finish (); /* Even if we're producing relocatable output, some non-fatal errors should |