On 2018-02-26 16:10, Tom Tromey wrote:
Maybe instead you could use objcopy to stuff the data into some section
in the executable. Or, just turn the dump to a C file, then compile it
and do a second link. Aside from (maybe hypothetical) C compiler
limits, that would be very portable.
Note that having (the option to keep) the dump and the main binary separate can
be a feature. For example, Emacs is often installed in a location that's
writable by root only, and if the dump file can be separate then users can just
redump in a directory that they can write to, without having to copy the entire
Emacs binary.
Separate dump files also makes it easier to experiment with multiple dumps.