Post Go back to editing

See the values of array elements from binary LDR

Category: Software
Product Number: bf
Software Version: CCES 1.2

I have a LDR file which was generated using CCES 1.2 in biary mode for a project targetting BF706 SoC and was written in C.

I currently dont have access to the source code.

In the project I had a byte aray named  

unsigned char xn_ec_nonce[32]
, declared globally in one of the C files and statically initialized to some hex values.

Is there a way to recover the elements of this array from the LDR ?

  • Hi,

    Unfortunately, it is not possible to recover the information from Loader(LDR) file without source code.

    If you are having executable(dxe) file, the disassembly window will displays disassembled instructions and symbolic information, which is useful for temporarily modifying the code to test a change or to view code when no source is available.

    You can debug the executable file (.dxe) without source files using the below steps.

    1. Create new project and build.
    2. In debug configuration remove the .dxe and add .dxe which need to be loaded.
    3. And debug. Now the disassembled instructions and symbolic information displays in the Disassembly window.

    Regards,
    Divya.P

  •    I understand the LDR is stripped off the debug information which is present in the DXE, thats the reason why I feel you are suggesting, it cannot be recovered. However, I was just wondering, if there was a litreture (eg Engineer To Engineer Note maybe) on the data structures of an LDR file, I could dig more deeper for the array. There are certain reasons for my optimism, like, its the only static intialized array whose values are unknown. There are almost 5-6 such arrays with known elements, so if all of them are located in neighbouring regions, I could try locate the required array.

  • Hi,

    As already mentioned, it is not possible to recover the information from Loader(LDR) file without source code.

    The loader file editor in CCES is used to view the structure and binary contents of a loader file. It produces a tree structure of the DXEs and blocks that make up the boot stream, together with detailed information for each block, including block flags/tags, addressing, size, and payload information.

    Once the project is in your workspace, double click on the loader file to open it in the Loader File Editor.

    Please refer in CCES help for more information:
    CrossCore® Embedded Studio <version> > Integrated Development Environment > Navigating Within the IDE > Editors > About the Loader File Editor

    Regards,
    Divya.P