google/autofdo

create_llvm_prof fails to generate prof files

Closed this issue · 1 comments

image

I run command "create_llvm_prof --binary=./QuoteSvr --out=st.prof" then got the below error:
[ERROR:../create_llvm_prof.cc:159] autofdo tool requires the first loadable segment to be executable. "./QuoteSvr" does not meet this requirement. Try rebuild with link option "-Wl,--no-rosegment".

What I use is GNU ld, so I add "-Wl,-z=noseparate-code" in LD_FLAGS. Unfortunately, I got the link warning as below:
/usr/bin/ld: warning: -z =noseparate-code ignored

GNU ld can not recognize "-Wl,--no-rosegment"

Anyone can help me? Thank you.
Attached is my perf.data.

Debian clang version 11.0.1-2

perf.zip

image

I got resolved by add "-Wl,-z,noseparate-code" , so close this thread