Page 1 of 1

Witchcraft Compiler Collection

Posted: Thu Jan 05, 2017 9:11 pm
by dchapiesky
Came across this... This could be neat... Thought you all would like to know about it...

The manual wiki doesn't have anything... actual docs are in ./doc

https://github.com/endrazine/wcc
wld : The Witchcraft Linker. - wld takes an ELF executable as an input and modifies it to create a shared library.

wcc : The Witchcraft Compiler. - The wcc compiler takes binaries (ELF, PE, ...) as an input and creates valid ELF binaries as an output. It can be used to create relocatable object files from executables or shared libraries.

wsh : The Witchcraft shell - The witchcraft shell accepts ELF shared libraries, ELF ET_DYN executables and Witchcraft Shell Scripts written in Punk-C as an input. It loads all the executables in its own address space and make their API available for programming in its embedded interpreter. This provides for binaries functionalities similar to those provided via reflection on languages like Java.

wcch : generate C headers from binaries - The wcch command takes an ELF binary path as a command line, and outputs a minimal C header file declaring all the exported global variables and functions from the input binary. This automates prototypes declaration when writting C code and linking with a binary for which C header files are not available.


Re: Witchcraft Compiler Collection

Posted: Fri Jan 06, 2017 4:32 am
by dozniak
Wow, thats a very powerful utiity
ehdr->e_type = ET_DYN;
Magic!

Re: Witchcraft Compiler Collection

Posted: Sat Jan 07, 2017 1:40 pm
by crunch
I had an idea similar to the wsh utility, where you could call C functions from an interpreter (think REPL) style. Never got around to implementing it though.

Re: Witchcraft Compiler Collection

Posted: Sat Jan 07, 2017 8:22 pm
by dchapiesky
I suggested it because it looked new (2016) and novel...

The generation of headers from bins is what interested me...

cheers