Closed HShan886 closed 2 years ago
Hello @Haishan312 . Is it x86 or arm? What compiler and linker you are using? Did you pass -fno-reorder-blocks-and-partition flag?
@yota9 OS: x86_64
compiler: gcc-9.2.1
ld: 2.32
I pass -Wl,--emit-relocs -fno-reorder-blocks-and-partition
into CFLAGS
@Haishan312, eu-strip
is likely corrupting the binary. One (hacky) workaround is to add -use-gnu-stack
flag to llvm-bolt
invocation, which will try to reuse the existing program header for the new segment.
Oups didn't notice strip word, sorry :)
@maksfb it works, thank you.
Hi I use latest bolt to optimize bubble_sort binary with command line
llvm-bolt bubble_sort -o bubble_sort.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort -split-functions=2 -split-all-cold -split-eh -dyno-stats --update-debug-sections -v=2
bubble_sort's url ishttps://github.com/VictorRodriguez/autofdo_tutorial
and is generated by commandmake release
Then using the following command to strip debug information
eu-strip bubble_sort.bolt -o bubble_sort.strip.bolt -f bubble_sort.sym
I got a segment fault when running bubble_sort.strip.bolt. This segment fault means cannot access the new .text section.Any suggestion will be pleasure, thank you.