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.

llvm-svn: 158402
This commit is contained in:
Rafael Espindola 2012-06-13 13:30:24 +00:00
parent 409d8ae165
commit 9aa1fcce58
1 changed files with 2 additions and 0 deletions

View File

@ -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