linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Help about the libc-2.1.1 segmentation fault
@ 2000-05-11  3:28 Shuangjun Zhu
  0 siblings, 0 replies; 4+ messages in thread
From: Shuangjun Zhu @ 2000-05-11  3:28 UTC (permalink / raw)
  To: linuxppc-embedded


Hello, everyone

On a MPC823 FADS board, I run the mpc8xx-2.2.13 kernel.
With the libc-2.1.1.so or libc-2.1.3.so, every application happened
    "Segmentation fault"
But if I compile the "hello world" program with  statically
linked library, or if I use the libc-1.99.so, there is no error.
Can I upgrade the libc to 2.x.x?

BTW, I have patched the linux kernel 2.3.33 FPU emulation patch.

So, what's wrong?

Thanks in advanced!

BRs,
Shuangjun

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help about the libc-2.1.1 segmentation fault
@ 2000-05-12  1:05 Shuangjun Zhu
  2000-05-12  5:07 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Shuangjun Zhu @ 2000-05-12  1:05 UTC (permalink / raw)
  To: Lucinda Schafer; +Cc: linuxppc-embedded


Firstly, thank you for your kind help.
In fact, my root file system is libc-1.99.so.  It assures me to begin to
work.
I build another file system to test the libc-2.1.1.so. It likes
           ----  lib/libc-2.1.1.so
          |
/mnt ----------  bin -------- hello.dynamic, which built with libc-2.1.1.so
library
          |              |--- hello.static, which built with static library
          |
          ------ sbin/

1. static library application, use ld-2.1.1.so and libc-2.1.1.so load
bash# /mnt/lib/ld.so.1 --library-path /mnt/lib /mnt/hello.static
Segmentation fault

2. static library application, run under libc-1.99.so
bash# /mnt/hello.static
Hello, world

3. dynamic library application, use ld-2.1.1.so and libc-2.1.1.so load
bash# /mnt/lib/ld.so.1 --library-path /mnt/lib /mnt/hello.dynamic
Segmentation fault

4. dynamic library application, use ld.so.1 and libc-1.99.so load
bash# /mnt/hello.dynamic
/mnt/hello.dynamic: error in loading shared libraries
: undefined symbol: __libc_start_main

So, any suggestion?

Does anyone use libc-2.1.1 on MPC8xx-2.2.13-linux ?

-Shuangjun
    -----Original Message-----
    From: Lucinda Schafer <lucsch@adaptivemicro.com>
    To: Shuangjun Zhu (r44089) <r44089@email.sps.mot.com>
    Date: Thursday, May 11, 2000 9:18 PM
    Subject: RE: Help about the libc-2.1.1 segmentation fault


    Your dynamic linker is still looking for libc-1.99.so, perhaps...

    For example, if your libraries are in /usr/local/powerpc-linux/lib and
your program is named "program", try running it by using

    /usr/local/powerpc-linux/lib/ld.so.1  --library-path
/usr/local/powerpc-linux/lib ./program

    If your program runs this way, that's your problem.

    -----Original Message-----
    From: Shuangjun Zhu [mailto:r44089@email.sps.mot.com]
    Sent: Wednesday, May 10, 2000 10:28 PM
    To: linuxppc-embedded@lists.linuxppc.org
    Subject: Help about the libc-2.1.1 segmentation fault




    Hello, everyone

    On a MPC823 FADS board, I run the mpc8xx-2.2.13 kernel.
    With the libc-2.1.1.so or libc-2.1.3.so, every application happened
        "Segmentation fault"
    But if I compile the "hello world" program with  statically
    linked library, or if I use the libc-1.99.so, there is no error.
    Can I upgrade the libc to 2.x.x?

    BTW, I have patched the linux kernel 2.3.33 FPU emulation patch.

    So, what's wrong?

    Thanks in advanced!

    BRs,
    Shuangjun


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help about the libc-2.1.1 segmentation fault
  2000-05-12  1:05 Help about the libc-2.1.1 segmentation fault Shuangjun Zhu
@ 2000-05-12  5:07 ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2000-05-12  5:07 UTC (permalink / raw)
  To: Shuangjun Zhu; +Cc: Lucinda Schafer, linuxppc-embedded


In message <001e01bfbbae$2d0e03a0$69f001dc@sjzhu.sps.mot.com> you wrote:
>
> Firstly, thank you for your kind help.
> In fact, my root file system is libc-1.99.so.  It assures me to begin to
> work.
> I build another file system to test the libc-2.1.1.so. It likes
>            ----  lib/libc-2.1.1.so
>           |
> /mnt ----------  bin -------- hello.dynamic, which built with libc-2.1.1.so
> library
>           |              |--- hello.static, which built with static library
>           |
>           ------ sbin/

Combining libc5 (1.99) and libc6 (2.1.x) withing one  system  is  not
easily done.

The only way I got  this  working  is  _strict_  separation  of  both
environments; separate directories is not enough.

Try the following: install a STATICALLY linked shell  (for  instance,
sash)  as  /mnt/bin/sh;  then  run "chroot /mnt /bin/sh", so that you
have a staicallly linked shell  running  in  a  chrooted  environment
where   ONLY  libc-2.1.x  files  (binaries,  libraries,  loader)  are
visible.

This way I've been testing my 2.1.x (x=1, 2 and 3) libs and  binaries
for a while.

Works fine for me, hope it helps.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
C++ was an interesting and valuable experiment, but we've learned its
lessons and it's time to move on.
                            - Peter Curran in <DCqM4z.BxB@isgtec.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help about the libc-2.1.1 segmentation fault
@ 2000-05-12 10:33 kd
  0 siblings, 0 replies; 4+ messages in thread
From: kd @ 2000-05-12 10:33 UTC (permalink / raw)
  To: Shuangjun Zhu; +Cc: linuxppc-embedded, lucsch


If you want to go the glibc2.1.x route stick with x=3. It is the one giving
the least problems and has stable pthread support for the powerpc. The
pthread support was somehow flaky both for x=1 and x=2 (in my experience).
Just dont forget to apply the necessary patches (Cacheline size patch and
fpu patch) and dont to forget to remove the memset.S file!!!!

I also have been playing with diffrent libraries (although now I am just
using glibc 2.1.3) and what I did is that installed just couple of
"embedded filesystem" which I could switch between just by changing the
export file for the NFS server. ( I am booting the boards over NFS).

Hope this helps,

K.D.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-05-12 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-12  1:05 Help about the libc-2.1.1 segmentation fault Shuangjun Zhu
2000-05-12  5:07 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2000-05-12 10:33 kd
2000-05-11  3:28 Shuangjun Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).