Richard L. Hamilton wrote: > why can't one process an ELF file in such a way as to re-create it with > a particular string table enlarged sufficiently to hold whatever one wants > (not needing to reserve space for patching string table entries in the > binary)?
Ali already gave a good answer here, but I want to put in my .02 also. If all the ELF sections stayed broken apart, and were individually loaded at run time, it would be much easier to modify one ELF section without impacting any others. But when the linker creates a shared object, it makes the object faster to load by combining section data into chunks (program segments) with similar properties. Since the .dynamic section gets combined with the .text section, you can't crack open the data inside the .dynamic section without possibly needing to change the starting location of the .text section data. That would mean completely re-linking the .text section (but since the relocations are mostly gone by now, there's no way to do that). --chris