aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-12-12 20:19:10 +0100
committerMichael Matz <matz@suse.de>2016-12-15 17:49:56 +0100
commit5d6a9e797a3c2d12ed54edb14851f4b023de4799 (patch)
tree217edc5a19620cb92d2fe6f81bf74f42f99ff0e5
parent22f5fccc2c06b8f7584b41d981742d2afe153a71 (diff)
downloadtinycc-5d6a9e797a3c2d12ed54edb14851f4b023de4799.tar.gz
tinycc-5d6a9e797a3c2d12ed54edb14851f4b023de4799.tar.bz2
x86-asm: Fix segfault
We need to access cur_text_section, not text_section.
-rw-r--r--i386-asm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386-asm.c b/i386-asm.c
index 3612627..5011af5 100644
--- a/i386-asm.c
+++ b/i386-asm.c
@@ -1121,7 +1121,7 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode)
/* after immediate operands, adjust pc-relative address */
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