"Bernhard Poess" <sigmaz3r0@xxxxxxxxx> writes: > For a research project I'm searching for a way to tell gcc to add a > relocation entry for relocations like this: > > leaq function(%rip), %some_reg > > where function is a resolved symbol in the same assembler file and the > value of function is known. This is really a function of the assembler, not the compiler. When using ELF, the assembler should always generate a relocation if the function is not static. If the function is static, I don't think there is any way to force the relocation. You would have to add an option to the assembler. If you are using gas, you would want to change adjust_reloc_syms in gas/write.c. Ian