elfrc — a resource compiler for ELF systems
Contents
Description
This manual page documents briefly the elfrc command.
This manual page was written for the Debian distribution because the original program does not have a
manual page.
elfrc is a program which can turn arbitrary files into ELF object files which can then be linked into
your program directly and accessed via simple, user-defined symbol names.
For instance, it's possible to embed even huge (16MB+) files directly into the executable and then access
the data in constant time without making the compiler or linker eat loads of memory.
Name
elfrc — a resource compiler for ELF systems
Options
Here's what the arguments do:
-ofilename
Store resulting ELF object in filename. If not given, no ELF object will be generated.
-hfilename
Store C header file which can be used to access the resource data in filename. If not given, no
header file will be generated.
-v Be a little verbose about what's going on.
In any case, the most important argument is resfile - the path to a resource file which can be parsed by
elfrc. If no resource file is given, or if "-" (a dash) is given, the resources will be read from the
standard input.
A resource file is just a plain text file, each line in the file describing a resource to be compiled
into the ELF output. Each line is expected to three fields, separated by tab characters: the type of the
resource (can be either 'binary' or 'text'), the symbol name (this should be a valid C identifier) and
the path to the file to be compiled in.
Synopsis
elfrc [-ofilename][-hfilename][-v]
