[llvm-dev] Start/end of .text section

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Start/end of .text section

Chris Lattner via llvm-dev
Hi,
Is there a way to retrieve the start/end of .text section (at runtime) without having to add additional PROVIDE() variables to the linker script?

Thanks

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Start/end of .text section

Chris Lattner via llvm-dev
Hello Sumonto,

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.

Peter

On 8 May 2018 at 19:38, Sumonto Ghosh via llvm-dev
<[hidden email]> wrote:

> Hi,
> Is there a way to retrieve the start/end of .text section (at runtime)
> without having to add additional PROVIDE() variables to the linker script?
>
> Thanks
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev