Print this page
7319 Need a way to turn off ld "multiple inclusion" warnings
Reviewed by: Martin Bochnig <opensxce@mail.ru>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  *      Copyright (c) 1988 AT&T
  24  *        All Rights Reserved
  25  *
  26  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.

  27  */
  28 
  29 #ifndef _LIBLD_H
  30 #define _LIBLD_H
  31 
  32 #include <stdlib.h>
  33 #include <libelf.h>
  34 #include <sgs.h>
  35 #include <_machelf.h>
  36 #include <string_table.h>
  37 #include <sys/avl.h>
  38 #include <alist.h>
  39 #include <elfcap.h>
  40 
  41 #ifdef  __cplusplus
  42 extern "C" {
  43 #endif
  44 
  45 /*
  46  * Default directory search path manipulation for the link-editor.  YLDIR


 448 #define FLG_OF_MAPGLOB  0x000200000000  /* global scope definition seen */
 449 #define FLG_OF_COMREL   0x000400000000  /* -z combreloc set, which enables */
 450                                         /*      DT_RELACNT tracking, */
 451 #define FLG_OF_NOCOMREL 0x000800000000  /* -z nocombreloc set */
 452 #define FLG_OF_AUTOLCL  0x001000000000  /* automatically reduce unspecified */
 453                                         /*      global symbols to locals */
 454 #define FLG_OF_AUTOELM  0x002000000000  /* automatically eliminate */
 455                                         /*      unspecified global symbols */
 456 #define FLG_OF_REDLSYM  0x004000000000  /* reduce local symbols */
 457 #define FLG_OF_OS_ORDER 0x008000000000  /* output section ordering required */
 458 #define FLG_OF_OSABI    0x010000000000  /* tag object as ELFOSABI_SOLARIS */
 459 #define FLG_OF_ADJOSCNT 0x020000000000  /* adjust ofl_shdrcnt to accommodate */
 460                                         /*      discarded sections */
 461 #define FLG_OF_OTOSCAP  0x040000000000  /* convert object capabilities to */
 462                                         /*      symbol capabilities */
 463 #define FLG_OF_PTCAP    0x080000000000  /* PT_SUNWCAP required */
 464 #define FLG_OF_CAPSTRS  0x100000000000  /* capability strings are required */
 465 #define FLG_OF_EHFRAME  0x200000000000  /* output contains .eh_frame section */
 466 #define FLG_OF_FATWARN  0x400000000000  /* make warnings fatal */
 467 #define FLG_OF_ADEFLIB  0x800000000000  /* no libraries in default path */

 468 
 469 /*
 470  * In the flags1 arena, establish any options that are applicable to archive
 471  * extraction first, and associate a mask.  These values are recorded with any
 472  * archive descriptor so that they may be reset should the archive require a
 473  * rescan to try and resolve undefined symbols.
 474  */
 475 #define FLG_OF1_ALLEXRT 0x0000000001    /* extract all members from an */
 476                                         /*      archive file */
 477 #define FLG_OF1_WEAKEXT 0x0000000002    /* allow archive extraction to */
 478                                         /*      resolve weak references */
 479 #define MSK_OF1_ARCHIVE 0x0000000003    /* archive flags mask */
 480 
 481 #define FLG_OF1_NOINTRP 0x0000000008    /* -z nointerp flag set */
 482 #define FLG_OF1_ZDIRECT 0x0000000010    /* -z direct flag set */
 483 #define FLG_OF1_NDIRECT 0x0000000020    /* no-direct bindings specified */
 484 #define FLG_OF1_DEFERRED 0x0000000040   /* deferred dependency recording */
 485 
 486 #define FLG_OF1_RELDYN  0x0000000100    /* process .dynamic in rel obj */
 487 #define FLG_OF1_NRLXREL 0x0000000200    /* -z norelaxreloc flag set */




   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  *      Copyright (c) 1988 AT&T
  24  *        All Rights Reserved
  25  *
  26  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  27  * Copyright 2016 RackTop Systems.
  28  */
  29 
  30 #ifndef _LIBLD_H
  31 #define _LIBLD_H
  32 
  33 #include <stdlib.h>
  34 #include <libelf.h>
  35 #include <sgs.h>
  36 #include <_machelf.h>
  37 #include <string_table.h>
  38 #include <sys/avl.h>
  39 #include <alist.h>
  40 #include <elfcap.h>
  41 
  42 #ifdef  __cplusplus
  43 extern "C" {
  44 #endif
  45 
  46 /*
  47  * Default directory search path manipulation for the link-editor.  YLDIR


 449 #define FLG_OF_MAPGLOB  0x000200000000  /* global scope definition seen */
 450 #define FLG_OF_COMREL   0x000400000000  /* -z combreloc set, which enables */
 451                                         /*      DT_RELACNT tracking, */
 452 #define FLG_OF_NOCOMREL 0x000800000000  /* -z nocombreloc set */
 453 #define FLG_OF_AUTOLCL  0x001000000000  /* automatically reduce unspecified */
 454                                         /*      global symbols to locals */
 455 #define FLG_OF_AUTOELM  0x002000000000  /* automatically eliminate */
 456                                         /*      unspecified global symbols */
 457 #define FLG_OF_REDLSYM  0x004000000000  /* reduce local symbols */
 458 #define FLG_OF_OS_ORDER 0x008000000000  /* output section ordering required */
 459 #define FLG_OF_OSABI    0x010000000000  /* tag object as ELFOSABI_SOLARIS */
 460 #define FLG_OF_ADJOSCNT 0x020000000000  /* adjust ofl_shdrcnt to accommodate */
 461                                         /*      discarded sections */
 462 #define FLG_OF_OTOSCAP  0x040000000000  /* convert object capabilities to */
 463                                         /*      symbol capabilities */
 464 #define FLG_OF_PTCAP    0x080000000000  /* PT_SUNWCAP required */
 465 #define FLG_OF_CAPSTRS  0x100000000000  /* capability strings are required */
 466 #define FLG_OF_EHFRAME  0x200000000000  /* output contains .eh_frame section */
 467 #define FLG_OF_FATWARN  0x400000000000  /* make warnings fatal */
 468 #define FLG_OF_ADEFLIB  0x800000000000  /* no libraries in default path */
 469 #define FLG_OF_MULINCL  0x1000000000000 /* allow multiple inclusions */
 470 
 471 /*
 472  * In the flags1 arena, establish any options that are applicable to archive
 473  * extraction first, and associate a mask.  These values are recorded with any
 474  * archive descriptor so that they may be reset should the archive require a
 475  * rescan to try and resolve undefined symbols.
 476  */
 477 #define FLG_OF1_ALLEXRT 0x0000000001    /* extract all members from an */
 478                                         /*      archive file */
 479 #define FLG_OF1_WEAKEXT 0x0000000002    /* allow archive extraction to */
 480                                         /*      resolve weak references */
 481 #define MSK_OF1_ARCHIVE 0x0000000003    /* archive flags mask */
 482 
 483 #define FLG_OF1_NOINTRP 0x0000000008    /* -z nointerp flag set */
 484 #define FLG_OF1_ZDIRECT 0x0000000010    /* -z direct flag set */
 485 #define FLG_OF1_NDIRECT 0x0000000020    /* no-direct bindings specified */
 486 #define FLG_OF1_DEFERRED 0x0000000040   /* deferred dependency recording */
 487 
 488 #define FLG_OF1_RELDYN  0x0000000100    /* process .dynamic in rel obj */
 489 #define FLG_OF1_NRLXREL 0x0000000200    /* -z norelaxreloc flag set */