/usr/lib/libkgsha.so: undefined symbol: __divsi3
Can not Load Key Generators
i guess it trying to load/use theis module which is part of package i compile with new testing gcc-2.95.3 fpa native toolchain
i get the feeling from looking around it could be result of a few things...
if my path is set to default vfp toolchain i get:
# ldd /usr/lib/libkgsha.so
libc.so.6 => /lib/libc.so.6 (0x40011000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
#
if my path is set to the new toolchain i get:
# ldd /usr/lib/libkgsha.so
libc.so.6 => /lib/libc.so.6 (0x40011000)
/opt/native/arm/2.95.3-armv4l-hardfpa//lib/ld-linux.so.2 => /opt/native/arm/2.95.3-armv4l-hardfpa//lib/ld-linux.so.2 (0x2aaaa000)
#
and if i add my new toolchain's /lib to the LD_LIBRARY_PATH i get :
# ldd /usr/lib/libkgsha.so
libc.so.6 => /opt/native/arm/2.95.3-armv4l-hardfpa/lib/libc.so.6 (0x40012000)
/opt/native/arm/2.95.3-armv4l-hardfpa//lib/ld-linux.so.2 => /opt/native/arm/2.95.3-armv4l-hardfpa//lib/ld-linux.so.2 (0x2aaaa000)
#
maybe it has some thing to so with the source code for the module ??
# *******************************************************************
# * Copyright (c) 1994-2005 Jetico, Inc., Finland
# * All rights reserved.
# *
# * File: Makefile
# *
# * Description: kgsha makefile
# *
# * Scope: SHA-1 key generator
# *
# * Platforms: Linux
# *
# * Author: Vitaliy Zolotarev
# *
# * Revision: $Id: Makefile,v 1.11 2007/02/08 06:48:34 nail Rel-1.6-13 $
# *
# *******************************************************************/ #
LD = ld -d -shared
CPP=g++
#CPPFLAGS = -fPIC -Wall -Werror -fno-strength-reduce -I../include -g
CPPFLAGS = -fPIC -Wall -fno-strength-reduce -I../include -O2
CPPFLAGS += $(EXTRA_CXXFLAFS)
TARGET = libkgsha.so
HEADERS = kg_defs.h kgsha.h kblock.h sha1.h random.h
OBJ = alg.o kblock.o kg_misc.o kgsha.o pwldlg.o sha1.o random.o
all: $(TARGET)
%.o: %.cpp
$(CPP) $(CPPFLAGS) -c -o $@ $<
$(TARGET): $(OBJ)
$(LD) $(OBJ) -soname $(TARGET) -o $(TARGET) -lc
cp -f $(TARGET) ../lib
# cp -f $(HEADERS) ../include
clean:
rm -f *.o *.ver *~ $(TARGET)
for example i found this on a site out there:
AsIDE will now automatically create an Intel-HEX format file after every build.
I'm getting getting a linker error undefined reference to `__divsi3' when I build my application. Why?
You need to link in the library libgcc.a. Within AsIDE:
1. Select Project|Project Properties|Tools
2. Select Link in the Tool name list
3. Click the Options... button
4. Add the following line to Libraries/Objects:
-L %(GCC_EXEC_PREFIX)\arm-elf\3.3.1 -lc -lgcc
Where -lgcc is shorthand for libgcc.a. AsIDE will now automatically link in libgcc.a after every build.
maybe something similiar could help... ?