Xorg input thread (2)

Bill Crawford billcrawford1970 at gmail.com
Tue Jul 10 02:32:57 PDT 2007

On 09/07/07, Nix <nix at esperi.org.uk> wrote:
> Actually you should be able to use a linker script to place marker
> symbols at the start and end of the section, and then just mlock the
> range between the addresses of those symbols.

Even easier, just use ".text" or ".whatever" as a symbol (you'll have to use
assembly code, but gcc lets you embed that in C anyway, and most other
compilers AFAIK have some mechanism for doing so).


void *
getsectionaddress ()
    void *p;
    __asm__ ("mov $.text, %[p]\n" : [p] "=r" (p) : );
    return p;

Could easily turn it into a macro taking the section name, if someone has
the preprocessor-fu to use # and ## correctly ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070710/df816193/attachment.html>

More information about the xorg mailing list