/* od-macho.c -- dump information about an Mach-O object file.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2022 Free Software Foundation, Inc.
Written by Tristan Gingold, Adacore.
This file is part of GNU Binutils.
{ "version_min_watchos", BFD_MACH_O_LC_VERSION_MIN_WATCHOS},
{ "note", BFD_MACH_O_LC_NOTE},
{ "build_version", BFD_MACH_O_LC_BUILD_VERSION},
+ { "exports_trie", BFD_MACH_O_LC_DYLD_EXPORTS_TRIE},
+ { "chained_fixups", BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS},
{ NULL, 0}
};
}
static void
-dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bfd_boolean verbose)
+dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bool verbose)
{
bfd_mach_o_dysymtab_command *dysymtab = &cmd->command.dysymtab;
bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
}
-static bfd_boolean
+static bool
load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
void (*dump)(bfd *abfd, unsigned char *buf, unsigned int len,
ufile_ptr off))
unsigned char *buf;
if (len == 0)
- return TRUE;
+ return true;
buf = xmalloc (len);
&& bfd_bread (buf, len, abfd) == len)
dump (abfd, buf, len, off);
else
- return FALSE;
+ return false;
free (buf);
- return TRUE;
+ return true;
}
static const bfd_mach_o_xlat_name bfd_mach_o_dyld_rebase_type_name[] =
static void
dump_dyld_info (bfd *abfd, bfd_mach_o_load_command *cmd,
- bfd_boolean verbose)
+ bool verbose)
{
bfd_mach_o_dyld_info_command *dinfo = &cmd->command.dyld_info;
static void
dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
- unsigned int idx, bfd_boolean verbose)
+ unsigned int idx, bool verbose)
{
bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
const char *cmd_name;
case BFD_MACH_O_LC_FUNCTION_STARTS:
case BFD_MACH_O_LC_DATA_IN_CODE:
case BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS:
+ case BFD_MACH_O_LC_DYLD_EXPORTS_TRIE:
+ case BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS:
{
bfd_mach_o_linkedit_command *linkedit = &cmd->command.linkedit;
printf
for (cmd = mdata->first_command, i = 0; cmd != NULL; cmd = cmd->next, i++)
{
if (cmd32 == 0)
- dump_load_command (abfd, cmd, i, FALSE);
+ dump_load_command (abfd, cmd, i, false);
else if (cmd->type == cmd32 || cmd->type == cmd64)
- dump_load_command (abfd, cmd, i, TRUE);
+ dump_load_command (abfd, cmd, i, true);
}
}
putchar (' ');
printf_uint64 (bfd_get_64 (abfd, e->start));
- printf (" %08lx", bfd_get_32 (abfd, e->length));
+ printf (" %08lx", (unsigned long)bfd_get_32 (abfd, e->length));
putchar (' ');
printf_uint64 (bfd_get_64 (abfd, e->personality));
putchar (' ');