mac OSX Unknown pseudo-op: .type

空扰寡人 提交于 2019-12-25 01:53:43

问题


I have to write some assembler code. Therefore I installed gcc4.4 (per homebrew) and called gcc-4.4 -c asma.s, but it does not work as expected:

asma.s:3:Unknown pseudo-op: .type
asma.s:3:Rest of line ignored. 1st junk character valued 97 (a).

The first lines consist only of standard pseudo-ops!

    .text
    .globl asma
    .type asma, @function
asma:

Do I have to install an alternative assembler?


回答1:


.type is an ELF/COFF directive, while OSX uses Mach-O format. In most cases you can safely remove the line.



来源:https://stackoverflow.com/questions/22269223/mac-osx-unknown-pseudo-op-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!