AnsweredAssumed Answered

elf2dyn error when creating a Dynamically Loaded Module (DLM)

Question asked by msCircal on Sep 25, 2015
Latest reply on Nov 27, 2015 by Kader.M

Platform: CCES

Blackfin: ADSP-BF706


I am trying to create a DLM as outlined in CrossCore System Run-Time documentation.


I was able to create a simple DLM that had one single simple DLM function. I was able to successfully create a DXE project to make use of this DLM, load it dynamically, and call the DLM function successfully.


I went on to create a more complex DLM, which incorporates a 3rd party .dlb library.

This library has been previously used in a regular DXE CCES project, and works fine.


With my new DLM, I am getting an error on elf2dyn, which I am not sure I full understand.

Compiling, linking work fine.


The elf2dyn console output is as follows:

'Creating Dynamic Loadable Module (DLM) file output (.dyn) ...'


"C:\Analog Devices\CrossCore Embedded Studio 1.1.1\elf2dyn" -r -e _xxx_Decoder DLMtest.dxe

elf2dyn: ed0054: Error: Relocation out of range: [0000000a in section 10 (.text)] -> [00000100 in section 4 (.data)]


Exporting: _xxx_Decoder

make[1]: [post-build] Error 1 (ignored)


In my LDF file, I have only created simple section definitions (.text, .data .bss)  See bottom of this message.


Not sure if I fully understand what the issue is. Not much info is on these forums with respect to DLMs and elf2dyn.


Any help is appreciated.


Thanks, Martin




= =====================================================================================

LDF file is as below ...


** ADSP-BF706 linker description file


** Product      : CrossCore Embedded Studio

** Tool Version :








** Define a linked objects list.






** Define a linked library list.






















** List of all objects and libraries.






** List of objects and libraries which prefer internal memory as

** specified by prefersMem attribute.









** List of objects and libraries which don't have a preference for

** external memory as specified by prefersMem attribute.


$OBJS_LIBS_NOT_EXTERNAL = $OBJS_LIBS{!prefersMem("external")};                                  





    // The sizes here are arbitary and should be large enough to hold the inputs

    // sections they will contain.  Specific START and END are unimportant as these

    // addresses will be "abstracted" away by elf2dyn.


    MEM_TEXT { START(0x00000000) END (0x07FFFFFF) TYPE(RAM) WIDTH(8) } 

    MEM_DATA { START(0x08000000) END (0x0BFFFFFF) TYPE(RAM) WIDTH(8) } 

    MEM_BSZ  { START(0x0C000000) END (0x0FFFFFFF) TYPE(RAM) WIDTH(8) }













        // Note the presence of three, and only three, output sections.  They must

        // be called .text, .data, and .bsz.  .bsz must be a zero-fill section

        // (ZERO_INIT keyword)





            INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program))


        } >MEM_TEXT





            INPUT_SECTIONS( $OBJECTS(data1 constdata voldata) $LIBRARIES(data1 constdata voldata))


            // Reserve 128K for DLM's own heap ... 3rd party DLB appears to require heap allocations.

            RESERVE(heaps_in_L2_sram, heaps_in_L2_sram_length = 131072, 4)

          ldf_heap_space = heaps_in_L2_sram;

          ldf_heap_end = (ldf_heap_space + (heaps_in_L2_sram_length - 4)) & 0xfffffffc;

          ldf_heap_length = ldf_heap_end - ldf_heap_space;


        } >MEM_DATA




        .bss ZERO_INIT



            INPUT_SECTIONS( $OBJECTS(bsz) $LIBRARIES(bsz))

        } >MEM_BSZ