stupaq / elf-oloader

ELF object files loader in userspace for Linux.
GNU General Public License v3.0
4 stars 1 forks source link

Cant compile #1

Closed cycl0ne closed 10 years ago

cycl0ne commented 10 years ago

On a clean linux (xubuntu 14.04) I get the following error: "fatal error: sys/cdefs.h: No such file or directory"

Test/ also complains: abs.d:2: *\ missing separator. Stop.

Cheers

stupaq commented 10 years ago

As far as I can tell, clean *Ubuntu does not constitute any dev environment, I suggest sudo apt-get install build-essential (and in general it's faster to use Google: http://ubuntuforums.org/showthread.php?t=1922575).

stupaq commented 10 years ago

The other matter is that the source does not directly reference sys/cdefs.h (is is required by some header file included by the source, these files should be provided with the distribution), my only conclusion is that something is seriously fucked up (missing dependencies) with your setup.

cycl0ne commented 10 years ago

Hi,

yes cleaned install i ment also build-essentials. Was a wrong include path due to my cross compiler setup for 32bit and your makefile with the standard setup. i found a cleaner source fo this elfloader on github.. to bad it couldnt solve my problem on getting an ELF Object Loader for x86 baremetal. All implementations use mmap (mmu) to cheat on the relocation. But thanks anyway for looking into it!

stupaq commented 10 years ago

I don't get the part with Makefile setup. I guess that replacing := with ?= would help you customise compilation flags without modifying the source.

You might want to know that this was a tiny assignment for an Advanced topics in Operating Systems course, so I wouldn't rely on it being production-grade (it is most likely bug-less though, but has very limited functionality, misses some less popular relocations and might reject exotic binaries). If you want something done and polished rather than an idea how to do it (or simple code to read), I'd suggest something with more fancy-looking Github page: https://github.com/GregorR/gelfload. I haven't looked into the source, but it sounds much better.

cycl0ne commented 10 years ago

Hi, thanks, allready found it, but also has the same problem using the host OS with MMU and using virtual memory adress space. What i am looking for is a ELF loader something similar to this: http://geezer.osdevbrasil.net/osd/exec/elf.c but more comprehensive and more sort of module based (to later support also other platforms from elf like ARM, MIPS, X64 etc.), there was once the Dynalink from the OSLib Ppl: http://sourceforge.net/p/freedos-32/code/HEAD/tree/trunk/fd32/dynalink/ but also very buggy and wont work anymore with newer code from GCC. So, still searching. If you are familiar with ELF etc. want to work for me on project basis to develop something similiar for some euros?

stupaq commented 10 years ago

Thanks, but I'm not interested.