History

arm64: Handle R_AARCH64_PREL32 again

This got lost when splitting reloc handling to individual files.

Michael Matz committed 9 years ago

Commit 3980e071 parent b1554321 file · +5 −0Browse files

Unified · Split

arm64-link.c+5−0
@@ -27,6 +27,7 @@ int code_reloc (int reloc_type) · 26 unmodified lines
27 switch (reloc_type) {27 switch (reloc_type) {
28 case R_AARCH64_ABS32:28 case R_AARCH64_ABS32:
29 case R_AARCH64_ABS64:29 case R_AARCH64_ABS64:
30 case R_AARCH64_PREL32:
30 case R_AARCH64_MOVW_UABS_G0_NC:31 case R_AARCH64_MOVW_UABS_G0_NC:
31 case R_AARCH64_MOVW_UABS_G1_NC:32 case R_AARCH64_MOVW_UABS_G1_NC:
32 case R_AARCH64_MOVW_UABS_G2_NC:33 case R_AARCH64_MOVW_UABS_G2_NC:
@@ -57,6 +58,7 @@ int gotplt_entry_type (int reloc_type) · 24 unmodified lines
57 switch (reloc_type) {58 switch (reloc_type) {
58 case R_AARCH64_ABS32:59 case R_AARCH64_ABS32:
59 case R_AARCH64_ABS64:60 case R_AARCH64_ABS64:
61 case R_AARCH64_PREL32:
60 case R_AARCH64_MOVW_UABS_G0_NC:62 case R_AARCH64_MOVW_UABS_G0_NC:
61 case R_AARCH64_MOVW_UABS_G1_NC:63 case R_AARCH64_MOVW_UABS_G1_NC:
62 case R_AARCH64_MOVW_UABS_G2_NC:64 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 · 102 unmodified lines
165 case R_AARCH64_ABS32:167 case R_AARCH64_ABS32:
166 write32le(ptr, val);168 write32le(ptr, val);
167 return;169 return;
170 case R_AARCH64_PREL32:
171 write32le(ptr, val - addr);
172 return;
168 case R_AARCH64_MOVW_UABS_G0_NC:173 case R_AARCH64_MOVW_UABS_G0_NC:
169 write32le(ptr, ((read32le(ptr) & 0xffe0001f) |174 write32le(ptr, ((read32le(ptr) & 0xffe0001f) |
170 (val & 0xffff) << 5));175 (val & 0xffff) << 5));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t