Skip to contentSkip to conversation

how to establish a link between source code and s specific execuable #yocto

DISCUSSION [email protected] 2 participants 2 messages Apr 20, 2020

lore
Share & tools
lore
#0 lore raw

Hello,
I have a question about the question, how to establish a link between source code and s specific execuable.
Let me explain this.
For example ,  the output of a project has many excutables,like lzma,xz, etc. Then i'd like to know what code(.c files) produces xz, what code produces lzma. I know log.do_compile can provide clue about it(like gcc -o xz xxx.c , but it is indirective and also confusing). Dose yocto provide users with a clearer way for the link? Also, I am not sure if objdump shows all the headers of the execuable.
thanks

#1 lore raw
Quoted 11 lines · On 20/04/2020 08:17, [email protected] wrote:

Hello,
I have a question about the question, how to establish a link between source code and s specific execuable.
Let me explain this.
For example ,  the output of a project has many excutables,like lzma,xz, etc. Then i'd like to know what code(.c files) produces xz, what code produces lzma. I know log.do_compile can provide clue about it(like gcc -o xz xxx.c , but it is indirective and also confusing). Dose yocto provide users with a clearer way for the link?
Also, I am not sure if objdump shows all the headers of the execuable. thanks

If you have compiled the executables with debug info then you can use 'objdump --dwarf' and look for the DW_AT_name and DW_AT_comp_dir records. They will give you the full path to each source file at the time of compilation

Quoted 3 lines
Signature · 3 lines
Chris Simmonds, trainer and consultant at 2net
http://www.2net.co.uk
Author of "Mastering Embedded Linux Programming"