Which *.o file or which library corresponds to symbols dumped by objdump?

StackOverflow https://stackoverflow.com/questions/19554968

  •  01-07-2022
  •  | 
  •  

Pergunta

Is there any way to know where the symbol comes from using objdump.

I have few symbols when i do objdump on my elf file (as follows):

8010864 g   F   .text   0000007c    __floatdisf

8010864 g   F   .text   0000007c    __aeabi_l2f

8010854 g   F   .text   0000008c    __floatundisf   

I am not sure where they come from. They are not part of the libm library.

Foi útil?

Solução

These functions are glue inserted by the compiler for conversions from integer to floating-point types. (floatdisf converts signed integer to float, floatundisf converts unsigned integer to float, and aeabi_l2f is an alias for floatdisf.)

The implementations of these functions in LLVM can be found at:

As the path suggests, they are part of the compiler_rt library, which is linked in automatically as needed.

Outras dicas

First of all extract all .o files from the lib.a (in some temp directory) ar -x lib.a

then find which .o file contains your symbol using below command ar -t lib.a | xargs grep "symbol" -l

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top