From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Manoj Srivastava <manoj.srivastava@stdc.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: Compiling libsepol with -fPIC instead of -fpic
Date: Mon, 20 Nov 2006 12:05:08 -0500 [thread overview]
Message-ID: <4561E044.6050006@mentalrootkit.com> (raw)
In-Reply-To: <87d57pqkca.fsf@glaurung.internal.golden-gryphon.com>
Manoj Srivastava wrote:
> Hi,
>
> I've had reports of packages filing to compile on SPARC
> hardware when linked with libsepol1 which was compiled with
> -fpic. We seem to be hitting the global offset table size limit;
> ,----[ GCC manual ]
> | `-fpic'
> | Generate position-independent code (PIC) suitable for use in a
> | shared library, if supported for the target machine. Such code
> | accesses all constant addresses through a global offset table
> | (GOT). The dynamic loader resolves the GOT entries when the
> | program starts (the dynamic loader is not part of GCC; it is part
> | of the operating system). If the GOT size for the linked
> | executable exceeds a machine-specific maximum size, you get an
> | error message from the linker indicating that `-fpic' does not
> | work; in that case, recompile with `-fPIC' instead. (These
> | maximums are 8k on the SPARC and 32k on the m68k and RS/6000. The
> | 386 has no such limit.)
> `----
>
> Simply recompiling with -fPIC corrects the problem.
>
> manoj
>
>
>
> ------------------------------------------------------------------------
>
> --- orig/src/Makefile
> +++ mod/src/Makefile
> @@ -24,10 +24,10 @@
> ln -sf $@ $(TARGET)
>
> %.o: %.c
> - $(CC) $(CFLAGS) -fpic -c -o $@ $<
> + $(CC) $(CFLAGS) -fPIC -c -o $@ $<
>
> %.lo: %.c
> - $(CC) $(CFLAGS) -fpic -DSHARED -c -o $@ $<
> + $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
>
> install: all
> test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
>
>
Acked-by: Karl MacMillan <kmacmillan@mentalrootkit.com>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2006-11-20 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 6:45 Compiling libsepol with -fPIC instead of -fpic Manoj Srivastava
2006-11-20 17:05 ` Karl MacMillan [this message]
2006-11-21 21:05 ` Stephen Smalley
2006-11-21 21:28 ` Karl MacMillan
2006-11-22 15:58 ` Stephen Smalley
2006-11-27 19:12 ` Karl MacMillan
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=4561E044.6050006@mentalrootkit.com \
--to=kmacmillan@mentalrootkit.com \
--cc=manoj.srivastava@stdc.com \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.