Bug 1024 - ld --oformat binary broken on PE targets: PE operations on non PE file.
Summary: ld --oformat binary broken on PE targets: PE operations on non PE file.
Status: RESOLVED WONTFIX
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-18 18:00 UTC by Aaron W. LaFramboise
Modified: 2021-06-02 03:26 UTC (History)
1 user (show)

See Also:
Host:
Target: *-pc-mingw32 *-pc-cygwin
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron W. LaFramboise 2005-06-18 18:00:26 UTC
Transcript:

$ cat ldbug.s
        .text
        .global _start
_start:
        nop
$ gcc -c ldbug.s
$ ld -e _start -Ttext=0 --oformat binary -o ldbug.bin ldbug.o
c:\aaronwl\cs\env\mingw-head-head-head\bin\ld.exe: PE operations on non PE 
file.

This same sequence of commands works without any errors on an ELF target.

This was originally reported here <https://sourceforge.net/forum/message.php?
msg_id=3207899> by https://sourceforge.net/users/huangxiangkui.
Comment 1 Alan Modra 2021-06-02 03:26:46 UTC
--oformat binary is not well supported anywhere really.