I am implementing a C function which will be copied to an other memory location during run time.
I have avoided function calls inside it, only using pure constant inside it. When I examine the assembly output, the constant access is translated into PC relative addressing instructions. However the relative address (literal pool) is outside the function. (Looks like they are generated in ramdom places).
I know in ARM assembly there is a .ltorg
directive which can localize these literal pool, is there a method in C to do the same thing?