faerie icon indicating copy to clipboard operation
faerie copied to clipboard

Artifact: textual relocation description format

Open m4b opened this issue 7 years ago • 0 comments

Design

Having a textual format which the artifact can dump would be extremely cool and useful.

In particular, if someone submits a bug report, can request they also paste the textual format dump from their artifact.

Furthermore, once a format was stabilized, we could implement an emitter and a parser, which would allow us to feed textual (and hence editable!) relocatable "artifacts" into a parser frontend (e.g., the prototype binary) in order to emit elf/macho object file backends, from a single textual format.

Use cases

  1. For debugging external issues, this won't require a binary to be uploaded, nor a compiler for whatever source generated it; just the state of the artifact prior to object file emission. This would aid in debugging + reproducability.

  2. For testing + integration, having a "portable" textual format would be very useful; we could programmatically create an artifact, then have it dump its text format and compare this against a checked in value, for example.

  3. Development: without recompiling the prototype, a text file could be edited, fed into the prototype, which then constructs the artifact based on the textual file, and then emits the object file. This would allow experimentation with unusual link patterns, new types of relocations, different kinds of code and relocation patterns, etc.

m4b avatar Sep 09 '18 08:09 m4b