I'm new to vax asm and have not been fully assimilated, it seems - I have
some asm code that is not PIC and so when compiled into a .so dies due
to .text relocs. (Linked static it all works)
It does kindof Duff's device in asm - there is an unrolled loop starting
at .Loop and a jump with offset into the loop is calculated in %r5, then the
code does:
jmp .Loop(%r5)
.Loop: ...
This causes a 32bit relocation for the .Loop address inside the
indirect jump with offset instructions.
What is the pic way to do this? Some trick? There doesn't seem to be a br +
register offset instruction.
Or along the lines of:
addl2 %pc,%r5
add .Loop - ., %r5
jmp (%r5)
.Loop: ...
(but the .Loop-. is not accepted by gas)
?