mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
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.
This commit is contained in:
@ -872,11 +872,10 @@ set_tv_header (struct ld_plugin_tv *tv)
|
||||
TVU(val) = major * 100 + minor;
|
||||
break;
|
||||
case LDPT_LINKER_OUTPUT:
|
||||
TVU(val) = (bfd_link_relocatable (&link_info)
|
||||
? LDPO_REL
|
||||
: (bfd_link_executable (&link_info)
|
||||
? (bfd_link_pic (&link_info) ? LDPO_PIE : LDPO_EXEC)
|
||||
: LDPO_DYN));
|
||||
TVU(val) = (bfd_link_relocatable (&link_info) ? LDPO_REL
|
||||
: bfd_link_pde (&link_info) ? LDPO_EXEC
|
||||
: bfd_link_pie (&link_info) ? LDPO_PIE
|
||||
: LDPO_DYN);
|
||||
break;
|
||||
case LDPT_OUTPUT_NAME:
|
||||
TVU(string) = output_filename;
|
||||
|
Reference in New Issue
Block a user