小编ove*_*low的帖子

"relocation R_X86_64_32S against `.bss' can not be used when making a shared object”

I'm absolutely green in this but during classes, teacher gave us file he wrote just for us to run it and it worked fine then, but when I try to do it at home (I use Linux on VirtualBox) and use:

nasm -f elf64 hello.asm -o hello.o
gcc hello.o -o hello
Run Code Online (Sandbox Code Playgroud)

I get an error "relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC”. Can someone please explain what to do to make …

linux assembly x86-64 nasm linker-errors

5
推荐指数
1
解决办法
4721
查看次数

标签 统计

assembly ×1

linker-errors ×1

linux ×1

nasm ×1

x86-64 ×1