Some of my assembler code is suddenly afflicted with a strange bug. Jump
instructions have an offset to the start of the code area rather than
their intended target. To make it even more mysterious, it doesn't
always happen. The key appears to be that the target symbol has been
declared as global:

000049e4 <ucb0rw>:
    49e4:       a2 b3 6c 06     bit     #2,     &0x066c ;r3 As==10
    49e8:       0b 27           jz      $-488           ;abs 0x4800
    49ea:       c2 4f 4e 06     mov.b   r15,    &0x064e ;

000049ee <ucb0rw1>:
    49ee:       92 b3 6c 06     bit     #1,     &0x066c ;r3 As==01
    49f2:       fd 27           jz      $-4             ;abs 0x49ee
    49f4:       5f 42 4c 06     mov.b   &0x064c,r15     ;0x064c
    49f8:       30 41           ret

ucb0rw has been declared as global while the other symbol has not.

Because of another problem I had with the assembler, gas is invoked with
option "-mQ". Disabling that option makes this error go away. (It might
not be the assembler that is at fault here but the linker. Changing the
gas option does fix it so I will go with the assembler.)

Assembler version is: GNU assembler (GNU Binutils)

David W. Schultz
Returned for Regrooving

Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
Mspgcc-users mailing list

Reply via email to