xref: /openbsd/gnu/usr.bin/binutils/gas/COPYING (revision b55d4692)
12159047fSniklas		    GNU GENERAL PUBLIC LICENSE
22159047fSniklas		       Version 2, June 1991
32159047fSniklas
4*b55d4692Sfgsch Copyright 1989, 1991, 1997 Free Software Foundation, Inc.
5fddef416Sniklas                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
62159047fSniklas Everyone is permitted to copy and distribute verbatim copies
72159047fSniklas of this license document, but changing it is not allowed.
82159047fSniklas
92159047fSniklas			    Preamble
102159047fSniklas
112159047fSniklas  The licenses for most software are designed to take away your
122159047fSniklasfreedom to share and change it.  By contrast, the GNU General Public
132159047fSniklasLicense is intended to guarantee your freedom to share and change free
142159047fSniklassoftware--to make sure the software is free for all its users.  This
152159047fSniklasGeneral Public License applies to most of the Free Software
162159047fSniklasFoundation's software and to any other program whose authors commit to
172159047fSniklasusing it.  (Some other Free Software Foundation software is covered by
182159047fSniklasthe GNU Library General Public License instead.)  You can apply it to
192159047fSniklasyour programs, too.
202159047fSniklas
212159047fSniklas  When we speak of free software, we are referring to freedom, not
222159047fSniklasprice.  Our General Public Licenses are designed to make sure that you
232159047fSniklashave the freedom to distribute copies of free software (and charge for
242159047fSniklasthis service if you wish), that you receive source code or can get it
252159047fSniklasif you want it, that you can change the software or use pieces of it
262159047fSniklasin new free programs; and that you know you can do these things.
272159047fSniklas
282159047fSniklas  To protect your rights, we need to make restrictions that forbid
292159047fSniklasanyone to deny you these rights or to ask you to surrender the rights.
302159047fSniklasThese restrictions translate to certain responsibilities for you if you
312159047fSniklasdistribute copies of the software, or if you modify it.
322159047fSniklas
332159047fSniklas  For example, if you distribute copies of such a program, whether
342159047fSniklasgratis or for a fee, you must give the recipients all the rights that
352159047fSniklasyou have.  You must make sure that they, too, receive or can get the
362159047fSniklassource code.  And you must show them these terms so they know their
372159047fSniklasrights.
382159047fSniklas
392159047fSniklas  We protect your rights with two steps: (1) copyright the software, and
402159047fSniklas(2) offer you this license which gives you legal permission to copy,
412159047fSniklasdistribute and/or modify the software.
422159047fSniklas
432159047fSniklas  Also, for each author's protection and ours, we want to make certain
442159047fSniklasthat everyone understands that there is no warranty for this free
452159047fSniklassoftware.  If the software is modified by someone else and passed on, we
462159047fSniklaswant its recipients to know that what they have is not the original, so
472159047fSniklasthat any problems introduced by others will not reflect on the original
482159047fSniklasauthors' reputations.
492159047fSniklas
502159047fSniklas  Finally, any free program is threatened constantly by software
512159047fSniklaspatents.  We wish to avoid the danger that redistributors of a free
522159047fSniklasprogram will individually obtain patent licenses, in effect making the
532159047fSniklasprogram proprietary.  To prevent this, we have made it clear that any
542159047fSniklaspatent must be licensed for everyone's free use or not licensed at all.
552159047fSniklas
562159047fSniklas  The precise terms and conditions for copying, distribution and
572159047fSniklasmodification follow.
582159047fSniklas
592159047fSniklas		    GNU GENERAL PUBLIC LICENSE
602159047fSniklas   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
612159047fSniklas
622159047fSniklas  0. This License applies to any program or other work which contains
632159047fSniklasa notice placed by the copyright holder saying it may be distributed
642159047fSniklasunder the terms of this General Public License.  The "Program", below,
652159047fSniklasrefers to any such program or work, and a "work based on the Program"
662159047fSniklasmeans either the Program or any derivative work under copyright law:
672159047fSniklasthat is to say, a work containing the Program or a portion of it,
682159047fSniklaseither verbatim or with modifications and/or translated into another
692159047fSniklaslanguage.  (Hereinafter, translation is included without limitation in
702159047fSniklasthe term "modification".)  Each licensee is addressed as "you".
712159047fSniklas
722159047fSniklasActivities other than copying, distribution and modification are not
732159047fSniklascovered by this License; they are outside its scope.  The act of
742159047fSniklasrunning the Program is not restricted, and the output from the Program
752159047fSniklasis covered only if its contents constitute a work based on the
762159047fSniklasProgram (independent of having been made by running the Program).
772159047fSniklasWhether that is true depends on what the Program does.
782159047fSniklas
792159047fSniklas  1. You may copy and distribute verbatim copies of the Program's
802159047fSniklassource code as you receive it, in any medium, provided that you
812159047fSniklasconspicuously and appropriately publish on each copy an appropriate
822159047fSniklascopyright notice and disclaimer of warranty; keep intact all the
832159047fSniklasnotices that refer to this License and to the absence of any warranty;
842159047fSniklasand give any other recipients of the Program a copy of this License
852159047fSniklasalong with the Program.
862159047fSniklas
872159047fSniklasYou may charge a fee for the physical act of transferring a copy, and
882159047fSniklasyou may at your option offer warranty protection in exchange for a fee.
892159047fSniklas
902159047fSniklas  2. You may modify your copy or copies of the Program or any portion
912159047fSniklasof it, thus forming a work based on the Program, and copy and
922159047fSniklasdistribute such modifications or work under the terms of Section 1
932159047fSniklasabove, provided that you also meet all of these conditions:
942159047fSniklas
952159047fSniklas    a) You must cause the modified files to carry prominent notices
962159047fSniklas    stating that you changed the files and the date of any change.
972159047fSniklas
982159047fSniklas    b) You must cause any work that you distribute or publish, that in
992159047fSniklas    whole or in part contains or is derived from the Program or any
1002159047fSniklas    part thereof, to be licensed as a whole at no charge to all third
1012159047fSniklas    parties under the terms of this License.
1022159047fSniklas
1032159047fSniklas    c) If the modified program normally reads commands interactively
1042159047fSniklas    when run, you must cause it, when started running for such
1052159047fSniklas    interactive use in the most ordinary way, to print or display an
1062159047fSniklas    announcement including an appropriate copyright notice and a
1072159047fSniklas    notice that there is no warranty (or else, saying that you provide
1082159047fSniklas    a warranty) and that users may redistribute the program under
1092159047fSniklas    these conditions, and telling the user how to view a copy of this
1102159047fSniklas    License.  (Exception: if the Program itself is interactive but
1112159047fSniklas    does not normally print such an announcement, your work based on
1122159047fSniklas    the Program is not required to print an announcement.)
1132159047fSniklas
1142159047fSniklasThese requirements apply to the modified work as a whole.  If
1152159047fSniklasidentifiable sections of that work are not derived from the Program,
1162159047fSniklasand can be reasonably considered independent and separate works in
1172159047fSniklasthemselves, then this License, and its terms, do not apply to those
1182159047fSniklassections when you distribute them as separate works.  But when you
1192159047fSniklasdistribute the same sections as part of a whole which is a work based
1202159047fSniklason the Program, the distribution of the whole must be on the terms of
1212159047fSniklasthis License, whose permissions for other licensees extend to the
1222159047fSniklasentire whole, and thus to each and every part regardless of who wrote it.
1232159047fSniklas
1242159047fSniklasThus, it is not the intent of this section to claim rights or contest
1252159047fSniklasyour rights to work written entirely by you; rather, the intent is to
1262159047fSniklasexercise the right to control the distribution of derivative or
1272159047fSniklascollective works based on the Program.
1282159047fSniklas
1292159047fSniklasIn addition, mere aggregation of another work not based on the Program
1302159047fSniklaswith the Program (or with a work based on the Program) on a volume of
1312159047fSniklasa storage or distribution medium does not bring the other work under
1322159047fSniklasthe scope of this License.
1332159047fSniklas
1342159047fSniklas  3. You may copy and distribute the Program (or a work based on it,
1352159047fSniklasunder Section 2) in object code or executable form under the terms of
1362159047fSniklasSections 1 and 2 above provided that you also do one of the following:
1372159047fSniklas
1382159047fSniklas    a) Accompany it with the complete corresponding machine-readable
1392159047fSniklas    source code, which must be distributed under the terms of Sections
1402159047fSniklas    1 and 2 above on a medium customarily used for software interchange; or,
1412159047fSniklas
1422159047fSniklas    b) Accompany it with a written offer, valid for at least three
1432159047fSniklas    years, to give any third party, for a charge no more than your
1442159047fSniklas    cost of physically performing source distribution, a complete
1452159047fSniklas    machine-readable copy of the corresponding source code, to be
1462159047fSniklas    distributed under the terms of Sections 1 and 2 above on a medium
1472159047fSniklas    customarily used for software interchange; or,
1482159047fSniklas
1492159047fSniklas    c) Accompany it with the information you received as to the offer
1502159047fSniklas    to distribute corresponding source code.  (This alternative is
1512159047fSniklas    allowed only for noncommercial distribution and only if you
1522159047fSniklas    received the program in object code or executable form with such
1532159047fSniklas    an offer, in accord with Subsection b above.)
1542159047fSniklas
1552159047fSniklasThe source code for a work means the preferred form of the work for
1562159047fSniklasmaking modifications to it.  For an executable work, complete source
1572159047fSniklascode means all the source code for all modules it contains, plus any
1582159047fSniklasassociated interface definition files, plus the scripts used to
1592159047fSniklascontrol compilation and installation of the executable.  However, as a
1602159047fSniklasspecial exception, the source code distributed need not include
1612159047fSniklasanything that is normally distributed (in either source or binary
1622159047fSniklasform) with the major components (compiler, kernel, and so on) of the
1632159047fSniklasoperating system on which the executable runs, unless that component
1642159047fSniklasitself accompanies the executable.
1652159047fSniklas
1662159047fSniklasIf distribution of executable or object code is made by offering
1672159047fSniklasaccess to copy from a designated place, then offering equivalent
1682159047fSniklasaccess to copy the source code from the same place counts as
1692159047fSniklasdistribution of the source code, even though third parties are not
1702159047fSniklascompelled to copy the source along with the object code.
1712159047fSniklas
1722159047fSniklas  4. You may not copy, modify, sublicense, or distribute the Program
1732159047fSniklasexcept as expressly provided under this License.  Any attempt
1742159047fSniklasotherwise to copy, modify, sublicense or distribute the Program is
1752159047fSniklasvoid, and will automatically terminate your rights under this License.
1762159047fSniklasHowever, parties who have received copies, or rights, from you under
1772159047fSniklasthis License will not have their licenses terminated so long as such
1782159047fSniklasparties remain in full compliance.
1792159047fSniklas
1802159047fSniklas  5. You are not required to accept this License, since you have not
1812159047fSniklassigned it.  However, nothing else grants you permission to modify or
1822159047fSniklasdistribute the Program or its derivative works.  These actions are
1832159047fSniklasprohibited by law if you do not accept this License.  Therefore, by
1842159047fSniklasmodifying or distributing the Program (or any work based on the
1852159047fSniklasProgram), you indicate your acceptance of this License to do so, and
1862159047fSniklasall its terms and conditions for copying, distributing or modifying
1872159047fSniklasthe Program or works based on it.
1882159047fSniklas
1892159047fSniklas  6. Each time you redistribute the Program (or any work based on the
1902159047fSniklasProgram), the recipient automatically receives a license from the
1912159047fSniklasoriginal licensor to copy, distribute or modify the Program subject to
1922159047fSniklasthese terms and conditions.  You may not impose any further
1932159047fSniklasrestrictions on the recipients' exercise of the rights granted herein.
1942159047fSniklasYou are not responsible for enforcing compliance by third parties to
1952159047fSniklasthis License.
1962159047fSniklas
1972159047fSniklas  7. If, as a consequence of a court judgment or allegation of patent
1982159047fSniklasinfringement or for any other reason (not limited to patent issues),
1992159047fSniklasconditions are imposed on you (whether by court order, agreement or
2002159047fSniklasotherwise) that contradict the conditions of this License, they do not
2012159047fSniklasexcuse you from the conditions of this License.  If you cannot
2022159047fSniklasdistribute so as to satisfy simultaneously your obligations under this
2032159047fSniklasLicense and any other pertinent obligations, then as a consequence you
2042159047fSniklasmay not distribute the Program at all.  For example, if a patent
2052159047fSniklaslicense would not permit royalty-free redistribution of the Program by
2062159047fSniklasall those who receive copies directly or indirectly through you, then
2072159047fSniklasthe only way you could satisfy both it and this License would be to
2082159047fSniklasrefrain entirely from distribution of the Program.
2092159047fSniklas
2102159047fSniklasIf any portion of this section is held invalid or unenforceable under
2112159047fSniklasany particular circumstance, the balance of the section is intended to
2122159047fSniklasapply and the section as a whole is intended to apply in other
2132159047fSniklascircumstances.
2142159047fSniklas
2152159047fSniklasIt is not the purpose of this section to induce you to infringe any
2162159047fSniklaspatents or other property right claims or to contest validity of any
2172159047fSniklassuch claims; this section has the sole purpose of protecting the
2182159047fSniklasintegrity of the free software distribution system, which is
2192159047fSniklasimplemented by public license practices.  Many people have made
2202159047fSniklasgenerous contributions to the wide range of software distributed
2212159047fSniklasthrough that system in reliance on consistent application of that
2222159047fSniklassystem; it is up to the author/donor to decide if he or she is willing
2232159047fSniklasto distribute software through any other system and a licensee cannot
2242159047fSniklasimpose that choice.
2252159047fSniklas
2262159047fSniklasThis section is intended to make thoroughly clear what is believed to
2272159047fSniklasbe a consequence of the rest of this License.
2282159047fSniklas
2292159047fSniklas  8. If the distribution and/or use of the Program is restricted in
2302159047fSniklascertain countries either by patents or by copyrighted interfaces, the
2312159047fSniklasoriginal copyright holder who places the Program under this License
2322159047fSniklasmay add an explicit geographical distribution limitation excluding
2332159047fSniklasthose countries, so that distribution is permitted only in or among
2342159047fSniklascountries not thus excluded.  In such case, this License incorporates
2352159047fSniklasthe limitation as if written in the body of this License.
2362159047fSniklas
2372159047fSniklas  9. The Free Software Foundation may publish revised and/or new versions
2382159047fSniklasof the General Public License from time to time.  Such new versions will
2392159047fSniklasbe similar in spirit to the present version, but may differ in detail to
2402159047fSniklasaddress new problems or concerns.
2412159047fSniklas
2422159047fSniklasEach version is given a distinguishing version number.  If the Program
2432159047fSniklasspecifies a version number of this License which applies to it and "any
2442159047fSniklaslater version", you have the option of following the terms and conditions
2452159047fSniklaseither of that version or of any later version published by the Free
2462159047fSniklasSoftware Foundation.  If the Program does not specify a version number of
2472159047fSniklasthis License, you may choose any version ever published by the Free Software
2482159047fSniklasFoundation.
2492159047fSniklas
2502159047fSniklas  10. If you wish to incorporate parts of the Program into other free
2512159047fSniklasprograms whose distribution conditions are different, write to the author
2522159047fSniklasto ask for permission.  For software which is copyrighted by the Free
2532159047fSniklasSoftware Foundation, write to the Free Software Foundation; we sometimes
2542159047fSniklasmake exceptions for this.  Our decision will be guided by the two goals
2552159047fSniklasof preserving the free status of all derivatives of our free software and
2562159047fSniklasof promoting the sharing and reuse of software generally.
2572159047fSniklas
2582159047fSniklas			    NO WARRANTY
2592159047fSniklas
2602159047fSniklas  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2612159047fSniklasFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2622159047fSniklasOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2632159047fSniklasPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2642159047fSniklasOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2652159047fSniklasMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2662159047fSniklasTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2672159047fSniklasPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2682159047fSniklasREPAIR OR CORRECTION.
2692159047fSniklas
2702159047fSniklas  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2712159047fSniklasWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2722159047fSniklasREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2732159047fSniklasINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2742159047fSniklasOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2752159047fSniklasTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2762159047fSniklasYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2772159047fSniklasPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2782159047fSniklasPOSSIBILITY OF SUCH DAMAGES.
2792159047fSniklas
2802159047fSniklas		     END OF TERMS AND CONDITIONS
2812159047fSniklas
282fddef416Sniklas	    How to Apply These Terms to Your New Programs
2832159047fSniklas
2842159047fSniklas  If you develop a new program, and you want it to be of the greatest
2852159047fSniklaspossible use to the public, the best way to achieve this is to make it
2862159047fSniklasfree software which everyone can redistribute and change under these terms.
2872159047fSniklas
2882159047fSniklas  To do so, attach the following notices to the program.  It is safest
2892159047fSniklasto attach them to the start of each source file to most effectively
2902159047fSniklasconvey the exclusion of warranty; and each file should have at least
2912159047fSniklasthe "copyright" line and a pointer to where the full notice is found.
2922159047fSniklas
2932159047fSniklas    <one line to give the program's name and a brief idea of what it does.>
2942159047fSniklas    Copyright (C) 19yy  <name of author>
2952159047fSniklas
2962159047fSniklas    This program is free software; you can redistribute it and/or modify
2972159047fSniklas    it under the terms of the GNU General Public License as published by
2982159047fSniklas    the Free Software Foundation; either version 2 of the License, or
2992159047fSniklas    (at your option) any later version.
3002159047fSniklas
3012159047fSniklas    This program is distributed in the hope that it will be useful,
3022159047fSniklas    but WITHOUT ANY WARRANTY; without even the implied warranty of
3032159047fSniklas    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3042159047fSniklas    GNU General Public License for more details.
3052159047fSniklas
3062159047fSniklas    You should have received a copy of the GNU General Public License
3072159047fSniklas    along with this program; if not, write to the Free Software
308fddef416Sniklas    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
309fddef416Sniklas
3102159047fSniklas
3112159047fSniklasAlso add information on how to contact you by electronic and paper mail.
3122159047fSniklas
3132159047fSniklasIf the program is interactive, make it output a short notice like this
3142159047fSniklaswhen it starts in an interactive mode:
3152159047fSniklas
3162159047fSniklas    Gnomovision version 69, Copyright (C) 19yy name of author
3172159047fSniklas    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
3182159047fSniklas    This is free software, and you are welcome to redistribute it
3192159047fSniklas    under certain conditions; type `show c' for details.
3202159047fSniklas
3212159047fSniklasThe hypothetical commands `show w' and `show c' should show the appropriate
3222159047fSniklasparts of the General Public License.  Of course, the commands you use may
3232159047fSniklasbe called something other than `show w' and `show c'; they could even be
3242159047fSniklasmouse-clicks or menu items--whatever suits your program.
3252159047fSniklas
3262159047fSniklasYou should also get your employer (if you work as a programmer) or your
3272159047fSniklasschool, if any, to sign a "copyright disclaimer" for the program, if
3282159047fSniklasnecessary.  Here is a sample; alter the names:
3292159047fSniklas
3302159047fSniklas  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
3312159047fSniklas  `Gnomovision' (which makes passes at compilers) written by James Hacker.
3322159047fSniklas
3332159047fSniklas  <signature of Ty Coon>, 1 April 1989
3342159047fSniklas  Ty Coon, President of Vice
3352159047fSniklas
3362159047fSniklasThis General Public License does not permit incorporating your program into
3372159047fSniklasproprietary programs.  If your program is a subroutine library, you may
3382159047fSniklasconsider it more useful to permit linking proprietary applications with the
3392159047fSniklaslibrary.  If this is what you want to do, use the GNU Library General
3402159047fSniklasPublic License instead of this License.
341