/* Support for the generic parts of PE/PEI; the common executable parts.
- Copyright (C) 1995-2017 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
name = _bfd_coff_internal_syment_name (abfd, in, namebuf);
if (name == NULL)
{
- _bfd_error_handler (_("%B: unable to find name for empty section"),
+ _bfd_error_handler (_("%pB: unable to find name for empty section"),
abfd);
bfd_set_error (bfd_error_invalid_target);
return;
name = (const char *) bfd_alloc (abfd, strlen (namebuf) + 1);
if (name == NULL)
{
- _bfd_error_handler (_("%B: out of memory creating name for empty section"),
+ _bfd_error_handler (_("%pB: out of memory creating name for empty section"),
abfd);
return;
}
sec = bfd_make_section_anyway_with_flags (abfd, name, flags);
if (sec == NULL)
{
- _bfd_error_handler (_("%B: unable to create fake empty section"),
+ _bfd_error_handler (_("%pB: unable to create fake empty section"),
abfd);
return;
}
{
/* xgettext:c-format */
_bfd_error_handler
- (_("%B: aout header specifies an invalid number of data-directory entries: %ld"),
+ (_("%pB: aout header specifies an invalid number of data-directory entries: %ld"),
abfd, a->NumberOfRvaAndSizes);
bfd_set_error (bfd_error_bad_value);
if (pe_data (abfd)->dll)
filehdr_in->f_flags |= F_DLL;
- filehdr_in->pe.e_magic = DOSMAGIC;
+ filehdr_in->pe.e_magic = IMAGE_DOS_SIGNATURE;
filehdr_in->pe.e_cblp = 0x90;
filehdr_in->pe.e_cp = 0x3;
filehdr_in->pe.e_crlc = 0x0;
filehdr_in->pe.dos_message[13] = 0x0a0d0d2e;
filehdr_in->pe.dos_message[14] = 0x24;
filehdr_in->pe.dos_message[15] = 0x0;
- filehdr_in->pe.nt_signature = NT_SIGNATURE;
+ filehdr_in->pe.nt_signature = IMAGE_NT_SIGNATURE;
H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
else
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: line number overflow: 0x%lx > 0xffff"),
+ _bfd_error_handler (_("%pB: line number overflow: 0x%lx > 0xffff"),
abfd, scnhdr_int->s_nlnno);
bfd_set_error (bfd_error_file_truncated);
H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nlnno);
if ((stop % onaline) != 0)
fprintf (file,
/* xgettext:c-format */
- _("Warning, .pdata section size (%ld) is not a multiple of %d\n"),
+ _("warning, .pdata section size (%ld) is not a multiple of %d\n"),
(long) stop, onaline);
fprintf (file,
if ((stop % onaline) != 0)
fprintf (file,
/* xgettext:c-format */
- _("Warning, .pdata section size (%ld) is not a multiple of %d\n"),
+ _("warning, .pdata section size (%ld) is not a multiple of %d\n"),
(long) stop, onaline);
fprintf (file,
> bfd_get_section_size (section))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%B: Data Directory size (%lx) exceeds space left in section (%Lx)"),
- obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
- bfd_get_section_size (section) - (addr - section->vma));
+ _bfd_error_handler
+ (_("%pB: Data Directory size (%lx) "
+ "exceeds space left in section (%" PRIx64 ")"),
+ obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
+ (uint64_t) (section->size - (addr - section->vma)));
return FALSE;
}
if (!bfd_set_section_contents (obfd, section, data, 0, section->size))
{
- _bfd_error_handler (_("Failed to update file offsets in debug directory"));
+ _bfd_error_handler (_("failed to update file offsets in debug directory"));
return FALSE;
}
}
else if (section)
{
- _bfd_error_handler (_("%B: Failed to read debug data section"), obfd);
+ _bfd_error_handler (_("%pB: failed to read debug data section"), obfd);
return FALSE;
}
}
if (adir->characteristics != bdir->characteristics)
{
- _bfd_error_handler (_(".rsrc merge failure: dirs with differing characteristics\n"));
+ _bfd_error_handler (_(".rsrc merge failure: dirs with differing characteristics"));
bfd_set_error (bfd_error_file_truncated);
return;
}
if (adir->major != bdir->major || adir->minor != bdir->minor)
{
- _bfd_error_handler (_(".rsrc merge failure: differing directory versions\n"));
+ _bfd_error_handler (_(".rsrc merge failure: differing directory versions"));
bfd_set_error (bfd_error_file_truncated);
return;
}
if (data > dataend)
{
/* Corrupted .rsrc section - cannot merge. */
- _bfd_error_handler (_("%B: .rsrc merge failure: corrupt .rsrc section"),
+ _bfd_error_handler (_("%pB: .rsrc merge failure: corrupt .rsrc section"),
abfd);
bfd_set_error (bfd_error_file_truncated);
goto end;
if ((data - p) > rsrc_sizes [num_resource_sets])
{
- _bfd_error_handler (_("%B: .rsrc merge failure: unexpected .rsrc size"),
+ _bfd_error_handler (_("%pB: .rsrc merge failure: unexpected .rsrc size"),
abfd);
bfd_set_error (bfd_error_file_truncated);
goto end;
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[1] because .idata$2 is missing"),
+ (_("%pB: unable to fill in DataDictionary[1] because .idata$2 is missing"),
abfd);
result = FALSE;
}
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[1] because .idata$4 is missing"),
+ (_("%pB: unable to fill in DataDictionary[1] because .idata$4 is missing"),
abfd);
result = FALSE;
}
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[12] because .idata$5 is missing"),
+ (_("%pB: unable to fill in DataDictionary[12] because .idata$5 is missing"),
abfd);
result = FALSE;
}
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"),
+ (_("%pB: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"),
abfd);
result = FALSE;
}
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)]"
+ (_("%pB: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)]"
" because .idata$6 is missing"), abfd);
result = FALSE;
}
else
{
_bfd_error_handler
- (_("%B: unable to fill in DataDictionary[9] because __tls_used is missing"),
+ (_("%pB: unable to fill in DataDictionary[9] because __tls_used is missing"),
abfd);
result = FALSE;
}