Andy Wingo <wi...@pobox.com> skribis: > On Sun 19 May 2013 23:52, l...@gnu.org (Ludovic Courtès) writes: > >> I guess literal strings would go out as per ‘SCM_IMMUTABLE_STRING’ >> (which needs relocation), right? > > Yep. Right now the stringbuf goes into read-only memory, but the string > itself goes in writable memory as it needs its link to the stringbuf > fixed up (relocated) at runtime.
OK. It could be in a PT_GNU_RELRO segment, which the loader (well, the other one, from glibc ;-)) remaps read-only after relocation. [A moment of enlightenment when one realizes what it means to have our own ELF toolchain. :-)] >> Perhaps the .guile.docstr section could eventually be used to contain >> stexi, but that seems to already fit into the plan anyway. > > That can happen already, but I think if we do texinfo we should > serialize the string as texinfo -- that way no relocs are needed if > docstrings aren't used, because if we use the .docstr string table, it's > just an offset into the image of a NUL-terminated UTF-8 byte sequence. Right, makes sense. > (I suppose we should be careful about embedded NUL characters; perhaps > we should use some other format for the string tables.) NULs in string contents should not be a problem, as long as there’s info somewhere about the string length, no? UTF-8-encoded ELF symbols may be more of a problem. How could NULs in symbols be handled? Thanks, Ludo’.