]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Move support code for linker script DEFINED to ldexp.c
authorAlan Modra <amodra@gmail.com>
Mon, 22 Dec 2014 00:15:13 +0000 (10:45 +1030)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 24 Aug 2017 12:46:40 +0000 (09:46 -0300)
commite9ec66bf93dadc08b7c66cc7353d22d2f178456c
tree1710c17cc5b192f1e1fecac31b768ee230b34116
parentee2042b79ce54284de08578cbb1a1454545e2723
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/ChangeLog
ld/ldexp.c
ld/ldexp.h
ld/ldlang.c
ld/ldlang.h
ld/ldmain.c