Re: [DynInst_API:] libiberty/libstdc++ demangler


Date: Tue, 16 Jun 2015 11:55:00 -0500
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] libiberty/libstdc++ demangler
On 06/16/2015 11:33 AM, Andrew Gontarek wrote:
Hi Bill,

On 06/15/2015 05:15 PM, Bill Williams wrote:
Weird; normally at least the /usr version of the demangler is built
PIC. Does
make VERBOSE=1 reflect the correct library search path for libiberty?

Looks like the search path is incorrect on the link line:

/opt/gcc/4.8.1/bin/c++  -fPIC  -std=c++11  -fvisibility=hidden
-fvisibility-inlines-hidden -W -Wall -Wpointer-arith -Wcast-qual
-Woverloaded-virtual -Wcast-align -Wno-non-template-friend -O2 -g
-Wl,--no-undefined -shared -Wl,-soname,libcommon.so.8.2 -o
libcommon.so.8.2.1 CMakeFiles/common.dir/src/Ident.C.o
CMakeFiles/common.dir/src/string-regex.C.o
CMakeFiles/common.dir/src/Timer.C.o
CMakeFiles/common.dir/src/Types.C.o
CMakeFiles/common.dir/src/debugOstream.C.o
CMakeFiles/common.dir/src/lprintf.C.o
CMakeFiles/common.dir/src/pathName.C.o
CMakeFiles/common.dir/src/Time.C.o
CMakeFiles/common.dir/src/fraction.C.o
CMakeFiles/common.dir/src/timing.C.o
CMakeFiles/common.dir/src/stats.C.o
CMakeFiles/common.dir/src/Annotatable.C.o
CMakeFiles/common.dir/src/MappedFile.C.o
CMakeFiles/common.dir/src/sha1.C.o
CMakeFiles/common.dir/src/serialize-bin.C.o
CMakeFiles/common.dir/src/serialize-xml.C.o
CMakeFiles/common.dir/src/util.C.o CMakeFiles/common.dir/src/Node.C.o
CMakeFiles/common.dir/src/Gra
ph.C.o CMakeFiles/common.dir/src/Edge.C.o
CMakeFiles/common.dir/src/DOT.C.o CMakeFiles/common.dir/src/dyn_regs.C.o
CMakeFiles/common.dir/src/AST.C.o
CMakeFiles/common.dir/src/addrtranslate.C.o
CMakeFiles/common.dir/src/arch-x86.C.o
CMakeFiles/common.dir/src/arch-power.C.o
CMakeFiles/common.dir/src/debug_common.C.o
CMakeFiles/common.dir/src/VariableLocation.C.o
CMakeFiles/common.dir/src/Buffer.C.o
CMakeFiles/common.dir/src/MachSyscall.C.o
CMakeFiles/common.dir/src/linuxKludges.C.o
CMakeFiles/common.dir/src/timing-linux.C.o
CMakeFiles/common.dir/src/parseauxv.C.o
CMakeFiles/common.dir/src/addrtranslate-sysv.C.o
CMakeFiles/common.dir/src/addrtranslate-auxv.C.o
CMakeFiles/common.dir/src/addrtranslate-linux.C.o
-L/tmp/andrewg/stat/install_tmp/lib -Wl,-Bstatic -liberty -Wl,-Bdynamic
-Wl,-rpath,/tmp/andrewg/stat/install_tmp/lib:::::::::::::::::::::::::::::::::::

/usr/bin/ld:
/opt/gcc/4.8.1/snos/lib/gcc/x86_64-suse-linux/4.8.1/../../../../lib64/libiberty.a(cplus-dem.o):
relocation R_X86_64_32S against `_sch_istable' can not be used when
making a shared object; recompile with -fPIC
/opt/gcc/4.8.1/snos/lib/gcc/x86_64-suse-linux/4.8.1/../../../../lib64/libiberty.a:
could not read symbols: Bad value

Is -DIBERTY_LIBRARIES supposed to override the default search path?

It's supposed to, yeah. The theory is it takes -DIBERTY_LIBRARIES, then standard paths, then LIBRARY_PATH, and finally LD_LIBRARY_PATH. 8.2.1 I believe suffered from a bug that's fixed on git master, though--in it, IBERTY_LIBRARIES should point to the directory containing libiberty, not the actual library.

-Andrew



--
--bw

Bill Williams
Paradyn Project
bill@xxxxxxxxxxx
[← Prev in Thread] Current Thread [Next in Thread→]