Bonjour à tous, j'essais le prog C suivant avec eclipse et gcc le tout sous windows xp
int start_prog(void);
int control(void);
int control(void){}
int start_prog(void){}
Mon makefile est:
all:
gcc -c -g test.c -o test.o
ld --output=test.out test.o --Map test.map -Ttext 0x1000 -estart_prog
objcopy -R .note -R .comment -S -O binary test.out test.bin
objdump test.out --disassemble
Tout va bien mais le linker me dit:
ld: warning: cannot find entry symbol start_prog; defaulting to 00001000
Il semble qu'il ne comprenne pas -estart_prog, ou est l'erreur? et bien sur la suite n'est pas dans l'odre que je voulais.
00001000 <_control>:
1000: 55 push %ebp
1001: 89 e5 mov %esp,%ebp
1003: 5d pop %ebp
1004: c3 ret
00001005 <_start_prog>:
1005: 55 push %ebp
1006: 89 e5 mov %esp,%ebp
1008: 5d pop %ebp
1009: c3 ret
si quelqu'un à une idée sur cela, merci de votre aide
Daniel
Partager