mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 06:23:58 +08:00
PR ld/13066
PR ld/12762 * plugin.c (add_symbols): Revert 2011-08-05.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2011-08-09 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR ld/13066
|
||||||
|
* plugin.c (add_symbols): Revert 2011-08-05.
|
||||||
|
|
||||||
2011-08-06 Kai Tietz <ktietz@redhat.com>
|
2011-08-06 Kai Tietz <ktietz@redhat.com>
|
||||||
|
|
||||||
* scripttempl/pep.sc: Add .debug_macro section.
|
* scripttempl/pep.sc: Add .debug_macro section.
|
||||||
|
11
ld/plugin.c
11
ld/plugin.c
@ -380,11 +380,11 @@ add_symbols (void *handle, int nsyms, const struct ld_plugin_symbol *syms)
|
|||||||
{
|
{
|
||||||
asymbol **symptrs;
|
asymbol **symptrs;
|
||||||
bfd *abfd = handle;
|
bfd *abfd = handle;
|
||||||
int n, k;
|
int n;
|
||||||
|
|
||||||
ASSERT (called_plugin);
|
ASSERT (called_plugin);
|
||||||
symptrs = xmalloc (nsyms * sizeof *symptrs);
|
symptrs = xmalloc (nsyms * sizeof *symptrs);
|
||||||
for (n = 0, k = 0; n < nsyms; n++)
|
for (n = 0; n < nsyms; n++)
|
||||||
{
|
{
|
||||||
enum ld_plugin_status rv;
|
enum ld_plugin_status rv;
|
||||||
asymbol *bfdsym;
|
asymbol *bfdsym;
|
||||||
@ -394,16 +394,15 @@ add_symbols (void *handle, int nsyms, const struct ld_plugin_symbol *syms)
|
|||||||
struct already_linked linked;
|
struct already_linked linked;
|
||||||
linked.comdat_key = xstrdup (syms[n].comdat_key);
|
linked.comdat_key = xstrdup (syms[n].comdat_key);
|
||||||
linked.u.abfd = abfd;
|
linked.u.abfd = abfd;
|
||||||
if (bfd_section_already_linked (abfd, &linked, &link_info))
|
bfd_section_already_linked (abfd, &linked, &link_info);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
bfdsym = bfd_make_empty_symbol (abfd);
|
bfdsym = bfd_make_empty_symbol (abfd);
|
||||||
symptrs[k++] = bfdsym;
|
symptrs[n] = bfdsym;
|
||||||
rv = asymbol_from_plugin_symbol (abfd, bfdsym, syms + n);
|
rv = asymbol_from_plugin_symbol (abfd, bfdsym, syms + n);
|
||||||
if (rv != LDPS_OK)
|
if (rv != LDPS_OK)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
bfd_set_symtab (abfd, symptrs, k);
|
bfd_set_symtab (abfd, symptrs, nsyms);
|
||||||
return LDPS_OK;
|
return LDPS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user