/* Don't find the real header size if only marking sections;
The bfd function may cache incorrect data. */
if (expld.phase != lang_mark_phase_enum)
- hdr_size = bfd_sizeof_headers (link_info.output_bfd, &link_info);
+ hdr_size = (bfd_sizeof_headers (link_info.output_bfd, &link_info)
+ / bfd_octets_per_byte (link_info.output_bfd, NULL));
new_number (hdr_size);
}
break;
output_section = h->u.def.section->output_section;
if (output_section == NULL)
{
- if (expld.phase != lang_final_phase_enum)
+ if (expld.phase <= lang_mark_phase_enum)
new_rel (h->u.def.value, h->u.def.section);
else
einfo (_("%X%P:%pS: unresolvable symbol `%s'"