Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Seg fault when compiled with -mabi=64 and -lpthread
@ 2005-06-30 17:33 Bryan Althouse
  2005-06-30 19:08 ` Stephen P. Becker
  2005-06-30 20:21 ` Ralf Baechle
  0 siblings, 2 replies; 22+ messages in thread
From: Bryan Althouse @ 2005-06-30 17:33 UTC (permalink / raw)
  To: 'Linux/MIPS Development'

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

I have a problem when linking a 64 bit application with libpthread.  I
appears to link fine, but it will seg fault when I execute it.  I wrote an
empty C program called empty.c:

 

int main (void)

{  

    return 0;

}

 

I cross compile it with:

/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/bin/mips64-linux-g
nu-gcc -mabi=64 empty.c -o empty -lpthread

The executable will seg fault.  If I remove the -lpthread, it is fine.
Also, if I change the 64 to 32, it is fine.

 

Maybe I have a bad libpthread in /lib64?  If I type "file
/lib64/libpthread-0.10.so" I get: "ELF 64-bit MSB shared object, mips-3 MIPS
R3000_BE, version 1, not stripped".  Looks fine to me.  Should I cross
compile and replace libpthread?  If so, where can I find the source?

 

The other strange thing is that ldd does not work on 64 bit applications.
It will always return:  "not a dynamic executable".  Does anyone know how
this could be fixed?  

 

I'm using a PMC Yosemite board with an RM9224 processor.  The kernel is
2.6.12 64bit SMP.  I am using the PMC supplied cross compile tools, kernel,
and NFS file system. 

 

Thanks for your help!

Bryan

  

 


[-- Attachment #2: Type: text/html, Size: 5425 bytes --]

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

end of thread, other threads:[~2005-07-01 17:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-30 17:33 Seg fault when compiled with -mabi=64 and -lpthread Bryan Althouse
2005-06-30 19:08 ` Stephen P. Becker
2005-06-30 19:31   ` Bryan Althouse
2005-06-30 20:21 ` Ralf Baechle
2005-06-30 21:03   ` Daniel Jacobowitz
2005-06-30 22:09     ` Stephen P. Becker
2005-07-01  3:51       ` Daniel Jacobowitz
2005-07-01  4:44         ` Kumba
2005-07-01  8:49         ` Maciej W. Rozycki
2005-07-01 13:39           ` Daniel Jacobowitz
2005-07-01 14:10             ` Maciej W. Rozycki
2005-07-01 14:46               ` Daniel Jacobowitz
2005-07-01 15:04                 ` Maciej W. Rozycki
2005-07-01 14:56         ` Stephen P. Becker
2005-07-01 15:22           ` Maciej W. Rozycki
2005-07-01 16:39             ` Stephen P. Becker
2005-07-01 17:02           ` Daniel Jacobowitz
2005-07-01 17:15             ` Stephen P. Becker
2005-07-01 15:09         ` Bryan Althouse
2005-07-01 14:54           ` sjhill
2005-07-01 15:09           ` Bryan Althouse
2005-07-01 15:29           ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox