Re: [go-nuts] Re: why the binary generated by go test has no symbol table

2020-09-09 Thread buaa...@gmail.com
it seems ldfags="-s=false" -gcflags="-l" can work 在2020年9月9日星期三 UTC+8 上午10:09:18 写道: > On Tue, Sep 8, 2020 at 7:04 PM buaa...@gmail.com > wrote: > > > > I wrote a tool to get binary file's symbol table during initialization, > and do some special tests, but it fails on Linux, so I get the

Re: [go-nuts] Re: why the binary generated by go test has no symbol table

2020-09-08 Thread Ian Lance Taylor
On Tue, Sep 8, 2020 at 7:04 PM buaa...@gmail.com wrote: > > I wrote a tool to get binary file's symbol table during initialization, and > do some special tests, but it fails on Linux, so I get the log like: > > $ go test > 2020/09/09 10:02:44 reading /tmp/go-build334351549/b001/xxx.test: no

Re: [go-nuts] Re: why the binary generated by go test has no symbol table

2020-09-08 Thread buaa...@gmail.com
I wrote a tool to get binary file's symbol table during initialization, and do some special tests, but it fails on Linux, so I get the log like: $ go test 2020/09/09 10:02:44 reading /tmp/go-build334351549/b001/xxx.test: no symbol section 2020/09/09 10:02:44 reading

Re: [go-nuts] Re: why the binary generated by go test has no symbol table

2020-09-08 Thread Ian Lance Taylor
On Mon, Sep 7, 2020 at 7:07 PM buaa...@gmail.com wrote: > > There is no ldflags provided, so why the symbol table is stripped Because if you run "go test" without the -c option, the executable is built, run, and then thrown away. There no reason to spend time generating debugging information

[go-nuts] Re: why the binary generated by go test has no symbol table

2020-09-07 Thread buaa...@gmail.com
There is no ldflags provided, so why the symbol table is stripped 在2020年9月8日星期二 UTC+8 上午10:05:33 写道: > And only on Linux, there is no symbol section in test binary unless I > generate it by go test -c -- You received this message because you are subscribed to the Google Groups "golang-nuts"