Bug 13431 – pragma(startaddress) doesn't work with COFF

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-09-06T10:50:04Z
Last change time
2024-12-13T18:26:03Z
Keywords
link-failure
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#17681 →

Comments

Comment #0 by dlang-bugzilla — 2014-09-06T10:50:04Z
I don't know if the COFF object file format supports indicating the entry point, but if it does, then DMD does not emit this information when pragma(startaddress) is used. Example program: ////////// test.d ////////// import win32.winbase; void start() { ExitProcess(0); } pragma(startaddress, start); //////////////////////////// When compiling with -m64 or -m32mscoff, the linker complains: LINK : fatal error LNK1561: entry point must be defined
Comment #1 by robert.schadek — 2024-12-13T18:26:03Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17681 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB