summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-03-15 09:50:43 +0100
committerPalmer Dabbelt <palmer@sifive.com>2018-04-03 05:00:54 +0200
commitda975dd4818cf42a181910789c096eb6997ed663 (patch)
treeeb538022010facb754f433de628a6b66bc954c4a /tools
parentRISC-V: Add section of GOT.PLT for kernel module (diff)
downloadlinux-da975dd4818cf42a181910789c096eb6997ed663.tar.xz
linux-da975dd4818cf42a181910789c096eb6997ed663.zip
RISC-V: Support GOT_HI20/CALL_PLT relocation type in kernel module
For CALL_PLT, emit the plt entry only when offset is more than 32-bit. For PCREL_LO12, it uses the location of corresponding HI20 to get the address of external symbol. It should check the HI20 type is the PCREL_HI20 or GOT_HI20, because sometime the location will have two or more relocation types. For example: 0: 00000797 auipc a5,0x0 0: R_RISCV_ALIGN *ABS* 0: R_RISCV_GOT_HI20 SYMBOL 4: 0007b783 ld a5,0(a5) # 0 <SYMBOL> 4: R_RISCV_PCREL_LO12_I .L0 4: R_RISCV_RELAX *ABS* Signed-off-by: Zong Li <zong@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions