ld bug 1


; This is a simple macro with label math in it.  The linker gets
; screwed up if the label it uses is imported.
#define IMMUR(lbl,s,reg)        .label L_##lbl  ! bl .+8,reg ! \
                                IMMU(lbl-L_##lbl-8,s) ! \
                                add s,reg,reg

; To fix it I needed to use this:
#define IMMUR_imported(lbl,s,reg) \
                IMMU(lbl,s)             ! IMMU(L_##lbl+8,reg) ! \
                sub s,reg,s             ! \
                .label L_##lbl          ! bl .+8,reg ! \
                add s,reg,reg


##################################################

Postscript - is this really a linker bug?  Is it the linkers responsibility
  to do math?  I don't think so - the linker doesn't have to do the math
  if the label isn't imported - the assembler does it.