When i try to link my assembly program ld linker says
undefined reference to printf
I tried writing extern printf in my code but gnu assembler says no such instruction.
my code is
.section .data
Dd: .ascii "hello"
.section .text
.global _start
_start:
.global main
main:
movq $0, %rax
movq $Dd, %rdi
call printf
ret
movq $60, %rax
syscall
Linker say undefined reference to 'printf'
Even i tried to link -dynamic-linker /lib/ld-linux.so.2