Mail Archives: djgpp/1997/06/19/21:04:52
From: | Kendrew LAU <kendrew AT mtk DOT com DOT hk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | RSXDJNT 131: ld.exe bug?
|
Date: | Wed, 18 Jun 1997 13:40:09 +0900
|
Organization: | Engineering Faculty CUHK
|
Lines: | 27
|
Message-ID: | <33A766A8.6599@mtk.com.hk>
|
Reply-To: | kendrew AT mtk DOT com DOT hk
|
NNTP-Posting-Host: | dialup2-03.erg.cuhk.hk
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
The ld.exe program in RSXNTDJ 131 does not print a warning
when linking a program with undefined reference. A simple
example is:
/* This is file a.c */
extern void f();
int main()
{
f();
return 0;
}
/* End of file a.c */
And compile it as:
gcc a.c
The compilation and linking go silently and produce the a.exe,
which gets killed upon execution:
Exiting due to signal SIGILL
Invalid Opcode at eip=00000000
...
I try it with the old ld.exe and it gives warning of
a.o(.text+0x9):a.c: undefined reference to `f'
So, do I do anything wrong, or is it a bug in this ld.exe
- Raw text -