aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-08-08 16:08:47 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-08-08 16:08:47 +0000
commite6f2cbf536d07211d8ff0d47c2f961a216f046f8 (patch)
tree25ae860b384d83bcd80e84f3966aefecaaea77ea /ld/ldlang.h
parent6798554723617c1f63f3359e89aa96df72f9daf3 (diff)
downloadgdb-e6f2cbf536d07211d8ff0d47c2f961a216f046f8.zip
gdb-e6f2cbf536d07211d8ff0d47c2f961a216f046f8.tar.gz
gdb-e6f2cbf536d07211d8ff0d47c2f961a216f046f8.tar.bz2
2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3006 * ldlang.c (lang_section_bst_type): Moved to ... * ldlang.h: Here. * ldlang.h (lang_wild_statement_struct): Add a tree field. * ldlang.c (wild_sort_fast): Use the tree field for BST. (wild): Likeise. (analyze_walk_wild_section_handler): Initialize the tree field.
Diffstat (limited to 'ld/ldlang.h')
-rw-r--r--ld/ldlang.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/ldlang.h b/ld/ldlang.h
index 91a4344..c23c3e5 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -305,6 +305,15 @@ typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
bfd *, const asection *);
+/* Binary search tree structure to efficiently sort sections by
+ name. */
+typedef struct lang_section_bst
+{
+ asection *section;
+ struct lang_section_bst *left;
+ struct lang_section_bst *right;
+} lang_section_bst_type;
+
struct lang_wild_statement_struct
{
lang_statement_header_type header;
@@ -316,6 +325,7 @@ struct lang_wild_statement_struct
walk_wild_section_handler_t walk_wild_section_handler;
struct wildcard_list *handler_data[4];
+ lang_section_bst_type *tree;
};
typedef struct lang_address_statement_struct