https://github.com/smx-smx/argon
GNU AS (GAS) as a library (experimental)
https://github.com/smx-smx/argon
assembler binutils gas jit library
Last synced: 5 months ago
JSON representation
GNU AS (GAS) as a library (experimental)
- Host: GitHub
- URL: https://github.com/smx-smx/argon
- Owner: smx-smx
- License: gpl-2.0
- Created: 2022-05-01T18:45:42.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-04T23:02:15.000Z (over 1 year ago)
- Last Synced: 2025-10-08T03:38:03.226Z (8 months ago)
- Topics: assembler, binutils, gas, jit, library
- Language: C
- Homepage:
- Size: 98.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
- Support: support.h
Awesome Lists containing this project
README
## argon
An experimental project to use binutils as a library
### rapl_test
An example program implementing a Read, Assemble, Print Loop.
It can be thought as a hacky JIT compiler based on GAS
#### How does it work?
- `CMakeLists.txt` takes care of downloading and building binutils with the correct flags
- `cc_wrap` is used as the C compiler in order to apply ad-hoc patches that expose the size of private types
- link time wrappers (`wrappers.cpp`) are used to hook binutils functions. This is used to implement a poor man's garbage collector and to allow object files to be written in-memory
- a small helper (`glue.c`) is added to binutils to simplify certain operations, like resetting and initializing GAS