/* BFD back-end for MS-DOS executables.
- Copyright (C) 1990-2021 Free Software Foundation, Inc.
+ Copyright (C) 1990-2022 Free Software Foundation, Inc.
Written by Bryan Ford of the University of Utah.
Contributed by the Center for Software Science at the
#define EXE_LOAD_LOW 0xffff
#define EXE_PAGE_SIZE 512
-static bfd_boolean
+static bool
msdos_mkobject (bfd *abfd)
{
bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i8086);
return 0;
}
-static bfd_boolean
+static bool
msdos_write_object_contents (bfd *abfd)
{
static char hdr[EXE_PAGE_SIZE];
if (high_vma > (bfd_vma)0xffff)
{
bfd_set_error(bfd_error_file_too_big);
- return FALSE;
+ return false;
}
/* Constants. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
|| bfd_bwrite (hdr, (bfd_size_type) sizeof(hdr), abfd) != sizeof(hdr))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
msdos_set_section_contents (bfd *abfd,
sec_ptr section,
const void *location,
{
if (count == 0)
- return TRUE;
+ return true;
section->filepos = EXE_PAGE_SIZE + bfd_section_vma (section);
{
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
|| bfd_bwrite (location, count, abfd) != count)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
' ', /* ar_pad_char */
16, /* ar_max_namelen */
0, /* match priority. */
+ TARGET_KEEP_UNUSED_SECTION_SYMBOLS, /* keep unused section symbols. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */