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.

Memory about the binary in DVRRDK_03.00.

Hi,
  how do I know the memory map for the binaries under DVRRDK_03.00.00.00/dvr_rdk/bin/ti816x/bin/ ?

  • Map file can be found in /dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_<m3vpss/m3video/c6xdsp>_release*.map

  • Dear Badri,

    Thanks for your reply.

    What I need is the memory map for each binaries (DVRRDK_03.00.00.00/dvr_rdk/bin/ti816x/bin/) in A8 side, do you know that?

  • The executables under DVRRDK_03.00.00.00/dvr_rdk/bin/ti816x/bin/ are user space apps.The addresses will be virtual address for the process .So I am not sure how the  addresses will be useful.Anyhow you can get the map file by modifying the link option

    /dvr_rdk/makerules/common_footer_a8.mk

    exe:
        @echo \# $(MODULE): $(PLATFORM): Linking
        $(LD) $(LD_OPTS) -Map $(EXE).map -o$(EXE) $(LIBS)
        @echo \# Final executable $(EXE) !!!    
        @echo \#

     

  • Hi Badri,

    Thanks for your reply

    I have done that.
    But I cant find *.map when using following command under DVRRDK_03.00.00.00/dvr_rdk/
    # find . -name "*.map"

  • we found following messageduring compiling
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'

    full messages are below
    # mem_rdwr: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//mem_rdwr.out !!!
    #
    # remote_debug_client: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//remote_debug_client.out !!!
    #
    # sys_pri: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//sys_pri.out !!!
    #
    # fw_load: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//fw_load.out !!!
    #
    # i2c_rdwr: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//i2c_rdwr.out !!!
    #
    # vpdma_dump: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//vpdma_dump.out !!!
    #
    # mem_stats: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//mem_stats.out !!!
    #
    # osa_kermod: Copying files to install directory
    # dvr_rdk_demo_mcfw_api: ti816x-evm: Building dependancies
    # dvr_rdk_demo_mcfw_api: ti816x-evm: Building dependancies
    # HNVR_audio_api: ti816x-evm: Building dependancies
    # dvr_rdk_demo_mcfw_api: ti816x-evm: Linking
    arm-none-linux-gnueabi-gcc: unrecognized option '-Map'
    # Final executable /home/medwin/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/bin/ti816x/bin//dvr_rdk_demo_mcfw_api.out !!!
    #

  • Pls try with option:

    $(LD) $(LD_OPTS) -o$(EXE) $(LIBS)  -Xlinker -M > $(EXE).map

  • Dear Badri,
    Thanks for your reply. It could generate *.map file.

    Following are parts of the map file

     .text        0x000145a4      0x730 /home/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/lib/ti816x-evm/dvr_rdk_demo_mcfw_api.a(aver_scd_bits_wr.o)
                    0x00014b04                Scd_resetStatistics
                    0x00014650                Scd_bitsWriteDelete
                    ...

    the 0x000145a4 is the virtual address as your speaking
    Q1.  what's the meaning of 0x730

  • It is origin and size of the section.0x730 is size in bytes of the .text section

  • According to following,

     .text          0x000145a4      0x730 /home/Projects/TI-8168/DVRRDK_03.00.00.00/dvr_rdk/../dvr_rdk/lib/ti816x-evm/dvr_rdk_demo_mcfw_api.a(scd_bits_wr.o)
                    0x00014b04                Scd_resetStatistics
                    0x00014650                Scd_bitsWriteDelete
                    0x000145f0                Scd_disableMotionTracking
                    0x00014b58                Scd_printStatistics
                    0x000145c8                Scd_enableMotionTracking
                    0x000146a8                Scd_bitsWriteCreate
                    0x00014a24                Scd_trackLayout
                    0x00014618                Scd_isMotionTrackingEnabled
                    0x00014af4                Scd_windowGrid
                    0x00014630                Scd_bitsWriteStop
                    0x00014644                Scd_bitsWriteCbFxn
                    0x000145a4                Scd_trackCh
                    0x000148cc                Scd_bitsWriteMain

    Q1. why the first item is "0x00014b04 Scd_resetStatistics" instead of "0x000145a4 Scd_trackCh"
    Q2. is there any meanning in the difference ?(like Scd_resetStatistics(0x00014b04) -Scd_bitsWriteDelete(0x00014650) )
    Q3. why the order isnot ascending order or descending order ?

  • The linker uses a default algorithm for section allocation to ensure best compact use of memory.  Based on this algorithm sections need not be in ascending or descending order.Also there is no meaning is difference between two symbol addresses.Pls refer http://linux.die.net/man/1/ld for explanation of linker options. There are options to change  the default linker algorithm as explained in the article