> Hi Guys, > > I apologise - I know that Jose CC'ed me on this topic, but I have lost > the email, so I am creating this post instead. > >> What about using an OS-specific section flag in elf.h, something like: >> #define SHF_GNU_PERSISTENT 0x0ff00001 /* Section must not be >> stripped. */ > > I rather like this idea. It would certainly make things easier. > Assuming that is that there is a convenient way to set the flag. Ie > we need to teach the assembler about it, and probably the linker too > (so that it can be used in linker scripts). > > It might also be a nice idea to have a complimentary flag to indicate > sections that expect to be stripped, even if they might otherwise be > retained. For example: > > #define SHF_GNU_TREAT_AS_DEBUG 0x0ff00002 /* Treat as a debug info > section. Strip with other debug sections and move to a separate > debug info file when creating such files. */ > > This could be added to note sections for example, where the notes > will not be needed at run-time.
I am, _very slowly_, working on this. Along with other 100 gazillion things to do, but unless someone else beats me to it, I will send patches at some point.