This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Access .text start address and size

I am trying to calculate the CRC of the code during runtime.  How do I access the starting address of the .text section and the .text size during a function call?

THanks,

Will

  • I was able to find an example which shows how to access the variables defined in the .map file.

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/244599.aspx

    When I look at my map file, my __text__ address is 0xFFFFFFFF and I don't see a variable which describes the end of the text section.  There is an __end__ but this variable includes .bss, .const, etc. Any help would be great.

    THanks,

    Will

  • Hi Will,

    Thanks for your post.

    The linker pre-defines certain symbols for that purpose.  Please refer section 8.5.9.4 titled Symbols Defined by the Linker in the Assembly Language Tools User's Guide as noted below:

    http://www-s.ti.com/sc/techlit/spru186 .

    Also, please refer the below E2E post for your reference which would help you better.

    http://e2e.ti.com/support/development_tools/compiler/f/343/t/176823.aspx

    Thanks & regards,

    Sivaraj K

     -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------