windows sucks, im using DJGPP for my testbed/compiler/linker and it works fine for my needs, compiles my kernel perfectly etc.
but i have implemented ELF relocation, and im struggling to create my own ELF for testing purposes, does anybody know a method i can compile and link my own files?
or... at my most desperate (until i find a solution), does anybody have a flat linked elf (32 bit) that does very little (i.e. prints a character to screen, simply returns etc) that i could use to test it in full?
Lukem95
Elf woes
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
I get this error when trying to link though.c:\djgpp\bin/ld.exe: target i586-elf not found
This is my link.ld script, it works fine for COFF, however i havn't implemented that yet, so its very little use to me except for my kernel.OUTPUT_FORMAT(i586-elf)
ENTRY(start)
SECTIONS
{
.text 0x100000 :
{
code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .; __data = .;
*(.data)
*(.rodata)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}
interesting that you start with a blank statement about windows, and then admit your not using it... (DJGPP is an old DOS program, and doesnt even work properly with windows)windows sucks, im using DJGPP for my testbed/compiler/linker and it works fine for my needs, compiles my kernel perfectly etc.
well im sorry for that then, i had no idea lol
i actually started using a computer with windows 98, and soon graduated to XP. I'm running vista on my laptop now. I've only been using pc's regularly since i was 11, 4 and a half years ago, so you can possibly understand why im not too familiar with DOS or what its native programs are?
i actually started using a computer with windows 98, and soon graduated to XP. I'm running vista on my laptop now. I've only been using pc's regularly since i was 11, 4 and a half years ago, so you can possibly understand why im not too familiar with DOS or what its native programs are?
You'll need to follow the GCC Cross Compiler tutorial found on the wiki. As said before, DJGPP is an old DOS program that doesn't work right with Windows, and as you correctly pointed out, it doesn't support the ELF file format.
You could also download Cygwin (which is Unix tools, compiled to run on Windows), but even then you'd need a cross compiler because Cygwin by default does not output ELF files.
You could also download Cygwin (which is Unix tools, compiled to run on Windows), but even then you'd need a cross compiler because Cygwin by default does not output ELF files.