-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[host] Add initial support for RISC-V relocations
This adds support for RISC-V relocations - enough to permit the running of UnitCL (in the default configuration). There are obviously many other relocations for RISC-V but without test coverage those have been left for future work. Note that relocation support is still incomplete. There is no support yet for the PLT or GOT sections, so if the executable is loaded too far away from external symbols, the relocation process will fail at program load time, complaining of an unreachable symbol. This situation is entirely down to the in-process memory of the OpenCL location and the machine it's running on, so cannot be easily pre-determined. Locally, at least, all (offline) UnitCL tests pass in isolation but fail when run together, because the binary is loaded too far away from some symbols such as memcpy. The ADD32 and SUB32 relocations only seem to appear for the PIC relocation model, which is not being used in main nor in this PR, but they are simple enough that including them should be fairly obviously correct.
- Loading branch information
1 parent
7cd729b
commit f4e845c
Showing
5 changed files
with
298 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.