Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/binutils/bfd/elflink.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 4,809 Lines • ▼ Show 20 Lines | _bfd_elf_archive_symbol_lookup (bfd *abfd, | ||||
p = strchr (name, ELF_VER_CHR); | p = strchr (name, ELF_VER_CHR); | ||||
if (p == NULL || p[1] != ELF_VER_CHR) | if (p == NULL || p[1] != ELF_VER_CHR) | ||||
return h; | return h; | ||||
/* First check with only one `@'. */ | /* First check with only one `@'. */ | ||||
len = strlen (name); | len = strlen (name); | ||||
copy = bfd_alloc (abfd, len); | copy = bfd_alloc (abfd, len); | ||||
if (copy == NULL) | if (copy == NULL) | ||||
return (struct elf_link_hash_entry *) 0 - 1; | return (struct elf_link_hash_entry *)(intptr_t)-1; | ||||
first = p - name + 1; | first = p - name + 1; | ||||
memcpy (copy, name, first); | memcpy (copy, name, first); | ||||
memcpy (copy + first, name + first + 1, len - first); | memcpy (copy + first, name + first + 1, len - first); | ||||
h = elf_link_hash_lookup (elf_hash_table (info), copy, FALSE, FALSE, FALSE); | h = elf_link_hash_lookup (elf_hash_table (info), copy, FALSE, FALSE, FALSE); | ||||
if (h == NULL) | if (h == NULL) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | if (defined[i] || included[i]) | ||||
continue; | continue; | ||||
if (symdef->file_offset == last) | if (symdef->file_offset == last) | ||||
{ | { | ||||
included[i] = TRUE; | included[i] = TRUE; | ||||
continue; | continue; | ||||
} | } | ||||
h = archive_symbol_lookup (abfd, info, symdef->name); | h = archive_symbol_lookup (abfd, info, symdef->name); | ||||
if (h == (struct elf_link_hash_entry *) 0 - 1) | if (h == (struct elf_link_hash_entry *)(intptr_t)-1) | ||||
goto error_return; | goto error_return; | ||||
if (h == NULL) | if (h == NULL) | ||||
continue; | continue; | ||||
if (h->root.type == bfd_link_hash_common) | if (h->root.type == bfd_link_hash_common) | ||||
{ | { | ||||
/* We currently have a common symbol. The archive map contains | /* We currently have a common symbol. The archive map contains | ||||
▲ Show 20 Lines • Show All 6,662 Lines • Show Last 20 Lines |