Optimize for add_archive_element.
bfd/ 2010-12-12 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_link_add_archive_symbols): Remove subsbfd. ld/ 2010-12-12 H.J. Lu <hongjiu.lu@intel.com> * ldlang.c (load_symbols): Optimize for add_archive_element.
This commit is contained in:
parent
68efed4197
commit
db0ca79ff4
4 changed files with 12 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2010-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elflink.c (elf_link_add_archive_symbols): Remove subsbfd.
|
||||||
|
|
||||||
2010-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
2010-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elf.c (special_sections_g): Add ".gnu.lto_".
|
* elf.c (special_sections_g): Add ".gnu.lto_".
|
||||||
|
|
|
@ -5011,7 +5011,6 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
{
|
{
|
||||||
struct elf_link_hash_entry *h;
|
struct elf_link_hash_entry *h;
|
||||||
bfd *element;
|
bfd *element;
|
||||||
bfd *subsbfd = NULL;
|
|
||||||
struct bfd_link_hash_entry *undefs_tail;
|
struct bfd_link_hash_entry *undefs_tail;
|
||||||
symindex mark;
|
symindex mark;
|
||||||
|
|
||||||
|
@ -5075,11 +5074,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
undefs_tail = info->hash->undefs_tail;
|
undefs_tail = info->hash->undefs_tail;
|
||||||
|
|
||||||
if (! (*info->callbacks->add_archive_element)
|
if (! (*info->callbacks->add_archive_element)
|
||||||
(info, element, symdef->name, &subsbfd))
|
(info, element, symdef->name, &element))
|
||||||
goto error_return;
|
goto error_return;
|
||||||
/* Potentially, the add_archive_element hook may have set a
|
if (! bfd_link_add_symbols (element, info))
|
||||||
substitute BFD for us. */
|
|
||||||
if (! bfd_link_add_symbols (subsbfd ? subsbfd : element, info))
|
|
||||||
goto error_return;
|
goto error_return;
|
||||||
|
|
||||||
/* If there are any new undefined symbols, we need to make
|
/* If there are any new undefined symbols, we need to make
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2010-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* ldlang.c (load_symbols): Optimize for add_archive_element.
|
||||||
|
|
||||||
2010-12-09 Mike Frysinger <vapier@gentoo.org>
|
2010-12-09 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* .gitignore: New file.
|
* .gitignore: New file.
|
||||||
|
|
|
@ -2717,15 +2717,14 @@ load_symbols (lang_input_statement_type *entry,
|
||||||
loaded = FALSE;
|
loaded = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
subsbfd = NULL;
|
subsbfd = member;
|
||||||
if (! ((*link_info.callbacks->add_archive_element)
|
if (! ((*link_info.callbacks->add_archive_element)
|
||||||
(&link_info, member, "--whole-archive", &subsbfd)))
|
(&link_info, member, "--whole-archive", &subsbfd)))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* Potentially, the add_archive_element hook may have set a
|
/* Potentially, the add_archive_element hook may have set a
|
||||||
substitute BFD for us. */
|
substitute BFD for us. */
|
||||||
if (! bfd_link_add_symbols (subsbfd ? subsbfd : member,
|
if (! bfd_link_add_symbols (member, &link_info))
|
||||||
&link_info))
|
|
||||||
{
|
{
|
||||||
einfo (_("%F%B: could not read symbols: %E\n"), member);
|
einfo (_("%F%B: could not read symbols: %E\n"), member);
|
||||||
loaded = FALSE;
|
loaded = FALSE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue