Home | History | Annotate | Line # | Download | only in doc
      1  1.1  mrg This is gccgo.info, produced by makeinfo version 6.5 from gccgo.texi.
      2  1.1  mrg 
      3  1.1  mrg Copyright (C) 2010-2022 Free Software Foundation, Inc.
      4  1.1  mrg 
      5  1.1  mrg    Permission is granted to copy, distribute and/or modify this document
      6  1.1  mrg under the terms of the GNU Free Documentation License, Version 1.3 or
      7  1.1  mrg any later version published by the Free Software Foundation; with no
      8  1.1  mrg Invariant Sections, the Front-Cover Texts being (a) (see below), and
      9  1.1  mrg with the Back-Cover Texts being (b) (see below).  A copy of the license
     10  1.1  mrg is included in the section entitled "GNU Free Documentation License".
     11  1.1  mrg 
     12  1.1  mrg    (a) The FSF's Front-Cover Text is:
     13  1.1  mrg 
     14  1.1  mrg    A GNU Manual
     15  1.1  mrg 
     16  1.1  mrg    (b) The FSF's Back-Cover Text is:
     17  1.1  mrg 
     18  1.1  mrg    You have freedom to copy and modify this GNU Manual, like GNU
     19  1.1  mrg software.  Copies published by the Free Software Foundation raise funds
     20  1.1  mrg for GNU development.
     21  1.1  mrg INFO-DIR-SECTION Software development
     22  1.1  mrg START-INFO-DIR-ENTRY
     23  1.1  mrg * Gccgo: (gccgo).           A GCC-based compiler for the Go language
     24  1.1  mrg END-INFO-DIR-ENTRY
     25  1.1  mrg 
     26  1.1  mrg 
     27  1.1  mrg    Copyright (C) 2010-2022 Free Software Foundation, Inc.
     28  1.1  mrg 
     29  1.1  mrg    Permission is granted to copy, distribute and/or modify this document
     30  1.1  mrg under the terms of the GNU Free Documentation License, Version 1.3 or
     31  1.1  mrg any later version published by the Free Software Foundation; with no
     32  1.1  mrg Invariant Sections, the Front-Cover Texts being (a) (see below), and
     33  1.1  mrg with the Back-Cover Texts being (b) (see below).  A copy of the license
     34  1.1  mrg is included in the section entitled "GNU Free Documentation License".
     35  1.1  mrg 
     36  1.1  mrg    (a) The FSF's Front-Cover Text is:
     37  1.1  mrg 
     38  1.1  mrg    A GNU Manual
     39  1.1  mrg 
     40  1.1  mrg    (b) The FSF's Back-Cover Text is:
     41  1.1  mrg 
     42  1.1  mrg    You have freedom to copy and modify this GNU Manual, like GNU
     43  1.1  mrg software.  Copies published by the Free Software Foundation raise funds
     44  1.1  mrg for GNU development.
     45  1.1  mrg 
     46  1.1  mrg 
     47  1.1  mrg File: gccgo.info,  Node: Top,  Next: Copying,  Up: (dir)
     48  1.1  mrg 
     49  1.1  mrg Introduction
     50  1.1  mrg ************
     51  1.1  mrg 
     52  1.1  mrg This manual describes how to use 'gccgo', the GNU compiler for the Go
     53  1.1  mrg programming language.  This manual is specifically about 'gccgo'.  For
     54  1.1  mrg more information about the Go programming language in general, including
     55  1.1  mrg language specifications and standard package documentation, see
     56  1.1  mrg <https://golang.org/>.
     57  1.1  mrg 
     58  1.1  mrg * Menu:
     59  1.1  mrg 
     60  1.1  mrg * Copying::                     The GNU General Public License.
     61  1.1  mrg * GNU Free Documentation License::
     62  1.1  mrg                                 How you can share and copy this manual.
     63  1.1  mrg * Invoking gccgo::              How to run gccgo.
     64  1.1  mrg * Import and Export::           Importing and exporting package data.
     65  1.1  mrg * Compiler Directives::         Comments to control compilation.
     66  1.1  mrg * C Interoperability::          Calling C from Go and vice-versa.
     67  1.1  mrg * Index::                       Index.
     68  1.1  mrg 
     69  1.1  mrg 
     70  1.1  mrg File: gccgo.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Top,  Up: Top
     71  1.1  mrg 
     72  1.1  mrg GNU General Public License
     73  1.1  mrg **************************
     74  1.1  mrg 
     75  1.1  mrg                         Version 3, 29 June 2007
     76  1.1  mrg 
     77  1.1  mrg      Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
     78  1.1  mrg 
     79  1.1  mrg      Everyone is permitted to copy and distribute verbatim copies of this
     80  1.1  mrg      license document, but changing it is not allowed.
     81  1.1  mrg 
     82  1.1  mrg Preamble
     83  1.1  mrg ========
     84  1.1  mrg 
     85  1.1  mrg The GNU General Public License is a free, copyleft license for software
     86  1.1  mrg and other kinds of works.
     87  1.1  mrg 
     88  1.1  mrg    The licenses for most software and other practical works are designed
     89  1.1  mrg to take away your freedom to share and change the works.  By contrast,
     90  1.1  mrg the GNU General Public License is intended to guarantee your freedom to
     91  1.1  mrg share and change all versions of a program-to make sure it remains free
     92  1.1  mrg software for all its users.  We, the Free Software Foundation, use the
     93  1.1  mrg GNU General Public License for most of our software; it applies also to
     94  1.1  mrg any other work released this way by its authors.  You can apply it to
     95  1.1  mrg your programs, too.
     96  1.1  mrg 
     97  1.1  mrg    When we speak of free software, we are referring to freedom, not
     98  1.1  mrg price.  Our General Public Licenses are designed to make sure that you
     99  1.1  mrg have the freedom to distribute copies of free software (and charge for
    100  1.1  mrg them if you wish), that you receive source code or can get it if you
    101  1.1  mrg want it, that you can change the software or use pieces of it in new
    102  1.1  mrg free programs, and that you know you can do these things.
    103  1.1  mrg 
    104  1.1  mrg    To protect your rights, we need to prevent others from denying you
    105  1.1  mrg these rights or asking you to surrender the rights.  Therefore, you have
    106  1.1  mrg certain responsibilities if you distribute copies of the software, or if
    107  1.1  mrg you modify it: responsibilities to respect the freedom of others.
    108  1.1  mrg 
    109  1.1  mrg    For example, if you distribute copies of such a program, whether
    110  1.1  mrg gratis or for a fee, you must pass on to the recipients the same
    111  1.1  mrg freedoms that you received.  You must make sure that they, too, receive
    112  1.1  mrg or can get the source code.  And you must show them these terms so they
    113  1.1  mrg know their rights.
    114  1.1  mrg 
    115  1.1  mrg    Developers that use the GNU GPL protect your rights with two steps:
    116  1.1  mrg (1) assert copyright on the software, and (2) offer you this License
    117  1.1  mrg giving you legal permission to copy, distribute and/or modify it.
    118  1.1  mrg 
    119  1.1  mrg    For the developers' and authors' protection, the GPL clearly explains
    120  1.1  mrg that there is no warranty for this free software.  For both users' and
    121  1.1  mrg authors' sake, the GPL requires that modified versions be marked as
    122  1.1  mrg changed, so that their problems will not be attributed erroneously to
    123  1.1  mrg authors of previous versions.
    124  1.1  mrg 
    125  1.1  mrg    Some devices are designed to deny users access to install or run
    126  1.1  mrg modified versions of the software inside them, although the manufacturer
    127  1.1  mrg can do so.  This is fundamentally incompatible with the aim of
    128  1.1  mrg protecting users' freedom to change the software.  The systematic
    129  1.1  mrg pattern of such abuse occurs in the area of products for individuals to
    130  1.1  mrg use, which is precisely where it is most unacceptable.  Therefore, we
    131  1.1  mrg have designed this version of the GPL to prohibit the practice for those
    132  1.1  mrg products.  If such problems arise substantially in other domains, we
    133  1.1  mrg stand ready to extend this provision to those domains in future versions
    134  1.1  mrg of the GPL, as needed to protect the freedom of users.
    135  1.1  mrg 
    136  1.1  mrg    Finally, every program is threatened constantly by software patents.
    137  1.1  mrg States should not allow patents to restrict development and use of
    138  1.1  mrg software on general-purpose computers, but in those that do, we wish to
    139  1.1  mrg avoid the special danger that patents applied to a free program could
    140  1.1  mrg make it effectively proprietary.  To prevent this, the GPL assures that
    141  1.1  mrg patents cannot be used to render the program non-free.
    142  1.1  mrg 
    143  1.1  mrg    The precise terms and conditions for copying, distribution and
    144  1.1  mrg modification follow.
    145  1.1  mrg 
    146  1.1  mrg TERMS AND CONDITIONS
    147  1.1  mrg ====================
    148  1.1  mrg 
    149  1.1  mrg   0. Definitions.
    150  1.1  mrg 
    151  1.1  mrg      "This License" refers to version 3 of the GNU General Public
    152  1.1  mrg      License.
    153  1.1  mrg 
    154  1.1  mrg      "Copyright" also means copyright-like laws that apply to other
    155  1.1  mrg      kinds of works, such as semiconductor masks.
    156  1.1  mrg 
    157  1.1  mrg      "The Program" refers to any copyrightable work licensed under this
    158  1.1  mrg      License.  Each licensee is addressed as "you".  "Licensees" and
    159  1.1  mrg      "recipients" may be individuals or organizations.
    160  1.1  mrg 
    161  1.1  mrg      To "modify" a work means to copy from or adapt all or part of the
    162  1.1  mrg      work in a fashion requiring copyright permission, other than the
    163  1.1  mrg      making of an exact copy.  The resulting work is called a "modified
    164  1.1  mrg      version" of the earlier work or a work "based on" the earlier work.
    165  1.1  mrg 
    166  1.1  mrg      A "covered work" means either the unmodified Program or a work
    167  1.1  mrg      based on the Program.
    168  1.1  mrg 
    169  1.1  mrg      To "propagate" a work means to do anything with it that, without
    170  1.1  mrg      permission, would make you directly or secondarily liable for
    171  1.1  mrg      infringement under applicable copyright law, except executing it on
    172  1.1  mrg      a computer or modifying a private copy.  Propagation includes
    173  1.1  mrg      copying, distribution (with or without modification), making
    174  1.1  mrg      available to the public, and in some countries other activities as
    175  1.1  mrg      well.
    176  1.1  mrg 
    177  1.1  mrg      To "convey" a work means any kind of propagation that enables other
    178  1.1  mrg      parties to make or receive copies.  Mere interaction with a user
    179  1.1  mrg      through a computer network, with no transfer of a copy, is not
    180  1.1  mrg      conveying.
    181  1.1  mrg 
    182  1.1  mrg      An interactive user interface displays "Appropriate Legal Notices"
    183  1.1  mrg      to the extent that it includes a convenient and prominently visible
    184  1.1  mrg      feature that (1) displays an appropriate copyright notice, and (2)
    185  1.1  mrg      tells the user that there is no warranty for the work (except to
    186  1.1  mrg      the extent that warranties are provided), that licensees may convey
    187  1.1  mrg      the work under this License, and how to view a copy of this
    188  1.1  mrg      License.  If the interface presents a list of user commands or
    189  1.1  mrg      options, such as a menu, a prominent item in the list meets this
    190  1.1  mrg      criterion.
    191  1.1  mrg 
    192  1.1  mrg   1. Source Code.
    193  1.1  mrg 
    194  1.1  mrg      The "source code" for a work means the preferred form of the work
    195  1.1  mrg      for making modifications to it.  "Object code" means any non-source
    196  1.1  mrg      form of a work.
    197  1.1  mrg 
    198  1.1  mrg      A "Standard Interface" means an interface that either is an
    199  1.1  mrg      official standard defined by a recognized standards body, or, in
    200  1.1  mrg      the case of interfaces specified for a particular programming
    201  1.1  mrg      language, one that is widely used among developers working in that
    202  1.1  mrg      language.
    203  1.1  mrg 
    204  1.1  mrg      The "System Libraries" of an executable work include anything,
    205  1.1  mrg      other than the work as a whole, that (a) is included in the normal
    206  1.1  mrg      form of packaging a Major Component, but which is not part of that
    207  1.1  mrg      Major Component, and (b) serves only to enable use of the work with
    208  1.1  mrg      that Major Component, or to implement a Standard Interface for
    209  1.1  mrg      which an implementation is available to the public in source code
    210  1.1  mrg      form.  A "Major Component", in this context, means a major
    211  1.1  mrg      essential component (kernel, window system, and so on) of the
    212  1.1  mrg      specific operating system (if any) on which the executable work
    213  1.1  mrg      runs, or a compiler used to produce the work, or an object code
    214  1.1  mrg      interpreter used to run it.
    215  1.1  mrg 
    216  1.1  mrg      The "Corresponding Source" for a work in object code form means all
    217  1.1  mrg      the source code needed to generate, install, and (for an executable
    218  1.1  mrg      work) run the object code and to modify the work, including scripts
    219  1.1  mrg      to control those activities.  However, it does not include the
    220  1.1  mrg      work's System Libraries, or general-purpose tools or generally
    221  1.1  mrg      available free programs which are used unmodified in performing
    222  1.1  mrg      those activities but which are not part of the work.  For example,
    223  1.1  mrg      Corresponding Source includes interface definition files associated
    224  1.1  mrg      with source files for the work, and the source code for shared
    225  1.1  mrg      libraries and dynamically linked subprograms that the work is
    226  1.1  mrg      specifically designed to require, such as by intimate data
    227  1.1  mrg      communication or control flow between those subprograms and other
    228  1.1  mrg      parts of the work.
    229  1.1  mrg 
    230  1.1  mrg      The Corresponding Source need not include anything that users can
    231  1.1  mrg      regenerate automatically from other parts of the Corresponding
    232  1.1  mrg      Source.
    233  1.1  mrg 
    234  1.1  mrg      The Corresponding Source for a work in source code form is that
    235  1.1  mrg      same work.
    236  1.1  mrg 
    237  1.1  mrg   2. Basic Permissions.
    238  1.1  mrg 
    239  1.1  mrg      All rights granted under this License are granted for the term of
    240  1.1  mrg      copyright on the Program, and are irrevocable provided the stated
    241  1.1  mrg      conditions are met.  This License explicitly affirms your unlimited
    242  1.1  mrg      permission to run the unmodified Program.  The output from running
    243  1.1  mrg      a covered work is covered by this License only if the output, given
    244  1.1  mrg      its content, constitutes a covered work.  This License acknowledges
    245  1.1  mrg      your rights of fair use or other equivalent, as provided by
    246  1.1  mrg      copyright law.
    247  1.1  mrg 
    248  1.1  mrg      You may make, run and propagate covered works that you do not
    249  1.1  mrg      convey, without conditions so long as your license otherwise
    250  1.1  mrg      remains in force.  You may convey covered works to others for the
    251  1.1  mrg      sole purpose of having them make modifications exclusively for you,
    252  1.1  mrg      or provide you with facilities for running those works, provided
    253  1.1  mrg      that you comply with the terms of this License in conveying all
    254  1.1  mrg      material for which you do not control copyright.  Those thus making
    255  1.1  mrg      or running the covered works for you must do so exclusively on your
    256  1.1  mrg      behalf, under your direction and control, on terms that prohibit
    257  1.1  mrg      them from making any copies of your copyrighted material outside
    258  1.1  mrg      their relationship with you.
    259  1.1  mrg 
    260  1.1  mrg      Conveying under any other circumstances is permitted solely under
    261  1.1  mrg      the conditions stated below.  Sublicensing is not allowed; section
    262  1.1  mrg      10 makes it unnecessary.
    263  1.1  mrg 
    264  1.1  mrg   3. Protecting Users' Legal Rights From Anti-Circumvention Law.
    265  1.1  mrg 
    266  1.1  mrg      No covered work shall be deemed part of an effective technological
    267  1.1  mrg      measure under any applicable law fulfilling obligations under
    268  1.1  mrg      article 11 of the WIPO copyright treaty adopted on 20 December
    269  1.1  mrg      1996, or similar laws prohibiting or restricting circumvention of
    270  1.1  mrg      such measures.
    271  1.1  mrg 
    272  1.1  mrg      When you convey a covered work, you waive any legal power to forbid
    273  1.1  mrg      circumvention of technological measures to the extent such
    274  1.1  mrg      circumvention is effected by exercising rights under this License
    275  1.1  mrg      with respect to the covered work, and you disclaim any intention to
    276  1.1  mrg      limit operation or modification of the work as a means of
    277  1.1  mrg      enforcing, against the work's users, your or third parties' legal
    278  1.1  mrg      rights to forbid circumvention of technological measures.
    279  1.1  mrg 
    280  1.1  mrg   4. Conveying Verbatim Copies.
    281  1.1  mrg 
    282  1.1  mrg      You may convey verbatim copies of the Program's source code as you
    283  1.1  mrg      receive it, in any medium, provided that you conspicuously and
    284  1.1  mrg      appropriately publish on each copy an appropriate copyright notice;
    285  1.1  mrg      keep intact all notices stating that this License and any
    286  1.1  mrg      non-permissive terms added in accord with section 7 apply to the
    287  1.1  mrg      code; keep intact all notices of the absence of any warranty; and
    288  1.1  mrg      give all recipients a copy of this License along with the Program.
    289  1.1  mrg 
    290  1.1  mrg      You may charge any price or no price for each copy that you convey,
    291  1.1  mrg      and you may offer support or warranty protection for a fee.
    292  1.1  mrg 
    293  1.1  mrg   5. Conveying Modified Source Versions.
    294  1.1  mrg 
    295  1.1  mrg      You may convey a work based on the Program, or the modifications to
    296  1.1  mrg      produce it from the Program, in the form of source code under the
    297  1.1  mrg      terms of section 4, provided that you also meet all of these
    298  1.1  mrg      conditions:
    299  1.1  mrg 
    300  1.1  mrg        a. The work must carry prominent notices stating that you
    301  1.1  mrg           modified it, and giving a relevant date.
    302  1.1  mrg 
    303  1.1  mrg        b. The work must carry prominent notices stating that it is
    304  1.1  mrg           released under this License and any conditions added under
    305  1.1  mrg           section 7.  This requirement modifies the requirement in
    306  1.1  mrg           section 4 to "keep intact all notices".
    307  1.1  mrg 
    308  1.1  mrg        c. You must license the entire work, as a whole, under this
    309  1.1  mrg           License to anyone who comes into possession of a copy.  This
    310  1.1  mrg           License will therefore apply, along with any applicable
    311  1.1  mrg           section 7 additional terms, to the whole of the work, and all
    312  1.1  mrg           its parts, regardless of how they are packaged.  This License
    313  1.1  mrg           gives no permission to license the work in any other way, but
    314  1.1  mrg           it does not invalidate such permission if you have separately
    315  1.1  mrg           received it.
    316  1.1  mrg 
    317  1.1  mrg        d. If the work has interactive user interfaces, each must display
    318  1.1  mrg           Appropriate Legal Notices; however, if the Program has
    319  1.1  mrg           interactive interfaces that do not display Appropriate Legal
    320  1.1  mrg           Notices, your work need not make them do so.
    321  1.1  mrg 
    322  1.1  mrg      A compilation of a covered work with other separate and independent
    323  1.1  mrg      works, which are not by their nature extensions of the covered
    324  1.1  mrg      work, and which are not combined with it such as to form a larger
    325  1.1  mrg      program, in or on a volume of a storage or distribution medium, is
    326  1.1  mrg      called an "aggregate" if the compilation and its resulting
    327  1.1  mrg      copyright are not used to limit the access or legal rights of the
    328  1.1  mrg      compilation's users beyond what the individual works permit.
    329  1.1  mrg      Inclusion of a covered work in an aggregate does not cause this
    330  1.1  mrg      License to apply to the other parts of the aggregate.
    331  1.1  mrg 
    332  1.1  mrg   6. Conveying Non-Source Forms.
    333  1.1  mrg 
    334  1.1  mrg      You may convey a covered work in object code form under the terms
    335  1.1  mrg      of sections 4 and 5, provided that you also convey the
    336  1.1  mrg      machine-readable Corresponding Source under the terms of this
    337  1.1  mrg      License, in one of these ways:
    338  1.1  mrg 
    339  1.1  mrg        a. Convey the object code in, or embodied in, a physical product
    340  1.1  mrg           (including a physical distribution medium), accompanied by the
    341  1.1  mrg           Corresponding Source fixed on a durable physical medium
    342  1.1  mrg           customarily used for software interchange.
    343  1.1  mrg 
    344  1.1  mrg        b. Convey the object code in, or embodied in, a physical product
    345  1.1  mrg           (including a physical distribution medium), accompanied by a
    346  1.1  mrg           written offer, valid for at least three years and valid for as
    347  1.1  mrg           long as you offer spare parts or customer support for that
    348  1.1  mrg           product model, to give anyone who possesses the object code
    349  1.1  mrg           either (1) a copy of the Corresponding Source for all the
    350  1.1  mrg           software in the product that is covered by this License, on a
    351  1.1  mrg           durable physical medium customarily used for software
    352  1.1  mrg           interchange, for a price no more than your reasonable cost of
    353  1.1  mrg           physically performing this conveying of source, or (2) access
    354  1.1  mrg           to copy the Corresponding Source from a network server at no
    355  1.1  mrg           charge.
    356  1.1  mrg 
    357  1.1  mrg        c. Convey individual copies of the object code with a copy of the
    358  1.1  mrg           written offer to provide the Corresponding Source.  This
    359  1.1  mrg           alternative is allowed only occasionally and noncommercially,
    360  1.1  mrg           and only if you received the object code with such an offer,
    361  1.1  mrg           in accord with subsection 6b.
    362  1.1  mrg 
    363  1.1  mrg        d. Convey the object code by offering access from a designated
    364  1.1  mrg           place (gratis or for a charge), and offer equivalent access to
    365  1.1  mrg           the Corresponding Source in the same way through the same
    366  1.1  mrg           place at no further charge.  You need not require recipients
    367  1.1  mrg           to copy the Corresponding Source along with the object code.
    368  1.1  mrg           If the place to copy the object code is a network server, the
    369  1.1  mrg           Corresponding Source may be on a different server (operated by
    370  1.1  mrg           you or a third party) that supports equivalent copying
    371  1.1  mrg           facilities, provided you maintain clear directions next to the
    372  1.1  mrg           object code saying where to find the Corresponding Source.
    373  1.1  mrg           Regardless of what server hosts the Corresponding Source, you
    374  1.1  mrg           remain obligated to ensure that it is available for as long as
    375  1.1  mrg           needed to satisfy these requirements.
    376  1.1  mrg 
    377  1.1  mrg        e. Convey the object code using peer-to-peer transmission,
    378  1.1  mrg           provided you inform other peers where the object code and
    379  1.1  mrg           Corresponding Source of the work are being offered to the
    380  1.1  mrg           general public at no charge under subsection 6d.
    381  1.1  mrg 
    382  1.1  mrg      A separable portion of the object code, whose source code is
    383  1.1  mrg      excluded from the Corresponding Source as a System Library, need
    384  1.1  mrg      not be included in conveying the object code work.
    385  1.1  mrg 
    386  1.1  mrg      A "User Product" is either (1) a "consumer product", which means
    387  1.1  mrg      any tangible personal property which is normally used for personal,
    388  1.1  mrg      family, or household purposes, or (2) anything designed or sold for
    389  1.1  mrg      incorporation into a dwelling.  In determining whether a product is
    390  1.1  mrg      a consumer product, doubtful cases shall be resolved in favor of
    391  1.1  mrg      coverage.  For a particular product received by a particular user,
    392  1.1  mrg      "normally used" refers to a typical or common use of that class of
    393  1.1  mrg      product, regardless of the status of the particular user or of the
    394  1.1  mrg      way in which the particular user actually uses, or expects or is
    395  1.1  mrg      expected to use, the product.  A product is a consumer product
    396  1.1  mrg      regardless of whether the product has substantial commercial,
    397  1.1  mrg      industrial or non-consumer uses, unless such uses represent the
    398  1.1  mrg      only significant mode of use of the product.
    399  1.1  mrg 
    400  1.1  mrg      "Installation Information" for a User Product means any methods,
    401  1.1  mrg      procedures, authorization keys, or other information required to
    402  1.1  mrg      install and execute modified versions of a covered work in that
    403  1.1  mrg      User Product from a modified version of its Corresponding Source.
    404  1.1  mrg      The information must suffice to ensure that the continued
    405  1.1  mrg      functioning of the modified object code is in no case prevented or
    406  1.1  mrg      interfered with solely because modification has been made.
    407  1.1  mrg 
    408  1.1  mrg      If you convey an object code work under this section in, or with,
    409  1.1  mrg      or specifically for use in, a User Product, and the conveying
    410  1.1  mrg      occurs as part of a transaction in which the right of possession
    411  1.1  mrg      and use of the User Product is transferred to the recipient in
    412  1.1  mrg      perpetuity or for a fixed term (regardless of how the transaction
    413  1.1  mrg      is characterized), the Corresponding Source conveyed under this
    414  1.1  mrg      section must be accompanied by the Installation Information.  But
    415  1.1  mrg      this requirement does not apply if neither you nor any third party
    416  1.1  mrg      retains the ability to install modified object code on the User
    417  1.1  mrg      Product (for example, the work has been installed in ROM).
    418  1.1  mrg 
    419  1.1  mrg      The requirement to provide Installation Information does not
    420  1.1  mrg      include a requirement to continue to provide support service,
    421  1.1  mrg      warranty, or updates for a work that has been modified or installed
    422  1.1  mrg      by the recipient, or for the User Product in which it has been
    423  1.1  mrg      modified or installed.  Access to a network may be denied when the
    424  1.1  mrg      modification itself materially and adversely affects the operation
    425  1.1  mrg      of the network or violates the rules and protocols for
    426  1.1  mrg      communication across the network.
    427  1.1  mrg 
    428  1.1  mrg      Corresponding Source conveyed, and Installation Information
    429  1.1  mrg      provided, in accord with this section must be in a format that is
    430  1.1  mrg      publicly documented (and with an implementation available to the
    431  1.1  mrg      public in source code form), and must require no special password
    432  1.1  mrg      or key for unpacking, reading or copying.
    433  1.1  mrg 
    434  1.1  mrg   7. Additional Terms.
    435  1.1  mrg 
    436  1.1  mrg      "Additional permissions" are terms that supplement the terms of
    437  1.1  mrg      this License by making exceptions from one or more of its
    438  1.1  mrg      conditions.  Additional permissions that are applicable to the
    439  1.1  mrg      entire Program shall be treated as though they were included in
    440  1.1  mrg      this License, to the extent that they are valid under applicable
    441  1.1  mrg      law.  If additional permissions apply only to part of the Program,
    442  1.1  mrg      that part may be used separately under those permissions, but the
    443  1.1  mrg      entire Program remains governed by this License without regard to
    444  1.1  mrg      the additional permissions.
    445  1.1  mrg 
    446  1.1  mrg      When you convey a copy of a covered work, you may at your option
    447  1.1  mrg      remove any additional permissions from that copy, or from any part
    448  1.1  mrg      of it.  (Additional permissions may be written to require their own
    449  1.1  mrg      removal in certain cases when you modify the work.)  You may place
    450  1.1  mrg      additional permissions on material, added by you to a covered work,
    451  1.1  mrg      for which you have or can give appropriate copyright permission.
    452  1.1  mrg 
    453  1.1  mrg      Notwithstanding any other provision of this License, for material
    454  1.1  mrg      you add to a covered work, you may (if authorized by the copyright
    455  1.1  mrg      holders of that material) supplement the terms of this License with
    456  1.1  mrg      terms:
    457  1.1  mrg 
    458  1.1  mrg        a. Disclaiming warranty or limiting liability differently from
    459  1.1  mrg           the terms of sections 15 and 16 of this License; or
    460  1.1  mrg 
    461  1.1  mrg        b. Requiring preservation of specified reasonable legal notices
    462  1.1  mrg           or author attributions in that material or in the Appropriate
    463  1.1  mrg           Legal Notices displayed by works containing it; or
    464  1.1  mrg 
    465  1.1  mrg        c. Prohibiting misrepresentation of the origin of that material,
    466  1.1  mrg           or requiring that modified versions of such material be marked
    467  1.1  mrg           in reasonable ways as different from the original version; or
    468  1.1  mrg 
    469  1.1  mrg        d. Limiting the use for publicity purposes of names of licensors
    470  1.1  mrg           or authors of the material; or
    471  1.1  mrg 
    472  1.1  mrg        e. Declining to grant rights under trademark law for use of some
    473  1.1  mrg           trade names, trademarks, or service marks; or
    474  1.1  mrg 
    475  1.1  mrg        f. Requiring indemnification of licensors and authors of that
    476  1.1  mrg           material by anyone who conveys the material (or modified
    477  1.1  mrg           versions of it) with contractual assumptions of liability to
    478  1.1  mrg           the recipient, for any liability that these contractual
    479  1.1  mrg           assumptions directly impose on those licensors and authors.
    480  1.1  mrg 
    481  1.1  mrg      All other non-permissive additional terms are considered "further
    482  1.1  mrg      restrictions" within the meaning of section 10.  If the Program as
    483  1.1  mrg      you received it, or any part of it, contains a notice stating that
    484  1.1  mrg      it is governed by this License along with a term that is a further
    485  1.1  mrg      restriction, you may remove that term.  If a license document
    486  1.1  mrg      contains a further restriction but permits relicensing or conveying
    487  1.1  mrg      under this License, you may add to a covered work material governed
    488  1.1  mrg      by the terms of that license document, provided that the further
    489  1.1  mrg      restriction does not survive such relicensing or conveying.
    490  1.1  mrg 
    491  1.1  mrg      If you add terms to a covered work in accord with this section, you
    492  1.1  mrg      must place, in the relevant source files, a statement of the
    493  1.1  mrg      additional terms that apply to those files, or a notice indicating
    494  1.1  mrg      where to find the applicable terms.
    495  1.1  mrg 
    496  1.1  mrg      Additional terms, permissive or non-permissive, may be stated in
    497  1.1  mrg      the form of a separately written license, or stated as exceptions;
    498  1.1  mrg      the above requirements apply either way.
    499  1.1  mrg 
    500  1.1  mrg   8. Termination.
    501  1.1  mrg 
    502  1.1  mrg      You may not propagate or modify a covered work except as expressly
    503  1.1  mrg      provided under this License.  Any attempt otherwise to propagate or
    504  1.1  mrg      modify it is void, and will automatically terminate your rights
    505  1.1  mrg      under this License (including any patent licenses granted under the
    506  1.1  mrg      third paragraph of section 11).
    507  1.1  mrg 
    508  1.1  mrg      However, if you cease all violation of this License, then your
    509  1.1  mrg      license from a particular copyright holder is reinstated (a)
    510  1.1  mrg      provisionally, unless and until the copyright holder explicitly and
    511  1.1  mrg      finally terminates your license, and (b) permanently, if the
    512  1.1  mrg      copyright holder fails to notify you of the violation by some
    513  1.1  mrg      reasonable means prior to 60 days after the cessation.
    514  1.1  mrg 
    515  1.1  mrg      Moreover, your license from a particular copyright holder is
    516  1.1  mrg      reinstated permanently if the copyright holder notifies you of the
    517  1.1  mrg      violation by some reasonable means, this is the first time you have
    518  1.1  mrg      received notice of violation of this License (for any work) from
    519  1.1  mrg      that copyright holder, and you cure the violation prior to 30 days
    520  1.1  mrg      after your receipt of the notice.
    521  1.1  mrg 
    522  1.1  mrg      Termination of your rights under this section does not terminate
    523  1.1  mrg      the licenses of parties who have received copies or rights from you
    524  1.1  mrg      under this License.  If your rights have been terminated and not
    525  1.1  mrg      permanently reinstated, you do not qualify to receive new licenses
    526  1.1  mrg      for the same material under section 10.
    527  1.1  mrg 
    528  1.1  mrg   9. Acceptance Not Required for Having Copies.
    529  1.1  mrg 
    530  1.1  mrg      You are not required to accept this License in order to receive or
    531  1.1  mrg      run a copy of the Program.  Ancillary propagation of a covered work
    532  1.1  mrg      occurring solely as a consequence of using peer-to-peer
    533  1.1  mrg      transmission to receive a copy likewise does not require
    534  1.1  mrg      acceptance.  However, nothing other than this License grants you
    535  1.1  mrg      permission to propagate or modify any covered work.  These actions
    536  1.1  mrg      infringe copyright if you do not accept this License.  Therefore,
    537  1.1  mrg      by modifying or propagating a covered work, you indicate your
    538  1.1  mrg      acceptance of this License to do so.
    539  1.1  mrg 
    540  1.1  mrg   10. Automatic Licensing of Downstream Recipients.
    541  1.1  mrg 
    542  1.1  mrg      Each time you convey a covered work, the recipient automatically
    543  1.1  mrg      receives a license from the original licensors, to run, modify and
    544  1.1  mrg      propagate that work, subject to this License.  You are not
    545  1.1  mrg      responsible for enforcing compliance by third parties with this
    546  1.1  mrg      License.
    547  1.1  mrg 
    548  1.1  mrg      An "entity transaction" is a transaction transferring control of an
    549  1.1  mrg      organization, or substantially all assets of one, or subdividing an
    550  1.1  mrg      organization, or merging organizations.  If propagation of a
    551  1.1  mrg      covered work results from an entity transaction, each party to that
    552  1.1  mrg      transaction who receives a copy of the work also receives whatever
    553  1.1  mrg      licenses to the work the party's predecessor in interest had or
    554  1.1  mrg      could give under the previous paragraph, plus a right to possession
    555  1.1  mrg      of the Corresponding Source of the work from the predecessor in
    556  1.1  mrg      interest, if the predecessor has it or can get it with reasonable
    557  1.1  mrg      efforts.
    558  1.1  mrg 
    559  1.1  mrg      You may not impose any further restrictions on the exercise of the
    560  1.1  mrg      rights granted or affirmed under this License.  For example, you
    561  1.1  mrg      may not impose a license fee, royalty, or other charge for exercise
    562  1.1  mrg      of rights granted under this License, and you may not initiate
    563  1.1  mrg      litigation (including a cross-claim or counterclaim in a lawsuit)
    564  1.1  mrg      alleging that any patent claim is infringed by making, using,
    565  1.1  mrg      selling, offering for sale, or importing the Program or any portion
    566  1.1  mrg      of it.
    567  1.1  mrg 
    568  1.1  mrg   11. Patents.
    569  1.1  mrg 
    570  1.1  mrg      A "contributor" is a copyright holder who authorizes use under this
    571  1.1  mrg      License of the Program or a work on which the Program is based.
    572  1.1  mrg      The work thus licensed is called the contributor's "contributor
    573  1.1  mrg      version".
    574  1.1  mrg 
    575  1.1  mrg      A contributor's "essential patent claims" are all patent claims
    576  1.1  mrg      owned or controlled by the contributor, whether already acquired or
    577  1.1  mrg      hereafter acquired, that would be infringed by some manner,
    578  1.1  mrg      permitted by this License, of making, using, or selling its
    579  1.1  mrg      contributor version, but do not include claims that would be
    580  1.1  mrg      infringed only as a consequence of further modification of the
    581  1.1  mrg      contributor version.  For purposes of this definition, "control"
    582  1.1  mrg      includes the right to grant patent sublicenses in a manner
    583  1.1  mrg      consistent with the requirements of this License.
    584  1.1  mrg 
    585  1.1  mrg      Each contributor grants you a non-exclusive, worldwide,
    586  1.1  mrg      royalty-free patent license under the contributor's essential
    587  1.1  mrg      patent claims, to make, use, sell, offer for sale, import and
    588  1.1  mrg      otherwise run, modify and propagate the contents of its contributor
    589  1.1  mrg      version.
    590  1.1  mrg 
    591  1.1  mrg      In the following three paragraphs, a "patent license" is any
    592  1.1  mrg      express agreement or commitment, however denominated, not to
    593  1.1  mrg      enforce a patent (such as an express permission to practice a
    594  1.1  mrg      patent or covenant not to sue for patent infringement).  To "grant"
    595  1.1  mrg      such a patent license to a party means to make such an agreement or
    596  1.1  mrg      commitment not to enforce a patent against the party.
    597  1.1  mrg 
    598  1.1  mrg      If you convey a covered work, knowingly relying on a patent
    599  1.1  mrg      license, and the Corresponding Source of the work is not available
    600  1.1  mrg      for anyone to copy, free of charge and under the terms of this
    601  1.1  mrg      License, through a publicly available network server or other
    602  1.1  mrg      readily accessible means, then you must either (1) cause the
    603  1.1  mrg      Corresponding Source to be so available, or (2) arrange to deprive
    604  1.1  mrg      yourself of the benefit of the patent license for this particular
    605  1.1  mrg      work, or (3) arrange, in a manner consistent with the requirements
    606  1.1  mrg      of this License, to extend the patent license to downstream
    607  1.1  mrg      recipients.  "Knowingly relying" means you have actual knowledge
    608  1.1  mrg      that, but for the patent license, your conveying the covered work
    609  1.1  mrg      in a country, or your recipient's use of the covered work in a
    610  1.1  mrg      country, would infringe one or more identifiable patents in that
    611  1.1  mrg      country that you have reason to believe are valid.
    612  1.1  mrg 
    613  1.1  mrg      If, pursuant to or in connection with a single transaction or
    614  1.1  mrg      arrangement, you convey, or propagate by procuring conveyance of, a
    615  1.1  mrg      covered work, and grant a patent license to some of the parties
    616  1.1  mrg      receiving the covered work authorizing them to use, propagate,
    617  1.1  mrg      modify or convey a specific copy of the covered work, then the
    618  1.1  mrg      patent license you grant is automatically extended to all
    619  1.1  mrg      recipients of the covered work and works based on it.
    620  1.1  mrg 
    621  1.1  mrg      A patent license is "discriminatory" if it does not include within
    622  1.1  mrg      the scope of its coverage, prohibits the exercise of, or is
    623  1.1  mrg      conditioned on the non-exercise of one or more of the rights that
    624  1.1  mrg      are specifically granted under this License.  You may not convey a
    625  1.1  mrg      covered work if you are a party to an arrangement with a third
    626  1.1  mrg      party that is in the business of distributing software, under which
    627  1.1  mrg      you make payment to the third party based on the extent of your
    628  1.1  mrg      activity of conveying the work, and under which the third party
    629  1.1  mrg      grants, to any of the parties who would receive the covered work
    630  1.1  mrg      from you, a discriminatory patent license (a) in connection with
    631  1.1  mrg      copies of the covered work conveyed by you (or copies made from
    632  1.1  mrg      those copies), or (b) primarily for and in connection with specific
    633  1.1  mrg      products or compilations that contain the covered work, unless you
    634  1.1  mrg      entered into that arrangement, or that patent license was granted,
    635  1.1  mrg      prior to 28 March 2007.
    636  1.1  mrg 
    637  1.1  mrg      Nothing in this License shall be construed as excluding or limiting
    638  1.1  mrg      any implied license or other defenses to infringement that may
    639  1.1  mrg      otherwise be available to you under applicable patent law.
    640  1.1  mrg 
    641  1.1  mrg   12. No Surrender of Others' Freedom.
    642  1.1  mrg 
    643  1.1  mrg      If conditions are imposed on you (whether by court order, agreement
    644  1.1  mrg      or otherwise) that contradict the conditions of this License, they
    645  1.1  mrg      do not excuse you from the conditions of this License.  If you
    646  1.1  mrg      cannot convey a covered work so as to satisfy simultaneously your
    647  1.1  mrg      obligations under this License and any other pertinent obligations,
    648  1.1  mrg      then as a consequence you may not convey it at all.  For example,
    649  1.1  mrg      if you agree to terms that obligate you to collect a royalty for
    650  1.1  mrg      further conveying from those to whom you convey the Program, the
    651  1.1  mrg      only way you could satisfy both those terms and this License would
    652  1.1  mrg      be to refrain entirely from conveying the Program.
    653  1.1  mrg 
    654  1.1  mrg   13. Use with the GNU Affero General Public License.
    655  1.1  mrg 
    656  1.1  mrg      Notwithstanding any other provision of this License, you have
    657  1.1  mrg      permission to link or combine any covered work with a work licensed
    658  1.1  mrg      under version 3 of the GNU Affero General Public License into a
    659  1.1  mrg      single combined work, and to convey the resulting work.  The terms
    660  1.1  mrg      of this License will continue to apply to the part which is the
    661  1.1  mrg      covered work, but the special requirements of the GNU Affero
    662  1.1  mrg      General Public License, section 13, concerning interaction through
    663  1.1  mrg      a network will apply to the combination as such.
    664  1.1  mrg 
    665  1.1  mrg   14. Revised Versions of this License.
    666  1.1  mrg 
    667  1.1  mrg      The Free Software Foundation may publish revised and/or new
    668  1.1  mrg      versions of the GNU General Public License from time to time.  Such
    669  1.1  mrg      new versions will be similar in spirit to the present version, but
    670  1.1  mrg      may differ in detail to address new problems or concerns.
    671  1.1  mrg 
    672  1.1  mrg      Each version is given a distinguishing version number.  If the
    673  1.1  mrg      Program specifies that a certain numbered version of the GNU
    674  1.1  mrg      General Public License "or any later version" applies to it, you
    675  1.1  mrg      have the option of following the terms and conditions either of
    676  1.1  mrg      that numbered version or of any later version published by the Free
    677  1.1  mrg      Software Foundation.  If the Program does not specify a version
    678  1.1  mrg      number of the GNU General Public License, you may choose any
    679  1.1  mrg      version ever published by the Free Software Foundation.
    680  1.1  mrg 
    681  1.1  mrg      If the Program specifies that a proxy can decide which future
    682  1.1  mrg      versions of the GNU General Public License can be used, that
    683  1.1  mrg      proxy's public statement of acceptance of a version permanently
    684  1.1  mrg      authorizes you to choose that version for the Program.
    685  1.1  mrg 
    686  1.1  mrg      Later license versions may give you additional or different
    687  1.1  mrg      permissions.  However, no additional obligations are imposed on any
    688  1.1  mrg      author or copyright holder as a result of your choosing to follow a
    689  1.1  mrg      later version.
    690  1.1  mrg 
    691  1.1  mrg   15. Disclaimer of Warranty.
    692  1.1  mrg 
    693  1.1  mrg      THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
    694  1.1  mrg      APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
    695  1.1  mrg      COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
    696  1.1  mrg      WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
    697  1.1  mrg      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    698  1.1  mrg      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
    699  1.1  mrg      RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
    700  1.1  mrg      SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
    701  1.1  mrg      NECESSARY SERVICING, REPAIR OR CORRECTION.
    702  1.1  mrg 
    703  1.1  mrg   16. Limitation of Liability.
    704  1.1  mrg 
    705  1.1  mrg      IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
    706  1.1  mrg      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
    707  1.1  mrg      AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
    708  1.1  mrg      DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
    709  1.1  mrg      CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
    710  1.1  mrg      THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
    711  1.1  mrg      BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
    712  1.1  mrg      PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
    713  1.1  mrg      PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
    714  1.1  mrg      THE POSSIBILITY OF SUCH DAMAGES.
    715  1.1  mrg 
    716  1.1  mrg   17. Interpretation of Sections 15 and 16.
    717  1.1  mrg 
    718  1.1  mrg      If the disclaimer of warranty and limitation of liability provided
    719  1.1  mrg      above cannot be given local legal effect according to their terms,
    720  1.1  mrg      reviewing courts shall apply local law that most closely
    721  1.1  mrg      approximates an absolute waiver of all civil liability in
    722  1.1  mrg      connection with the Program, unless a warranty or assumption of
    723  1.1  mrg      liability accompanies a copy of the Program in return for a fee.
    724  1.1  mrg 
    725  1.1  mrg END OF TERMS AND CONDITIONS
    726  1.1  mrg ===========================
    727  1.1  mrg 
    728  1.1  mrg How to Apply These Terms to Your New Programs
    729  1.1  mrg =============================================
    730  1.1  mrg 
    731  1.1  mrg If you develop a new program, and you want it to be of the greatest
    732  1.1  mrg possible use to the public, the best way to achieve this is to make it
    733  1.1  mrg free software which everyone can redistribute and change under these
    734  1.1  mrg terms.
    735  1.1  mrg 
    736  1.1  mrg    To do so, attach the following notices to the program.  It is safest
    737  1.1  mrg to attach them to the start of each source file to most effectively
    738  1.1  mrg state the exclusion of warranty; and each file should have at least the
    739  1.1  mrg "copyright" line and a pointer to where the full notice is found.
    740  1.1  mrg 
    741  1.1  mrg      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
    742  1.1  mrg      Copyright (C) YEAR NAME OF AUTHOR
    743  1.1  mrg 
    744  1.1  mrg      This program is free software: you can redistribute it and/or modify
    745  1.1  mrg      it under the terms of the GNU General Public License as published by
    746  1.1  mrg      the Free Software Foundation, either version 3 of the License, or (at
    747  1.1  mrg      your option) any later version.
    748  1.1  mrg 
    749  1.1  mrg      This program is distributed in the hope that it will be useful, but
    750  1.1  mrg      WITHOUT ANY WARRANTY; without even the implied warranty of
    751  1.1  mrg      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    752  1.1  mrg      General Public License for more details.
    753  1.1  mrg 
    754  1.1  mrg      You should have received a copy of the GNU General Public License
    755  1.1  mrg      along with this program.  If not, see <https://www.gnu.org/licenses/>.
    756  1.1  mrg 
    757  1.1  mrg    Also add information on how to contact you by electronic and paper
    758  1.1  mrg mail.
    759  1.1  mrg 
    760  1.1  mrg    If the program does terminal interaction, make it output a short
    761  1.1  mrg notice like this when it starts in an interactive mode:
    762  1.1  mrg 
    763  1.1  mrg      PROGRAM Copyright (C) YEAR NAME OF AUTHOR
    764  1.1  mrg      This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
    765  1.1  mrg      This is free software, and you are welcome to redistribute it
    766  1.1  mrg      under certain conditions; type 'show c' for details.
    767  1.1  mrg 
    768  1.1  mrg    The hypothetical commands 'show w' and 'show c' should show the
    769  1.1  mrg appropriate parts of the General Public License.  Of course, your
    770  1.1  mrg program's commands might be different; for a GUI interface, you would
    771  1.1  mrg use an "about box".
    772  1.1  mrg 
    773  1.1  mrg    You should also get your employer (if you work as a programmer) or
    774  1.1  mrg school, if any, to sign a "copyright disclaimer" for the program, if
    775  1.1  mrg necessary.  For more information on this, and how to apply and follow
    776  1.1  mrg the GNU GPL, see <https://www.gnu.org/licenses/>.
    777  1.1  mrg 
    778  1.1  mrg    The GNU General Public License does not permit incorporating your
    779  1.1  mrg program into proprietary programs.  If your program is a subroutine
    780  1.1  mrg library, you may consider it more useful to permit linking proprietary
    781  1.1  mrg applications with the library.  If this is what you want to do, use the
    782  1.1  mrg GNU Lesser General Public License instead of this License.  But first,
    783  1.1  mrg please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
    784  1.1  mrg 
    785  1.1  mrg 
    786  1.1  mrg File: gccgo.info,  Node: GNU Free Documentation License,  Next: Invoking gccgo,  Prev: Copying,  Up: Top
    787  1.1  mrg 
    788  1.1  mrg GNU Free Documentation License
    789  1.1  mrg ******************************
    790  1.1  mrg 
    791  1.1  mrg                      Version 1.3, 3 November 2008
    792  1.1  mrg 
    793  1.1  mrg      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
    794  1.1  mrg      <https://fsf.org/>
    795  1.1  mrg 
    796  1.1  mrg      Everyone is permitted to copy and distribute verbatim copies
    797  1.1  mrg      of this license document, but changing it is not allowed.
    798  1.1  mrg 
    799  1.1  mrg   0. PREAMBLE
    800  1.1  mrg 
    801  1.1  mrg      The purpose of this License is to make a manual, textbook, or other
    802  1.1  mrg      functional and useful document "free" in the sense of freedom: to
    803  1.1  mrg      assure everyone the effective freedom to copy and redistribute it,
    804  1.1  mrg      with or without modifying it, either commercially or
    805  1.1  mrg      noncommercially.  Secondarily, this License preserves for the
    806  1.1  mrg      author and publisher a way to get credit for their work, while not
    807  1.1  mrg      being considered responsible for modifications made by others.
    808  1.1  mrg 
    809  1.1  mrg      This License is a kind of "copyleft", which means that derivative
    810  1.1  mrg      works of the document must themselves be free in the same sense.
    811  1.1  mrg      It complements the GNU General Public License, which is a copyleft
    812  1.1  mrg      license designed for free software.
    813  1.1  mrg 
    814  1.1  mrg      We have designed this License in order to use it for manuals for
    815  1.1  mrg      free software, because free software needs free documentation: a
    816  1.1  mrg      free program should come with manuals providing the same freedoms
    817  1.1  mrg      that the software does.  But this License is not limited to
    818  1.1  mrg      software manuals; it can be used for any textual work, regardless
    819  1.1  mrg      of subject matter or whether it is published as a printed book.  We
    820  1.1  mrg      recommend this License principally for works whose purpose is
    821  1.1  mrg      instruction or reference.
    822  1.1  mrg 
    823  1.1  mrg   1. APPLICABILITY AND DEFINITIONS
    824  1.1  mrg 
    825  1.1  mrg      This License applies to any manual or other work, in any medium,
    826  1.1  mrg      that contains a notice placed by the copyright holder saying it can
    827  1.1  mrg      be distributed under the terms of this License.  Such a notice
    828  1.1  mrg      grants a world-wide, royalty-free license, unlimited in duration,
    829  1.1  mrg      to use that work under the conditions stated herein.  The
    830  1.1  mrg      "Document", below, refers to any such manual or work.  Any member
    831  1.1  mrg      of the public is a licensee, and is addressed as "you".  You accept
    832  1.1  mrg      the license if you copy, modify or distribute the work in a way
    833  1.1  mrg      requiring permission under copyright law.
    834  1.1  mrg 
    835  1.1  mrg      A "Modified Version" of the Document means any work containing the
    836  1.1  mrg      Document or a portion of it, either copied verbatim, or with
    837  1.1  mrg      modifications and/or translated into another language.
    838  1.1  mrg 
    839  1.1  mrg      A "Secondary Section" is a named appendix or a front-matter section
    840  1.1  mrg      of the Document that deals exclusively with the relationship of the
    841  1.1  mrg      publishers or authors of the Document to the Document's overall
    842  1.1  mrg      subject (or to related matters) and contains nothing that could
    843  1.1  mrg      fall directly within that overall subject.  (Thus, if the Document
    844  1.1  mrg      is in part a textbook of mathematics, a Secondary Section may not
    845  1.1  mrg      explain any mathematics.)  The relationship could be a matter of
    846  1.1  mrg      historical connection with the subject or with related matters, or
    847  1.1  mrg      of legal, commercial, philosophical, ethical or political position
    848  1.1  mrg      regarding them.
    849  1.1  mrg 
    850  1.1  mrg      The "Invariant Sections" are certain Secondary Sections whose
    851  1.1  mrg      titles are designated, as being those of Invariant Sections, in the
    852  1.1  mrg      notice that says that the Document is released under this License.
    853  1.1  mrg      If a section does not fit the above definition of Secondary then it
    854  1.1  mrg      is not allowed to be designated as Invariant.  The Document may
    855  1.1  mrg      contain zero Invariant Sections.  If the Document does not identify
    856  1.1  mrg      any Invariant Sections then there are none.
    857  1.1  mrg 
    858  1.1  mrg      The "Cover Texts" are certain short passages of text that are
    859  1.1  mrg      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
    860  1.1  mrg      that says that the Document is released under this License.  A
    861  1.1  mrg      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
    862  1.1  mrg      be at most 25 words.
    863  1.1  mrg 
    864  1.1  mrg      A "Transparent" copy of the Document means a machine-readable copy,
    865  1.1  mrg      represented in a format whose specification is available to the
    866  1.1  mrg      general public, that is suitable for revising the document
    867  1.1  mrg      straightforwardly with generic text editors or (for images composed
    868  1.1  mrg      of pixels) generic paint programs or (for drawings) some widely
    869  1.1  mrg      available drawing editor, and that is suitable for input to text
    870  1.1  mrg      formatters or for automatic translation to a variety of formats
    871  1.1  mrg      suitable for input to text formatters.  A copy made in an otherwise
    872  1.1  mrg      Transparent file format whose markup, or absence of markup, has
    873  1.1  mrg      been arranged to thwart or discourage subsequent modification by
    874  1.1  mrg      readers is not Transparent.  An image format is not Transparent if
    875  1.1  mrg      used for any substantial amount of text.  A copy that is not
    876  1.1  mrg      "Transparent" is called "Opaque".
    877  1.1  mrg 
    878  1.1  mrg      Examples of suitable formats for Transparent copies include plain
    879  1.1  mrg      ASCII without markup, Texinfo input format, LaTeX input format,
    880  1.1  mrg      SGML or XML using a publicly available DTD, and standard-conforming
    881  1.1  mrg      simple HTML, PostScript or PDF designed for human modification.
    882  1.1  mrg      Examples of transparent image formats include PNG, XCF and JPG.
    883  1.1  mrg      Opaque formats include proprietary formats that can be read and
    884  1.1  mrg      edited only by proprietary word processors, SGML or XML for which
    885  1.1  mrg      the DTD and/or processing tools are not generally available, and
    886  1.1  mrg      the machine-generated HTML, PostScript or PDF produced by some word
    887  1.1  mrg      processors for output purposes only.
    888  1.1  mrg 
    889  1.1  mrg      The "Title Page" means, for a printed book, the title page itself,
    890  1.1  mrg      plus such following pages as are needed to hold, legibly, the
    891  1.1  mrg      material this License requires to appear in the title page.  For
    892  1.1  mrg      works in formats which do not have any title page as such, "Title
    893  1.1  mrg      Page" means the text near the most prominent appearance of the
    894  1.1  mrg      work's title, preceding the beginning of the body of the text.
    895  1.1  mrg 
    896  1.1  mrg      The "publisher" means any person or entity that distributes copies
    897  1.1  mrg      of the Document to the public.
    898  1.1  mrg 
    899  1.1  mrg      A section "Entitled XYZ" means a named subunit of the Document
    900  1.1  mrg      whose title either is precisely XYZ or contains XYZ in parentheses
    901  1.1  mrg      following text that translates XYZ in another language.  (Here XYZ
    902  1.1  mrg      stands for a specific section name mentioned below, such as
    903  1.1  mrg      "Acknowledgements", "Dedications", "Endorsements", or "History".)
    904  1.1  mrg      To "Preserve the Title" of such a section when you modify the
    905  1.1  mrg      Document means that it remains a section "Entitled XYZ" according
    906  1.1  mrg      to this definition.
    907  1.1  mrg 
    908  1.1  mrg      The Document may include Warranty Disclaimers next to the notice
    909  1.1  mrg      which states that this License applies to the Document.  These
    910  1.1  mrg      Warranty Disclaimers are considered to be included by reference in
    911  1.1  mrg      this License, but only as regards disclaiming warranties: any other
    912  1.1  mrg      implication that these Warranty Disclaimers may have is void and
    913  1.1  mrg      has no effect on the meaning of this License.
    914  1.1  mrg 
    915  1.1  mrg   2. VERBATIM COPYING
    916  1.1  mrg 
    917  1.1  mrg      You may copy and distribute the Document in any medium, either
    918  1.1  mrg      commercially or noncommercially, provided that this License, the
    919  1.1  mrg      copyright notices, and the license notice saying this License
    920  1.1  mrg      applies to the Document are reproduced in all copies, and that you
    921  1.1  mrg      add no other conditions whatsoever to those of this License.  You
    922  1.1  mrg      may not use technical measures to obstruct or control the reading
    923  1.1  mrg      or further copying of the copies you make or distribute.  However,
    924  1.1  mrg      you may accept compensation in exchange for copies.  If you
    925  1.1  mrg      distribute a large enough number of copies you must also follow the
    926  1.1  mrg      conditions in section 3.
    927  1.1  mrg 
    928  1.1  mrg      You may also lend copies, under the same conditions stated above,
    929  1.1  mrg      and you may publicly display copies.
    930  1.1  mrg 
    931  1.1  mrg   3. COPYING IN QUANTITY
    932  1.1  mrg 
    933  1.1  mrg      If you publish printed copies (or copies in media that commonly
    934  1.1  mrg      have printed covers) of the Document, numbering more than 100, and
    935  1.1  mrg      the Document's license notice requires Cover Texts, you must
    936  1.1  mrg      enclose the copies in covers that carry, clearly and legibly, all
    937  1.1  mrg      these Cover Texts: Front-Cover Texts on the front cover, and
    938  1.1  mrg      Back-Cover Texts on the back cover.  Both covers must also clearly
    939  1.1  mrg      and legibly identify you as the publisher of these copies.  The
    940  1.1  mrg      front cover must present the full title with all words of the title
    941  1.1  mrg      equally prominent and visible.  You may add other material on the
    942  1.1  mrg      covers in addition.  Copying with changes limited to the covers, as
    943  1.1  mrg      long as they preserve the title of the Document and satisfy these
    944  1.1  mrg      conditions, can be treated as verbatim copying in other respects.
    945  1.1  mrg 
    946  1.1  mrg      If the required texts for either cover are too voluminous to fit
    947  1.1  mrg      legibly, you should put the first ones listed (as many as fit
    948  1.1  mrg      reasonably) on the actual cover, and continue the rest onto
    949  1.1  mrg      adjacent pages.
    950  1.1  mrg 
    951  1.1  mrg      If you publish or distribute Opaque copies of the Document
    952  1.1  mrg      numbering more than 100, you must either include a machine-readable
    953  1.1  mrg      Transparent copy along with each Opaque copy, or state in or with
    954  1.1  mrg      each Opaque copy a computer-network location from which the general
    955  1.1  mrg      network-using public has access to download using public-standard
    956  1.1  mrg      network protocols a complete Transparent copy of the Document, free
    957  1.1  mrg      of added material.  If you use the latter option, you must take
    958  1.1  mrg      reasonably prudent steps, when you begin distribution of Opaque
    959  1.1  mrg      copies in quantity, to ensure that this Transparent copy will
    960  1.1  mrg      remain thus accessible at the stated location until at least one
    961  1.1  mrg      year after the last time you distribute an Opaque copy (directly or
    962  1.1  mrg      through your agents or retailers) of that edition to the public.
    963  1.1  mrg 
    964  1.1  mrg      It is requested, but not required, that you contact the authors of
    965  1.1  mrg      the Document well before redistributing any large number of copies,
    966  1.1  mrg      to give them a chance to provide you with an updated version of the
    967  1.1  mrg      Document.
    968  1.1  mrg 
    969  1.1  mrg   4. MODIFICATIONS
    970  1.1  mrg 
    971  1.1  mrg      You may copy and distribute a Modified Version of the Document
    972  1.1  mrg      under the conditions of sections 2 and 3 above, provided that you
    973  1.1  mrg      release the Modified Version under precisely this License, with the
    974  1.1  mrg      Modified Version filling the role of the Document, thus licensing
    975  1.1  mrg      distribution and modification of the Modified Version to whoever
    976  1.1  mrg      possesses a copy of it.  In addition, you must do these things in
    977  1.1  mrg      the Modified Version:
    978  1.1  mrg 
    979  1.1  mrg        A. Use in the Title Page (and on the covers, if any) a title
    980  1.1  mrg           distinct from that of the Document, and from those of previous
    981  1.1  mrg           versions (which should, if there were any, be listed in the
    982  1.1  mrg           History section of the Document).  You may use the same title
    983  1.1  mrg           as a previous version if the original publisher of that
    984  1.1  mrg           version gives permission.
    985  1.1  mrg 
    986  1.1  mrg        B. List on the Title Page, as authors, one or more persons or
    987  1.1  mrg           entities responsible for authorship of the modifications in
    988  1.1  mrg           the Modified Version, together with at least five of the
    989  1.1  mrg           principal authors of the Document (all of its principal
    990  1.1  mrg           authors, if it has fewer than five), unless they release you
    991  1.1  mrg           from this requirement.
    992  1.1  mrg 
    993  1.1  mrg        C. State on the Title page the name of the publisher of the
    994  1.1  mrg           Modified Version, as the publisher.
    995  1.1  mrg 
    996  1.1  mrg        D. Preserve all the copyright notices of the Document.
    997  1.1  mrg 
    998  1.1  mrg        E. Add an appropriate copyright notice for your modifications
    999  1.1  mrg           adjacent to the other copyright notices.
   1000  1.1  mrg 
   1001  1.1  mrg        F. Include, immediately after the copyright notices, a license
   1002  1.1  mrg           notice giving the public permission to use the Modified
   1003  1.1  mrg           Version under the terms of this License, in the form shown in
   1004  1.1  mrg           the Addendum below.
   1005  1.1  mrg 
   1006  1.1  mrg        G. Preserve in that license notice the full lists of Invariant
   1007  1.1  mrg           Sections and required Cover Texts given in the Document's
   1008  1.1  mrg           license notice.
   1009  1.1  mrg 
   1010  1.1  mrg        H. Include an unaltered copy of this License.
   1011  1.1  mrg 
   1012  1.1  mrg        I. Preserve the section Entitled "History", Preserve its Title,
   1013  1.1  mrg           and add to it an item stating at least the title, year, new
   1014  1.1  mrg           authors, and publisher of the Modified Version as given on the
   1015  1.1  mrg           Title Page.  If there is no section Entitled "History" in the
   1016  1.1  mrg           Document, create one stating the title, year, authors, and
   1017  1.1  mrg           publisher of the Document as given on its Title Page, then add
   1018  1.1  mrg           an item describing the Modified Version as stated in the
   1019  1.1  mrg           previous sentence.
   1020  1.1  mrg 
   1021  1.1  mrg        J. Preserve the network location, if any, given in the Document
   1022  1.1  mrg           for public access to a Transparent copy of the Document, and
   1023  1.1  mrg           likewise the network locations given in the Document for
   1024  1.1  mrg           previous versions it was based on.  These may be placed in the
   1025  1.1  mrg           "History" section.  You may omit a network location for a work
   1026  1.1  mrg           that was published at least four years before the Document
   1027  1.1  mrg           itself, or if the original publisher of the version it refers
   1028  1.1  mrg           to gives permission.
   1029  1.1  mrg 
   1030  1.1  mrg        K. For any section Entitled "Acknowledgements" or "Dedications",
   1031  1.1  mrg           Preserve the Title of the section, and preserve in the section
   1032  1.1  mrg           all the substance and tone of each of the contributor
   1033  1.1  mrg           acknowledgements and/or dedications given therein.
   1034  1.1  mrg 
   1035  1.1  mrg        L. Preserve all the Invariant Sections of the Document, unaltered
   1036  1.1  mrg           in their text and in their titles.  Section numbers or the
   1037  1.1  mrg           equivalent are not considered part of the section titles.
   1038  1.1  mrg 
   1039  1.1  mrg        M. Delete any section Entitled "Endorsements".  Such a section
   1040  1.1  mrg           may not be included in the Modified Version.
   1041  1.1  mrg 
   1042  1.1  mrg        N. Do not retitle any existing section to be Entitled
   1043  1.1  mrg           "Endorsements" or to conflict in title with any Invariant
   1044  1.1  mrg           Section.
   1045  1.1  mrg 
   1046  1.1  mrg        O. Preserve any Warranty Disclaimers.
   1047  1.1  mrg 
   1048  1.1  mrg      If the Modified Version includes new front-matter sections or
   1049  1.1  mrg      appendices that qualify as Secondary Sections and contain no
   1050  1.1  mrg      material copied from the Document, you may at your option designate
   1051  1.1  mrg      some or all of these sections as invariant.  To do this, add their
   1052  1.1  mrg      titles to the list of Invariant Sections in the Modified Version's
   1053  1.1  mrg      license notice.  These titles must be distinct from any other
   1054  1.1  mrg      section titles.
   1055  1.1  mrg 
   1056  1.1  mrg      You may add a section Entitled "Endorsements", provided it contains
   1057  1.1  mrg      nothing but endorsements of your Modified Version by various
   1058  1.1  mrg      parties--for example, statements of peer review or that the text
   1059  1.1  mrg      has been approved by an organization as the authoritative
   1060  1.1  mrg      definition of a standard.
   1061  1.1  mrg 
   1062  1.1  mrg      You may add a passage of up to five words as a Front-Cover Text,
   1063  1.1  mrg      and a passage of up to 25 words as a Back-Cover Text, to the end of
   1064  1.1  mrg      the list of Cover Texts in the Modified Version.  Only one passage
   1065  1.1  mrg      of Front-Cover Text and one of Back-Cover Text may be added by (or
   1066  1.1  mrg      through arrangements made by) any one entity.  If the Document
   1067  1.1  mrg      already includes a cover text for the same cover, previously added
   1068  1.1  mrg      by you or by arrangement made by the same entity you are acting on
   1069  1.1  mrg      behalf of, you may not add another; but you may replace the old
   1070  1.1  mrg      one, on explicit permission from the previous publisher that added
   1071  1.1  mrg      the old one.
   1072  1.1  mrg 
   1073  1.1  mrg      The author(s) and publisher(s) of the Document do not by this
   1074  1.1  mrg      License give permission to use their names for publicity for or to
   1075  1.1  mrg      assert or imply endorsement of any Modified Version.
   1076  1.1  mrg 
   1077  1.1  mrg   5. COMBINING DOCUMENTS
   1078  1.1  mrg 
   1079  1.1  mrg      You may combine the Document with other documents released under
   1080  1.1  mrg      this License, under the terms defined in section 4 above for
   1081  1.1  mrg      modified versions, provided that you include in the combination all
   1082  1.1  mrg      of the Invariant Sections of all of the original documents,
   1083  1.1  mrg      unmodified, and list them all as Invariant Sections of your
   1084  1.1  mrg      combined work in its license notice, and that you preserve all
   1085  1.1  mrg      their Warranty Disclaimers.
   1086  1.1  mrg 
   1087  1.1  mrg      The combined work need only contain one copy of this License, and
   1088  1.1  mrg      multiple identical Invariant Sections may be replaced with a single
   1089  1.1  mrg      copy.  If there are multiple Invariant Sections with the same name
   1090  1.1  mrg      but different contents, make the title of each such section unique
   1091  1.1  mrg      by adding at the end of it, in parentheses, the name of the
   1092  1.1  mrg      original author or publisher of that section if known, or else a
   1093  1.1  mrg      unique number.  Make the same adjustment to the section titles in
   1094  1.1  mrg      the list of Invariant Sections in the license notice of the
   1095  1.1  mrg      combined work.
   1096  1.1  mrg 
   1097  1.1  mrg      In the combination, you must combine any sections Entitled
   1098  1.1  mrg      "History" in the various original documents, forming one section
   1099  1.1  mrg      Entitled "History"; likewise combine any sections Entitled
   1100  1.1  mrg      "Acknowledgements", and any sections Entitled "Dedications".  You
   1101  1.1  mrg      must delete all sections Entitled "Endorsements."
   1102  1.1  mrg 
   1103  1.1  mrg   6. COLLECTIONS OF DOCUMENTS
   1104  1.1  mrg 
   1105  1.1  mrg      You may make a collection consisting of the Document and other
   1106  1.1  mrg      documents released under this License, and replace the individual
   1107  1.1  mrg      copies of this License in the various documents with a single copy
   1108  1.1  mrg      that is included in the collection, provided that you follow the
   1109  1.1  mrg      rules of this License for verbatim copying of each of the documents
   1110  1.1  mrg      in all other respects.
   1111  1.1  mrg 
   1112  1.1  mrg      You may extract a single document from such a collection, and
   1113  1.1  mrg      distribute it individually under this License, provided you insert
   1114  1.1  mrg      a copy of this License into the extracted document, and follow this
   1115  1.1  mrg      License in all other respects regarding verbatim copying of that
   1116  1.1  mrg      document.
   1117  1.1  mrg 
   1118  1.1  mrg   7. AGGREGATION WITH INDEPENDENT WORKS
   1119  1.1  mrg 
   1120  1.1  mrg      A compilation of the Document or its derivatives with other
   1121  1.1  mrg      separate and independent documents or works, in or on a volume of a
   1122  1.1  mrg      storage or distribution medium, is called an "aggregate" if the
   1123  1.1  mrg      copyright resulting from the compilation is not used to limit the
   1124  1.1  mrg      legal rights of the compilation's users beyond what the individual
   1125  1.1  mrg      works permit.  When the Document is included in an aggregate, this
   1126  1.1  mrg      License does not apply to the other works in the aggregate which
   1127  1.1  mrg      are not themselves derivative works of the Document.
   1128  1.1  mrg 
   1129  1.1  mrg      If the Cover Text requirement of section 3 is applicable to these
   1130  1.1  mrg      copies of the Document, then if the Document is less than one half
   1131  1.1  mrg      of the entire aggregate, the Document's Cover Texts may be placed
   1132  1.1  mrg      on covers that bracket the Document within the aggregate, or the
   1133  1.1  mrg      electronic equivalent of covers if the Document is in electronic
   1134  1.1  mrg      form.  Otherwise they must appear on printed covers that bracket
   1135  1.1  mrg      the whole aggregate.
   1136  1.1  mrg 
   1137  1.1  mrg   8. TRANSLATION
   1138  1.1  mrg 
   1139  1.1  mrg      Translation is considered a kind of modification, so you may
   1140  1.1  mrg      distribute translations of the Document under the terms of section
   1141  1.1  mrg      4.  Replacing Invariant Sections with translations requires special
   1142  1.1  mrg      permission from their copyright holders, but you may include
   1143  1.1  mrg      translations of some or all Invariant Sections in addition to the
   1144  1.1  mrg      original versions of these Invariant Sections.  You may include a
   1145  1.1  mrg      translation of this License, and all the license notices in the
   1146  1.1  mrg      Document, and any Warranty Disclaimers, provided that you also
   1147  1.1  mrg      include the original English version of this License and the
   1148  1.1  mrg      original versions of those notices and disclaimers.  In case of a
   1149  1.1  mrg      disagreement between the translation and the original version of
   1150  1.1  mrg      this License or a notice or disclaimer, the original version will
   1151  1.1  mrg      prevail.
   1152  1.1  mrg 
   1153  1.1  mrg      If a section in the Document is Entitled "Acknowledgements",
   1154  1.1  mrg      "Dedications", or "History", the requirement (section 4) to
   1155  1.1  mrg      Preserve its Title (section 1) will typically require changing the
   1156  1.1  mrg      actual title.
   1157  1.1  mrg 
   1158  1.1  mrg   9. TERMINATION
   1159  1.1  mrg 
   1160  1.1  mrg      You may not copy, modify, sublicense, or distribute the Document
   1161  1.1  mrg      except as expressly provided under this License.  Any attempt
   1162  1.1  mrg      otherwise to copy, modify, sublicense, or distribute it is void,
   1163  1.1  mrg      and will automatically terminate your rights under this License.
   1164  1.1  mrg 
   1165  1.1  mrg      However, if you cease all violation of this License, then your
   1166  1.1  mrg      license from a particular copyright holder is reinstated (a)
   1167  1.1  mrg      provisionally, unless and until the copyright holder explicitly and
   1168  1.1  mrg      finally terminates your license, and (b) permanently, if the
   1169  1.1  mrg      copyright holder fails to notify you of the violation by some
   1170  1.1  mrg      reasonable means prior to 60 days after the cessation.
   1171  1.1  mrg 
   1172  1.1  mrg      Moreover, your license from a particular copyright holder is
   1173  1.1  mrg      reinstated permanently if the copyright holder notifies you of the
   1174  1.1  mrg      violation by some reasonable means, this is the first time you have
   1175  1.1  mrg      received notice of violation of this License (for any work) from
   1176  1.1  mrg      that copyright holder, and you cure the violation prior to 30 days
   1177  1.1  mrg      after your receipt of the notice.
   1178  1.1  mrg 
   1179  1.1  mrg      Termination of your rights under this section does not terminate
   1180  1.1  mrg      the licenses of parties who have received copies or rights from you
   1181  1.1  mrg      under this License.  If your rights have been terminated and not
   1182  1.1  mrg      permanently reinstated, receipt of a copy of some or all of the
   1183  1.1  mrg      same material does not give you any rights to use it.
   1184  1.1  mrg 
   1185  1.1  mrg   10. FUTURE REVISIONS OF THIS LICENSE
   1186  1.1  mrg 
   1187  1.1  mrg      The Free Software Foundation may publish new, revised versions of
   1188  1.1  mrg      the GNU Free Documentation License from time to time.  Such new
   1189  1.1  mrg      versions will be similar in spirit to the present version, but may
   1190  1.1  mrg      differ in detail to address new problems or concerns.  See
   1191  1.1  mrg      <https://www.gnu.org/copyleft/>.
   1192  1.1  mrg 
   1193  1.1  mrg      Each version of the License is given a distinguishing version
   1194  1.1  mrg      number.  If the Document specifies that a particular numbered
   1195  1.1  mrg      version of this License "or any later version" applies to it, you
   1196  1.1  mrg      have the option of following the terms and conditions either of
   1197  1.1  mrg      that specified version or of any later version that has been
   1198  1.1  mrg      published (not as a draft) by the Free Software Foundation.  If the
   1199  1.1  mrg      Document does not specify a version number of this License, you may
   1200  1.1  mrg      choose any version ever published (not as a draft) by the Free
   1201  1.1  mrg      Software Foundation.  If the Document specifies that a proxy can
   1202  1.1  mrg      decide which future versions of this License can be used, that
   1203  1.1  mrg      proxy's public statement of acceptance of a version permanently
   1204  1.1  mrg      authorizes you to choose that version for the Document.
   1205  1.1  mrg 
   1206  1.1  mrg   11. RELICENSING
   1207  1.1  mrg 
   1208  1.1  mrg      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
   1209  1.1  mrg      World Wide Web server that publishes copyrightable works and also
   1210  1.1  mrg      provides prominent facilities for anybody to edit those works.  A
   1211  1.1  mrg      public wiki that anybody can edit is an example of such a server.
   1212  1.1  mrg      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
   1213  1.1  mrg      site means any set of copyrightable works thus published on the MMC
   1214  1.1  mrg      site.
   1215  1.1  mrg 
   1216  1.1  mrg      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
   1217  1.1  mrg      license published by Creative Commons Corporation, a not-for-profit
   1218  1.1  mrg      corporation with a principal place of business in San Francisco,
   1219  1.1  mrg      California, as well as future copyleft versions of that license
   1220  1.1  mrg      published by that same organization.
   1221  1.1  mrg 
   1222  1.1  mrg      "Incorporate" means to publish or republish a Document, in whole or
   1223  1.1  mrg      in part, as part of another Document.
   1224  1.1  mrg 
   1225  1.1  mrg      An MMC is "eligible for relicensing" if it is licensed under this
   1226  1.1  mrg      License, and if all works that were first published under this
   1227  1.1  mrg      License somewhere other than this MMC, and subsequently
   1228  1.1  mrg      incorporated in whole or in part into the MMC, (1) had no cover
   1229  1.1  mrg      texts or invariant sections, and (2) were thus incorporated prior
   1230  1.1  mrg      to November 1, 2008.
   1231  1.1  mrg 
   1232  1.1  mrg      The operator of an MMC Site may republish an MMC contained in the
   1233  1.1  mrg      site under CC-BY-SA on the same site at any time before August 1,
   1234  1.1  mrg      2009, provided the MMC is eligible for relicensing.
   1235  1.1  mrg 
   1236  1.1  mrg ADDENDUM: How to use this License for your documents
   1237  1.1  mrg ====================================================
   1238  1.1  mrg 
   1239  1.1  mrg To use this License in a document you have written, include a copy of
   1240  1.1  mrg the License in the document and put the following copyright and license
   1241  1.1  mrg notices just after the title page:
   1242  1.1  mrg 
   1243  1.1  mrg        Copyright (C)  YEAR  YOUR NAME.
   1244  1.1  mrg        Permission is granted to copy, distribute and/or modify this document
   1245  1.1  mrg        under the terms of the GNU Free Documentation License, Version 1.3
   1246  1.1  mrg        or any later version published by the Free Software Foundation;
   1247  1.1  mrg        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
   1248  1.1  mrg        Texts.  A copy of the license is included in the section entitled ``GNU
   1249  1.1  mrg        Free Documentation License''.
   1250  1.1  mrg 
   1251  1.1  mrg    If you have Invariant Sections, Front-Cover Texts and Back-Cover
   1252  1.1  mrg Texts, replace the "with...Texts."  line with this:
   1253  1.1  mrg 
   1254  1.1  mrg          with the Invariant Sections being LIST THEIR TITLES, with
   1255  1.1  mrg          the Front-Cover Texts being LIST, and with the Back-Cover Texts
   1256  1.1  mrg          being LIST.
   1257  1.1  mrg 
   1258  1.1  mrg    If you have Invariant Sections without Cover Texts, or some other
   1259  1.1  mrg combination of the three, merge those two alternatives to suit the
   1260  1.1  mrg situation.
   1261  1.1  mrg 
   1262  1.1  mrg    If your document contains nontrivial examples of program code, we
   1263  1.1  mrg recommend releasing these examples in parallel under your choice of free
   1264  1.1  mrg software license, such as the GNU General Public License, to permit
   1265  1.1  mrg their use in free software.
   1266  1.1  mrg 
   1267  1.1  mrg 
   1268  1.1  mrg File: gccgo.info,  Node: Invoking gccgo,  Next: Import and Export,  Prev: GNU Free Documentation License,  Up: Top
   1269  1.1  mrg 
   1270  1.1  mrg 1 Invoking gccgo
   1271  1.1  mrg ****************
   1272  1.1  mrg 
   1273  1.1  mrg The 'gccgo' command is a frontend to 'gcc' and supports many of the same
   1274  1.1  mrg options.  *Note Option Summary: (gcc)Option Summary.  This manual only
   1275  1.1  mrg documents the options specific to 'gccgo'.
   1276  1.1  mrg 
   1277  1.1  mrg    The 'gccgo' command may be used to compile Go source code into an
   1278  1.1  mrg object file, link a collection of object files together, or do both in
   1279  1.1  mrg sequence.
   1280  1.1  mrg 
   1281  1.1  mrg    Go source code is compiled as packages.  A package consists of one or
   1282  1.1  mrg more Go source files.  All the files in a single package must be
   1283  1.1  mrg compiled together, by passing all the files as arguments to 'gccgo'.  A
   1284  1.1  mrg single invocation of 'gccgo' may only compile a single package.
   1285  1.1  mrg 
   1286  1.1  mrg    One Go package may 'import' a different Go package.  The imported
   1287  1.1  mrg package must have already been compiled; 'gccgo' will read the import
   1288  1.1  mrg data directly from the compiled package.  When this package is later
   1289  1.1  mrg linked, the compiled form of the package must be included in the link
   1290  1.1  mrg command.
   1291  1.1  mrg 
   1292  1.1  mrg    Go programs must generally be compiled with debugging information,
   1293  1.1  mrg and '-g1' is the default as described below.  Stripping a Go program
   1294  1.1  mrg will generally cause it to misbehave or fail.
   1295  1.1  mrg 
   1296  1.1  mrg '-IDIR'
   1297  1.1  mrg      Specify a directory to use when searching for an import package at
   1298  1.1  mrg      compile time.
   1299  1.1  mrg 
   1300  1.1  mrg '-LDIR'
   1301  1.1  mrg      When linking, specify a library search directory, as with 'gcc'.
   1302  1.1  mrg 
   1303  1.1  mrg '-fgo-pkgpath=STRING'
   1304  1.1  mrg      Set the package path to use.  This sets the value returned by the
   1305  1.1  mrg      PkgPath method of reflect.Type objects.  It is also used for the
   1306  1.1  mrg      names of globally visible symbols.  The argument to this option
   1307  1.1  mrg      should normally be the string that will be used to import this
   1308  1.1  mrg      package after it has been installed; in other words, a pathname
   1309  1.1  mrg      within the directories specified by the '-I' option.
   1310  1.1  mrg 
   1311  1.1  mrg '-fgo-prefix=STRING'
   1312  1.1  mrg      An alternative to '-fgo-pkgpath'.  The argument will be combined
   1313  1.1  mrg      with the package name from the source file to produce the package
   1314  1.1  mrg      path.  If '-fgo-pkgpath' is used, '-fgo-prefix' will be ignored.
   1315  1.1  mrg 
   1316  1.1  mrg      Go permits a single program to include more than one package with
   1317  1.1  mrg      the same name in the 'package' clause in the source file, though
   1318  1.1  mrg      obviously the two packages must be imported using different
   1319  1.1  mrg      pathnames.  In order for this to work with 'gccgo', either
   1320  1.1  mrg      '-fgo-pkgpath' or '-fgo-prefix' must be specified when compiling a
   1321  1.1  mrg      package.
   1322  1.1  mrg 
   1323  1.1  mrg      Using either '-fgo-pkgpath' or '-fgo-prefix' disables the special
   1324  1.1  mrg      treatment of the 'main' package and permits that package to be
   1325  1.1  mrg      imported like any other.
   1326  1.1  mrg 
   1327  1.1  mrg '-fgo-relative-import-path=DIR'
   1328  1.1  mrg      A relative import is an import that starts with './' or '../'.  If
   1329  1.1  mrg      this option is used, 'gccgo' will use DIR as a prefix for the
   1330  1.1  mrg      relative import when searching for it.
   1331  1.1  mrg 
   1332  1.1  mrg '-frequire-return-statement'
   1333  1.1  mrg '-fno-require-return-statement'
   1334  1.1  mrg      By default 'gccgo' will warn about functions which have one or more
   1335  1.1  mrg      return parameters but lack an explicit 'return' statement.  This
   1336  1.1  mrg      warning may be disabled using '-fno-require-return-statement'.
   1337  1.1  mrg 
   1338  1.1  mrg '-fgo-check-divide-zero'
   1339  1.1  mrg      Add explicit checks for division by zero.  In Go a division (or
   1340  1.1  mrg      modulos) by zero causes a panic.  On Unix systems this is detected
   1341  1.1  mrg      in the runtime by catching the 'SIGFPE' signal.  Some processors,
   1342  1.1  mrg      such as PowerPC, do not generate a SIGFPE on division by zero.
   1343  1.1  mrg      Some runtimes do not generate a signal that can be caught.  On
   1344  1.1  mrg      those systems, this option may be used.  Or the checks may be
   1345  1.1  mrg      removed via '-fno-go-check-divide-zero'.  This option is currently
   1346  1.1  mrg      on by default, but in the future may be off by default on systems
   1347  1.1  mrg      that do not require it.
   1348  1.1  mrg 
   1349  1.1  mrg '-fgo-check-divide-overflow'
   1350  1.1  mrg      Add explicit checks for division overflow.  For example, division
   1351  1.1  mrg      overflow occurs when computing 'INT_MIN / -1'.  In Go this should
   1352  1.1  mrg      be wrapped, to produce 'INT_MIN'.  Some processors, such as x86,
   1353  1.1  mrg      generate a trap on division overflow.  On those systems, this
   1354  1.1  mrg      option may be used.  Or the checks may be removed via
   1355  1.1  mrg      '-fno-go-check-divide-overflow'.  This option is currently on by
   1356  1.1  mrg      default, but in the future may be off by default on systems that do
   1357  1.1  mrg      not require it.
   1358  1.1  mrg 
   1359  1.1  mrg '-fno-go-optimize-allocs'
   1360  1.1  mrg      Disable escape analysis, which tries to allocate objects on the
   1361  1.1  mrg      stack rather than the heap.
   1362  1.1  mrg 
   1363  1.1  mrg '-fgo-debug-escapeN'
   1364  1.1  mrg      Output escape analysis debugging information.  Larger values of N
   1365  1.1  mrg      generate more information.
   1366  1.1  mrg 
   1367  1.1  mrg '-fgo-debug-escape-hash=N'
   1368  1.1  mrg      A hash value to debug escape analysis.  N is a binary string.  This
   1369  1.1  mrg      runs escape analysis only on functions whose names hash to values
   1370  1.1  mrg      that match the given suffix N.  This can be used to binary search
   1371  1.1  mrg      across functions to uncover escape analysis bugs.
   1372  1.1  mrg 
   1373  1.1  mrg '-fgo-debug-optimization'
   1374  1.1  mrg      Output optimization diagnostics.
   1375  1.1  mrg 
   1376  1.1  mrg '-fgo-c-header=FILE'
   1377  1.1  mrg      Write top-level named Go struct definitions to FILE as C code.
   1378  1.1  mrg      This is used when compiling the runtime package.
   1379  1.1  mrg 
   1380  1.1  mrg '-fgo-compiling-runtime'
   1381  1.1  mrg      Apply special rules for compiling the runtime package.  Implicit
   1382  1.1  mrg      memory allocation is forbidden.  Some additional compiler
   1383  1.1  mrg      directives are supported.
   1384  1.1  mrg 
   1385  1.1  mrg '-fgo-embedcfg=FILE'
   1386  1.1  mrg      Identify a JSON file used to map patterns used with special
   1387  1.1  mrg      '//go:embed' comments to the files named by the patterns.  The JSON
   1388  1.1  mrg      file should have two components: 'Patterns' maps each pattern to a
   1389  1.1  mrg      list of file names, and 'Files' maps each file name to a full path
   1390  1.1  mrg      to the file.  This option is intended for use by the 'go' command
   1391  1.1  mrg      to implement '//go:embed'.
   1392  1.1  mrg 
   1393  1.1  mrg '-g'
   1394  1.1  mrg      This is the standard 'gcc' option (*note Debugging Options:
   1395  1.1  mrg      (gcc)Debugging Options.).  It is mentioned here because by default
   1396  1.1  mrg      'gccgo' turns on debugging information generation with the
   1397  1.1  mrg      equivalent of the standard option '-g1'.  This is because Go
   1398  1.1  mrg      programs require debugging information to be available in order to
   1399  1.1  mrg      get backtrace information.  An explicit '-g0' may be used to
   1400  1.1  mrg      disable the generation of debugging information, in which case
   1401  1.1  mrg      certain standard library functions, such as 'runtime.Callers', will
   1402  1.1  mrg      not operate correctly.
   1403  1.1  mrg 
   1404  1.1  mrg 
   1405  1.1  mrg File: gccgo.info,  Node: Import and Export,  Next: Compiler Directives,  Prev: Invoking gccgo,  Up: Top
   1406  1.1  mrg 
   1407  1.1  mrg 2 Import and Export
   1408  1.1  mrg *******************
   1409  1.1  mrg 
   1410  1.1  mrg When 'gccgo' compiles a package which exports anything, the export
   1411  1.1  mrg information will be stored directly in the object file.  When a package
   1412  1.1  mrg is imported, 'gccgo' must be able to find the file.
   1413  1.1  mrg 
   1414  1.1  mrg    When Go code imports the package 'GOPACKAGE', 'gccgo' will look for
   1415  1.1  mrg the import data using the following filenames, using the first one that
   1416  1.1  mrg it finds.
   1417  1.1  mrg 
   1418  1.1  mrg 'GOPACKAGE.gox'
   1419  1.1  mrg 'libGOPACKAGE.so'
   1420  1.1  mrg 'libGOPACKAGE.a'
   1421  1.1  mrg 'GOPACKAGE.o'
   1422  1.1  mrg 
   1423  1.1  mrg    The compiler will search for these files in the directories named by
   1424  1.1  mrg any '-I' options, in order in which the directories appear on the
   1425  1.1  mrg command line.  The compiler will then search several standard system
   1426  1.1  mrg directories.  Finally the compiler will search the current directory (to
   1427  1.1  mrg search the current directory earlier, use '-I.').
   1428  1.1  mrg 
   1429  1.1  mrg    The compiler will extract the export information directly from the
   1430  1.1  mrg compiled object file.  The file 'GOPACKAGE.gox' will typically contain
   1431  1.1  mrg nothing but export data.  This can be generated from 'GOPACKAGE.o' via
   1432  1.1  mrg 
   1433  1.1  mrg      objcopy -j .go_export GOPACKAGE.o GOPACKAGE.gox
   1434  1.1  mrg 
   1435  1.1  mrg    For example, it may be desirable to extract the export information
   1436  1.1  mrg from several different packages into their independent 'GOPACKAGE.gox'
   1437  1.1  mrg files, and then to combine the different package object files together
   1438  1.1  mrg into a single shared library or archive.
   1439  1.1  mrg 
   1440  1.1  mrg    At link time you must explicitly tell 'gccgo' which files to link
   1441  1.1  mrg together into the executable, as is usual with 'gcc'.  This is different
   1442  1.1  mrg from the behavior of other Go compilers.
   1443  1.1  mrg 
   1444  1.1  mrg 
   1445  1.1  mrg File: gccgo.info,  Node: Compiler Directives,  Next: C Interoperability,  Prev: Import and Export,  Up: Top
   1446  1.1  mrg 
   1447  1.1  mrg 3 Compiler Directives
   1448  1.1  mrg *********************
   1449  1.1  mrg 
   1450  1.1  mrg The Go compiler supports a few compiler directives.  A compiler
   1451  1.1  mrg directive uses a '//' comment at the start of a line.  There must be no
   1452  1.1  mrg space between the '//' and the name of the directive.
   1453  1.1  mrg 
   1454  1.1  mrg '//line FILE:LINE'
   1455  1.1  mrg      The '//line' directive specifies that the source line that follows
   1456  1.1  mrg      should be recorded as having come from the given file path and line
   1457  1.1  mrg      number.  Successive lines are recorded using increasing line
   1458  1.1  mrg      numbers, until the next directive.  This directive typically
   1459  1.1  mrg      appears in machine-generated code, so that compilers and debuggers
   1460  1.1  mrg      will show lines in the original input to the generator.
   1461  1.1  mrg 
   1462  1.1  mrg '//extern EXTERN_NAME'
   1463  1.1  mrg      The 'extern' directive sets the externally visible name of the next
   1464  1.1  mrg      function declaration.  See *note Function Names::.
   1465  1.1  mrg 
   1466  1.1  mrg '//go:compile GO_NAME EXTERN_NAME'
   1467  1.1  mrg      The 'go:compile' directives sets the externally visible name of a
   1468  1.1  mrg      function definition or declaration.  See *note Function Names::.
   1469  1.1  mrg 
   1470  1.1  mrg '//go:noescape'
   1471  1.1  mrg      The '//go:noescape' directive specifies that the next declaration
   1472  1.1  mrg      in the file, which must be a func without a body (meaning that it
   1473  1.1  mrg      has an implementation not written in Go) does not allow any of the
   1474  1.1  mrg      pointers passed as arguments to escape into the heap or into the
   1475  1.1  mrg      values returned from the function.  This information can be used
   1476  1.1  mrg      during the compiler's escape analysis of Go code calling the
   1477  1.1  mrg      function.
   1478  1.1  mrg 
   1479  1.1  mrg '//go:nosplit'
   1480  1.1  mrg      The '//go:nosplit' directive specifies that the next function
   1481  1.1  mrg      declared in the file must not include a stack overflow check.  This
   1482  1.1  mrg      is most commonly used by low-level runtime sources invoked at times
   1483  1.1  mrg      when it is unsafe for the calling goroutine to be preempted.
   1484  1.1  mrg 
   1485  1.1  mrg '//go:noinline'
   1486  1.1  mrg      The '//go:noinline' directive specifies that the next function
   1487  1.1  mrg      defined in the file may not be inlined.
   1488  1.1  mrg 
   1489  1.1  mrg 
   1490  1.1  mrg File: gccgo.info,  Node: C Interoperability,  Next: Index,  Prev: Compiler Directives,  Up: Top
   1491  1.1  mrg 
   1492  1.1  mrg 4 C Interoperability
   1493  1.1  mrg ********************
   1494  1.1  mrg 
   1495  1.1  mrg When using 'gccgo' there is limited interoperability with C, or with C++
   1496  1.1  mrg code compiled using 'extern "C"'.
   1497  1.1  mrg 
   1498  1.1  mrg    This information is provided largely for documentation purposes.  For
   1499  1.1  mrg ordinary use it is best to build programs with the go tool and then use
   1500  1.1  mrg 'import "C"', as described at <https://golang.org/cmd/cgo>.
   1501  1.1  mrg 
   1502  1.1  mrg * Menu:
   1503  1.1  mrg 
   1504  1.1  mrg * C Type Interoperability::     How C and Go types match up.
   1505  1.1  mrg * Function Names::              How Go functions are named.
   1506  1.1  mrg 
   1507  1.1  mrg 
   1508  1.1  mrg File: gccgo.info,  Node: C Type Interoperability,  Next: Function Names,  Up: C Interoperability
   1509  1.1  mrg 
   1510  1.1  mrg 4.1 C Type Interoperability
   1511  1.1  mrg ===========================
   1512  1.1  mrg 
   1513  1.1  mrg Basic types map directly: an 'int' in Go is an 'int' in C, etc.  Go
   1514  1.1  mrg 'byte' is equivalent to C 'unsigned char'.  Pointers in Go are pointers
   1515  1.1  mrg in C. A Go 'struct' is the same as C 'struct' with the same field names
   1516  1.1  mrg and types.
   1517  1.1  mrg 
   1518  1.1  mrg    The Go 'string' type is currently defined as a two-element structure:
   1519  1.1  mrg 
   1520  1.1  mrg      struct __go_string {
   1521  1.1  mrg        const unsigned char *__data;
   1522  1.1  mrg        int __length;
   1523  1.1  mrg      };
   1524  1.1  mrg 
   1525  1.1  mrg    You can't pass arrays between C and Go.  However, a pointer to an
   1526  1.1  mrg array in Go is equivalent to a C pointer to the equivalent of the
   1527  1.1  mrg element type.  For example, Go '*[10]int' is equivalent to C 'int*',
   1528  1.1  mrg assuming that the C pointer does point to 10 elements.
   1529  1.1  mrg 
   1530  1.1  mrg    A slice in Go is a structure.  The current definition is:
   1531  1.1  mrg 
   1532  1.1  mrg      struct __go_slice {
   1533  1.1  mrg        void *__values;
   1534  1.1  mrg        int __count;
   1535  1.1  mrg        int __capacity;
   1536  1.1  mrg      };
   1537  1.1  mrg 
   1538  1.1  mrg    The type of a Go function with no receiver is equivalent to a C
   1539  1.1  mrg function whose parameter types are equivalent.  When a Go function
   1540  1.1  mrg returns more than one value, the C function returns a struct.  For
   1541  1.1  mrg example, these functions have equivalent types:
   1542  1.1  mrg 
   1543  1.1  mrg      func GoFunction(int) (int, float)
   1544  1.1  mrg      struct { int i; float f; } CFunction(int)
   1545  1.1  mrg 
   1546  1.1  mrg    A pointer to a Go function is equivalent to a pointer to a C function
   1547  1.1  mrg when the functions have equivalent types.
   1548  1.1  mrg 
   1549  1.1  mrg    Go 'interface', 'channel', and 'map' types have no corresponding C
   1550  1.1  mrg type ('interface' is a two-element struct and 'channel' and 'map' are
   1551  1.1  mrg pointers to structs in C, but the structs are deliberately
   1552  1.1  mrg undocumented).  C 'enum' types correspond to some integer type, but
   1553  1.1  mrg precisely which one is difficult to predict in general; use a cast.  C
   1554  1.1  mrg 'union' types have no corresponding Go type.  C 'struct' types
   1555  1.1  mrg containing bitfields have no corresponding Go type.  C++ 'class' types
   1556  1.1  mrg have no corresponding Go type.
   1557  1.1  mrg 
   1558  1.1  mrg    Memory allocation is completely different between C and Go, as Go
   1559  1.1  mrg uses garbage collection.  The exact guidelines in this area are
   1560  1.1  mrg undetermined, but it is likely that it will be permitted to pass a
   1561  1.1  mrg pointer to allocated memory from C to Go.  The responsibility of
   1562  1.1  mrg eventually freeing the pointer will remain with C side, and of course if
   1563  1.1  mrg the C side frees the pointer while the Go side still has a copy the
   1564  1.1  mrg program will fail.  When passing a pointer from Go to C, the Go function
   1565  1.1  mrg must retain a visible copy of it in some Go variable.  Otherwise the Go
   1566  1.1  mrg garbage collector may delete the pointer while the C function is still
   1567  1.1  mrg using it.
   1568  1.1  mrg 
   1569  1.1  mrg 
   1570  1.1  mrg File: gccgo.info,  Node: Function Names,  Prev: C Type Interoperability,  Up: C Interoperability
   1571  1.1  mrg 
   1572  1.1  mrg 4.2 Function Names
   1573  1.1  mrg ==================
   1574  1.1  mrg 
   1575  1.1  mrg Go code can call C functions directly using the '//extern' or
   1576  1.1  mrg '//go:linkname' compiler directives.  An '//extern' directive must be at
   1577  1.1  mrg the beginning of the line and must start with '//extern'.  This must be
   1578  1.1  mrg followed by a space and then the external name of the function.  The
   1579  1.1  mrg function declaration must be on the line immediately after the comment.
   1580  1.1  mrg For example, here is how the C function 'open' can be declared in Go:
   1581  1.1  mrg 
   1582  1.1  mrg      //extern open
   1583  1.1  mrg      func c_open(name *byte, mode int, perm int) int
   1584  1.1  mrg 
   1585  1.1  mrg    You can do the same thing using the '//go:linkname' compiler
   1586  1.1  mrg directive.  The '//go:linkname' directive must be at the start of the
   1587  1.1  mrg line.  It is followed by whitespace, the name of the Go function, more
   1588  1.1  mrg whitespace, and the external name of the function.  Unlike '//extern',
   1589  1.1  mrg '//go:linkname' does not need to appear immediately adjacent to the
   1590  1.1  mrg function definition or declaration.
   1591  1.1  mrg 
   1592  1.1  mrg      //go:linkname c_open open
   1593  1.1  mrg      func c_open(name *byte, mode int, perm int) int
   1594  1.1  mrg 
   1595  1.1  mrg    The C function naturally expects a nul terminated string, which in Go
   1596  1.1  mrg is equivalent to a pointer to an array (not a slice!)  of 'byte' with a
   1597  1.1  mrg terminating zero byte.  So a sample call from Go would look like (after
   1598  1.1  mrg importing the 'os' package):
   1599  1.1  mrg 
   1600  1.1  mrg      var name = [4]byte{'f', 'o', 'o', 0};
   1601  1.1  mrg      i := c_open(&name[0], os.O_RDONLY, 0);
   1602  1.1  mrg 
   1603  1.1  mrg    Note that this serves as an example only.  To open a file in Go
   1604  1.1  mrg please use Go's 'os.Open' function instead.
   1605  1.1  mrg 
   1606  1.1  mrg    The name of Go functions accessed from C is subject to change.  At
   1607  1.1  mrg present the name of a Go function that does not have a receiver is
   1608  1.1  mrg 'pkgpath.Functionname'.  The PKGPATH is set by the '-fgo-pkgpath' option
   1609  1.1  mrg used when the package is compiled; if the option is not used, the
   1610  1.1  mrg default is 'go.PACKAGENAME'.  To call the function from C you must set
   1611  1.1  mrg the name using the 'gcc' '__asm__' extension.
   1612  1.1  mrg 
   1613  1.1  mrg      extern int go_function(int) __asm__ ("mypkgpath.Function");
   1614  1.1  mrg 
   1615  1.1  mrg 
   1616  1.1  mrg File: gccgo.info,  Node: Index,  Prev: C Interoperability,  Up: Top
   1617  1.1  mrg 
   1618  1.1  mrg Index
   1619  1.1  mrg *****
   1620  1.1  mrg 
   1621  1.1  mrg [index]
   1622  1.1  mrg * Menu:
   1623  1.1  mrg 
   1624  1.1  mrg * -fgo-c-header:                         Invoking gccgo.      (line 110)
   1625  1.1  mrg * -fgo-check-divide-overflow:            Invoking gccgo.      (line  83)
   1626  1.1  mrg * -fgo-check-divide-zero:                Invoking gccgo.      (line  72)
   1627  1.1  mrg * -fgo-compiling-runtime:                Invoking gccgo.      (line 114)
   1628  1.1  mrg * -fgo-debug-escape:                     Invoking gccgo.      (line  97)
   1629  1.1  mrg * -fgo-debug-escape-hash:                Invoking gccgo.      (line 101)
   1630  1.1  mrg * -fgo-debug-optimization:               Invoking gccgo.      (line 107)
   1631  1.1  mrg * -fgo-embedcfg:                         Invoking gccgo.      (line 119)
   1632  1.1  mrg * -fgo-pkgpath:                          Invoking gccgo.      (line  37)
   1633  1.1  mrg * -fgo-prefix:                           Invoking gccgo.      (line  45)
   1634  1.1  mrg * -fgo-relative-import-path:             Invoking gccgo.      (line  61)
   1635  1.1  mrg * -fno-go-check-divide-overflow:         Invoking gccgo.      (line  83)
   1636  1.1  mrg * -fno-go-check-divide-zero:             Invoking gccgo.      (line  72)
   1637  1.1  mrg * -fno-go-debug-optimization:            Invoking gccgo.      (line 107)
   1638  1.1  mrg * -fno-go-optimize-allocs:               Invoking gccgo.      (line  93)
   1639  1.1  mrg * -fno-require-return-statement:         Invoking gccgo.      (line  67)
   1640  1.1  mrg * -frequire-return-statement:            Invoking gccgo.      (line  67)
   1641  1.1  mrg * -g for gccgo:                          Invoking gccgo.      (line 127)
   1642  1.1  mrg * -I:                                    Invoking gccgo.      (line  30)
   1643  1.1  mrg * -L:                                    Invoking gccgo.      (line  34)
   1644  1.1  mrg * .gox:                                  Import and Export.   (line  10)
   1645  1.1  mrg * extern:                                Function Names.      (line   6)
   1646  1.1  mrg * external names:                        Function Names.      (line   6)
   1647  1.1  mrg * FDL, GNU Free Documentation License:   GNU Free Documentation License.
   1648  1.1  mrg                                                               (line   6)
   1649  1.1  mrg * slice in C:                            C Type Interoperability.
   1650  1.1  mrg                                                               (line  23)
   1651  1.1  mrg * string in C:                           C Type Interoperability.
   1652  1.1  mrg                                                               (line  11)
   1653  1.1  mrg 
   1654  1.1  mrg 
   1655  1.1  mrg 
   1656  1.1  mrg Tag Table:
   1657  1.1  mrg Node: Top1688
   1658  1.1  mrg Node: Copying2548
   1659  1.1  mrg Node: GNU Free Documentation License40084
   1660  1.1  mrg Node: Invoking gccgo65214
   1661  1.1  mrg Node: Import and Export71394
   1662  1.1  mrg Node: Compiler Directives72990
   1663  1.1  mrg Node: C Interoperability74974
   1664  1.1  mrg Node: C Type Interoperability75561
   1665  1.1  mrg Node: Function Names78120
   1666  1.1  mrg Node: Index80124
   1667  1.1  mrg 
   1668  1.1  mrg End Tag Table
   1669