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
2727 switch (reloc_type) {
2828 case R_AARCH64_ABS32:
2929 case R_AARCH64_ABS64:
30+ case R_AARCH64_PREL32:
3031 case R_AARCH64_MOVW_UABS_G0_NC:
3132 case R_AARCH64_MOVW_UABS_G1_NC:
3233 case R_AARCH64_MOVW_UABS_G2_NC:
@@ -57,6 +58,7 @@ int gotplt_entry_type (int reloc_type) · 24 unmodified lines
5758 switch (reloc_type) {
5859 case R_AARCH64_ABS32:
5960 case R_AARCH64_ABS64:
61+ case R_AARCH64_PREL32:
6062 case R_AARCH64_MOVW_UABS_G0_NC:
6163 case R_AARCH64_MOVW_UABS_G1_NC:
6264 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
165167 case R_AARCH64_ABS32:
166168 write32le(ptr, val);
167169 return;
170+ case R_AARCH64_PREL32:
171+ write32le(ptr, val - addr);
172+ return;
168173 case R_AARCH64_MOVW_UABS_G0_NC:
169174 write32le(ptr, ((read32le(ptr) & 0xffe0001f) |
170175 (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