My next step is to create all the code for my next project and optimise the current code.
So I thought I would look into gcc.
I am using Cygwin64.
gcc looks good but I have spent a few hours now on trying to get it to compile code at a starting address.
I have googled and searched this site.
Being unfamiliar with Linux it has held me back a bit.
My source code is:
Code: Select all
int start(void)
{
mylabel:
goto mylabel;
}
Can someone help me out?$ gcc -Wall -pedantic-errors kernel.c -o kernel.exe -nostdlib -Wl,-Ttext=0x20000
/tmp/ccD98StI.o:kernel.c:(.pdata+0x0): relocation truncated to fit: rva32 against `.text'
/tmp/ccD98StI.o:kernel.c:(.pdata+0x4): relocation truncated to fit: rva32 against `.text'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccD98StI.o: bad reloc address 0x8 in section `.pdata'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status