I'm instrumenting my program with a custom compiler instrumentation pass. The compiler adds a global variable in each module. All the global go to a particular section (_prof_global
). For each module i can see global with objdump -h
. But in the final binary the section is removed. Most likely linker is removing it because the globals are unused. Is there a way to force linker to keep that section anyways?
↧
Force linker to include a section in the binary
↧