Im developing a new makefile, but am running into a strange problem that I have never seen before... My problem is very simular to This thread
Here is the problem:
I have 2 files: Stage3.asm, and Main.c. I can assemble and compile them seperately just fine. However, I am unable to do both.
I recieve this error:
Notice that GCC has nothing to do with Stage3. What makes this strange is that, I can completely delete the code from both files (Stage3.asm and Main.c), and still recieve this error... wtf? Because of this, providing the code will not help, as it does not seem to be the problem (As I still recieve the error without it) It works if I assemble, or just compile--but if I do both, I get this crash. I also recieve this crash when interfacing the NASM with LD.nasm -f elf Stage3.asm -o Stage3.o
gcc Main.c -c
Main.c: In function `main':
Main.c:2: warning: return type of `main' is not `int'
Exiting due to signal SIGSEGV
General Protection Fault at eip=000859cf
eax=fff50000 ebx=fff50000 ecx=000002b8 edx=fff60000 esi=00000c20 edi=00003fc0
ebp=001257f8 esp=001257e4 program=c:\djgpp\bin\as.exe
cs: sel=0257 base=02b80000 limit=7d46ffff
ds: sel=025f base=02b80000 limit=7d46ffff
es: sel=025f base=02b80000 limit=7d46ffff
fs: sel=022f base=00016cb0 limit=0000ffff
gs: sel=026f base=00000000 limit=0010ffff
ss: sel=025f base=02b80000 limit=7d46ffff
App stack: [001258d0..000a58d0] Exceptn stack: [000a5824..000a38e4]
Call frame traceback EIPs:
0x000859cf
0x00081485
0x00082897
0x0000d5d0
0x0001d43d
0x00005de8
0x000853c2
make.exe: *** [all] Error 1
I should note that this is the GCC and LD provided with DJGPP. It worked fine with my previous systems; it does not seem to work now though...
I also should note that the above is generated by a makefile. I will post it, if anyone thinks that might be the problem.
Any help is appreciated,
Thanks!