Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 1998 13:14:36 +1100
From:      Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
To:        current@FreeBSD.ORG
Cc:        archie@whistle.com
Subject:   Re: strings in the kernel (was: snprintf() in the kernel)
Message-ID:  <98Nov23.131413est.40343@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help
Archie Cobbs <archie@whistle.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98Nov23.131413est.40343>