This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Using BFD library - linker problems
- To: binutils at gcc dot gnu dot org
- Subject: Using BFD library - linker problems
- From: Grzegorz Ilczuk <Grzegorz dot Ilczuk at heitec dot de>
- Date: Mon, 25 Jun 2001 15:17:02 +0200
- Organization: Heitec AG
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