▲ | o11c 5 days ago | ||||||||||||||||
Right, but you can just use the section start/end symbols for a section that already goes into a mapped segment. | |||||||||||||||||
▲ | matheusmoreira 5 days ago | parent [-] | ||||||||||||||||
Can you show me how that would work? It's trivial to put arbitrary files into sections:
The problem is the program.files.* sections do not get mapped in by a LOAD segment. I ended up having to write my own tool to patch in a LOAD segment into the segments table because objcopy does not have the ability to do it.Even asked a Stack Overflow question about this two years ago: https://stackoverflow.com/q/77468641 The only answer I got told me to simply read the sections into memory via /proc/self/exe or edit the segments table and make it so that the LOAD segments cover the whole file. I eventually figured out ways to add LOAD segments to the table. By that point I didn't need sections anymore, just a custom segment type. | |||||||||||||||||
|