This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linking shared libopcodes against libbfd


libopcodes has the undefined symbol bfd_get_arch that is provided by
libbfd:
$ nm /usr/lib64/libopcodes.so  |grep U |grep bfd

                 U bfd_get_arch

But libopcodes is not linked against libbfd: 
$ ldd /usr/lib64/libopcodes.so 
        libc.so.6 => /lib64/libc.so.6 (0x0000002a9568d000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)

This leads e.g. to a runtime error when dlopening libopcodes directly.

I'm apending a patch to fix this.  I tested build of binutils on
Linux/x86-64 with both --disable-shared and --enable-shared.

Ok to commit?
Andreas

2003-05-14  Andreas Jaeger  <aj@suse.de>

	* Makefile.am (libopcodes_la_LIBADD): Add libbfd.la.
	(libopcodes_la_DEPENDENCIES): Add libbfd.la.
	* Makefile.in: Regenerated.

============================================================
Index: opcodes/Makefile.am
--- opcodes/Makefile.am	1 Apr 2003 15:50:30 -0000	1.65
+++ opcodes/Makefile.am	14 May 2003 11:33:50 -0000
@@ -282,8 +282,8 @@ disassemble.lo: disassemble.c $(INCDIR)/
 	$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
 
 libopcodes_la_SOURCES =  dis-buf.c disassemble.c
-libopcodes_la_DEPENDENCIES = $(OFILES)
-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
+libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la
+libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la
 libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
 
 # libtool will build .libs/libopcodes.a.  We create libopcodes.a in

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]