cembeddedobjdumpbinutilsnm

`nm` and `objdump` unknown dollar signed symbol


Th nm source.o gives unknown symbols:

F:\STM32CubeIDE\LMS\ANC_fxlms_v1\Debug\Core\Src>nm FX_LMS.o
00000000 b $d
00000298 t $d
00000000 b $d
000000b4 t $d
00000000 b $d
00000544 t $d
00000024 t $d
00000000 b $d
000002b0 t $d
00000000 d $d
000001f8 t $d
00000000 b $d
00000178 t $d
00000000 b $d
00000000 b $d
00000000 b $d
000000f0 t $d
00000000 b $d
00000058 t $d
00000000 b $d
00000000 b $d
00000000 b $d
00000000 b $d
00000000 b $d
00000050 t $d
00000000 b $d
000005ec t $d
00000000 b $d
00000664 t $d
00000000 b $d
00000000 b $d
0000003c t $d
00000000 t $t
.
.
.
00000000 t $t
00000000 t $t
         U ADC_DMAError
         U ADC_Enable
00000001 T ADC_Start_DMA_double
0000010c d aecho.0
.
.
.

I want to know the meaning of the $d and $t symbol. What is that? What is a reference that explain those? This is the compiled C source from eclipse (STM32cubeIDE on Windows 10 64-bit).

The maybe important build commands copied from eclipse console:

21:04:01 **** Incremental Build of configuration Debug for project ANC_fxlms_v1 ****
make -j8 all 
arm-none-eabi-gcc "../Core/Src/FX_LMS.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DARM_MATH_CM7 -DUSE_HAL_DRIVER -DSTM32H743xx -c -I../Core/Inc -I"F:/STM32CubeIDE/LMS/ANC_fxlms_v1/Core/Inc/drv" -I"F:/STM32CubeIDE/LMS/ANC_fxlms_v1/Drivers/CMSIS/DSP/Include" -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/FX_LMS.d" -MT"Core/Src/FX_LMS.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/FX_LMS.o"

and here is the source:


Solution

  • You compiled the file for ARM architecture.

    nm is for your local architecture. So most probably x86-64-pc-linux-gnu-nm or something like that.

    arm-none-eabi-nm is for ARM architecture.

    The endianess or some other quirks in the exact specification of ELF file may differ between architectures, which is most probably why you are seeing such artifacts.