summaryrefslogtreecommitdiff
path: root/cgaas.c
diff options
context:
space:
mode:
authorJohn van Groningen2013-07-17 11:58:11 +0000
committerJohn van Groningen2013-07-17 11:58:11 +0000
commit7e98eb143c027699af393ef8aeaa4a4b394a1605 (patch)
treed08e8706cd7abc569cb9bc1bfa3ceff89397c3a9 /cgaas.c
parentmake global labels protected for position independent code on linux (diff)
make imported global labels protected for position independent code on linux
Diffstat (limited to 'cgaas.c')
-rw-r--r--cgaas.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cgaas.c b/cgaas.c
index d379345..adca535 100644
--- a/cgaas.c
+++ b/cgaas.c
@@ -6834,6 +6834,11 @@ static void write_object_labels (void)
#ifdef ELF
write_l (object_label->object_label_string_offset);
write_c (ELF32_ST_INFO (STB_GLOBAL,STT_NOTYPE));
+# ifdef LINUX
+ if (pic_flag)
+ write_c (STV_PROTECTED);
+ else
+# endif
write_c (0);
write_w (0);
write_q (0);