[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LD Bug & AS Improvements
From: |
Nick Clifton |
Subject: |
Re: LD Bug & AS Improvements |
Date: |
Sat, 7 Jul 2001 16:58:20 +0100 (BST) |
Hi Brian,
I think that the patch below should prevent the seg fault. Please
could you try it and let me know.
It does not actually allow --ofromat=binary to work, but I suspect
that it may not be possible. Some targets (eg the arm) cannot do a
translation to a forign file format at the same time as a link is
being performed because they need to store data in private, target
specific areas of the output bfd. I suspect that the PE target is a
similar case.
You should however be able to link without --oformat and then use
objcopy to convert the resulting linked file into binary format.
Cheers
Nick
Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.44
diff -p -r1.44 pe.em
*** pe.em 2001/06/05 00:48:41 1.44
--- pe.em 2001/07/07 15:54:29
*************** gld_${EMULATION_NAME}_after_open ()
*** 800,806 ****
FIXME: This should be done via a function, rather than by
including an internal BFD header. */
! if (!coff_data (output_bfd)->pe)
einfo (_("%F%P: PE operations on non PE file.\n"));
pe_data (output_bfd)->pe_opthdr = pe;
--- 800,806 ----
FIXME: This should be done via a function, rather than by
including an internal BFD header. */
! if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == NULL)
einfo (_("%F%P: PE operations on non PE file.\n"));
pe_data (output_bfd)->pe_opthdr = pe;