LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: "Kevin B. Hendricks" <khendricks@ivey.uwo.ca>
Cc: <yellowdog-devel@lists.yellowdoglinux.com>,
	<linuxppc-dev@lists.linuxppc.org>
Subject: Re: do we need -fPIC for X11R6 modules
Date: Tue, 9 Oct 2001 15:05:21 +1000 (EST)	[thread overview]
Message-ID: <15298.34193.467121.221740@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20011009005252.QEEA29786.tomts9-srv.bellnexxia.net@there>


Kevin B. Hendricks writes:

> Quick question.  Should we be building X11R6 modules with -fPIC?  When I
> try, the resulting modules generate lots of unresolved symbols (like
> "fixup", etc).

I assume you mean XFree86 modules?

> What exactly are X11R6 modules?  Are they shared libraries?  If so, they
> should be built using -fPIC?  If they are not shared libraries, how are
> they "loaded" and "linked" in?

No, they are ordinary object files, which get loaded and linked into
the running XFree86 server process using linker code that is included
in the XFree86 server.  That is, the server mallocs some memory, reads
in the text and data and other stuff, processes the relocations, and
puts the symbols into its internal symbol table.

That means that for code in XFree86 to call a procedure in a module,
it has to do an explicit "lookup symbol" function call to get the
address of the procedure and then an indirect function call.

So no, we don't want -fPIC.  That introduces a whole new and different
set of relocations into the object file and I would be surprised if
the XFree86 loader knew how to deal with them.

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

      reply	other threads:[~2001-10-09  5:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-06 12:28 ATI Radeon 32MB PCI, Apple 17 Flat panel on B+W G3 Kevin B. Hendricks
2001-10-06 12:29 ` Kaoru Fukui
2001-10-06 15:58   ` Kevin B. Hendricks
2001-10-06 16:16     ` Tom Rini
2001-10-06 17:11       ` Benjamin Herrenschmidt
2001-10-06 18:06         ` Kevin B. Hendricks
2001-10-07  1:37 ` Ani Joshi
2001-10-07  1:41   ` Kevin B. Hendricks
2001-10-07 17:16   ` Gregorio Gervasio Jr.
2001-10-09  0:54   ` do we need -fPIC for X11R6 modules Kevin B. Hendricks
2001-10-09  5:05     ` Paul Mackerras [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15298.34193.467121.221740@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=khendricks@ivey.uwo.ca \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=yellowdog-devel@lists.yellowdoglinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox