Is there a GAS equivalent to NASM's 'DEFAULT REL' directive?
I'm trying to port some NASM assembly to GAS and specifically, I'm getting hung up on storage declared with CEXTERN in the original file.
The original NASM:
SECTION .text
cextern pw_8000
...
...
movq m7, [pw_8000]
When I assemble the file and try to link it, I see the following:
ld: common/x86/dct-a.o: relocation R_X86_64_32S against `x264_pw_8000' can not be used when making a shared object; recompile with -fPIC
With YASM, calling DEFAULT REL seems to fix this. I have no idea how to do this with GAS.
Any ideas?
EDIT: It seems according to this post that the move command can be written as
movq m7, [rip+pw_8000]
Does anyone know if this is correct