As far as I know, the only way to retrieve the start/end of the .text
section is via the linker script. LLD will define __start_<section
name> and __stop_<section name> symbols if <section name> is a valid C
identifier, which unfortunately doesn't cover sections starting with a
'.' like .text. I think Gold and ld.bfd behave this way as well but I
haven't checked the finer details.
On 8 May 2018 at 19:38, Sumonto Ghosh via llvm-dev
<[hidden email]> wrote: