diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 11 | ||||
-rw-r--r-- | include/bfdlink.h | 30 |
2 files changed, 31 insertions, 10 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index df9e2e2..e1bd6ae 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,14 @@ +2015-08-18 H.J. Lu <hongjiu.lu@intel.com> + + * include/bfdlink.h (output_type): New enum. + (bfd_link_executable): New macro. + (bfd_link_dll): Likewise. + (bfd_link_relocatable): Likewise. + (bfd_link_pic): Likewise. + (bfd_link_pie): Likewise. + (bfd_link_info): Remove shared, executable, pie and relocatable. + Add output_type and pic. + 2015-08-12 H.J. Lu <hongjiu.lu@intel.com> Sync with GCC diff --git a/include/bfdlink.h b/include/bfdlink.h index b9dc139..797a465 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -259,22 +259,32 @@ struct flag_info struct bfd_elf_dynamic_list; struct bfd_elf_version_tree; +/* Types of output. */ + +enum output_type +{ + type_executable = 0, + type_dll, + type_relocatable +}; + +#define bfd_link_executable(info) ((info)->type == type_executable) +#define bfd_link_dll(info) ((info)->type == type_dll) +#define bfd_link_relocatable(info) ((info)->type == type_relocatable) +#define bfd_link_pic(info) (info)->pic +#define bfd_link_pie(info) (bfd_link_executable (info) \ + && bfd_link_pic (info)) + /* This structure holds all the information needed to communicate between BFD and the linker when doing a link. */ struct bfd_link_info { - /* TRUE if BFD should generate a shared object (or a pie). */ - unsigned int shared: 1; - - /* TRUE if generating an executable, position independent or not. */ - unsigned int executable : 1; - - /* TRUE if generating a position independent executable. */ - unsigned int pie: 1; + /* Output type. */ + ENUM_BITFIELD (output_type) type : 2; - /* TRUE if BFD should generate a relocatable object file. */ - unsigned int relocatable: 1; + /* TRUE if BFD should generate a position independent object. */ + unsigned int pic : 1; /* TRUE if BFD should pre-bind symbols in a shared object. */ unsigned int symbolic: 1; |