2 ms·
> concatenate the data to the ELF and add a PT_LOAD segment for it so that Linux loads it onto memory automatically I was reading Justine's Github profile, and
by sph 3y ago
> concatenate the data to the ELF and add a PT_LOAD segment for it so that Linux loads it onto memory automatically
I was reading Justine's Github profile, and there was a mention of POSIX systems natively supporting shebang programs made of binary + appended data out of the box. I don't remember the specifics, might be worth investigating how that works exactly.
- matheusmoreira 3y agoYeah, she actually got that feature standardized. Apparently it's a binary version of the feature used in those self-extracting installer .run scripts. I finished the embedded segment loading feature by the way. I'm writing that article as promised but if you'd like to check it out ahead of time: https://github.com/lone-lang/lone/blob/master/source/tools/lone-embed.c https://github.com/lone-lang/lone/blob/master/source/tools/l... https://github.com/lone-lang/lone/blob/master/source/lone/auxiliary_vector.c https://github.com/lone-lang/lone/blob/master/source/lone/au... https://github.com/lone-lang/lone/blob/master/source/lone/segment.c https://github.com/lone-lang/lone/blob/master/source/lone/se... https://github.com/lone-lang/lone/blob/master/source/lone/modules/embedded.c https://github.com/lone-lang/lone/blob/master/source/lone/mo...