From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: rtl metadata musings Date: Mon, 20 May 2013 21:28:35 +0200 Message-ID: <87txlxqwm4.fsf@gnu.org> References: <871u9fqv70.fsf@pobox.com> <87bo86y6vx.fsf@gnu.org> <877gitd92a.fsf@pobox.com> <87fvxhsj3j.fsf@gnu.org> <87li79bj4b.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369078143 4971 80.91.229.3 (20 May 2013 19:29:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 May 2013 19:29:03 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 20 21:29:02 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UeVlV-0005Ku-MY for guile-devel@m.gmane.org; Mon, 20 May 2013 21:29:01 +0200 Original-Received: from localhost ([::1]:43968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeVlV-0008Kq-54 for guile-devel@m.gmane.org; Mon, 20 May 2013 15:29:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeVlM-0008GJ-9M for guile-devel@gnu.org; Mon, 20 May 2013 15:28:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeVlH-0004Pe-B0 for guile-devel@gnu.org; Mon, 20 May 2013 15:28:52 -0400 Original-Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=33083 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeVlH-0004OG-50 for guile-devel@gnu.org; Mon, 20 May 2013 15:28:47 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 829D2D52F; Mon, 20 May 2013 21:28:36 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m6GhVV-a3TmF; Mon, 20 May 2013 21:28:36 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id E494CD494; Mon, 20 May 2013 21:28:35 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Prairial an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87li79bj4b.fsf@pobox.com> (Andy Wingo's message of "Mon, 20 May 2013 20:29:08 +0200") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:e0b:1:123:ca0a:a9ff:fe03:271e X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16394 Archived-At: Andy Wingo skribis: > On Mon 20 May 2013 18:37, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Andy Wingo skribis: >> >>> On Sun 19 May 2013 23:52, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >>> >>>> I guess literal strings would go out as per =E2=80=98SCM_IMMUTABLE_STR= ING=E2=80=99 >>>> (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. :-)] > > Right :) We don't need to rely on the loader, and in fact should not in > general do so. Some "relocations" are actually more complicated than > what glibc does; for example, for symbols or keywords. Yes. I meant, there are things Guile=E2=80=99s loader could remap read-only once the relocations are done, as glibc=E2=80=99s loader does for PT_GNU_RE= LRO. >>> (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=E2=80= =99s >> info somewhere about the string length, no? > > There isn't -- not in ELF string tables. They're NUL-terminated. > >> UTF-8-encoded ELF symbols may be more of a problem. How could NULs in >> symbols be handled? > > Well we can just use some other data structure that's not a standard ELF > string table; since we have the linker and loader and we are defining > custom sections (.guile.docstrs for example) we can do what we like. OK. Ludo=E2=80=99.