汇编语言在32位和64位下有区别
    32位的汇编在代码前增加.code32
    as可以通过--32指定生成32位汇编

在64位系统下ld链接生成32位程序:
    ld: i386 architecture of input file `xxx.o' is incompatible with i386:x86-64 output
(1)使用--oformat elf32-i386
(2)若(1)无效,可以使用-m elf_i386

汇编语言在32位和64位下有区别
    32位的汇编在代码前增加.code32
    as可以通过--32指定生成32位汇编

在64位系统下ld链接生成32位程序:
    ld: i386 architecture of input file `xxx.o' is incompatible with i386:x86-64 output
(1)使用--oformat elf32-i386
(2)若(1)无效,可以使用-m elf_i386

相关文章:

  • 2022-03-08
  • 2021-10-13
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2021-10-24
  • 2022-12-23
相关资源
相似解决方案