This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Undefined reference to snprintf in Cortex R5 using arm none-eabi compiler

Hi Experts,

There was undefined reference to the snprintf() function during linking using arm-none-eabi compiler.

Compiler version: arm none-eabi gcc 4.5.1

Compiler options: -nostdlib -nodefaultlibs -nostartfiles -msoft-float -mfloat-abi=soft -Wformat -mthumb -mfix-cortexm3-ldrd

Parents
  • Hi Joey,

    Thanks for the update. I re-checked and it uses the following sequences in linker file which collides in order vs unordered linking. Also this happens specifically when I am trying to access functions like snprintf() and vsnprintf().

            .ARM.extab :
            {
                    *(.ARM.extab* .gnu.linkonce.armextab.*)
            } > FLASH

            __exidx_start = .;
            .ARM.exidx :
            {
                    *(.ARM.exidx* .gnu.linkonce.armexidx.*)
            } > FLASH
            __exidx_end = .;

Reply
  • Hi Joey,

    Thanks for the update. I re-checked and it uses the following sequences in linker file which collides in order vs unordered linking. Also this happens specifically when I am trying to access functions like snprintf() and vsnprintf().

            .ARM.extab :
            {
                    *(.ARM.extab* .gnu.linkonce.armextab.*)
            } > FLASH

            __exidx_start = .;
            .ARM.exidx :
            {
                    *(.ARM.exidx* .gnu.linkonce.armexidx.*)
            } > FLASH
            __exidx_end = .;

Children