Linking error

Ian Lance Taylor iant@google.com
Fri Jun 15 15:21:00 GMT 2012


naga raj <gnuuser.raj@gmail.com> writes:

>>> ../../empty_cpp_bsp_0/lib/liblocal.a(close.o): In function `close':
>>> /proj/empty_cpp_bsp_0//libsrc/src/close.c:50: multiple definition of `close'
>>> /bin/../lib/gcc/arm-eabi/4.6.1/../../../../arm-eabi/lib/libc.a(lib_a-sysclose.o):sysclose.c:(.text+0x0):
>>> first defined here


>  From map file I found that close() function is called from libc of
> toolchain and not from my local library. I dont know why it is still
> refering close in local library.

Something is causing both liblocal.a(close.o) and
libc.a(lib_a-sysclose.o) to be included.  The map file should tell for
each object why it was pulled in to the link.

Ian



More information about the Binutils mailing list