diff options
author | John van Groningen | 2013-08-01 11:58:12 +0000 |
---|---|---|
committer | John van Groningen | 2013-08-01 11:58:12 +0000 |
commit | 60631883ddc23baaf6c6ecc23c36d03cf158072a (patch) | |
tree | 47f3a168be6ebc687ba4545dc820c74212ed2e5c | |
parent | fix offsets in descriptors, for position independent code on linux (diff) |
fix offsets in descriptors, for position independent code on linux
-rw-r--r-- | cgcode.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -2522,11 +2522,13 @@ void code_eq_nulldesc (char descriptor_name[],int a_offset) graph_2=g_load_id (0,graph_1); #ifdef NEW_DESCRIPTORS graph_5=g_load_des_id (-2,graph_2); -# ifdef MACH_O64 +# ifdef MACH_O64 graph_5=g_lsl (g_load_i (4),graph_5); -# else +# elif defined (G_A64) && defined (LINUX) + graph_5=g_lsl (g_load_i (pic_flag ? 4 : 3),graph_5); +# else graph_5=g_lsl (g_load_i (3),graph_5); -# endif +# endif graph_6=g_sub (graph_5,graph_2); #else graph_5=g_load_des_id (2-2,graph_2); @@ -3873,6 +3875,8 @@ static void code_jmp_ap_ (int n_apply_args) if (profile_function_label!=NULL) # ifdef MACH_O64 i_jmp_id_profile (8-2,REGISTER_A2,0); +# elif defined (G_A64) && defined (LINUX) + i_jmp_id_profile (pic_flag ? 8-2 : 4-2,REGISTER_A2,0); # else i_jmp_id_profile (4-2,REGISTER_A2,0); # endif @@ -3880,6 +3884,8 @@ static void code_jmp_ap_ (int n_apply_args) # endif # ifdef MACH_O64 i_jmp_id (8-2,REGISTER_A2,0); +# elif defined (G_A64) && defined (LINUX) + i_jmp_id (pic_flag ? 8-2 : 4-2,REGISTER_A2,0); # else i_jmp_id (4-2,REGISTER_A2,0); # endif |