[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_2F07B2EF6347A6E6521E4B9DECEEDBF88E05@qq.com>
Date: Sun, 22 Apr 2018 15:51:40 +0800
From: "Wang Sheng-Hui" <shhuiw@...mail.com>
To: "ast" <ast@...nel.org>,
"daniel" <daniel@...earbox.net>,
"kstewart" <kstewart@...uxfoundation.org>,
"gregkh" <gregkh@...uxfoundation.org>,
"tglx" <tglx@...utronix.de>,
"pombredanne" <pombredanne@...b.com>
Cc: "netdev" <netdev@...r.kernel.org>
Subject: How to detect libbfd when building tools/bpf?
Sorry to trouble you !
I run debian and installed binutils-dev beforehand.
Then I copied tools/build/feature/test-libbfd.c to t.c and run:
------------------------------------------------------------------------
root@...yfintech:~# cat t.c
#include <bfd.h>
extern int printf(const char *format, ...);
int main(void)
{
char symbol[4096] = "FieldName__9ClassNameFd";
char *tmp;
tmp = bfd_demangle(0, symbol, 0);
printf("demangled symbol: {%s}\n", tmp);
return 0;
}
root@...yfintech:~# gcc t.c -lbfd
root@...yfintech:~# ./a.out
demangled symbol: {ClassName::FieldName}
I thought libbfd can be reached from above.
But when I built tools/bpf, libbfd cannot be detected:
-------------------------------------------------------------------------
/linux# make O=../buildkernel/ tools/bpf
make[1]: Entering directory '/root/buildkernel'
DESCEND bpf
Auto-detecting system features:
... libbfd: [ OFF ]
... disassembler-four-args: [ on ]
DESCEND bpftool
Auto-detecting system features:
... libbfd: [ OFF ]
... disassembler-four-args: [ on ]
make[1]: Leaving directory '/root/buildkernel'
I wonder how should I do to get libbfd auto detected when building bpf tool?
Regards,
shenghui
Powered by blists - more mailing lists