This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Troubles with ld under windows
- To: "gcc-help" <gcc-help at gcc dot gnu dot org>
- Subject: Troubles with ld under windows
- From: "Thomas Lenherr" <lenherr at netpeople dot ch>
- Date: Sun, 28 Oct 2001 18:40:15 +0100
- Reply-To: <lenherr at netpeople dot ch>
Greetings,
my ld (from DJGPP) does not really do what I want. Look at this:
== START: test.c ==
int main()
{
int i;
i=0x12345678;
}
== END: test.c ==
I enter this command: gcc -c test.c
(No errors/messages)
(Version of gcc: 2.952)
This gives me test.o (sent with this msg)
Then I enter this command: ld -o test.bin -Ttext 0x0 -e _main --oformat
binary test.o
(No errors/messages)
(Version of ld: 2.9.5)
The result is test.bin (sent with this msg)
But this file is just crap, why?? (test.bin is exactly 1kb)
I've used objdump -D on test.o and most seems perfect.
What the hell is happening with my code?
Thanks
Thomas Lenherr
test.o
test.bin