Date: | Fri, 10 Feb 2017 18:06:42 +0000 |
---|---|
From: | Mohamed Elsabagh <melsabag@xxxxxxx> |
Subject: | Re: [DynInst_API:] Compiling CFGTool using Dyninst Libarary in Ubuntu 16.04 |
I think the Makefile for the CFGTool is outdated. It's missing the instructionAPI library. Also GCC (POSIX?) searches libraries in the same order their names are encountered in the g++ command. If the Dyninst libraries are placed *before* CFG.cpp, GCC will search the libraries *before* it resolves any symbols in CFG.cpp, and therefore the compiled CFG object will fail to link to link with Dyninst. I am quoting the following from "https://linux.die.net/man/1/g++": "It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, foo.o -lz bar.o searches library z after file foo.o but before bar.o. If bar.o refers to functions in z, those functions may not be loaded." The following works:Â g++ -g -O2 -std=gnu++11 -I/usr/local/include -L/usr/local/lib CFG.cpp -o CFG -lparseAPI -linstructionAPI -lsymtabAPI -ldynDwarf -ldynElfÂ-lelf -lcommon -ldwarf On Fri, Feb 10, 2017 at 6:59 AM Sazzadur Rahaman <sazzad14@xxxxxx> wrote:
|
[← Prev in Thread] | Current Thread | [Next in Thread→] |
---|---|---|
|
Previous by Date: | Re: [DynInst_API:] Building Examples from parseAPI and dataflowAPI in Ubuntu 16.04, Sazzadur Rahaman |
---|---|
Next by Date: | Re: [DynInst_API:] Compiling CFGTool using Dyninst Libarary in Ubuntu 16.04, Sazzadur Rahaman |
Previous by Thread: | [DynInst_API:] Compiling CFGTool using Dyninst Libarary in Ubuntu 16.04, Sazzadur Rahaman |
Next by Thread: | Re: [DynInst_API:] Compiling CFGTool using Dyninst Libarary in Ubuntu 16.04, Sazzadur Rahaman |
Indexes: | [Date] [Thread] |