Re: [PATCH 0/4] OpenRISC binutils updates and new relocs

Richard Henderson
2018-09-17T16:29:41Z

On 9/17/18 8:07 AM, Nick Clifton wrote:
> I do not see any need to add extra document for the new relocs, unless you
> have created new assembler pseudo-ops to generate them. (I did not see any
> code to add such operators, but I may have missed something).

There is new syntax for these new relocs, in the form of function-like markup.

E.g:

l.ori r3,r4,@lo(foo) # an existing reloc
l.ori r3,r4,@po(foo) # a new reloc added here

> I do have one question though. Is there a need to be able to distinguish
> between binaries that use the new l.adrp instruction and those that don't.
> For example if a library is built using the new instruction but then it is
> linked into an executable which is supposed to run on silicon which does
> not support the new instruction, should the linker issue an error ? If so,
> how does it detect this situation ?

I have never been a fan of how this is handled e.g. for mips.
To that end, I have done nothing at all. This is more in line
with how we (do not) handle this situation for x86.

r~