Local labels in GNU assembler; gdb printing backtrace as though labels are functions

后端 未结 1 415
余生分开走
余生分开走 2020-12-11 18:43

Two pieces of example code; first some C++ code calling into assembly:

/* test1.cc */
#include 

extern \"C\" void blah();
extern \"C\" void s         


        
相关标签:
1条回答
  • 2020-12-11 19:29

    I found an answer in the GNU assembler manual; quoting from that doc:

    A local symbol is any symbol beginning with certain local label prefixes. By default, the local label prefix is ‘.L’ for ELF systems or ‘L’ for traditional a.out systems, but each target may have its own set of local label prefixes.

    Sure enough, as soon as I put .L on there, it worked.

    .L labels don't appear as symbols in the object file.

    0 讨论(0)
提交回复
热议问题