X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fldexp.c;h=3ffabb8c1da6e2f2677b1dc63e25e7ee92221c03;hb=0574b47b73d57f7d78b174aaad01e8d1141bbe32;hp=1fda65d714836f12a8b2351d0c5162ca554d631a;hpb=b3adc24a0713411ab38a21dc894dd40dbc5c8f4f;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/ldexp.c b/ld/ldexp.c index 1fda65d714..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; @@ -730,7 +731,10 @@ fold_name (etree_type *tree) tree->name.name, TRUE, FALSE, TRUE); if (!h) - einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n")); + { + if (expld.phase != lang_first_phase_enum) + einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n")); + } else if (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak) {