Skip to content

Commit

Permalink
Add new x86-64 relocations
Browse files Browse the repository at this point in the history
These relocations are for Intel Advanced Performance Extensions.
The real implementation will be added once major compilers start
supporting APX.
  • Loading branch information
rui314 committed Jan 16, 2025
1 parent 8929bd4 commit 06f20e9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/elf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ std::string rel_to_string<X86_64>(u32 r_type) {
CASE(R_X86_64_IRELATIVE);
CASE(R_X86_64_GOTPCRELX);
CASE(R_X86_64_REX_GOTPCRELX);
CASE(R_X86_64_CODE_4_GOTPCRELX);
CASE(R_X86_64_CODE_4_GOTTPOFF);
CASE(R_X86_64_CODE_4_GOTPC32_TLSDESC);
CASE(R_X86_64_CODE_5_GOTPCRELX);
CASE(R_X86_64_CODE_5_GOTTPOFF);
CASE(R_X86_64_CODE_5_GOTPC32_TLSDESC);
CASE(R_X86_64_CODE_6_GOTPCRELX);
CASE(R_X86_64_CODE_6_GOTTPOFF);
CASE(R_X86_64_CODE_6_GOTPC32_TLSDESC);
}
return unknown_type(r_type);
}
Expand Down
9 changes: 9 additions & 0 deletions src/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ enum : u32 {
R_X86_64_IRELATIVE = 37,
R_X86_64_GOTPCRELX = 41,
R_X86_64_REX_GOTPCRELX = 42,
R_X86_64_CODE_4_GOTPCRELX = 43,
R_X86_64_CODE_4_GOTTPOFF = 44,
R_X86_64_CODE_4_GOTPC32_TLSDESC = 45,
R_X86_64_CODE_5_GOTPCRELX = 46,
R_X86_64_CODE_5_GOTTPOFF = 47,
R_X86_64_CODE_5_GOTPC32_TLSDESC = 48,
R_X86_64_CODE_6_GOTPCRELX = 49,
R_X86_64_CODE_6_GOTTPOFF = 50,
R_X86_64_CODE_6_GOTPC32_TLSDESC = 51,
};

enum : u32 {
Expand Down

0 comments on commit 06f20e9

Please sign in to comment.