From owner-freebsd-current Sun Nov 22 18:15:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA11903 for freebsd-current-outgoing; Sun, 22 Nov 1998 18:15:29 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA11898 for ; Sun, 22 Nov 1998 18:15:25 -0800 (PST) (envelope-from peter.jeremy@auss2.alcatel.com.au) Received: by border.alcanet.com.au id <40343>; Mon, 23 Nov 1998 13:14:13 +1100 Date: Mon, 23 Nov 1998 13:14:36 +1100 From: Peter Jeremy Subject: Re: strings in the kernel (was: snprintf() in the kernel) To: current@FreeBSD.ORG Cc: archie@whistle.com Message-Id: <98Nov23.131413est.40343@border.alcanet.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Archie Cobbs wrote: >Sounds like a job for mr. linker.. Not really. For the linker to be able to do this, it would each string definition in a separate block (so that it could include or exclude it as it wished). This is not currently supported by the compiler or assembler, and only supported at an object module level within libraries in the linker. There's also the problem that the symbols used to refer to the strings are currently private - and therefore can't be referenced from a different module. Combining substrings across modules really means either pre-processing the source code to generate a common string block and a pile of #defines (or similar) into it [as done by X11], or modifying the compiler, assembler and linker to defer the actual string allocations. Neither approach is quick and easy to implement. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message