How to retrieve a block of binary from .text section in an executable?
I know objcopy can help by using:
objcopy --only-section=.text --output-target binary a.out a.out.bin
But it would be much better if I can realize the same goal within a function call using BFD library. Is there any way to call objcopy using function calls?