I need to embed some data into an executable or SO file on Linux. I've found I can do it with ld --format binary
, however, all examples I've seen assume the data file is in the current directory. If it is not, then the resulting symbol name gets complicated, as it tries to include the full path to the file.
Is there a way to provide a name for the symbol explicitly, for ex. Say symbol name for this data should be MyData ?
Thanks