On 09/16/2017 08:15 PM, Andreas Schwab wrote:
On Sep 16 2017, Marek Pietrzak <marekp...@gmail.com> wrote:

test.o:     file format elf32-m68hc11

Disassembly of section .text:

00000000 <a1>:
    0:    bd 00 00        jsr    0x0 <a1>
    3:    20 0a           bra    0xf <a2>
     ...

0000000f <a2>:
    f:    01              nop

As you can see bra is generated correctly, but jsr is incorrect.
Look at the relocations.


test.o:     file format elf32-m68hc11


Disassembly of section .text:

00000000 <a1>:
    0:  bd 00 00        jsr     0x0 <a1>
                        0: R_M68HC11_RL_JUMP    *ABS*
                        1: R_M68HC11_16 a2
    3:  20 0a           bra     0xf <a2>
                        3: R_M68HC11_RL_JUMP    *ABS*
        ...

0000000f <a2>:
    f:  01              nop

Andreas.

Right, ld fixes the relocs. Thanks for the tip.

Marek


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to