normal to have undefined symbols?

Guest #5101389
Rate this post
• ▲ 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
1
arm-none-eabi-objdump -tT | grep --line-buffered "UND" | tee tmp.txt

is
1
00000000  w      *UND*  00000000 malloc
2
00000000  w      *UND*  00000000 __deregister_frame_info
3
00000000  w      *UND*  00000000 software_init_hook
4
00000000  w      *UND*  00000000 hardware_init_hook
5
00000000  w      *UND*  00000000 __libc_fini
6
00000000  w      *UND*  00000000 _Jv_RegisterClasses
7
00000000  w      *UND*  00000000 __register_frame_info
8
00000000  w      *UND*  00000000 free

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

6
set(GCC_COVERAGE_LINK_FLAGS
7
"-T \"${PROJECT_SOURCE_DIR}/ldscripts/mem.ld\" \
8
-T \"${PROJECT_SOURCE_DIR}/ldscripts/libs.ld\" \
9
-T \"${PROJECT_SOURCE_DIR}/ldscripts/sections.ld\" \
10
-Xlinker --gc-sections -Wl,-Map,\"elka.map\" \
11
--specs=nosys.specs")

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

Reply

A question of your own? This thread is over 9 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.