mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
PE linker segmentation fault with MALLOC_PERTURB_=1
PR 24596 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Check that the output is coff before accessing coff tdata. * emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
2019-05-28 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 24596
|
||||
* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Check that
|
||||
the output is coff before accessing coff tdata.
|
||||
* emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
|
||||
|
||||
2019-05-28 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* testsuite/ld-aarch64/variant_pcs-now.d: Use --hash-style=sysv.
|
||||
|
@ -1360,7 +1360,8 @@ gld_${EMULATION_NAME}_after_open (void)
|
||||
FIXME: This should be done via a function, rather than by
|
||||
including an internal BFD header. */
|
||||
|
||||
if (coff_data (link_info.output_bfd) == NULL
|
||||
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
|
||||
|| coff_data (link_info.output_bfd) == NULL
|
||||
|| coff_data (link_info.output_bfd)->pe == 0)
|
||||
einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
|
||||
link_info.output_bfd);
|
||||
|
@ -1348,7 +1348,8 @@ gld_${EMULATION_NAME}_after_open (void)
|
||||
FIXME: This should be done via a function, rather than by
|
||||
including an internal BFD header. */
|
||||
|
||||
if (coff_data (link_info.output_bfd) == NULL
|
||||
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
|
||||
|| coff_data (link_info.output_bfd) == NULL
|
||||
|| coff_data (link_info.output_bfd)->pe == 0)
|
||||
einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
|
||||
link_info.output_bfd);
|
||||
|
Reference in New Issue
Block a user