Forum: ARM programming with GCC/GNU tools normal to have undefined symbols?

von errolflynn (Guest)

Rate this post
0 useful
not useful
After compiling/linking a FreeRTOS program into an ELF file for 
ARM-Cortex M4 (ARMv7E-M) using arm-none-eabi tools, I see that some 
symbols are still undefined. Some are from libc/crt libraries.

The output of
arm-none-eabi-objdump -tT | grep --line-buffered "UND" | tee tmp.txt

00000000  w      *UND*  00000000 malloc
00000000  w      *UND*  00000000 __deregister_frame_info
00000000  w      *UND*  00000000 software_init_hook
00000000  w      *UND*  00000000 hardware_init_hook
00000000  w      *UND*  00000000 __libc_fini
00000000  w      *UND*  00000000 _Jv_RegisterClasses
00000000  w      *UND*  00000000 __register_frame_info
00000000  w      *UND*  00000000 free

This project uses CMake with the following compile and link flags:
set(GCC_COVERAGE_COMPILE_FLAGS "-march=armv7e-m -mthumb \
-mfloat-abi=softfp -mfpu=fpv4-sp-d16 -Og -fmessage-length=0 \
-fsigned-char -ffunction-sections -fdata-sections -ffreestanding \
-fno-move-loop-invariants -Wall -Wextra -g3")

"-T \"${PROJECT_SOURCE_DIR}/ldscripts/mem.ld\" \
-T \"${PROJECT_SOURCE_DIR}/ldscripts/libs.ld\" \
-T \"${PROJECT_SOURCE_DIR}/ldscripts/sections.ld\" \
-Xlinker --gc-sections -Wl,-Map,\"elka.map\" \

As you can see, it uses
 specs, which uses Newlib I think.

von Erl S. (errolflynn)

Rate this post
0 useful
not useful
Edit (new acct):
For context, the program builds and runs with closed-source build tools, 
but I switched to open-source tools and now it builds but does not run.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.