From 0909078590ad8b1145d8776ef8057489ff45321d Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Tue, 3 Dec 2013 14:21:14 +0000 Subject: implement position independent code generation on 64 bit linux (fix CHAR descriptor) --- cgcode.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cgcode.c b/cgcode.c index 36bea5f..5a92327 100644 --- a/cgcode.c +++ b/cgcode.c @@ -1168,9 +1168,18 @@ static INSTRUCTION_GRAPH char_descriptor_graph (void) if (!parallel_flag && last_CHAR_descriptor_block==last_block) graph=last_CHAR_descriptor_graph; else { +#if defined (G_A64) && defined (LINUX) + if (rts_got_flag){ + if (CHAR_label==NULL) + CHAR_label=enter_label ("CHAR_0",IMPORT_LABEL | DATA_LABEL | USE_GOT_LABEL); + graph=g_lea (CHAR_label); + } else +#endif + { if (CHAR_label==NULL) CHAR_label=enter_label ("CHAR",IMPORT_LABEL | DATA_LABEL); graph=g_load_des_i (CHAR_label,0); + } if (!parallel_flag){ last_CHAR_descriptor_graph=graph; -- cgit v1.2.3