This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

glibc-2.3.4 .so on glibc-2.6.1 system = mmap error


Hi,

I'm glad to see the new list. Hopefully people are listening ...

I compiled a .so on a glibc-2.3.4 system (CentOS 4 - 2.6.9) cleanly
but when I try to run it on a glibc-2.6.1 system (OpenSUSE 10.3 -
2.6.22) mmap either returns MAP_FAILED w/ errno = ENOMEM or succeeds
but the memory isn't what it should be. It runs fine on a glibc-2.5
system (CentOS 5.0 - 2.6.18) and if I compile it on the same glibc-2.5
system it works on the glibc-2.6.1 system. It's only the 2.3 library
that blows up on 2.6.

Does anyone have any suggestions or diagnostics that might help
identify the problem?

I would like my code to work on a wide range of systems.

System and library details inlined below.

Mike

--8<-- CentOS 4

This is the system the library (libplexcel.so) was compiled on:

[root@ls6 ~]# uname -a
Linux ls6.foo.net 2.6.9-67.0.7.EL #1 Sat Mar 15 06:19:46 EDT 2008
x86_64 x86_64 x86_64 GNU/Linux
[root@ls6 ~]# rpm -qa | grep glibc
glibc-common-2.3.4-2.39
glibc-2.3.4-2.39
glibc-headers-2.3.4-2.39
glibc-2.3.4-2.39
glibc-kernheaders-2.4-9.1.100.EL
glibc-devel-2.3.4-2.39
[root@ls6 ~]# objdump -T /lib64/tls/libc.so.6 | grep mmap
00000036fa0c40c0  w   DF .text  000000000000002b  GLIBC_2.2.5 mmap
00000036fa0c40c0  w   DF .text  000000000000002b  GLIBC_2.2.5 mmap64
[root@ls6 ~]# objdump -T /usr/lib64/libplexcel.so | grep mmap
0000000000000000      DF *UND*  000000000000002a  GLIBC_2.2.5 mmap

--8<-- OpenSUSE 10.3

This is the system on which libplexcel.so's call to mmap returns
MAP_FAILED or garbage:

ls4:~ # uname -a
Linux ls4 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC x86_64
x86_64 x86_64 GNU/Linux
ls4:~ # rpm -qa | grep glibc
glibc-i18ndata-2.6.1-18
glibc-locale-2.6.1-18
glibc-32bit-2.6.1-18
glibc-2.6.1-18
glibc-locale-32bit-2.6.1-18
ls4:~ # objdump -T /lib64/libc.so.6 | grep mmap
00000000000c22e0  w   DF .text  0000000000000028  GLIBC_2.2.5 mmap64
00000000000c22e0  w   DF .text  0000000000000028  GLIBC_2.2.5 mmap
ls4:~ # objdump -T /usr/lib64/libplexcel.so | grep mmap
0000000000000000      DF *UND*  000000000000002a  GLIBC_2.2.5 mmap

--8<-- CentOS 5.0

This is the glibc-2.5 system on which the library runs fine. The
library runs fine on the glibc-2.6 system if I compile it on this
system.

[ioplex@s0 ~]$ uname -a
Linux s0.foo.net 2.6.18-8.1.14.el5 #1 SMP Thu Sep 27 19:05:32 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
[ioplex@s0 ~]$ rpm -qa | grep glibc
glibc-2.5-12
glibc-headers-2.5-12
glibc-2.5-12
glibc-devel-2.5-12
glibc-common-2.5-12
[ioplex@s0 ~]$ objdump -T /lib64/libc.so.6 | grep mmap
0000003a030ca250  w   DF .text  0000000000000028  GLIBC_2.2.5 mmap64
0000003a030ca250  w   DF .text  0000000000000028  GLIBC_2.2.5 mmap


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]