aboutsummaryrefslogtreecommitdiff
path: root/include/plugin-api.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03Update copyright years.Jakub Jelinek1-1/+1
2023-08-07PR29961, plugin-api.h: "Could not detect architecture endianess"Alan Modra1-22/+23
Found when attempting to build binutils on sparc sunos-5.8 where sys/byteorder.h defines _BIG_ENDIAN but not any of the BYTE_ORDER variants. This patch adds the extra tests to cope with the old machine, and tidies the header a little. include/ChangeLog: * plugin-api.h: When handling non-gcc or gcc < 4.6.0 include necessary header files before testing macros. Make more use of #elif. Test _LITTLE_ENDIAN and _BIG_ENDIAN in final tests.
2023-05-11Implement LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [PR109128]Joseph Myers1-0/+16
This is one part of the fix for PR109128, along with a corresponding binutils's linker change. Without this patch, what happens in the linker, when an unused object in a .a file has offload data, is that elf_link_is_defined_archive_symbol calls bfd_link_plugin_object_p, which ends up calling the plugin's claim_file_handler, which then records the object as one with offload data. That is, the linker never decides to use the object in the first place, but use of this _p interface (called as part of trying to decide whether to use the object) results in the plugin deciding to use its offload data (and a consequent mismatch in the offload data present at runtime). The new hook allows the linker plugin to distinguish calls to claim_file_handler that know the object is being used by the linker (from ldmain.c:add_archive_element), from calls that don't know it's being used by the linker (from elf_link_is_defined_archive_symbol); in the latter case, the plugin should avoid recording the object as one with offload data. PR middle-end/109128 include/ * plugin-api.h (ld_plugin_claim_file_handler_v2) (ld_plugin_register_claim_file_v2) (LDPT_REGISTER_CLAIM_FILE_HOOK_V2): New. (struct ld_plugin_tv): Add tv_register_claim_file_v2. lto-plugin/ * lto-plugin.c (register_claim_file_v2): New. (claim_file_handler_v2): New. (claim_file_handler): Wrap claim_file_handler_v2. (onload): Handle LDPT_REGISTER_CLAIM_FILE_HOOK_V2.
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-07-12lto-plugin: implement LDPT_GET_API_VERSIONMartin Liska1-0/+33
include/ChangeLog: * plugin-api.h (enum linker_api_version): New enum. (ld_plugin_get_api_version): New. (enum ld_plugin_tag): Add LDPT_GET_API_VERSION. (struct ld_plugin_tv): Add tv_get_api_version. lto-plugin/ChangeLog: * lto-plugin.c (negotiate_api_version): New. (onload): Negotiate API version. * Makefile.am: Add -DBASE_VERSION. * Makefile.in: Regenerate.
2022-05-04LTO plugin: modernize a bit.Martin Liska1-34/+34
include/ChangeLog: * plugin-api.h (enum ld_plugin_tag): Do not set implicit enum values. lto-plugin/ChangeLog: * lto-plugin.c (struct plugin_objfile): Use bool for offset field. (exec_lto_wrapper): Assign true/false to bool variables. (process_offload_section): Likewise. (claim_file_handler): Likewise. (onload): Likewise.
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-04-01Fix typo in a macro usage.Martin Liska1-1/+1
PR lto/94249 * plugin-api.h: Fix a typo.
2020-03-24Improve endianess detection.Martin Liska1-2/+63
PR lto/94249 * plugin-api.h: Add more robust endianess detection.
2020-03-21Fix comma at end of enumerator list seen with -std=c++98.Martin Liska1-1/+1
* plugin-api.h (enum ld_plugin_symbol_type): Remove comma after last value of an enum. * lto-symtab.h (enum gcc_plugin_symbol_type): Likewise.
2020-03-19Update include/plugin-api.h.Martin Liska1-2/+30
* plugin-api.h (struct ld_plugin_symbol): Split int def into 4 char fields. (enum ld_plugin_symbol_type): New. (enum ld_plugin_symbol_section_kind): New. (enum ld_plugin_tag): Add LDPT_ADD_SYMBOLS_V2.
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-01-09PR other/16615 [2/5]Sandra Loosemore1-1/+1
2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 [2/5] include/ * libiberty.h: Mechanically replace "can not" with "cannot". * plugin-api.h: Likewise. libiberty/ * cp-demangle.c: Mechanically replace "can not" with "cannot". * floatformat.c: Likewise. * strerror.c: Likewise. From-SVN: r267784
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-05-02Plugin API to get the list of wrap symbols.Sriraman Tallam1-1/+11
This was approved for the binutils gold linker. 2018-05-01 Sriraman Tallam <tmsriram@google.com> * plugin-api.h: Add plugin API to get the list of wrap symbols. From-SVN: r259820
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-11-10Add plugin API for processing plugin-added input files.Stephen Crane1-1/+17
Gold plugins may wish to further process an input file added by a plugin. For example, the plugin may need to assign a unique segment for sections in a plugin-generated input file. This patch adds a plugin callback that the linker will call when reading symbols from a new input file added after the all_symbols_read event (i.e. an input file added by a plugin). 2017-11-10 Stephen Crane <sjc@immunant.com> * plugin-api.h: Add plugin API for processing plugin-added input files. From-SVN: r254640
2017-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r244052
2016-03-04Sync include/plugin-api.h with binutils.Cary Coutant1-2/+27
2016-03-03 Than McIntosh <thanm@google.com> * plugin-api.h: Add new hooks to the plugin transfer vector to to support querying section alignment and section size. (ld_plugin_get_input_section_alignment): New hook. (ld_plugin_get_input_section_size): New hook. (ld_plugin_tag): Add LDPT_GET_INPUT_SECTION_ALIGNMENT and LDPT_GET_INPUT_SECTION_SIZE. (ld_plugin_tv): Add tv_get_input_section_alignment and tv_get_input_section_size. 2016-03-03 Evgenii Stepanov <eugenis@google.com> * plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3. From-SVN: r233986
2015-07-14Update copyright year in includeH.J. Lu1-1/+1
From-SVN: r225781
2013-02-11Sync plugin-api.h with the copy in binutils. Please see:Sriraman Tallam1-27/+27
http://sourceware.org/ml/binutils/2013-02/msg00136.html for a change committed to plugin-api.h 2013-02-11 Sriraman Tallam <tmsriram@google.com> * plugin-api.h (enum ld_plugin_level): Assign integers explicitly for all values. From-SVN: r195953
2012-08-24Sync plugin-api.h with gold patch : ↵Sriraman Tallam1-1/+32
http://sourceware.org/ml/binutils/2012-08/msg00447.html * plugin-api.h (ld_plugin_allow_unique_segment_for_sections): New interface. (ld_plugin_unique_segment_for_sections): New interface. (LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. (LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. (tv_allow_unique_segment_for_sections): New member. (tv_unique_segment_for_sections): New member. From-SVN: r190654
2012-06-12plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE.Rafael Ávila de Espíndola1-1/+2
2012-06-12 Rafael Ávila de Espíndola <respindola@mozilla.com> * plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE. From-SVN: r188484
2011-09-26re PR lto/47247 (Linker plugin specification makes it difficult to handle ↵Cary Coutant1-2/+9
COMDATs) PR lto/47247 * plugin-api.h (enum ld_plugin_symbol_resolution): Add LDPR_PREVAILING_DEF_IRONLY_EXP. (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2. From-SVN: r179220
2011-07-142012011-07-13 Sriraman Tallam <tmsriram@google.com>Sriraman Tallam1-1/+80
* plugin-api.h (ld_plugin_section): New struct. (ld_plugin_get_section_count): New typedef. (ld_plugin_get_section_type): New typedef. (ld_plugin_get_section_name): New typedef. (ld_plugin_get_section_contents): New typedef. (ld_plugin_update_section_order): New typedef. (ld_plugin_allow_section_ordering): New typedef. (LDPT_GET_SECTION_COUNT): New enum value. (LDPT_GET_SECTION_TYPE): New enum value. (LDPT_GET_SECTION_NAME): New enum value. (LDPT_GET_SECTION_CONTENTS): New enum value. (LDPT_UPDATE_SECTION_ORDER): New enum value. (LDPT_ALLOW_SECTION_ORDERING): New enum value. (tv_get_section_count): New struct members. (tv_get_section_type): New struct members. (tv_get_section_name): New struct members. (tv_get_section_contents): New struct members. (tv_update_section_order): New struct members. (tv_allow_section_ordering): New struct members. From-SVN: r176260
2011-03-23plugin-api.h (ld_plugin_get_view): New.Rafael Ávila de Espíndola1-1/+7
2010-03-23 Rafael Ávila de Espíndola <respindola@mozilla.com> * plugin-api.h (ld_plugin_get_view): New. (ld_plugin_tag): Add LDPT_GET_VIEW. (ld_plugin_tv): Add tv_get_view. From-SVN: r171351
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek1-1/+1
From-SVN: r168438
2010-10-15Sync LD plugin patch series (part 1/6) with src/include/.Dave Korn1-1/+2
* plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member. From-SVN: r165496
2010-06-21plugin-api.h (ld_plugin_set_extra_library_path): New.Rafael Avila de Espindola1-1/+9
2010-06-21 Rafael Espindola <espindola@google.com> * plugin-api.h (ld_plugin_set_extra_library_path): New. (ld_plugin_tag): Add LDPT_SET_EXTRA_LIBRARY_PATH. (ld_plugin_tv): Add tv_set_extra_library_path. From-SVN: r161116
2010-06-18plugin.h (ld_plugin_add_input_file, [...]): Make argument const.Rafael Avila de Espindola1-2/+2
2010-06-18 Rafael Espindola <espindola@google.com> * plugin.h (ld_plugin_add_input_file, ld_plugin_add_input_library): Make argument const. From-SVN: r161007
2010-06-02plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME.Rafael Avila de Espindola1-1/+2
2010-06-01 Rafael Espindola <espindola@google.com> * plugin-api.h (ld_plugin_tag): Add LDPT_OUTPUT_NAME. From-SVN: r160126
2009-10-19re PR lto/40790 (plugin-api.h unconditionally includes stdint.h)Rafael Espindola1-0/+8
include/ 2009-10-09 Rafael Avila de Espindola <espindola@google.com> PR40790 * plugin-api.h: Don't include stdint.h unconditionally. lto-plugin/ 2009-10-09 Rafael Avila de Espindola <espindola@google.com> PR40790 * configure: Regenerate. * configure.ac: Add AC_TYPE_UINT64_T. From-SVN: r152976
2009-10-09plugin-api.h (ld_plugin_add_input_library): Change argument name to libname.Rafael Avila de Espindola1-1/+1
2009-10-09 Rafael Espindola <espindola@google.com> * plugin-api.h (ld_plugin_add_input_library): Change argument name to libname. From-SVN: r152592
2009-10-05plugin-api.h: Sync with src.Rafael Avila de Espindola1-2/+29
2009-10-05 Rafael Espindola <espindola@google.com> * plugin-api.h: Sync with src. From-SVN: r152472
2009-10-04plugin-api.h: Fix compile.Jerry Quinn1-1/+1
2009-10-04 Jerry Quinn <jlquinn@optonline.net> * plugin-api.h: Fix compile. From-SVN: r152438
2009-10-03Merge lto branch into trunk.Diego Novillo1-0/+263
From-SVN: r152434