relocation R_X86_64_8 against undefined symbol `ELF' can not be used when making a PIE object
问题 Having this in gas: .text .globl main main: xor %eax, %eax lea str(%rip), %rdi call printf call exit str: .byte 0x7F, "ELF", 1,1,1,0 I thought the .byte directive could be concatenate as in nasm db 0x7F, "ELF", 1, 1, 1, 0 ; e_ident source : http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html 回答1: In GAS syntax, "ELF" is a symbol reference to the symbol name ELF , not a multi-char string. In the context of .byte directive, it's only looking for a number, not a possible string. And