/******************************************************* Function: ld_slookup_mext Return pointer to ?? struct. *******************************************************/ void * ld_slookup_mext(char *name, bfd_boolean is_extern) { bfd *abfd = p_current_bfd; struct elf_link_hash_entry *p_hash = NULL; if (!is_extern) p_hash = elf_link_hash_lookup ( elf_hash_table (&link_info), name, FALSE, FALSE, FALSE); else p_hash = ((struct elf_link_hash_entry *) bfd_wrapped_link_hash_lookup( abfd, &link_info, name, FALSE, FALSE, FALSE)); return p_hash; }
static bfd_boolean sh_symbian_import_as (struct bfd_link_info *info, bfd * abfd, char * current_name, char * new_name) { struct elf_link_hash_entry * new_hash; symbol_rename * node; if (SYMBIAN_DEBUG) fprintf (stderr, "IMPORT '%s' AS '%s'\n", current_name, new_name); for (node = rename_list; node; node = node->next) if (strcmp (node->current_name, current_name) == 0) { if (strcmp (node->new_name, new_name) == 0) /* Already added to rename list. */ return TRUE; bfd_set_error (bfd_error_invalid_operation); _bfd_error_handler (_("%B: IMPORT AS directive for %s conceals previous IMPORT AS"), abfd, current_name); return FALSE; } if ((node = bfd_malloc (sizeof * node)) == NULL) { if (SYMBIAN_DEBUG) fprintf (stderr, "IMPORT AS: No mem for new rename node\n"); return FALSE; } if ((node->current_name = bfd_malloc (strlen (current_name) + 1)) == NULL) { if (SYMBIAN_DEBUG) fprintf (stderr, "IMPORT AS: No mem for current name field in rename node\n"); free (node); return FALSE; } else strcpy (node->current_name, current_name); if ((node->new_name = bfd_malloc (strlen (new_name) + 1)) == NULL) { if (SYMBIAN_DEBUG) fprintf (stderr, "IMPORT AS: No mem for new name field in rename node\n"); free (node->current_name); free (node); return FALSE; } else strcpy (node->new_name, new_name); node->next = rename_list; node->current_hash = NULL; node->new_symndx = 0; rename_list = node; new_hash = elf_link_hash_lookup (elf_hash_table (info), node->new_name, TRUE, FALSE, TRUE); bfd_elf_link_record_dynamic_symbol (info, new_hash); if (new_hash->root.type == bfd_link_hash_new) new_hash->root.type = bfd_link_hash_undefined; return TRUE; }