how to prevent gcc from generating GOT references

David Livshin
Mon Jan 21 08:20:00 GMT 2019


How to prevent gcc from generating @GOT* references,
e.g. instead of
	movq	exit@GOTPCREL(%rip), %rax
to generate
	movq	exit(%rip), %rax
or, perhaps, something more complicated for 64-bit symbols.

It definitely can be done; I am using gcc on Fedora and never saw @GOT* 
( and @PLT ) generated. However on Ubinty, gcc often generates these 

Thank you,


More information about the Gcc-help mailing list