/* PEF support for BFD.
- Copyright (C) 1999-2015 Free Software Foundation, Inc.
+ Copyright (C) 1999-2017 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#define bfd_pef_bfd_discard_group bfd_generic_discard_group
#define bfd_pef_section_already_linked _bfd_generic_section_already_linked
#define bfd_pef_bfd_define_common_symbol bfd_generic_define_common_symbol
+#define bfd_pef_bfd_define_start_stop bfd_generic_define_start_stop
#define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_pef_bfd_final_link _bfd_generic_final_link
#define bfd_pef_bfd_link_split_section _bfd_generic_link_split_section
#define bfd_pef_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+#define bfd_pef_bfd_link_check_relocs _bfd_generic_link_check_relocs
static int
bfd_pef_parse_traceback_table (bfd *abfd,
fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
if (CONST_STRNEQ (symbol->name, "__traceback_"))
{
- unsigned char *buf = alloca (symbol->udata.i);
+ unsigned char *buf = xmalloc (symbol->udata.i);
size_t offset = symbol->value + 4;
size_t len = symbol->udata.i;
int ret;
len, 0, NULL, file);
if (ret < 0)
fprintf (file, " [ERROR]");
+ free (buf);
}
}
}
goto end;
for (section = abfd->sections; section != NULL; section = section->next)
- if ((section->index + 1) == header.main_section)
+ if ((long) (section->index + 1) == header.main_section)
break;
if (section == NULL)
bfd_pef_convert_architecture (header->architecture, &cputype, &cpusubtype);
if (cputype == bfd_arch_unknown)
{
- (*_bfd_error_handler) (_("bfd_pef_scan: unknown architecture 0x%lx"),
- header->architecture);
+ _bfd_error_handler (_("bfd_pef_scan: unknown architecture 0x%lx"),
+ header->architecture);
return -1;
}
bfd_set_arch_mach (abfd, cputype, cpusubtype);