Using BFD library - linker problems

Grzegorz Ilczuk Grzegorz.Ilczuk@heitec.de
Mon Jun 25 06:19:00 GMT 2001


Hello

	I would like to access and modify ELF files from a program written in
C, so according to the documentation I have included 'bfd.h' and have
tried to link a program with 'libbfd.a'. But I have got some error
messages :
[pc-grzilc : grzilc] bfd >gcc hello.c -lbfd
/usr/lib/libbfd.so: undefined reference to `objalloc_create'
/usr/lib/libbfd.so: undefined reference to `xstrerror'
/usr/lib/libbfd.so: undefined reference to `hex_init'
/usr/lib/libbfd.so: undefined reference to `concat'
/usr/lib/libbfd.so: undefined reference to `_objalloc_alloc'
/usr/lib/libbfd.so: undefined reference to `_hex_value'
/usr/lib/libbfd.so: undefined reference to `objalloc_free_block'
/usr/lib/libbfd.so: undefined reference to `objalloc_free'
/usr/lib/libbfd.so: undefined reference to `xexit'
collect2: ld returned 1 exit status

Please help me how should I use the library. I'm just started to use
Linux and I don't know which library is missing or what is wrong.

A lot of greetings
Grzegorz Ilczuk



More information about the Binutils mailing list