problem with building 64 bit library - symbols seem to be getting messed up

Ishfak F Bhagat bishfak at in.ibm.com
Wed Jan 7 16:29:18 EST 2004


Oops, my mail did not go as ASCII and got base64 encoded !

Here it is again:

I am building a 64 bit library on ppc linux using the gcc (cross) compiler
v3.2.
During linking I get the following errors :

        ------------------- link errs ------------------
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o: In
function `no symbol':
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o(.text+0xe9c):
multiple definition of `no symbol'
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o(.text+0x120):
first defined here
/opt/cross/lib/gcc-lib/powerpc64-linux/3.2/../../../../powerpc64-linux/bin/ld:
Warning: size of symbol `' changed from 212 to 2444 in
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o: In
function `list_delete_esc':
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o(.opd+0x138):
multiple definition of `list_delete_esc'
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o(.text+0x1828):first
defined here
/opt/cross/lib/gcc-lib/powerpc64-linux/3.2/../../../../powerpc64-linux/bin/ld:
Warning: size of symbol `list_delete_esc' changed from 3404 to 24 in
/BUILD/sb/ldapdevnew/obj/ppc_linux_2/libraries/libldap/ssl/64/getdn.o
        --------------------------------------------------


going thru the nm output for the above .o file, I realized that the
symbols are getting messed up. Few of the initial characters for most
symbols are getting stripped off,  and some symbols just blank. E.g. the
last symbol is seen as '8z' but is actually 'utf8z'
in the src file !

        ----------------- part of the nm output ------------------
00000000000000ad d
                 U
                 U
0000000000000120 T
0000000000000e9c T
0000000000002808 T
0000000000002a78 T
0000000000000228 D
00000000000003d8 D
0000000000000468 D
0000000000006360 T
0000000000000498 D
00000000000063c8 T
0000000000000510 D
00000000000072ac T
0000000000000528 D
00000000000073d0 T
0000000000000540 D
00000000000074d0 T
0000000000004be8 T .ldap_explode_dns
000000000000043d d .ldap_explode_dns2
0000000000000000 T .malloc
0000000000000439 d 2ufn2
0000000000000430 d 8gthan
000000000000042f d 8slasht
000000000000042b d 8z
        ---------------------------------------------------


I use the following command (thru my makefile) for compiling the above
file :

        ----------------------- compile command ----------------------
powerpc64-linux-gcc -c -O0
-DTEMPLATEFILE="\"/usr/ldap/etc/ldaptemplates.conf\""
-DFILTERFILE="\"/usr/ldap/etc/ldapfilter.conf\"" -DLDAPV3
-DLOCALCP_TRANSLATION -DSSL -DLDAP_SSL_MAX -DLDAP_THREADSAFE
-DSLAPD_CALLBACKS -DPPC_LINUX_2 -D_PPC_LINUX_2 -DLINUX2 -DLDAP_DEBUG
-DLDAP_REFERRALS -DRDBM_CACHE -DREVERSE_INDEXING -DNEEDPROTOS
-D__EXTENSIONS__ -DCLIENT_SERVER_LOCALCP_TRANSLATION -DLOCALCP_ASCII
-D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D__SVR4
-D_ALL_SOURCE -mno-altivec -mabi=no-altivec -D_REENTRANT -D__64BIT__
-DPPC__64 -fPIC -nostartfiles
-I/BUILD/sb/ldapdevnew/export/ppc_linux_2/ldap/usr/include
-I/BUILD/sb/ldapdevnew/adks/common/include
-I/BUILD/sb/ldapdevnew/adks/ppc_linux_2/gskit/701.9/include
-I/BUILD/sb/ldapdevnew/adks/ppc_linux_2/kerberos5/include
/BUILD/sb/ldapdevnew/src/libraries/libldap/getdn.c
        ----------------------- compile command ----------------------


Any clues to what is going wrong?

NOTE: The above errors are noticed only on some files. I am able to build
some other libraries successfully and the above errors are only noticed on

some .c files for this particular library.

Does it look like a compiler bug? I searched the SuSe website and 3.2
seems to be the latest GCC compiler.

Any help is greatly appreciated.



Thanks and Regards,
Ishfak Bhagat
Staff Software Engineer
IBM India Software Labs, Pune
Tie-Line - 92-47022
Tel - 91 20 26901022
        (91 20 26982424, Extn: 1022)
Fax - 91 20 26982425


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





More information about the Linuxppc64-dev mailing list