Help - Search - Members - Calendar
Full Version: Undefined Symbol: __divsi3
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
/usr/lib/ 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/ => /lib/ (0x40011000)
       /lib/ => /lib/ (0x2aaaa000)

if my path is set to the new toolchain i get:

# ldd /usr/lib/ => /lib/ (0x40011000)
       /opt/native/arm/2.95.3-armv4l-hardfpa//lib/ => /opt/native/arm/2.95.3-armv4l-hardfpa//lib/ (0x2aaaa000)

and if i add my new toolchain's /lib to the LD_LIBRARY_PATH i get :

# ldd /usr/lib/ => /opt/native/arm/2.95.3-armv4l-hardfpa/lib/ (0x40012000)
       /opt/native/arm/2.95.3-armv4l-hardfpa//lib/ => /opt/native/arm/2.95.3-armv4l-hardfpa//lib/ (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

#CPPFLAGS = -fPIC -Wall -Werror -fno-strength-reduce -I../include -g
CPPFLAGS = -fPIC -Wall -fno-strength-reduce -I../include -O2

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
    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... ?
(i think its an old gcc thing)

yep, just add the following to the end of the linker command ( $(LD) $(OBJ) -soname $(TARGET) -o $(TARGET) -lc) in the Makefile for the .o file::

-L/opt/native/arm/2.95.3-armv4l-hardfpa/lib/gcc-lib/armv4l-unknown-linux-gnu/2.95.3/ -lgcc

ie path to libgcc.a which defines __divsi3 among other goodies wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2016 Invision Power Services, Inc.