Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-09 08:51:06

0001 /* plugin-api.h -- External linker plugin API.  */
0002 
0003 /* Copyright (C) 2009-2024 Free Software Foundation, Inc.
0004    Written by Cary Coutant <ccoutant@google.com>.
0005 
0006    This file is part of binutils.
0007 
0008    This program is free software; you can redistribute it and/or modify
0009    it under the terms of the GNU General Public License as published by
0010    the Free Software Foundation; either version 3 of the License, or
0011    (at your option) any later version.
0012 
0013    This program is distributed in the hope that it will be useful,
0014    but WITHOUT ANY WARRANTY; without even the implied warranty of
0015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016    GNU General Public License for more details.
0017 
0018    You should have received a copy of the GNU General Public License
0019    along with this program; if not, write to the Free Software
0020    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
0021    MA 02110-1301, USA.  */
0022 
0023 /* This file defines the interface for writing a linker plugin, which is
0024    described at < http://gcc.gnu.org/wiki/whopr/driver >.  */
0025 
0026 #ifndef PLUGIN_API_H
0027 #define PLUGIN_API_H
0028 
0029 #ifdef HAVE_STDINT_H
0030 #include <stdint.h>
0031 #elif defined(HAVE_INTTYPES_H)
0032 #include <inttypes.h>
0033 #endif
0034 #include <sys/types.h>
0035 #if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && \
0036     !defined(UINT64_MAX) && !defined(uint64_t)
0037 #error cannot find uint64_t type
0038 #endif
0039 
0040 /* Detect endianess based on gcc's (>=4.6.0) __BYTE_ORDER__ macro.  */
0041 #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \
0042     defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_PDP_ENDIAN__)
0043 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
0044 #define PLUGIN_LITTLE_ENDIAN 1
0045 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
0046 #define PLUGIN_BIG_ENDIAN 1
0047 #elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
0048 #define PLUGIN_PDP_ENDIAN 1
0049 #endif
0050 
0051 #else
0052 /* Include header files to define endian macros.  */
0053 #if defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__ANDROID__)
0054 #include <endian.h>
0055 
0056 #elif defined(__SVR4) && defined(__sun)
0057 #include <sys/byteorder.h>
0058 
0059 #elif defined(__FreeBSD__) || defined(__NetBSD__) || \
0060       defined(__DragonFly__) || defined(__minix)
0061 #include <sys/endian.h>
0062 
0063 #elif defined(__OpenBSD__)
0064 #include <machine/endian.h>
0065 #endif
0066 
0067 /* Detect endianess based on __BYTE_ORDER.  */
0068 #ifdef __BYTE_ORDER
0069 #if __BYTE_ORDER == __LITTLE_ENDIAN
0070 #define PLUGIN_LITTLE_ENDIAN 1
0071 #elif __BYTE_ORDER == __BIG_ENDIAN
0072 #define PLUGIN_BIG_ENDIAN 1
0073 #endif
0074 
0075 /* Detect endianess based on _BYTE_ORDER.  */
0076 #elif defined _BYTE_ORDER
0077 #if _BYTE_ORDER == _LITTLE_ENDIAN
0078 #define PLUGIN_LITTLE_ENDIAN 1
0079 #elif _BYTE_ORDER == _BIG_ENDIAN
0080 #define PLUGIN_BIG_ENDIAN 1
0081 #endif
0082 
0083 /* Detect based on _WIN32.  */
0084 #elif defined _WIN32
0085 #define PLUGIN_LITTLE_ENDIAN 1
0086 
0087 /* Detect based on __BIG_ENDIAN__ and __LITTLE_ENDIAN__ */
0088 #elif defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
0089 #define PLUGIN_LITTLE_ENDIAN 1
0090 #elif defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
0091 #define PLUGIN_BIG_ENDIAN 1
0092 #endif
0093 #endif
0094 
0095 #ifdef __cplusplus
0096 extern "C"
0097 {
0098 #endif
0099 
0100 /* Status code returned by most API routines.  */
0101 
0102 enum ld_plugin_status
0103 {
0104   LDPS_OK = 0,
0105   LDPS_NO_SYMS,         /* Attempt to get symbols that haven't been added. */
0106   LDPS_BAD_HANDLE,      /* No claimed object associated with given handle. */
0107   LDPS_ERR
0108   /* Additional Error codes TBD.  */
0109 };
0110 
0111 /* The version of the API specification.  */
0112 
0113 enum ld_plugin_api_version
0114 {
0115   LD_PLUGIN_API_VERSION = 1
0116 };
0117 
0118 /* The type of output file being generated by the linker.  */
0119 
0120 enum ld_plugin_output_file_type
0121 {
0122   LDPO_REL,
0123   LDPO_EXEC,
0124   LDPO_DYN,
0125   LDPO_PIE
0126 };
0127 
0128 /* An input file managed by the plugin library.  */
0129 
0130 struct ld_plugin_input_file
0131 {
0132   const char *name;
0133   int fd;
0134   off_t offset;
0135   off_t filesize;
0136   void *handle;
0137 };
0138 
0139 /* A symbol belonging to an input file managed by the plugin library.  */
0140 
0141 struct ld_plugin_symbol
0142 {
0143   char *name;
0144   char *version;
0145   /* This is for compatibility with older ABIs.  The older ABI defined
0146      only 'def' field.  */
0147 #if PLUGIN_BIG_ENDIAN == 1
0148   char unused;
0149   char section_kind;
0150   char symbol_type;
0151   char def;
0152 #elif PLUGIN_LITTLE_ENDIAN == 1
0153   char def;
0154   char symbol_type;
0155   char section_kind;
0156   char unused;
0157 #elif PLUGIN_PDP_ENDIAN == 1
0158   char symbol_type;
0159   char def;
0160   char unused;
0161   char section_kind;
0162 #else
0163 #error "Could not detect architecture endianess"
0164 #endif
0165   int visibility;
0166   uint64_t size;
0167   char *comdat_key;
0168   int resolution;
0169 };
0170 
0171 /* An object's section.  */
0172 
0173 struct ld_plugin_section
0174 {
0175   const void* handle;
0176   unsigned int shndx;
0177 };
0178 
0179 /* Whether the symbol is a definition, reference, or common, weak or not.  */
0180 
0181 enum ld_plugin_symbol_kind
0182 {
0183   LDPK_DEF,
0184   LDPK_WEAKDEF,
0185   LDPK_UNDEF,
0186   LDPK_WEAKUNDEF,
0187   LDPK_COMMON
0188 };
0189 
0190 /* The visibility of the symbol.  */
0191 
0192 enum ld_plugin_symbol_visibility
0193 {
0194   LDPV_DEFAULT,
0195   LDPV_PROTECTED,
0196   LDPV_INTERNAL,
0197   LDPV_HIDDEN
0198 };
0199 
0200 /* The type of the symbol.  */
0201 
0202 enum ld_plugin_symbol_type
0203 {
0204   LDST_UNKNOWN,
0205   LDST_FUNCTION,
0206   LDST_VARIABLE
0207 };
0208 
0209 enum ld_plugin_symbol_section_kind
0210 {
0211   LDSSK_DEFAULT,
0212   LDSSK_BSS
0213 };
0214 
0215 /* How a symbol is resolved.  */
0216 
0217 enum ld_plugin_symbol_resolution
0218 {
0219   LDPR_UNKNOWN = 0,
0220 
0221   /* Symbol is still undefined at this point.  */
0222   LDPR_UNDEF,
0223 
0224   /* This is the prevailing definition of the symbol, with references from
0225      regular object code.  */
0226   LDPR_PREVAILING_DEF,
0227 
0228   /* This is the prevailing definition of the symbol, with no
0229      references from regular objects.  It is only referenced from IR
0230      code.  */
0231   LDPR_PREVAILING_DEF_IRONLY,
0232 
0233   /* This definition was pre-empted by a definition in a regular
0234      object file.  */
0235   LDPR_PREEMPTED_REG,
0236 
0237   /* This definition was pre-empted by a definition in another IR file.  */
0238   LDPR_PREEMPTED_IR,
0239 
0240   /* This symbol was resolved by a definition in another IR file.  */
0241   LDPR_RESOLVED_IR,
0242 
0243   /* This symbol was resolved by a definition in a regular object
0244      linked into the main executable.  */
0245   LDPR_RESOLVED_EXEC,
0246 
0247   /* This symbol was resolved by a definition in a shared object.  */
0248   LDPR_RESOLVED_DYN,
0249 
0250   /* This is the prevailing definition of the symbol, with no
0251      references from regular objects.  It is only referenced from IR
0252      code, but the symbol is exported and may be referenced from
0253      a dynamic object (not seen at link time).  */
0254   LDPR_PREVAILING_DEF_IRONLY_EXP
0255 };
0256 
0257 /* The plugin library's "claim file" handler.  */
0258 
0259 typedef
0260 enum ld_plugin_status
0261 (*ld_plugin_claim_file_handler) (
0262   const struct ld_plugin_input_file *file, int *claimed);
0263 
0264 /* The plugin library's "claim file" handler, version 2.  */
0265 
0266 typedef
0267 enum ld_plugin_status
0268 (*ld_plugin_claim_file_handler_v2) (
0269   const struct ld_plugin_input_file *file, int *claimed, int known_used);
0270 
0271 /* The plugin library's "all symbols read" handler.  */
0272 
0273 typedef
0274 enum ld_plugin_status
0275 (*ld_plugin_all_symbols_read_handler) (void);
0276 
0277 /* The plugin library's cleanup handler.  */
0278 
0279 typedef
0280 enum ld_plugin_status
0281 (*ld_plugin_cleanup_handler) (void);
0282 
0283 /* The linker's interface for registering the "claim file" handler.  */
0284 
0285 typedef
0286 enum ld_plugin_status
0287 (*ld_plugin_register_claim_file) (ld_plugin_claim_file_handler handler);
0288 
0289 /* The linker's interface for registering the "claim file" handler,
0290    version 2.  */
0291 
0292 typedef
0293 enum ld_plugin_status
0294 (*ld_plugin_register_claim_file_v2) (ld_plugin_claim_file_handler_v2 handler);
0295 
0296 /* The linker's interface for registering the "all symbols read" handler.  */
0297 
0298 typedef
0299 enum ld_plugin_status
0300 (*ld_plugin_register_all_symbols_read) (
0301   ld_plugin_all_symbols_read_handler handler);
0302 
0303 /* The linker's interface for registering the cleanup handler.  */
0304 
0305 typedef
0306 enum ld_plugin_status
0307 (*ld_plugin_register_cleanup) (ld_plugin_cleanup_handler handler);
0308 
0309 /* The linker's interface for adding symbols from a claimed input file.  */
0310 
0311 typedef
0312 enum ld_plugin_status
0313 (*ld_plugin_add_symbols) (void *handle, int nsyms,
0314                           const struct ld_plugin_symbol *syms);
0315 
0316 /* The linker's interface for getting the input file information with
0317    an open (possibly re-opened) file descriptor.  */
0318 
0319 typedef
0320 enum ld_plugin_status
0321 (*ld_plugin_get_input_file) (const void *handle,
0322                              struct ld_plugin_input_file *file);
0323 
0324 typedef
0325 enum ld_plugin_status
0326 (*ld_plugin_get_view) (const void *handle, const void **viewp);
0327 
0328 /* The linker's interface for releasing the input file.  */
0329 
0330 typedef
0331 enum ld_plugin_status
0332 (*ld_plugin_release_input_file) (const void *handle);
0333 
0334 /* The linker's interface for retrieving symbol resolution information.  */
0335 
0336 typedef
0337 enum ld_plugin_status
0338 (*ld_plugin_get_symbols) (const void *handle, int nsyms,
0339                           struct ld_plugin_symbol *syms);
0340 
0341 /* The linker's interface for adding a compiled input file.  */
0342 
0343 typedef
0344 enum ld_plugin_status
0345 (*ld_plugin_add_input_file) (const char *pathname);
0346 
0347 /* The linker's interface for adding a library that should be searched.  */
0348 
0349 typedef
0350 enum ld_plugin_status
0351 (*ld_plugin_add_input_library) (const char *libname);
0352 
0353 /* The linker's interface for adding a library path that should be searched.  */
0354 
0355 typedef
0356 enum ld_plugin_status
0357 (*ld_plugin_set_extra_library_path) (const char *path);
0358 
0359 /* The linker's interface for issuing a warning or error message.  */
0360 
0361 typedef
0362 enum ld_plugin_status
0363 (*ld_plugin_message) (int level, const char *format, ...);
0364 
0365 /* The linker's interface for retrieving the number of sections in an object.
0366    The handle is obtained in the claim_file handler.  This interface should
0367    only be invoked in the claim_file handler.   This function sets *COUNT to
0368    the number of sections in the object.  */
0369 
0370 typedef
0371 enum ld_plugin_status
0372 (*ld_plugin_get_input_section_count) (const void* handle, unsigned int *count);
0373 
0374 /* The linker's interface for retrieving the section type of a specific
0375    section in an object.  This interface should only be invoked in the
0376    claim_file handler.  This function sets *TYPE to an ELF SHT_xxx value.  */
0377 
0378 typedef
0379 enum ld_plugin_status
0380 (*ld_plugin_get_input_section_type) (const struct ld_plugin_section section,
0381                                      unsigned int *type);
0382 
0383 /* The linker's interface for retrieving the name of a specific section in
0384    an object. This interface should only be invoked in the claim_file handler.
0385    This function sets *SECTION_NAME_PTR to a null-terminated buffer allocated
0386    by malloc.  The plugin must free *SECTION_NAME_PTR.  */
0387 
0388 typedef
0389 enum ld_plugin_status
0390 (*ld_plugin_get_input_section_name) (const struct ld_plugin_section section,
0391                                      char **section_name_ptr);
0392 
0393 /* The linker's interface for retrieving the contents of a specific section
0394    in an object.  This interface should only be invoked in the claim_file
0395    handler.  This function sets *SECTION_CONTENTS to point to a buffer that is
0396    valid until clam_file handler returns.  It sets *LEN to the size of the
0397    buffer.  */
0398 
0399 typedef
0400 enum ld_plugin_status
0401 (*ld_plugin_get_input_section_contents) (const struct ld_plugin_section section,
0402                                          const unsigned char **section_contents,
0403                                          size_t* len);
0404 
0405 /* The linker's interface for specifying the desired order of sections.
0406    The sections should be specifed using the array SECTION_LIST in the
0407    order in which they should appear in the final layout.  NUM_SECTIONS
0408    specifies the number of entries in each array.  This should be invoked
0409    in the all_symbols_read handler.  */
0410 
0411 typedef
0412 enum ld_plugin_status
0413 (*ld_plugin_update_section_order) (const struct ld_plugin_section *section_list,
0414                    unsigned int num_sections);
0415 
0416 /* The linker's interface for specifying that reordering of sections is
0417    desired so that the linker can prepare for it.  This should be invoked
0418    before update_section_order, preferably in the claim_file handler.  */
0419 
0420 typedef
0421 enum ld_plugin_status
0422 (*ld_plugin_allow_section_ordering) (void);
0423 
0424 /* The linker's interface for specifying that a subset of sections is
0425    to be mapped to a unique segment.  If the plugin wants to call
0426    unique_segment_for_sections, it must call this function from a
0427    claim_file_handler or when it is first loaded.  */
0428 
0429 typedef
0430 enum ld_plugin_status
0431 (*ld_plugin_allow_unique_segment_for_sections) (void);
0432 
0433 /* The linker's interface for specifying that a specific set of sections
0434    must be mapped to a unique segment.  ELF segments do not have names
0435    and the NAME is used as the name of the newly created output section
0436    that is then placed in the unique PT_LOAD segment.  FLAGS is used to
0437    specify if any additional segment flags need to be set.  For instance,
0438    a specific segment flag can be set to identify this segment.  Unsetting
0439    segment flags that would be set by default is not possible.  The
0440    parameter SEGMENT_ALIGNMENT when non-zero will override the default.  */
0441 
0442 typedef
0443 enum ld_plugin_status
0444 (*ld_plugin_unique_segment_for_sections) (
0445     const char* segment_name,
0446     uint64_t segment_flags,
0447     uint64_t segment_alignment,
0448     const struct ld_plugin_section * section_list,
0449     unsigned int num_sections);
0450 
0451 /* The linker's interface for retrieving the section alignment requirement
0452    of a specific section in an object.  This interface should only be invoked in the
0453    claim_file handler.  This function sets *ADDRALIGN to the ELF sh_addralign
0454    value of the input section.  */
0455 
0456 typedef
0457 enum ld_plugin_status
0458 (*ld_plugin_get_input_section_alignment) (const struct ld_plugin_section section,
0459                                           unsigned int *addralign);
0460 
0461 /* The linker's interface for retrieving the section size of a specific section
0462    in an object.  This interface should only be invoked in the claim_file handler.
0463    This function sets *SECSIZE to the ELF sh_size
0464    value of the input section.  */
0465 
0466 typedef
0467 enum ld_plugin_status
0468 (*ld_plugin_get_input_section_size) (const struct ld_plugin_section section,
0469                                      uint64_t *secsize);
0470 
0471 typedef
0472 enum ld_plugin_status
0473 (*ld_plugin_new_input_handler) (const struct ld_plugin_input_file *file);
0474 
0475 /* The linker's interface for registering the "new_input" handler. This handler
0476    will be notified when a new input file has been added after the
0477    all_symbols_read event, allowing the plugin to, for example, set a unique
0478    segment for sections in plugin-generated input files. */
0479 
0480 typedef
0481 enum ld_plugin_status
0482 (*ld_plugin_register_new_input) (ld_plugin_new_input_handler handler);
0483 
0484 /* The linker's interface for getting the list of wrapped symbols using the
0485    --wrap option. This sets *NUM_SYMBOLS to number of wrapped symbols and
0486    *WRAP_SYMBOL_LIST to the list of wrapped symbols. */
0487 
0488 typedef
0489 enum ld_plugin_status
0490 (*ld_plugin_get_wrap_symbols) (uint64_t *num_symbols,
0491                                const char ***wrap_symbol_list);
0492 
0493 enum ld_plugin_level
0494 {
0495   LDPL_INFO,
0496   LDPL_WARNING,
0497   LDPL_ERROR,
0498   LDPL_FATAL
0499 };
0500 
0501 /* Contract between a plug-in and a linker.  */
0502 
0503 enum linker_api_version
0504 {
0505    /* The linker/plugin do not implement any of the API levels below, the API
0506        is determined solely via the transfer vector.  */
0507    LAPI_V0,
0508 
0509    /* API level v1.  The linker provides get_symbols_v3, add_symbols_v2,
0510       the plugin will use that and not any lower versions.
0511       claim_file is thread-safe on the plugin side and
0512       add_symbols on the linker side.  */
0513    LAPI_V1
0514 };
0515 
0516 /* The linker's interface for API version negotiation.  A plug-in calls
0517   the function (with its IDENTIFIER and VERSION), plus minimal and maximal
0518   version of linker_api_version is provided.  Linker then returns selected
0519   API version and provides its IDENTIFIER and VERSION.  The returned value
0520   by linker must be in range [MINIMAL_API_SUPPORTED, MAXIMAL_API_SUPPORTED].
0521   Identifier pointers remain valid as long as the plugin is loaded.  */
0522 
0523 typedef
0524 int
0525 (*ld_plugin_get_api_version) (const char *plugin_identifier,
0526                   const char *plugin_version,
0527                   int minimal_api_supported,
0528                   int maximal_api_supported,
0529                   const char **linker_identifier,
0530                   const char **linker_version);
0531 
0532 /* Values for the tv_tag field of the transfer vector.  */
0533 
0534 enum ld_plugin_tag
0535 {
0536   LDPT_NULL,
0537   LDPT_API_VERSION,
0538   LDPT_GOLD_VERSION,
0539   LDPT_LINKER_OUTPUT,
0540   LDPT_OPTION,
0541   LDPT_REGISTER_CLAIM_FILE_HOOK,
0542   LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK,
0543   LDPT_REGISTER_CLEANUP_HOOK,
0544   LDPT_ADD_SYMBOLS,
0545   LDPT_GET_SYMBOLS,
0546   LDPT_ADD_INPUT_FILE,
0547   LDPT_MESSAGE,
0548   LDPT_GET_INPUT_FILE,
0549   LDPT_RELEASE_INPUT_FILE,
0550   LDPT_ADD_INPUT_LIBRARY,
0551   LDPT_OUTPUT_NAME,
0552   LDPT_SET_EXTRA_LIBRARY_PATH,
0553   LDPT_GNU_LD_VERSION,
0554   LDPT_GET_VIEW,
0555   LDPT_GET_INPUT_SECTION_COUNT,
0556   LDPT_GET_INPUT_SECTION_TYPE,
0557   LDPT_GET_INPUT_SECTION_NAME,
0558   LDPT_GET_INPUT_SECTION_CONTENTS,
0559   LDPT_UPDATE_SECTION_ORDER,
0560   LDPT_ALLOW_SECTION_ORDERING,
0561   LDPT_GET_SYMBOLS_V2,
0562   LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS,
0563   LDPT_UNIQUE_SEGMENT_FOR_SECTIONS,
0564   LDPT_GET_SYMBOLS_V3,
0565   LDPT_GET_INPUT_SECTION_ALIGNMENT,
0566   LDPT_GET_INPUT_SECTION_SIZE,
0567   LDPT_REGISTER_NEW_INPUT_HOOK,
0568   LDPT_GET_WRAP_SYMBOLS,
0569   LDPT_ADD_SYMBOLS_V2,
0570   LDPT_GET_API_VERSION,
0571   LDPT_REGISTER_CLAIM_FILE_HOOK_V2
0572 };
0573 
0574 /* The plugin transfer vector.  */
0575 
0576 struct ld_plugin_tv
0577 {
0578   enum ld_plugin_tag tv_tag;
0579   union
0580   {
0581     int tv_val;
0582     const char *tv_string;
0583     ld_plugin_register_claim_file tv_register_claim_file;
0584     ld_plugin_register_claim_file_v2 tv_register_claim_file_v2;
0585     ld_plugin_register_all_symbols_read tv_register_all_symbols_read;
0586     ld_plugin_register_cleanup tv_register_cleanup;
0587     ld_plugin_add_symbols tv_add_symbols;
0588     ld_plugin_get_symbols tv_get_symbols;
0589     ld_plugin_add_input_file tv_add_input_file;
0590     ld_plugin_message tv_message;
0591     ld_plugin_get_input_file tv_get_input_file;
0592     ld_plugin_get_view tv_get_view;
0593     ld_plugin_release_input_file tv_release_input_file;
0594     ld_plugin_add_input_library tv_add_input_library;
0595     ld_plugin_set_extra_library_path tv_set_extra_library_path;
0596     ld_plugin_get_input_section_count tv_get_input_section_count;
0597     ld_plugin_get_input_section_type tv_get_input_section_type;
0598     ld_plugin_get_input_section_name tv_get_input_section_name;
0599     ld_plugin_get_input_section_contents tv_get_input_section_contents;
0600     ld_plugin_update_section_order tv_update_section_order;
0601     ld_plugin_allow_section_ordering tv_allow_section_ordering;
0602     ld_plugin_allow_unique_segment_for_sections tv_allow_unique_segment_for_sections; 
0603     ld_plugin_unique_segment_for_sections tv_unique_segment_for_sections;
0604     ld_plugin_get_input_section_alignment tv_get_input_section_alignment;
0605     ld_plugin_get_input_section_size tv_get_input_section_size;
0606     ld_plugin_register_new_input tv_register_new_input;
0607     ld_plugin_get_wrap_symbols tv_get_wrap_symbols;
0608     ld_plugin_get_api_version tv_get_api_version;
0609   } tv_u;
0610 };
0611 
0612 /* The plugin library's "onload" entry point.  */
0613 
0614 typedef
0615 enum ld_plugin_status
0616 (*ld_plugin_onload) (struct ld_plugin_tv *tv);
0617 
0618 #ifdef __cplusplus
0619 }
0620 #endif
0621 
0622 #endif /* !defined(PLUGIN_API_H) */