aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-08-19 12:32:54 +0930
committerAlan Modra <amodra@gmail.com>2015-08-19 12:53:54 +0930
commit64d94ba01a4f56ac10bb277e66bb00d82bd97f10 (patch)
tree62c874d41a10602671ff90819aef826e06ed57c5 /ld/lexsup.c
parent3cbc1e5e68341e53a03fe7e9d38fc02e0d78c418 (diff)
downloadgdb-64d94ba01a4f56ac10bb277e66bb00d82bd97f10.zip
gdb-64d94ba01a4f56ac10bb277e66bb00d82bd97f10.tar.gz
gdb-64d94ba01a4f56ac10bb277e66bb00d82bd97f10.tar.bz2
Remove link_info.pic
Adding type_pie to output_type allows us to remove link_info.pic and with some reordering of the enum, produces better code. include/ * bfdlink.h (enum output_type): Delete type_executable, add type_pde and type_pie. Reorder. (struct bfd_link_info): Delete pic field. (bfd_link_executable, bfd_link_pde, bfd_link_pie, bfd_link_pic): Adjust. ld/ * emultempl/aix.em: Don't set link_info.pic. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/sunos.em: Likewise. * lexsup.c (parse_args): Likewise. Set type_pie for -pie. * plugin.c (set_tv_header <LDPT_LINKER_OUTPUT>): Simplify.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 777d6e2..ace1803 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -1121,7 +1121,6 @@ parse_args (unsigned argc, char **argv)
einfo (_("%P%F: -r and -shared may not be used together\n"));
link_info.type = type_dll;
- link_info.pic = TRUE;
/* When creating a shared library, the default
behaviour is to ignore any unresolved references. */
if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
@@ -1138,8 +1137,7 @@ parse_args (unsigned argc, char **argv)
if (bfd_link_relocatable (&link_info))
einfo (_("%P%F: -r and -pie may not be used together\n"));
- link_info.type = type_executable;
- link_info.pic = TRUE;
+ link_info.type = type_pie;
}
else
einfo (_("%P%F: -pie not supported\n"));