summaryrefslogtreecommitdiff
path: root/ld/ldlang.h
diff options
context:
space:
mode:
authorDave Korn <dave.korn@artimi.com>2011-03-10 10:25:02 +0000
committerDave Korn <dave.korn@artimi.com>2011-03-10 10:25:02 +0000
commit73bf2d19b9d0ed88f5b424ec2a605d98c2e7b08c (patch)
tree677ab0ba78ef44ea080d180b5cf42e898a8a4f61 /ld/ldlang.h
parenta13be087f47368832095a9cd36a2cdb5dcf9b61b (diff)
downloadbinutils-redhat-73bf2d19b9d0ed88f5b424ec2a605d98c2e7b08c.tar.gz
[PATCH] Revise linker plugin API to better preserve link order.
ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * ldlang.h (lang_input_statement_type): Add new 'claim_archive' flag, wrapping both it and 'claim' flag in #ifdef ENABLE_PLUGINS. * ldmain.c (add_archive_element): Set it if the member is claimed. * ldlang.c (new_afile): Initialise claim_archive and claimed members. (find_replacements_insert_point): New helper function. (lang_process): After adding and opening replacement files passed from plugin, splice them into correct place in statement list and file chains to preserve critical link order. (lang_list_insert_after): New helper function. (lang_list_remove_tail): Likewise.
Diffstat (limited to 'ld/ldlang.h')
-rw-r--r--ld/ldlang.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldlang.h b/ld/ldlang.h
index 8aff0b3f2b..db47af8964 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -287,9 +287,14 @@ typedef struct lang_input_statement_struct
/* Set if the file does not exist. */
unsigned int missing_file : 1;
+#ifdef ENABLE_PLUGINS
/* Set if the file was claimed by a plugin. */
unsigned int claimed : 1;
+ /* Set if the file was claimed from an archive. */
+ unsigned int claim_archive : 1;
+#endif /* ENABLE_PLUGINS */
+
} lang_input_statement_type;
typedef struct