Hello,
I want to create my own format for executables and shared libraries, and now I wonder how to create executables using this format ... of course I could write my own linker, which uses ELF reloctable objects to create my executable, but this is a lot of work ( boring work because it only tooks a lot of time, but it's not really complicated cause I'm familiar with stuff like relocation, sections, alignments, ... ) .
Is there a good way to port ld to know my format or is there a less-complex one to port ? Maybe you know some simple elf-loader I could use or something like that ... I would really like to go on with my os and not to waste lots of time on this problem ...
Linker for my executable format
Hello
If you want to add your own executable-object format to LD you have to play with BFD, then build binutils that targets your format.
1- Write a backend for BFD
2- Play with Makefile.am Makefile.in configure.in in bfd and gas
3- Write some scripts i think they have the extension *.sc in gas
4- Compile your binutils
5- Test if it works by compiling gcc with your target --target=i586-myformat
May be i forgot alot of things, but that's what popped from my head stack now.
Thanks
If you want to add your own executable-object format to LD you have to play with BFD, then build binutils that targets your format.
1- Write a backend for BFD
2- Play with Makefile.am Makefile.in configure.in in bfd and gas
3- Write some scripts i think they have the extension *.sc in gas
4- Compile your binutils
5- Test if it works by compiling gcc with your target --target=i586-myformat
May be i forgot alot of things, but that's what popped from my head stack now.
Thanks
Systems and Computer Engineering Researcher
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds
http://sce.carleton.ca/~maslan
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds
http://sce.carleton.ca/~maslan
Thanks, that sounds great. Never heard of bfd before, but I googled for it and found some interesting things. That's exactly what I wanted.
I dunno yet whether I write a backend for bfd or a bfd frontent to create my execuatble out of some elf files, cause I think last one could be easierer and whould be still enough.
I dunno yet whether I write a backend for bfd or a bfd frontent to create my execuatble out of some elf files, cause I think last one could be easierer and whould be still enough.