summaryrefslogtreecommitdiffstats
path: root/ld/plugin.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-14 23:44:38 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-06-14 23:44:38 +0000
commit6611f2e124895bfad9cbb51e5c0bf53daa86986d (patch)
treeab832402d78991c916bb875e13bd923aafe49454 /ld/plugin.c
parent3771a44cf0e0b3a1017bcdce1eb0596bb1109296 (diff)
downloadppe42-binutils-6611f2e124895bfad9cbb51e5c0bf53daa86986d.tar.gz
ppe42-binutils-6611f2e124895bfad9cbb51e5c0bf53daa86986d.zip
Handle link_info.pie in ld plugin
* plugin.c (set_tv_header): Handle link_info.pie.
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index 2515888878..7e3d2a33ba 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -697,7 +697,9 @@ set_tv_header (struct ld_plugin_tv *tv)
case LDPT_LINKER_OUTPUT:
TVU(val) = (link_info.relocatable
? LDPO_REL
- : link_info.executable ? LDPO_EXEC : LDPO_DYN);
+ : (link_info.executable
+ ? (link_info.pie ? LDPO_PIE : LDPO_EXEC)
+ : LDPO_DYN));
break;
case LDPT_OUTPUT_NAME:
TVU(string) = output_filename;
OpenPOWER on IntegriCloud