admin管理员组文章数量:1310004
Have an existing .asm
source module setup for the standard cdecl
naming and calling convention that is built with yasm
for an elf32
target. The .asm source can be used across different platforms and architectures.
The C function is declared with __attribute__((__cdecl__))
, but the linker is still looking for the name without the leading underscore.
Turns out that gcc only changes the calling convention and not the name.
So two questions:
1 - Does yasm have an option to automatically strip leading underscores (_) for all the symbols that have them?
2 - Does gcc have an attribute or method to let it know the name needs an underscore.
FWIW, if you have a COFF
or OMF
.obj file, objconv
can convert it and handle everything:
objconv -felf32 -nu source.obj target.o
TIA!!
本文标签: yasmusing gcc attribute((cdecl)) still results with ld quotundefined symbolquotStack Overflow
版权声明:本文标题:yasm - using gcc __attribute__((__cdecl__)) still results with ld "undefined symbol" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741833240a2400060.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论