Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate symbol table with arm gcc

Tags:

gcc

embedded

arm

I would like to create a symbol definition table to be used in a separate application during linking. ARM's armlink linker has the following flag but I'm using arm-eabi:

--symdefs=filename

like image 693
nikolas Avatar asked Sep 29 '22 06:09

nikolas


1 Answers

The GNU objcopy utility has an option --extract-symbol that may do what you want. It generates an object file with only symbol data - no actual code or data.

It is specifically intended to generate a .sym file for use in the VxWorks RTOS which has a command shell and dynamic linker/loader that uses this information. It is also used by the VxWorks host shell and source-level debugger.

The binutils nm utility on the other hand generates output very similar to armlink's --symdefs which you might easily post-process into exactly the form you need.

like image 177
Clifford Avatar answered Oct 03 '22 06:10

Clifford