summaryrefslogtreecommitdiffstats
path: root/tools/gold
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-06-13 13:30:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-06-13 13:30:24 +0000
commit4f81768d448f909f503885520928b1723f0388a3 (patch)
treed180c23bbb59fe0660f11f7e8cb58d32628be169 /tools/gold
parentd34491f6751ae2f8daf3e857c84bcb5b06fba889 (diff)
downloadexternal_llvm-4f81768d448f909f503885520928b1723f0388a3.zip
external_llvm-4f81768d448f909f503885520928b1723f0388a3.tar.gz
external_llvm-4f81768d448f909f503885520928b1723f0388a3.tar.bz2
Use LTO_CODEGEN_PIC_MODEL_DYNAMIC for PIE. This requirest a git version of
gold to work. Since the enum value LDPO_PIE has just been added to plugin-api.h, use a numeric constant for now so that we don't require an unreleased version of gold to build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold')
-rw-r--r--tools/gold/gold-plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index cfd84c0..9c17da6 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -153,6 +153,8 @@ ld_plugin_status onload(ld_plugin_tv *tv) {
switch (tv->tv_u.tv_val) {
case LDPO_REL: // .o
case LDPO_DYN: // .so
+ // FIXME: Replace 3 with LDPO_PIE once that is in a released binutils.
+ case 3: // position independent executable
output_type = LTO_CODEGEN_PIC_MODEL_DYNAMIC;
break;
case LDPO_EXEC: // .exe