This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Troubles with ld under windows


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]