The behavior of these flags is not well documentmented, so there
may be bugs and some surprising interactions with other flags. */
- if (som_section_data (sym->section)
+ if (sym->section->owner != NULL
+ && sym->section->owner->xvec->flavour == bfd_target_som_flavour
+ && som_section_data (sym->section)
&& som_section_data (sym->section)->subspace_dict
&& info->symbol_scope == SS_UNIVERSAL
&& (info->symbol_type == ST_ENTRY
bfd *obfd ATTRIBUTE_UNUSED,
asymbol **osymbol)
{
- /* One day we may try to grok other private data. */
if (ibfd->xvec->flavour != bfd_target_som_flavour)
- return false;
+ {
+ /* The som backend makes use of som specific symbol fields
+ when outputting symbols. */
+ asymbol *osym = som_make_empty_symbol (obfd);
+ if (osym == NULL)
+ return false;
+ memcpy (osym, *isymbol, sizeof (*osym));
+ osym->the_bfd = obfd;
+ return true;
+ }
/* The only private information we need to copy is the argument relocation
bits. */