mirror of
https://github.com/frida/tinycc
synced 2024-12-25 14:36:49 +03:00
x86-asm: Fix segfault
We need to access cur_text_section, not text_section.
This commit is contained in:
parent
22f5fccc2c
commit
5d6a9e797a
@ -1121,7 +1121,7 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode)
|
|||||||
|
|
||||||
/* after immediate operands, adjust pc-relative address */
|
/* after immediate operands, adjust pc-relative address */
|
||||||
if (pc)
|
if (pc)
|
||||||
add32le(text_section->data + pc - 4, pc - ind);
|
add32le(cur_text_section->data + pc - 4, pc - ind);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return the constraint priority (we allocate first the lowest
|
/* return the constraint priority (we allocate first the lowest
|
||||||
|
Loading…
Reference in New Issue
Block a user