[SOLVED] undefined symbol:end

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] undefined symbol:end

    Hi,
    I would like to use a static library cross-compiled in debian with arm-none-eabi-gcc,semihosting in segger studio and the library uses some functions in librdimon.So I added newlib to ses by project->options->linker->Additional input files. But I'm getting this error when linking

    undefined symbol:end



    After some digging in newlib, I figured out this symbol in librdimon.a and Arm GNU Toolchain 4.9.3 says
    If you used nosys.specs or rdimon.specs, it may expect symbol 'end' to be defined to denote the HEAP start. Define symbol 'end'.Refer "12. How to update linker scripts for syscalls?" for examples.
    I couldn't find any resource how to handle this in segger linker script,I'm absolutely stuck in.
    Thanks in advance.

    The post was edited 1 time, last by grpnr ().

  • Hello,

    Thank you for your inquiry.
    As stated in the newlib documentation you linked make sure that symbol end is defined as the startingpoint of heap.
    An example implementation for this can be found in the SEGGER_THUMB_Startup.s
    There the end of heap is defined as __heap_end__.

    Simply rename that value to the one you need for your library to work.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    Alternatively our support system can be used as well: segger.com/ticket/