csky: Support PC relative diff relocation
authorLifang Xia <lifang_xia@c-sky.com>
Fri, 14 Sep 2018 13:02:51 +0000 (21:02 +0800)
committerLifang Xia <lifang_xia@c-sky.com>
Fri, 14 Sep 2018 13:04:47 +0000 (21:04 +0800)
commitfe75f42ee15944a0d14d3d42b242676fc2417352
tree3b2767935fe63bc1c6585bbc3a394ebab6eb34d7
parent87b240d48512fa30aab8b5963914a9093009fd68
csky: Support PC relative diff relocation

Define DIFF_EXPR_OK to Support PC relative diff relocation,
and add CKCORE_PCREL32 relocation process

bfd/
        * elf32-csky.c (csky_elf_howto_table): Fill special_function of
        R_CKCORE_PCREL32.
        (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
gas/
        * config/tc-csky.c (md_apply_fix): Transmit
        BFD_RELOC_32_PCREL to BFD_RELOC_CKCORE_PCREL32.
        (tc_gen_reloc): Trasmit BFD_RELOC_CKCORE_ADDR32 to
        BFD_RELOC_CKCORE_PCREL32 while pc-relative.
        * config/tc-csky.h (DIFF_EXPR_OK): Define to enable PC relative
        diff relocs.
bfd/ChangeLog
bfd/elf32-csky.c
gas/ChangeLog
gas/config/tc-csky.c
gas/config/tc-csky.h