diff options
| author | Michael Matz <matz@suse.de> | 2016-12-13 12:48:55 +0100 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:49:57 +0100 |
| commit | 3980e07fe52457579364a098c2e8d2ecc06fa130 (patch) | |
| tree | 35afaf53fde592fda48326f22e7c087ca6aaf9ea | |
| parent | b155432b65983df148ce6ce0e7bdc07d80c81d0e (diff) | |
| download | tinycc-3980e07fe52457579364a098c2e8d2ecc06fa130.tar.gz tinycc-3980e07fe52457579364a098c2e8d2ecc06fa130.tar.bz2 | |
arm64: Handle R_AARCH64_PREL32 again
This got lost when splitting reloc handling to individual files.
| -rw-r--r-- | arm64-link.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arm64-link.c b/arm64-link.c index e8f810d..dd96ded 100644 --- a/arm64-link.c +++ b/arm64-link.c @@ -27,6 +27,7 @@ int code_reloc (int reloc_type) switch (reloc_type) { case R_AARCH64_ABS32: case R_AARCH64_ABS64: + case R_AARCH64_PREL32: case R_AARCH64_MOVW_UABS_G0_NC: case R_AARCH64_MOVW_UABS_G1_NC: case R_AARCH64_MOVW_UABS_G2_NC: @@ -57,6 +58,7 @@ int gotplt_entry_type (int reloc_type) switch (reloc_type) { case R_AARCH64_ABS32: case R_AARCH64_ABS64: + case R_AARCH64_PREL32: case R_AARCH64_MOVW_UABS_G0_NC: case R_AARCH64_MOVW_UABS_G1_NC: case R_AARCH64_MOVW_UABS_G2_NC: @@ -165,6 +167,9 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, add case R_AARCH64_ABS32: write32le(ptr, val); return; + case R_AARCH64_PREL32: + write32le(ptr, val - addr); + return; case R_AARCH64_MOVW_UABS_G0_NC: write32le(ptr, ((read32le(ptr) & 0xffe0001f) | (val & 0xffff) << 5)); |
