OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 6:46 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Witchcraft Compiler Collection
PostPosted: Thu Jan 05, 2017 9:11 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
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

Quote:
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.



_________________
Plagiarize. Plagiarize. Let not one line escape thine eyes...


Top
 Profile  
 
 Post subject: Re: Witchcraft Compiler Collection
PostPosted: Fri Jan 06, 2017 4:32 am 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
Wow, thats a very powerful utiity

Quote:
ehdr->e_type = ET_DYN;


Magic!

_________________
Learn to read.


Top
 Profile  
 
 Post subject: Re: Witchcraft Compiler Collection
PostPosted: Sat Jan 07, 2017 1:40 pm 
Offline
Member
Member
User avatar

Joined: Wed Aug 31, 2016 9:53 pm
Posts: 81
Location: San Diego, CA
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.

_________________
Some of my open-source projects:
Ext2/ELF32 bootloader
Lightweight x86 assembler, designed to be portable for osdev
Scheme in under 1000 lines of C


Top
 Profile  
 
 Post subject: Re: Witchcraft Compiler Collection
PostPosted: Sat Jan 07, 2017 8:22 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
I suggested it because it looked new (2016) and novel...

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

cheers

_________________
Plagiarize. Plagiarize. Let not one line escape thine eyes...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group