X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fldexp.c;h=3ffabb8c1da6e2f2677b1dc63e25e7ee92221c03;hb=f809832224cc45eb58812f6d4bb03cbf52fad980;hp=d2b1b43a5a9d72610a8d9986b173e871a0b7d7bf;hpb=91114f7583fac8fdf57c58a1f632839da62e43da;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/ldexp.c b/ld/ldexp.c index d2b1b43a5a..3ffabb8c1d 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -700,7 +700,8 @@ fold_name (etree_type *tree) /* 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; @@ -742,7 +743,7 @@ fold_name (etree_type *tree) 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'"