Cygwin: Update ELF target used by dumper on x86_64
Like [1], but actually making the effort to be 'usable' and 'tested'. [1] https://cygwin.com/pipermail/cygwin/2019-October/242815.html
This commit is contained in:
parent
f2a285bd4f
commit
38f8860146
@ -645,7 +645,13 @@ dumper::init_core_dump ()
|
|||||||
{
|
{
|
||||||
bfd_init ();
|
bfd_init ();
|
||||||
|
|
||||||
core_bfd = bfd_openw (file_name, "elf32-i386");
|
#ifdef __x86_64__
|
||||||
|
const char *target = "elf64-x86-64";
|
||||||
|
#else
|
||||||
|
const char *target = "elf32-i386";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
core_bfd = bfd_openw (file_name, target);
|
||||||
if (core_bfd == NULL)
|
if (core_bfd == NULL)
|
||||||
{
|
{
|
||||||
bfd_perror ("opening bfd");
|
bfd_perror ("opening bfd");
|
||||||
@ -658,7 +664,7 @@ dumper::init_core_dump ()
|
|||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0))
|
if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0 /* = default */))
|
||||||
{
|
{
|
||||||
bfd_perror ("setting bfd architecture");
|
bfd_perror ("setting bfd architecture");
|
||||||
goto failed;
|
goto failed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user