summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-10-22 06:58:17 +0000
committerJakub Jelinek <jakub@redhat.com>2003-10-22 06:58:17 +0000
commit851a6b45f7d4b0ae3d7502ff1a0108c9b2baead0 (patch)
treee0f2f8903a663dcb60c3027748bdc5362afa58fc /include
parent39b016b2e43ae9c6ffe2d578b9c6921d361c500f (diff)
downloadgdb-851a6b45f7d4b0ae3d7502ff1a0108c9b2baead0.tar.gz
bfd/
* elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals field changes. (_bfd_elf_link_assign_sym_version): Likewise. * elflink.h (size_dynamic_sections): Likewise. include/ * bfdlink.h (struct bfd_elf_version_expr): Remove match field. Add wildcard and mask fields. (BFD_ELF_VERSION_C_TYPE): Define. (BFD_ELF_VERSION_CXX_TYPE): Likewise. (BFD_ELF_VERSION_JAVA_TYPE): Likewise. (struct bfd_elf_version_expr_head): New. (struct bfd_elf_version_tree): Add match field. Change type of globals and locals fields to struct bfd_elf_version_expr_head. ld/ * ldlang.c: Include hashtab.h. (lang_vers_match_lang_c, lang_vers_match_lang_cplusplus, lang_vers_match_lang_java): Remove. (lang_vers_match): New function. (lang_new_vers_pattern): Initialize wildcard and mask fields, don't initialize match. (lang_new_vers_node): Use xcalloc. Adjust for globals and locals field type changes. Set match field. (version_expr_head_hash, version_expr_head_eq): New functions. (lang_finalize_version_expr_head): New function. (lang_register_vers_node): Call lang_finalize_version_expr_head. Search in hash table if not wildcard when looking for duplicates. * emultempl/ppc64elf.em (new_vers_pattern): Don't bother with duplicate checking. Initialize all fields of dot_entry from entry with the exception of pattern and next.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog12
-rw-r--r--include/bfdlink.h37
2 files changed, 41 insertions, 8 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 34f66f05631..d1e9a1df72b 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,15 @@
+2003-10-22 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_elf_version_expr): Remove match field.
+ Add wildcard and mask fields.
+ (BFD_ELF_VERSION_C_TYPE): Define.
+ (BFD_ELF_VERSION_CXX_TYPE): Likewise.
+ (BFD_ELF_VERSION_JAVA_TYPE): Likewise.
+ (struct bfd_elf_version_expr_head): New.
+ (struct bfd_elf_version_tree): Add match field.
+ Change type of globals and locals fields
+ to struct bfd_elf_version_expr_head.
+
2003-10-14 Bob Wilson <bob.wilson@acm.org>
* elf/xtensa.h: Formatting. Fix comments about property section
diff --git a/include/bfdlink.h b/include/bfdlink.h
index c174dcdc698..fd77c294442 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -617,20 +617,37 @@ extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
BFD, but it would be a pain. Instead, the regular linker sets up
these structures, and then passes them into BFD. */
-/* Regular expressions for a version. */
+/* Glob pattern for a version. */
struct bfd_elf_version_expr
{
- /* Next regular expression for this version. */
+ /* Next glob pattern for this version. */
struct bfd_elf_version_expr *next;
- /* Regular expression. */
+ /* Glob pattern. */
const char *pattern;
- /* Matching function. */
- int (*match) (struct bfd_elf_version_expr *, const char *);
/* Defined by ".symver". */
- unsigned int symver: 1;
+ unsigned int symver : 1;
/* Defined by version script. */
unsigned int script : 1;
+ /* Is this a wildcard?. */
+ unsigned int wildcard : 1;
+ /* Pattern type. */
+#define BFD_ELF_VERSION_C_TYPE 1
+#define BFD_ELF_VERSION_CXX_TYPE 2
+#define BFD_ELF_VERSION_JAVA_TYPE 4
+ unsigned int mask : 3;
+};
+
+struct bfd_elf_version_expr_head
+{
+ /* List of all patterns, both wildcards and non-wildcards. */
+ struct bfd_elf_version_expr *list;
+ /* Hash table for non-wildcards. */
+ void *htab;
+ /* Remaining patterns. */
+ struct bfd_elf_version_expr *remaining;
+ /* What kind of pattern types are present in list (bitmask). */
+ unsigned int mask;
};
/* Version dependencies. */
@@ -654,15 +671,19 @@ struct bfd_elf_version_tree
/* Version number. */
unsigned int vernum;
/* Regular expressions for global symbols in this version. */
- struct bfd_elf_version_expr *globals;
+ struct bfd_elf_version_expr_head globals;
/* Regular expressions for local symbols in this version. */
- struct bfd_elf_version_expr *locals;
+ struct bfd_elf_version_expr_head locals;
/* List of versions which this version depends upon. */
struct bfd_elf_version_deps *deps;
/* Index of the version name. This is used within BFD. */
unsigned int name_indx;
/* Whether this version tree was used. This is used within BFD. */
int used;
+ /* Matching hook. */
+ struct bfd_elf_version_expr *(*match)
+ (struct bfd_elf_version_expr_head *head,
+ struct bfd_elf_version_expr *prev, const char *sym);
};
#endif