Commit Graph

2 Commits

Author SHA1 Message Date
James Clarke ddfe8751b1 [test] Fix lld/test/ELF/riscv-pcrel-hilo-error.s after D73211 2020-01-23 02:30:10 +00:00
Fangrui Song 4e225deab4 [ELF][RISCV] Error on R_RISCV_PCREL_LO12_[IS] that point to absolute symbols
The referenced symbol is expected to point to an R_RISCV_*_HI20
relocation. An absolute symbol has no associated section, therefore
there cannot be a matching R_RISCV_*_HI20.

This fixes the crash reported by PR42038. For reference, ld.bfd errors:

    (.init+0x4): dangerous relocation: %pcrel_lo missing matching %pcrel_hi

Differential Revision: https://reviews.llvm.org/D63273

llvm-svn: 365049
2019-07-03 15:38:59 +00:00