case BFD_RELOC_PPC_TOC16:
return &xcoff_howto_table[3];
case BFD_RELOC_32:
+ case BFD_RELOC_CTOR:
return &xcoff_howto_table[0];
default:
return NULL;
HAS_SYMS | HAS_LOCALS | WP_TEXT),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading char */
+ /* Making the leading_char a period should make for nicer messages. */
+ '.', /* leading char */
'/', /* ar_pad_char */
15, /* ar_max_namelen??? FIXMEmgo */
if (enclosing != NULL
&& (coff_section_data (abfd, enclosing) == NULL
|| coff_section_data (abfd, enclosing)->relocs == NULL)
- && cache)
+ && cache
+ && enclosing->reloc_count > 0)
{
if (_bfd_coff_read_internal_relocs (abfd, enclosing, true,
external_relocs, false,
if (sym.n_sclass == C_EXT)
{
csect->flags |= SEC_IS_COMMON;
+ csect->_raw_size = 0;
section = csect;
value = aux.x_csect.x_scnlen.l;
}
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, flags, section, value,
- (const char *) NULL, copy, false,
+ (const char *) NULL, copy, true,
(struct bfd_link_hash_entry **) sym_hash)))
goto error_return;
(info, abfd, hds->root.root.string,
(flagword) 0, bfd_und_section_ptr,
(bfd_vma) 0, (const char *) NULL, false,
- false,
+ true,
(struct bfd_link_hash_entry **) NULL)))
goto error_return;
}
}
}
+ /* If this is still a common symbol, and it wasn't garbage
+ collected, we need to actually allocate space for it in the .bss
+ section. */
+ if (h->root.type == bfd_link_hash_common
+ && (! xcoff_hash_table (ldinfo->info)->gc
+ || (h->flags & XCOFF_MARK) != 0)
+ && h->root.u.c.p->section->_raw_size == 0)
+ {
+ BFD_ASSERT (bfd_is_com_section (h->root.u.c.p->section));
+ h->root.u.c.p->section->_raw_size = h->root.u.c.size;
+ }
+
/* We need to add a symbol to the .loader section if it is mentioned
in a reloc which we are copying to the .loader section and it was
not defined or common, or if it is the entry point. */
+ sec->output_section->vma
+ sec->output_offset);
}
+ else if (h->root.type == bfd_link_hash_common)
+ {
+ asection *sec;
+
+ sec = h->root.u.c.p->section;
+ val = (sec->output_section->vma
+ + sec->output_offset);
+ }
else if ((h->flags & XCOFF_REF_DYNAMIC) != 0
|| (h->flags & XCOFF_IMPORT) != 0)
{