summaryrefslogtreecommitdiffstats
path: root/ld/emultempl/ppc64elf.em
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
commit108ba30509ad6169d0f2e06b755fa39a2c28a946 (patch)
treef08f61aaf06d9e7ba1789b24f137c266bb6fc80e /ld/emultempl/ppc64elf.em
parenta9b7fca23b894846cfca99db5bb1c9d06ea75a89 (diff)
downloadppe42-binutils-108ba30509ad6169d0f2e06b755fa39a2c28a946.tar.gz
ppe42-binutils-108ba30509ad6169d0f2e06b755fa39a2c28a946.zip
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 'ld/emultempl/ppc64elf.em')
-rw-r--r--ld/emultempl/ppc64elf.em33
1 files changed, 2 insertions, 31 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index b1b3f9ef07..1ed49e580b 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -405,46 +405,17 @@ gld${EMULATION_NAME}_new_vers_pattern (struct bfd_elf_version_expr *entry)
unsigned int len;
char *dot_pat;
- if (!dotsyms || entry->pattern[0] == '*')
+ if (!dotsyms || entry->pattern[0] == '*' || entry->pattern[0] == '.')
return entry;
- /* Is the script adding ".foo" explicitly? */
- if (entry->pattern[0] == '.')
- {
- /* We may have added this pattern automatically. Don't add it
- again. Quadratic behaviour here is acceptable as the list
- may be traversed for each input bfd symbol. */
- for (next = entry->next; next != NULL; next = next->next)
- {
- if (strcmp (next->pattern, entry->pattern) == 0
- && next->match == entry->match)
- {
- next = entry->next;
- free ((char *) entry->pattern);
- free (entry);
- return next;
- }
- }
- return entry;
- }
-
- /* Don't add ".foo" if the script has already done so. */
- for (next = entry->next; next != NULL; next = next->next)
- {
- if (next->pattern[0] == '.'
- && strcmp (next->pattern + 1, entry->pattern) == 0
- && next->match == entry->match)
- return entry;
- }
-
dot_entry = xmalloc (sizeof *dot_entry);
+ *dot_entry = *entry;
dot_entry->next = entry;
len = strlen (entry->pattern) + 2;
dot_pat = xmalloc (len);
dot_pat[0] = '.';
memcpy (dot_pat + 1, entry->pattern, len - 1);
dot_entry->pattern = dot_pat;
- dot_entry->match = entry->match;
return dot_entry;
}
OpenPOWER on IntegriCloud