This is the mail archive of the
mailing list for the libc-ports project.
static link on MIPS
- From: Atsushi Nemoto <anemo at mba dot ocn dot ne dot jp>
- To: libc-ports at sourceware dot org
- Cc: drow at false dot org, macro at linux-mips dot org
- Date: Wed, 24 Dec 2008 02:28:10 +0900 (JST)
- Subject: static link on MIPS
As glibc bugzilla #1048 show, static linking on MIPS is somewhat
broken for years. For example,
$ cat foo.c
int main(int argc, char **argv)
$ gcc -o foo foo.c -static
/tmp/ccSCPyxW.o: In function `main':
foo.c:(.text+0x2c): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
foo: ../sysdeps/unix/sysv/linux/ia64/getpagesize.c:35: __getpagesize: Assertion `_rtld_global_ro._dl_pagesize != 0' failed.
Floating point exception
(Note that mips getpagesize.c includes ia64/getpagesize.c)
Up to glibc 2.8, glibc-2.3.90-20050704-mips-dl-static.patch by Maciej
could be used to fix the problem. But with glibc 2.9, it causes
Did someone already fixed this for recent glibc?
If no, I want to forward-port the patch. Can anybody suggests where
to fix? I suppose the patch was broken since this commit
(http://sourceware.org/ml/libc-ports/2008-10/msg00000.html), but not
On Wed, 1 Oct 2008 09:30:40 -0400, Daniel Jacobowitz <email@example.com> wrote:
> I have checked in this patch, which adds support for the new PLT
> format recently added to binutils and gcc.
> This patch also fixes a bug in dlsym on MIPS, even with current GCC
> and binutils; dlsym would sometimes return lazy binding stubs. That's
> what the copy of dl-lookup.c and the trick in do-lookup.h are for.
> Daniel Jacobowitz
> 2008-10-01 Mark Shinwell <firstname.lastname@example.org>
> Daniel Jacobowitz <email@example.com>
> Richard Sandiford <firstname.lastname@example.org>
Any suggestions are welcome. Thanks.