Skip to content

Commit 4f316bd

Browse files
authored
Handle %got and %plt relocs for x86 (#207)
* Fix #206 * Fix formatting
1 parent 2ced3cc commit 4f316bd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

diff.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3003,7 +3003,9 @@ class ArchSettings:
30033003
),
30043004
re_large_imm=re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}"),
30053005
re_sprel=re.compile(r"(-?0x[0-9a-f]+|-?[0-9]+)(?=\((%ebp|%esi)\))"),
3006-
re_imm=re.compile(r"(?:\b|-)(0x[0-9a-f]+|[0-9]+)|([\?$_][^ \t,]+)"),
3006+
re_imm=re.compile(
3007+
r"(?:\b|-)(0x[0-9a-f]+|[0-9]+)|([\?$_][^ \t,]+)|(%(plt|got)\([^)]*\))"
3008+
),
30073009
re_reloc=re.compile(
30083010
r"R_386_|dir32|DISP32|WRTSEG|OFF32|OFFPC32|OFF16|OFFPC16|SEG|FAR16"
30093011
),

0 commit comments

Comments
 (0)