mirror of
https://github.com/pret/agbcc.git
synced 2026-04-25 07:19:40 -05:00
remove unused include files
This commit is contained in:
parent
346ed7678f
commit
b03d2c9d30
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
*.exe
|
||||
*.o
|
||||
|
|
|
|||
340
COPYING
340
COPYING
|
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
482
COPYING.LIB
482
COPYING.LIB
|
|
@ -1,482 +0,0 @@
|
|||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
130
COPYING.NEWLIB
130
COPYING.NEWLIB
|
|
@ -1,130 +0,0 @@
|
|||
The newlib subdirectory is a collection of software from several sources.
|
||||
Each have their own copyrights embedded in each file that they concern.
|
||||
|
||||
(1) University of California, Berkeley
|
||||
|
||||
Copyright (c) 1990 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms are permitted
|
||||
provided that the above copyright notice and this paragraph are
|
||||
duplicated in all such forms and that any documentation,
|
||||
advertising materials, and other materials related to such
|
||||
distribution and use acknowledge that the software was developed
|
||||
by the University of California, Berkeley. The name of the
|
||||
University may not be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
(2) DJ Delorie
|
||||
|
||||
Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
|
||||
|
||||
This file is distributed under the terms listed in the document
|
||||
"copying.dj", available from DJ Delorie at the address above.
|
||||
A copy of "copying.dj" should accompany this file; if not, a copy
|
||||
should be available from where this file was obtained. This file
|
||||
may not be distributed without a verbatim copy of "copying.dj".
|
||||
|
||||
This file is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
(3) David M. Gay at AT&T
|
||||
|
||||
The author of this software is David M. Gay.
|
||||
|
||||
Copyright (c) 1991 by AT&T.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose without fee is hereby granted, provided that this entire notice
|
||||
is included in all copies of any software which is or includes a copy
|
||||
or modification of this software and in all copies of the supporting
|
||||
documentation for such software.
|
||||
|
||||
THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
|
||||
WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
|
||||
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
|
||||
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
|
||||
|
||||
(4) Advanced Micro Devices
|
||||
|
||||
Copyright 1989, 1990 Advanced Micro Devices, Inc.
|
||||
|
||||
This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
specifically grants the user the right to modify, use and distribute this
|
||||
software provided this notice is not removed or altered. All other rights
|
||||
are reserved by AMD.
|
||||
|
||||
AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
USE OF THIS SOFTWARE.
|
||||
|
||||
So that all may benefit from your experience, please report any problems
|
||||
or suggestions about this software to the 29K Technical Support Center at
|
||||
800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
|
||||
Advanced Micro Devices, Inc.
|
||||
29K Support Products
|
||||
Mail Stop 573
|
||||
5900 E. Ben White Blvd.
|
||||
Austin, TX 78741
|
||||
800-292-9263
|
||||
|
||||
(5) C.W. Sandmann
|
||||
|
||||
Copyright (C) 1993 C.W. Sandmann
|
||||
|
||||
This file may be freely distributed as long as the author's name remains.
|
||||
|
||||
(6) Eric Backus
|
||||
|
||||
(C) Copyright 1992 Eric Backus
|
||||
|
||||
This software may be used freely so long as this copyright notice is
|
||||
left intact. There is no warrantee on this software.
|
||||
|
||||
(7) Sun Microsystems
|
||||
|
||||
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||
|
||||
Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
Permission to use, copy, modify, and distribute this
|
||||
software is freely granted, provided that this notice
|
||||
is preserved.
|
||||
|
||||
(8) Hewlett Packard
|
||||
|
||||
(c) Copyright 1986 HEWLETT-PACKARD COMPANY
|
||||
|
||||
To anyone who acknowledges that this file is provided "AS IS"
|
||||
without any express or implied warranty:
|
||||
permission to use, copy, modify, and distribute this file
|
||||
for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice and this notice appears in all
|
||||
copies, and that the name of Hewlett-Packard Company not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific, written prior permission.
|
||||
Hewlett-Packard Company makes no representations about the
|
||||
suitability of this software for any purpose.
|
||||
|
||||
(9) Unless otherwise stated in each remaining newlib file, the remaining
|
||||
files in the newlib subdirectory are governed by the following copyright.
|
||||
|
||||
Copyright (c) 1994, 1997 Cygnus Solutions.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms are permitted
|
||||
provided that the above copyright notice and this paragraph are
|
||||
duplicated in all such forms and that any documentation,
|
||||
advertising materials, and other materials related to such
|
||||
distribution and use acknowledge that the software was developed
|
||||
at Cygnus Solutions. Cygnus Solutions may not be used to
|
||||
endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
87
config.if
87
config.if
|
|
@ -1,87 +0,0 @@
|
|||
#! /dev/null
|
||||
# Don't call it directly. This shell script fragment is called to
|
||||
# determine:
|
||||
#
|
||||
# 1. libstcxx_interface: the interface name for libstdc++.
|
||||
# 2. cxx_interface: the interface name for c++.
|
||||
# 3. libc_interface: the interface name for libc.
|
||||
#
|
||||
|
||||
# Get the top level src dir.
|
||||
if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ]
|
||||
then
|
||||
echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "${topsrcdir}" ]
|
||||
then
|
||||
if_topsrcdir=${topsrcdir}
|
||||
else
|
||||
if_topsrcdir=${top_srcdir}
|
||||
fi
|
||||
|
||||
if [ -f ${if_topsrcdir}/libstdc++/Makefile.in ]; then
|
||||
# We check libstdc++ for libstdcxx_interface.
|
||||
libstdcxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/libstdc++/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
|
||||
else
|
||||
libstdcxx_interface=
|
||||
fi
|
||||
|
||||
if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then
|
||||
# We check gcc/cp for cxx_interface.
|
||||
cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
|
||||
else
|
||||
cxx_interface=
|
||||
fi
|
||||
|
||||
# The trickiest part is libc_interface.
|
||||
if [ -z "${libc_interface}" ]
|
||||
then
|
||||
case ${target_os} in
|
||||
*linux*libc1*|*linux*libc5*)
|
||||
case ${target_alias} in
|
||||
*alpha*|*powerpc*)
|
||||
libc_interface=-libc5.9-
|
||||
;;
|
||||
*)
|
||||
libc_interface=-libc5-
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*linux*gnu*)
|
||||
# We have to work harder to figure it out.
|
||||
if [ ${target_alias} = ${build_alias} ]
|
||||
then
|
||||
dummy=if$$
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
printf("%d\n", __GLIBC_MINOR__);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null
|
||||
if [ "$?" = 0 ]
|
||||
then
|
||||
libc_interface=-libc6.`./$dummy`-
|
||||
rm -f $dummy.c $dummy
|
||||
else
|
||||
# It should never happen.
|
||||
echo "Cannot find the GNU C library minor version number." >&2
|
||||
rm -f $dummy.c $dummy
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# Cross compiling. Assume glibc 2.1.
|
||||
libc_interface=-libc6.1-
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
libc_interface=-
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
1274
config.sub
vendored
1274
config.sub
vendored
File diff suppressed because it is too large
Load Diff
340
include/COPYING
340
include/COPYING
|
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
1510
include/ChangeLog
1510
include/ChangeLog
File diff suppressed because it is too large
Load Diff
|
|
@ -1,163 +0,0 @@
|
|||
/* ANSI and traditional C compatability macros
|
||||
Copyright 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
PTR `void *' `char *'
|
||||
LONG_DOUBLE `long double' `double'
|
||||
VOLATILE `volatile' `'
|
||||
SIGNED `signed' `'
|
||||
PTRCONST `void *const' `char *'
|
||||
ANSI_PROTOTYPES 1 not defined
|
||||
|
||||
CONST is also defined, but is obsolete. Just use const.
|
||||
|
||||
obsolete -- DEFUN (name, arglist, args)
|
||||
|
||||
Defines function NAME.
|
||||
|
||||
ARGLIST lists the arguments, separated by commas and enclosed in
|
||||
parentheses. ARGLIST becomes the argument list in traditional C.
|
||||
|
||||
ARGS list the arguments with their types. It becomes a prototype in
|
||||
ANSI C, and the type declarations in traditional C. Arguments should
|
||||
be separated with `AND'. For functions with a variable number of
|
||||
arguments, the last thing listed should be `DOTS'.
|
||||
|
||||
obsolete -- DEFUN_VOID (name)
|
||||
|
||||
Defines a function NAME, which takes no arguments.
|
||||
|
||||
obsolete -- EXFUN (name, (prototype)) -- obsolete.
|
||||
|
||||
Replaced by PARAMS. Do not use; will disappear someday soon.
|
||||
Was used in external function declarations.
|
||||
In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
|
||||
parentheses). In traditional C it is `NAME()'.
|
||||
For a function that takes no arguments, PROTOTYPE should be `(void)'.
|
||||
|
||||
obsolete -- PROTO (type, name, (prototype) -- obsolete.
|
||||
|
||||
This one has also been replaced by PARAMS. Do not use.
|
||||
|
||||
PARAMS ((args))
|
||||
|
||||
We could use the EXFUN macro to handle prototype declarations, but
|
||||
the name is misleading and the result is ugly. So we just define a
|
||||
simple macro to handle the parameter lists, as in:
|
||||
|
||||
static int foo PARAMS ((int, char));
|
||||
|
||||
This produces: `static int foo();' or `static int foo (int, char);'
|
||||
|
||||
EXFUN would have done it like this:
|
||||
|
||||
static int EXFUN (foo, (int, char));
|
||||
|
||||
but the function is not external...and it's hard to visually parse
|
||||
the function name out of the mess. EXFUN should be considered
|
||||
obsolete; new code should be written to use PARAMS.
|
||||
|
||||
DOTS is also obsolete.
|
||||
|
||||
Examples:
|
||||
|
||||
extern int printf PARAMS ((const char *format, ...));
|
||||
*/
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
|
||||
/* All known AIX compilers implement these things (but don't always
|
||||
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||
in SVR4 mode, but does not define __STDC__. */
|
||||
|
||||
#define PTR void *
|
||||
#define PTRCONST void *CONST
|
||||
#define LONG_DOUBLE long double
|
||||
|
||||
#ifndef IN_GCC
|
||||
#define AND ,
|
||||
#define NOARGS void
|
||||
#define VOLATILE volatile
|
||||
#define SIGNED signed
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#define PARAMS(paramlist) paramlist
|
||||
#define ANSI_PROTOTYPES 1
|
||||
|
||||
#define VPARAMS(ARGS) ARGS
|
||||
#define VA_START(va_list,var) va_start(va_list,var)
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#ifndef IN_GCC
|
||||
#define CONST const
|
||||
#define DOTS , ...
|
||||
#define PROTO(type, name, arglist) type name arglist
|
||||
#define EXFUN(name, proto) name proto
|
||||
#define DEFUN(name, arglist, args) name(args)
|
||||
#define DEFUN_VOID(name) name(void)
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#else /* Not ANSI C. */
|
||||
|
||||
#define PTR char *
|
||||
#define PTRCONST PTR
|
||||
#define LONG_DOUBLE double
|
||||
|
||||
#ifndef IN_GCC
|
||||
#define AND ;
|
||||
#define NOARGS
|
||||
#define VOLATILE
|
||||
#define SIGNED
|
||||
#endif /* !IN_GCC */
|
||||
|
||||
#ifndef const /* some systems define it in header files for non-ansi mode */
|
||||
#define const
|
||||
#endif
|
||||
|
||||
#define PARAMS(paramlist) ()
|
||||
|
||||
#define VPARAMS(ARGS) (va_alist) va_dcl
|
||||
#define VA_START(va_list,var) va_start(va_list)
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#ifndef IN_GCC
|
||||
#define CONST
|
||||
#define DOTS
|
||||
#define PROTO(type, name, arglist) type name ()
|
||||
#define EXFUN(name, proto) name()
|
||||
#define DEFUN(name, arglist, args) name arglist args;
|
||||
#define DEFUN_VOID(name) name()
|
||||
#endif /* ! IN_GCC */
|
||||
|
||||
#endif /* ANSI C. */
|
||||
|
||||
#endif /* ansidecl.h */
|
||||
|
|
@ -1,178 +0,0 @@
|
|||
Sun Jun 28 11:33:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
||||
|
||||
* stab.def: Add N_ALIAS from SunPro F77.
|
||||
|
||||
Mon Mar 11 12:15:52 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* stab.def: Use __define_stab_duplicate rather than __define_stab
|
||||
for duplicate entries N_BROWS and N_MOD2.
|
||||
* stab_gnu.h (__define_stab_duplicate): Define before including
|
||||
stab.def.
|
||||
|
||||
Fri Oct 27 17:47:16 1995 Niklas Hallqvist <niklas@appli.se>
|
||||
|
||||
* aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
|
||||
TARGET_PAGE_SIZE.
|
||||
|
||||
Tue Sep 12 12:07:02 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* sun4.h (struct internal_sun4_dynamic_link): Change all fields
|
||||
from long to unsigned long.
|
||||
|
||||
Wed Jul 12 00:15:13 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
|
||||
|
||||
* sun4.h (PAGE_SIZE): Undefine before defining.
|
||||
|
||||
Thu Jun 16 14:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* aout64.h (BMAGIC): Define.
|
||||
|
||||
Sat Jun 11 16:16:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
Add weak symbols as an extension to a.out.
|
||||
* aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define.
|
||||
* stab.def: Update symbol value table.
|
||||
|
||||
Thu Jun 2 17:13:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
|
||||
24. Fix up ld_got comment.
|
||||
|
||||
Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* dynix3.h: Cleanup, adapt to current bfd version.
|
||||
|
||||
Sat Feb 26 10:25:53 1994 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* aout64.h: Add casts to avoid warnings from SVR4 cc.
|
||||
|
||||
Fri Feb 11 12:56:04 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
|
||||
portability.
|
||||
|
||||
Fri Jan 21 00:59:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* sun4.h: Added information about SunOS shared libraries.
|
||||
|
||||
Fri Jan 7 08:20:13 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
|
||||
|
||||
* aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
|
||||
|
||||
Sat Dec 25 14:55:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
|
||||
|
||||
Tue Nov 16 15:43:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE
|
||||
for Linux ZMAGIC.
|
||||
(N_TXTOFF, N_DATOFF): Use them.
|
||||
|
||||
Thu Nov 4 00:33:48 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match
|
||||
sun3 system; used to overlap other fields.
|
||||
(RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise.
|
||||
|
||||
Wed Nov 3 13:48:27 1993 David J. Mackenzie (djm@thepub.cygnus.com)
|
||||
|
||||
* aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's
|
||||
suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE.
|
||||
|
||||
Fri Oct 29 15:09:52 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* hp300hpux.h (N_SHARED_LIB): Define to be 0.
|
||||
|
||||
Mon Sep 13 21:00:56 1993 John Gilmore (gnu@cygnus.com)
|
||||
|
||||
* ar.h (ARMAP_TIME_OFFSET): Add and describe.
|
||||
|
||||
Mon Aug 23 Sean Fagan (sef@cygnus.com)
|
||||
|
||||
* aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden.
|
||||
|
||||
Mon Aug 16 14:30:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* stab_gnu.h: Include aout/stab.def not just stab.def.
|
||||
|
||||
Sun Jul 18 21:41:47 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
|
||||
|
||||
* dynix3.h: New, for symmetry running dynix.
|
||||
|
||||
Thu Jul 8 12:52:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* aout64.h (N_BADMAG): Recognize QMAGIC.
|
||||
N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC.
|
||||
N_DATOFF: Pad text size if we need to.
|
||||
|
||||
Fri Jun 18 19:19:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* stab.def (N_ECOML): Fix comment.
|
||||
|
||||
Mon May 31 09:21:30 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||
|
||||
* stab.def: Remove Solaris information on N_FUN stabstring grammar;
|
||||
I've transferred it to gdb/doc/stabs.texinfo, where it belongs.
|
||||
|
||||
Mon May 10 05:48:43 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* hp300hpux.h: Patch from Glenn Engel for linker problem and
|
||||
compatibility fix:
|
||||
(OMAGIC, NMAGIC): New definitions.
|
||||
(SHAREMAGIC): Deleted.
|
||||
(HPUX_DOT_O_MAGIC): New macro.
|
||||
(_N_BADMAG): Adjusted.
|
||||
(N_HEADER_IN_TEXT, N_DATADDR): New macros.
|
||||
|
||||
Thu Apr 29 12:07:37 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
|
||||
|
||||
* hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
|
||||
|
||||
Tue Apr 27 05:51:04 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define
|
||||
if `external_exec' is already defined as a macro.
|
||||
(N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define
|
||||
if already defined.
|
||||
(struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if
|
||||
`external_nlist' is already defined as a macro.
|
||||
|
||||
Sat Aug 15 04:23:02 1992 John Gilmore (gnu@cygnus.com)
|
||||
|
||||
* adobe.h: Add description of a.out.adobe format.
|
||||
|
||||
Fri Jul 3 00:36:52 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* stab.def: Update more Solaris definitions.
|
||||
* stab_gnu.h: Add N_SO language types, and Solaris basic float types.
|
||||
|
||||
Sun Jun 14 10:53:53 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* stab.def: Update descriptions of Solaris-2 stabs; add N_UNDF.
|
||||
|
||||
Thu Jun 11 01:12:07 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* stab.def: Add N_OBJ and N_OPT from Solaris-2.
|
||||
|
||||
Thu Jan 30 18:12:44 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* aout/aout64.h: N_TXTSIZE needs some more parentheses.
|
||||
I don't trust C precedence.
|
||||
|
||||
Wed Dec 18 14:32:01 1991 Per Bothner (bothner at cygnus.com)
|
||||
|
||||
* aout/aout64.h: Move common sunos-specific test
|
||||
to recognize shared libraries into new macro N_SHARED_LIB.
|
||||
Use it to simplify&reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
|
||||
|
||||
Sat Nov 30 20:34:52 1991 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||
|
||||
* ChangeLog, aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h,
|
||||
reloc.h, stab.def, stab_gnu.h, sun4.h: All moved from the
|
||||
devo/include directory
|
||||
|
||||
|
||||
Local Variables:
|
||||
version-control: never
|
||||
End:
|
||||
|
|
@ -1,297 +0,0 @@
|
|||
/* `a.out.adobe' differences from standard a.out files */
|
||||
|
||||
#ifndef __A_OUT_ADOBE_H__
|
||||
#define __A_OUT_ADOBE_H__
|
||||
|
||||
#define BYTES_IN_WORD 4
|
||||
|
||||
/* Struct external_exec is the same. */
|
||||
|
||||
/* This is the layout on disk of the 32-bit or 64-bit exec header. */
|
||||
|
||||
struct external_exec
|
||||
{
|
||||
bfd_byte e_info[4]; /* magic number and stuff */
|
||||
bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */
|
||||
bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */
|
||||
bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */
|
||||
bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */
|
||||
bfd_byte e_entry[BYTES_IN_WORD]; /* start address */
|
||||
bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */
|
||||
bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
|
||||
|
||||
/* Magic numbers for a.out files */
|
||||
|
||||
#undef ZMAGIC
|
||||
#define ZMAGIC 0xAD0BE /* Cute, eh? */
|
||||
#undef OMAGIC
|
||||
#undef NMAGIC
|
||||
|
||||
#define N_BADMAG(x) ((x).a_info != ZMAGIC)
|
||||
|
||||
/* By default, segment size is constant. But some machines override this
|
||||
to be a function of the a.out header (e.g. machine type). */
|
||||
#ifndef N_SEGSIZE
|
||||
#define N_SEGSIZE(x) SEGMENT_SIZE
|
||||
#endif
|
||||
#undef N_SEGSIZE /* FIXMEXXXX */
|
||||
|
||||
/* Segment information for the a.out.Adobe format is specified after the
|
||||
file header. It contains N segment descriptors, followed by one with
|
||||
a type of zero.
|
||||
|
||||
The actual text of the segments starts at N_TXTOFF in the file,
|
||||
regardless of how many or how few segment headers there are. */
|
||||
|
||||
struct external_segdesc {
|
||||
unsigned char e_type[1];
|
||||
unsigned char e_size[3];
|
||||
unsigned char e_virtbase[4];
|
||||
unsigned char e_filebase[4];
|
||||
};
|
||||
|
||||
struct internal_segdesc {
|
||||
unsigned int a_type:8; /* Segment type N_TEXT, N_DATA, 0 */
|
||||
unsigned int a_size:24; /* Segment size */
|
||||
bfd_vma a_virtbase; /* Virtual address */
|
||||
unsigned int a_filebase; /* Base address in object file */
|
||||
};
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
|
||||
/* This is documented to be at 1024, but appears to really be at 2048.
|
||||
FIXME?! */
|
||||
#define N_TXTOFF(x) 2048
|
||||
|
||||
#define N_TXTSIZE(x) ((x).a_text)
|
||||
|
||||
#define N_DATADDR(x)
|
||||
|
||||
#define N_BSSADDR(x)
|
||||
|
||||
/* Offsets of the various portions of the file after the text segment. */
|
||||
|
||||
#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
|
||||
#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
|
||||
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
|
||||
#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
|
||||
#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
|
||||
/* Symbols */
|
||||
struct external_nlist {
|
||||
bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */
|
||||
bfd_byte e_type[1]; /* type of symbol */
|
||||
bfd_byte e_other[1]; /* misc info (usually empty) */
|
||||
bfd_byte e_desc[2]; /* description field */
|
||||
bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */
|
||||
};
|
||||
|
||||
#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
|
||||
|
||||
struct internal_nlist {
|
||||
unsigned long n_strx; /* index into string table of name */
|
||||
unsigned char n_type; /* type of symbol */
|
||||
unsigned char n_other; /* misc info (usually empty) */
|
||||
unsigned short n_desc; /* description field */
|
||||
bfd_vma n_value; /* value of symbol */
|
||||
};
|
||||
|
||||
/* The n_type field is the symbol type, containing: */
|
||||
|
||||
#define N_UNDF 0 /* Undefined symbol */
|
||||
#define N_ABS 2 /* Absolute symbol -- defined at particular addr */
|
||||
#define N_TEXT 4 /* Text sym -- defined at offset in text seg */
|
||||
#define N_DATA 6 /* Data sym -- defined at offset in data seg */
|
||||
#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */
|
||||
#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */
|
||||
#define N_FN 0x1f /* File name of .o file */
|
||||
#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */
|
||||
/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
|
||||
N_DATA, or N_BSS. When the low-order bit of other types is set,
|
||||
(e.g. N_WARNING versus N_FN), they are two different types. */
|
||||
#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */
|
||||
#define N_TYPE 0x1e
|
||||
#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */
|
||||
|
||||
#define N_INDR 0x0a
|
||||
|
||||
/* The following symbols refer to set elements.
|
||||
All the N_SET[ATDB] symbols with the same name form one set.
|
||||
Space is allocated for the set in the text section, and each set
|
||||
elements value is stored into one word of the space.
|
||||
The first word of the space is the length of the set (number of elements).
|
||||
|
||||
The address of the set is made into an N_SETV symbol
|
||||
whose name is the same as the name of the set.
|
||||
This symbol acts like a N_DATA global symbol
|
||||
in that it can satisfy undefined external references. */
|
||||
|
||||
/* These appear as input to LD, in a .o file. */
|
||||
#define N_SETA 0x14 /* Absolute set element symbol */
|
||||
#define N_SETT 0x16 /* Text set element symbol */
|
||||
#define N_SETD 0x18 /* Data set element symbol */
|
||||
#define N_SETB 0x1A /* Bss set element symbol */
|
||||
|
||||
/* This is output from LD. */
|
||||
#define N_SETV 0x1C /* Pointer to set vector in data area. */
|
||||
|
||||
/* Warning symbol. The text gives a warning message, the next symbol
|
||||
in the table will be undefined. When the symbol is referenced, the
|
||||
message is printed. */
|
||||
|
||||
#define N_WARNING 0x1e
|
||||
|
||||
/* Relocations
|
||||
|
||||
There are two types of relocation flavours for a.out systems,
|
||||
standard and extended. The standard form is used on systems where the
|
||||
instruction has room for all the bits of an offset to the operand, whilst
|
||||
the extended form is used when an address operand has to be split over n
|
||||
instructions. Eg, on the 68k, each move instruction can reference
|
||||
the target with a displacement of 16 or 32 bits. On the sparc, move
|
||||
instructions use an offset of 14 bits, so the offset is stored in
|
||||
the reloc field, and the data in the section is ignored.
|
||||
*/
|
||||
|
||||
/* This structure describes a single relocation to be performed.
|
||||
The text-relocation section of the file is a vector of these structures,
|
||||
all of which apply to the text section.
|
||||
Likewise, the data-relocation section applies to the data section. */
|
||||
|
||||
struct reloc_std_external {
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
|
||||
bfd_byte r_index[3]; /* symbol table index of symbol */
|
||||
bfd_byte r_type[1]; /* relocation type */
|
||||
};
|
||||
|
||||
#define RELOC_STD_BITS_PCREL_BIG 0x80
|
||||
#define RELOC_STD_BITS_PCREL_LITTLE 0x01
|
||||
|
||||
#define RELOC_STD_BITS_LENGTH_BIG 0x60
|
||||
#define RELOC_STD_BITS_LENGTH_SH_BIG 5 /* To shift to units place */
|
||||
#define RELOC_STD_BITS_LENGTH_LITTLE 0x06
|
||||
#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
|
||||
|
||||
#define RELOC_STD_BITS_EXTERN_BIG 0x10
|
||||
#define RELOC_STD_BITS_EXTERN_LITTLE 0x08
|
||||
|
||||
#define RELOC_STD_BITS_BASEREL_BIG 0x08
|
||||
#define RELOC_STD_BITS_BASEREL_LITTLE 0x08
|
||||
|
||||
#define RELOC_STD_BITS_JMPTABLE_BIG 0x04
|
||||
#define RELOC_STD_BITS_JMPTABLE_LITTLE 0x04
|
||||
|
||||
#define RELOC_STD_BITS_RELATIVE_BIG 0x02
|
||||
#define RELOC_STD_BITS_RELATIVE_LITTLE 0x02
|
||||
|
||||
#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */
|
||||
|
||||
struct reloc_std_internal
|
||||
{
|
||||
bfd_vma r_address; /* Address (within segment) to be relocated. */
|
||||
/* The meaning of r_symbolnum depends on r_extern. */
|
||||
unsigned int r_symbolnum:24;
|
||||
/* Nonzero means value is a pc-relative offset
|
||||
and it should be relocated for changes in its own address
|
||||
as well as for changes in the symbol or section specified. */
|
||||
unsigned int r_pcrel:1;
|
||||
/* Length (as exponent of 2) of the field to be relocated.
|
||||
Thus, a value of 2 indicates 1<<2 bytes. */
|
||||
unsigned int r_length:2;
|
||||
/* 1 => relocate with value of symbol.
|
||||
r_symbolnum is the index of the symbol
|
||||
in files the symbol table.
|
||||
0 => relocate with the address of a segment.
|
||||
r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
|
||||
(the N_EXT bit may be set also, but signifies nothing). */
|
||||
unsigned int r_extern:1;
|
||||
/* The next three bits are for SunOS shared libraries, and seem to
|
||||
be undocumented. */
|
||||
unsigned int r_baserel:1; /* Linkage table relative */
|
||||
unsigned int r_jmptable:1; /* pc-relative to jump table */
|
||||
unsigned int r_relative:1; /* "relative relocation" */
|
||||
/* unused */
|
||||
unsigned int r_pad:1; /* Padding -- set to zero */
|
||||
};
|
||||
|
||||
|
||||
/* EXTENDED RELOCS */
|
||||
|
||||
struct reloc_ext_external {
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
|
||||
bfd_byte r_index[3]; /* symbol table index of symbol */
|
||||
bfd_byte r_type[1]; /* relocation type */
|
||||
bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
|
||||
};
|
||||
|
||||
#define RELOC_EXT_BITS_EXTERN_BIG 0x80
|
||||
#define RELOC_EXT_BITS_EXTERN_LITTLE 0x01
|
||||
|
||||
#define RELOC_EXT_BITS_TYPE_BIG 0x1F
|
||||
#define RELOC_EXT_BITS_TYPE_SH_BIG 0
|
||||
#define RELOC_EXT_BITS_TYPE_LITTLE 0xF8
|
||||
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
|
||||
|
||||
/* Bytes per relocation entry */
|
||||
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
|
||||
|
||||
enum reloc_type
|
||||
{
|
||||
/* simple relocations */
|
||||
RELOC_8, /* data[0:7] = addend + sv */
|
||||
RELOC_16, /* data[0:15] = addend + sv */
|
||||
RELOC_32, /* data[0:31] = addend + sv */
|
||||
/* pc-rel displacement */
|
||||
RELOC_DISP8, /* data[0:7] = addend - pc + sv */
|
||||
RELOC_DISP16, /* data[0:15] = addend - pc + sv */
|
||||
RELOC_DISP32, /* data[0:31] = addend - pc + sv */
|
||||
/* Special */
|
||||
RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
|
||||
RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
|
||||
RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
|
||||
RELOC_22, /* data[0:21] = (addend + sv) */
|
||||
RELOC_13, /* data[0:12] = (addend + sv) */
|
||||
RELOC_LO10, /* data[0:9] = (addend + sv) */
|
||||
RELOC_SFA_BASE,
|
||||
RELOC_SFA_OFF13,
|
||||
/* P.I.C. (base-relative) */
|
||||
RELOC_BASE10, /* Not sure - maybe we can do this the */
|
||||
RELOC_BASE13, /* right way now */
|
||||
RELOC_BASE22,
|
||||
/* for some sort of pc-rel P.I.C. (?) */
|
||||
RELOC_PC10,
|
||||
RELOC_PC22,
|
||||
/* P.I.C. jump table */
|
||||
RELOC_JMP_TBL,
|
||||
/* reputedly for shared libraries somehow */
|
||||
RELOC_SEGOFF16,
|
||||
RELOC_GLOB_DAT,
|
||||
RELOC_JMP_SLOT,
|
||||
RELOC_RELATIVE,
|
||||
|
||||
RELOC_11,
|
||||
RELOC_WDISP2_14,
|
||||
RELOC_WDISP19,
|
||||
RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
|
||||
RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
|
||||
|
||||
/* 29K relocation types */
|
||||
RELOC_JUMPTARG,
|
||||
RELOC_CONST,
|
||||
RELOC_CONSTH,
|
||||
|
||||
NO_RELOC
|
||||
};
|
||||
|
||||
|
||||
struct reloc_internal {
|
||||
bfd_vma r_address; /* offset of of data to relocate */
|
||||
long r_index; /* symbol table index of symbol */
|
||||
enum reloc_type r_type; /* relocation type */
|
||||
bfd_vma r_addend; /* datum addend */
|
||||
};
|
||||
|
||||
#endif /* __A_OUT_ADOBE_H__ */
|
||||
|
|
@ -1,475 +0,0 @@
|
|||
/* `a.out' object-file definitions, including extensions to 64-bit fields */
|
||||
|
||||
#ifndef __A_OUT_64_H__
|
||||
#define __A_OUT_64_H__
|
||||
|
||||
/* This is the layout on disk of the 32-bit or 64-bit exec header. */
|
||||
|
||||
#ifndef external_exec
|
||||
struct external_exec
|
||||
{
|
||||
bfd_byte e_info[4]; /* magic number and stuff */
|
||||
bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */
|
||||
bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */
|
||||
bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */
|
||||
bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */
|
||||
bfd_byte e_entry[BYTES_IN_WORD]; /* start address */
|
||||
bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */
|
||||
bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
|
||||
|
||||
/* Magic numbers for a.out files */
|
||||
|
||||
#if ARCH_SIZE==64
|
||||
#define OMAGIC 0x1001 /* Code indicating object file */
|
||||
#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */
|
||||
#define NMAGIC 0x1003 /* Code indicating pure executable. */
|
||||
|
||||
/* There is no 64-bit QMAGIC as far as I know. */
|
||||
|
||||
#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC)
|
||||
#else
|
||||
#define OMAGIC 0407 /* ...object file or impure executable. */
|
||||
#define NMAGIC 0410 /* Code indicating pure executable. */
|
||||
#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
|
||||
#define BMAGIC 0415 /* Used by a b.out object. */
|
||||
|
||||
/* This indicates a demand-paged executable with the header in the text.
|
||||
It is used by 386BSD (and variants) and Linux, at least. */
|
||||
#ifndef QMAGIC
|
||||
#define QMAGIC 0314
|
||||
#endif
|
||||
# ifndef N_BADMAG
|
||||
# define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC \
|
||||
&& N_MAGIC(x) != QMAGIC)
|
||||
# endif /* N_BADMAG */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef QMAGIC
|
||||
#define N_IS_QMAGIC(x) (N_MAGIC (x) == QMAGIC)
|
||||
#else
|
||||
#define N_IS_QMAGIC(x) (0)
|
||||
#endif
|
||||
|
||||
/* The difference between TARGET_PAGE_SIZE and N_SEGSIZE is that TARGET_PAGE_SIZE is
|
||||
the finest granularity at which you can page something, thus it
|
||||
controls the padding (if any) before the text segment of a ZMAGIC
|
||||
file. N_SEGSIZE is the resolution at which things can be marked as
|
||||
read-only versus read/write, so it controls the padding between the
|
||||
text segment and the data segment (in memory; on disk the padding
|
||||
between them is TARGET_PAGE_SIZE). TARGET_PAGE_SIZE and N_SEGSIZE are the same
|
||||
for most machines, but different for sun3. */
|
||||
|
||||
/* By default, segment size is constant. But some machines override this
|
||||
to be a function of the a.out header (e.g. machine type). */
|
||||
|
||||
#ifndef N_SEGSIZE
|
||||
#define N_SEGSIZE(x) SEGMENT_SIZE
|
||||
#endif
|
||||
|
||||
/* Virtual memory address of the text section.
|
||||
This is getting very complicated. A good reason to discard a.out format
|
||||
for something that specifies these fields explicitly. But til then...
|
||||
|
||||
* OMAGIC and NMAGIC files:
|
||||
(object files: text for "relocatable addr 0" right after the header)
|
||||
start at 0, offset is EXEC_BYTES_SIZE, size as stated.
|
||||
* The text address, offset, and size of ZMAGIC files depend
|
||||
on the entry point of the file:
|
||||
* entry point below TEXT_START_ADDR:
|
||||
(hack for SunOS shared libraries)
|
||||
start at 0, offset is 0, size as stated.
|
||||
* If N_HEADER_IN_TEXT(x) is true (which defaults to being the
|
||||
case when the entry point is EXEC_BYTES_SIZE or further into a page):
|
||||
no padding is needed; text can start after exec header. Sun
|
||||
considers the text segment of such files to include the exec header;
|
||||
for BFD's purposes, we don't, which makes more work for us.
|
||||
start at TEXT_START_ADDR + EXEC_BYTES_SIZE, offset is EXEC_BYTES_SIZE,
|
||||
size as stated minus EXEC_BYTES_SIZE.
|
||||
* If N_HEADER_IN_TEXT(x) is false (which defaults to being the case when
|
||||
the entry point is less than EXEC_BYTES_SIZE into a page (e.g. page
|
||||
aligned)): (padding is needed so that text can start at a page boundary)
|
||||
start at TEXT_START_ADDR, offset TARGET_PAGE_SIZE, size as stated.
|
||||
|
||||
Specific configurations may want to hardwire N_HEADER_IN_TEXT,
|
||||
for efficiency or to allow people to play games with the entry point.
|
||||
In that case, you would #define N_HEADER_IN_TEXT(x) as 1 for sunos,
|
||||
and as 0 for most other hosts (Sony News, Vax Ultrix, etc).
|
||||
(Do this in the appropriate bfd target file.)
|
||||
(The default is a heuristic that will break if people try changing
|
||||
the entry point, perhaps with the ld -e flag.)
|
||||
|
||||
* QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true,
|
||||
and for which the starting address is TARGET_PAGE_SIZE (or should this be
|
||||
SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC).
|
||||
*/
|
||||
|
||||
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
|
||||
in the text. */
|
||||
#ifndef N_HEADER_IN_TEXT
|
||||
#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
|
||||
#endif
|
||||
|
||||
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
|
||||
files. */
|
||||
#ifndef N_SHARED_LIB
|
||||
#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR)
|
||||
#endif
|
||||
|
||||
/* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on
|
||||
the assumption that we are dealing with a .o file, not an
|
||||
executable. This is necessary for OMAGIC (but means we don't work
|
||||
right on the output from ld -N); more questionable for NMAGIC. */
|
||||
|
||||
#ifndef N_TXTADDR
|
||||
#define N_TXTADDR(x) \
|
||||
(/* The address of a QMAGIC file is always one page in, */ \
|
||||
/* with the header in the text. */ \
|
||||
N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
|
||||
N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
|
||||
N_SHARED_LIB(x) ? 0 : \
|
||||
N_HEADER_IN_TEXT(x) ? \
|
||||
TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\
|
||||
TEXT_START_ADDR /* a page of padding */\
|
||||
)
|
||||
#endif
|
||||
|
||||
/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
|
||||
to make the text segment start at a certain boundary. For most
|
||||
systems, this boundary is TARGET_PAGE_SIZE. But for Linux, in the
|
||||
time-honored tradition of crazy ZMAGIC hacks, it is 1024 which is
|
||||
not what TARGET_PAGE_SIZE needs to be for QMAGIC. */
|
||||
|
||||
#ifndef ZMAGIC_DISK_BLOCK_SIZE
|
||||
#define ZMAGIC_DISK_BLOCK_SIZE TARGET_PAGE_SIZE
|
||||
#endif
|
||||
|
||||
#define N_DISK_BLOCK_SIZE(x) \
|
||||
(N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : TARGET_PAGE_SIZE)
|
||||
|
||||
/* Offset in an a.out of the start of the text section. */
|
||||
#ifndef N_TXTOFF
|
||||
#define N_TXTOFF(x) \
|
||||
(/* For {O,N,Q}MAGIC, no padding. */ \
|
||||
N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \
|
||||
N_SHARED_LIB(x) ? 0 : \
|
||||
N_HEADER_IN_TEXT(x) ? \
|
||||
EXEC_BYTES_SIZE : /* no padding */\
|
||||
ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */\
|
||||
)
|
||||
#endif
|
||||
/* Size of the text section. It's always as stated, except that we
|
||||
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
|
||||
for ZMAGIC files that nominally include the exec header
|
||||
as part of the first page of text. (BFD doesn't consider the
|
||||
exec header to be part of the text segment.) */
|
||||
#ifndef N_TXTSIZE
|
||||
#define N_TXTSIZE(x) \
|
||||
(/* For QMAGIC, we don't consider the header part of the text section. */\
|
||||
N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
|
||||
(N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
|
||||
N_HEADER_IN_TEXT(x) ? \
|
||||
(x).a_text - EXEC_BYTES_SIZE: /* no padding */\
|
||||
(x).a_text /* a page of padding */\
|
||||
)
|
||||
#endif
|
||||
/* The address of the data segment in virtual memory.
|
||||
It is the text segment address, plus text segment size, rounded
|
||||
up to a N_SEGSIZE boundary for pure or pageable files. */
|
||||
#ifndef N_DATADDR
|
||||
#define N_DATADDR(x) \
|
||||
(N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \
|
||||
: (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
|
||||
#endif
|
||||
/* The address of the BSS segment -- immediately after the data segment. */
|
||||
|
||||
#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
|
||||
|
||||
/* Offsets of the various portions of the file after the text segment. */
|
||||
|
||||
/* For {Q,Z}MAGIC, there is padding to make the data segment start on
|
||||
a page boundary. Most of the time the a_text field (and thus
|
||||
N_TXTSIZE) already contains this padding. It is possible that for
|
||||
BSDI and/or 386BSD it sometimes doesn't contain the padding, and
|
||||
perhaps we should be adding it here. But this seems kind of
|
||||
questionable and probably should be BSDI/386BSD-specific if we do
|
||||
do it.
|
||||
|
||||
For NMAGIC (at least for hp300 BSD, probably others), there is
|
||||
padding in memory only, not on disk, so we must *not* ever pad here
|
||||
for NMAGIC. */
|
||||
|
||||
#ifndef N_DATOFF
|
||||
#define N_DATOFF(x) \
|
||||
(N_TXTOFF(x) + N_TXTSIZE(x))
|
||||
#endif
|
||||
|
||||
#ifndef N_TRELOFF
|
||||
#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
|
||||
#endif
|
||||
#ifndef N_DRELOFF
|
||||
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
|
||||
#endif
|
||||
#ifndef N_SYMOFF
|
||||
#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
|
||||
#endif
|
||||
#ifndef N_STROFF
|
||||
#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
#endif
|
||||
|
||||
/* Symbols */
|
||||
#ifndef external_nlist
|
||||
struct external_nlist {
|
||||
bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */
|
||||
bfd_byte e_type[1]; /* type of symbol */
|
||||
bfd_byte e_other[1]; /* misc info (usually empty) */
|
||||
bfd_byte e_desc[2]; /* description field */
|
||||
bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */
|
||||
};
|
||||
#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
|
||||
#endif
|
||||
|
||||
struct internal_nlist {
|
||||
unsigned long n_strx; /* index into string table of name */
|
||||
unsigned char n_type; /* type of symbol */
|
||||
unsigned char n_other; /* misc info (usually empty) */
|
||||
unsigned short n_desc; /* description field */
|
||||
bfd_vma n_value; /* value of symbol */
|
||||
};
|
||||
|
||||
/* The n_type field is the symbol type, containing: */
|
||||
|
||||
#define N_UNDF 0 /* Undefined symbol */
|
||||
#define N_ABS 2 /* Absolute symbol -- defined at particular addr */
|
||||
#define N_TEXT 4 /* Text sym -- defined at offset in text seg */
|
||||
#define N_DATA 6 /* Data sym -- defined at offset in data seg */
|
||||
#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */
|
||||
#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */
|
||||
#define N_FN 0x1f /* File name of .o file */
|
||||
#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */
|
||||
/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
|
||||
N_DATA, or N_BSS. When the low-order bit of other types is set,
|
||||
(e.g. N_WARNING versus N_FN), they are two different types. */
|
||||
#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */
|
||||
#define N_TYPE 0x1e
|
||||
#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */
|
||||
|
||||
#define N_INDR 0x0a
|
||||
|
||||
/* The following symbols refer to set elements.
|
||||
All the N_SET[ATDB] symbols with the same name form one set.
|
||||
Space is allocated for the set in the text section, and each set
|
||||
elements value is stored into one word of the space.
|
||||
The first word of the space is the length of the set (number of elements).
|
||||
|
||||
The address of the set is made into an N_SETV symbol
|
||||
whose name is the same as the name of the set.
|
||||
This symbol acts like a N_DATA global symbol
|
||||
in that it can satisfy undefined external references. */
|
||||
|
||||
/* These appear as input to LD, in a .o file. */
|
||||
#define N_SETA 0x14 /* Absolute set element symbol */
|
||||
#define N_SETT 0x16 /* Text set element symbol */
|
||||
#define N_SETD 0x18 /* Data set element symbol */
|
||||
#define N_SETB 0x1A /* Bss set element symbol */
|
||||
|
||||
/* This is output from LD. */
|
||||
#define N_SETV 0x1C /* Pointer to set vector in data area. */
|
||||
|
||||
/* Warning symbol. The text gives a warning message, the next symbol
|
||||
in the table will be undefined. When the symbol is referenced, the
|
||||
message is printed. */
|
||||
|
||||
#define N_WARNING 0x1e
|
||||
|
||||
/* Weak symbols. These are a GNU extension to the a.out format. The
|
||||
semantics are those of ELF weak symbols. Weak symbols are always
|
||||
externally visible. The N_WEAK? values are squeezed into the
|
||||
available slots. The value of a N_WEAKU symbol is 0. The values
|
||||
of the other types are the definitions. */
|
||||
#define N_WEAKU 0x0d /* Weak undefined symbol. */
|
||||
#define N_WEAKA 0x0e /* Weak absolute symbol. */
|
||||
#define N_WEAKT 0x0f /* Weak text symbol. */
|
||||
#define N_WEAKD 0x10 /* Weak data symbol. */
|
||||
#define N_WEAKB 0x11 /* Weak bss symbol. */
|
||||
|
||||
/* Relocations
|
||||
|
||||
There are two types of relocation flavours for a.out systems,
|
||||
standard and extended. The standard form is used on systems where the
|
||||
instruction has room for all the bits of an offset to the operand, whilst
|
||||
the extended form is used when an address operand has to be split over n
|
||||
instructions. Eg, on the 68k, each move instruction can reference
|
||||
the target with a displacement of 16 or 32 bits. On the sparc, move
|
||||
instructions use an offset of 14 bits, so the offset is stored in
|
||||
the reloc field, and the data in the section is ignored.
|
||||
*/
|
||||
|
||||
/* This structure describes a single relocation to be performed.
|
||||
The text-relocation section of the file is a vector of these structures,
|
||||
all of which apply to the text section.
|
||||
Likewise, the data-relocation section applies to the data section. */
|
||||
|
||||
struct reloc_std_external {
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
|
||||
bfd_byte r_index[3]; /* symbol table index of symbol */
|
||||
bfd_byte r_type[1]; /* relocation type */
|
||||
};
|
||||
|
||||
#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80)
|
||||
#define RELOC_STD_BITS_PCREL_LITTLE ((unsigned int) 0x01)
|
||||
|
||||
#define RELOC_STD_BITS_LENGTH_BIG ((unsigned int) 0x60)
|
||||
#define RELOC_STD_BITS_LENGTH_SH_BIG 5
|
||||
#define RELOC_STD_BITS_LENGTH_LITTLE ((unsigned int) 0x06)
|
||||
#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
|
||||
|
||||
#define RELOC_STD_BITS_EXTERN_BIG ((unsigned int) 0x10)
|
||||
#define RELOC_STD_BITS_EXTERN_LITTLE ((unsigned int) 0x08)
|
||||
|
||||
#define RELOC_STD_BITS_BASEREL_BIG ((unsigned int) 0x08)
|
||||
#define RELOC_STD_BITS_BASEREL_LITTLE ((unsigned int) 0x10)
|
||||
|
||||
#define RELOC_STD_BITS_JMPTABLE_BIG ((unsigned int) 0x04)
|
||||
#define RELOC_STD_BITS_JMPTABLE_LITTLE ((unsigned int) 0x20)
|
||||
|
||||
#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02)
|
||||
#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40)
|
||||
|
||||
#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */
|
||||
|
||||
struct reloc_std_internal
|
||||
{
|
||||
bfd_vma r_address; /* Address (within segment) to be relocated. */
|
||||
/* The meaning of r_symbolnum depends on r_extern. */
|
||||
unsigned int r_symbolnum:24;
|
||||
/* Nonzero means value is a pc-relative offset
|
||||
and it should be relocated for changes in its own address
|
||||
as well as for changes in the symbol or section specified. */
|
||||
unsigned int r_pcrel:1;
|
||||
/* Length (as exponent of 2) of the field to be relocated.
|
||||
Thus, a value of 2 indicates 1<<2 bytes. */
|
||||
unsigned int r_length:2;
|
||||
/* 1 => relocate with value of symbol.
|
||||
r_symbolnum is the index of the symbol
|
||||
in files the symbol table.
|
||||
0 => relocate with the address of a segment.
|
||||
r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
|
||||
(the N_EXT bit may be set also, but signifies nothing). */
|
||||
unsigned int r_extern:1;
|
||||
/* The next three bits are for SunOS shared libraries, and seem to
|
||||
be undocumented. */
|
||||
unsigned int r_baserel:1; /* Linkage table relative */
|
||||
unsigned int r_jmptable:1; /* pc-relative to jump table */
|
||||
unsigned int r_relative:1; /* "relative relocation" */
|
||||
/* unused */
|
||||
unsigned int r_pad:1; /* Padding -- set to zero */
|
||||
};
|
||||
|
||||
|
||||
/* EXTENDED RELOCS */
|
||||
|
||||
struct reloc_ext_external {
|
||||
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
|
||||
bfd_byte r_index[3]; /* symbol table index of symbol */
|
||||
bfd_byte r_type[1]; /* relocation type */
|
||||
bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
|
||||
};
|
||||
|
||||
#define RELOC_EXT_BITS_EXTERN_BIG ((unsigned int) 0x80)
|
||||
#define RELOC_EXT_BITS_EXTERN_LITTLE ((unsigned int) 0x01)
|
||||
|
||||
#define RELOC_EXT_BITS_TYPE_BIG ((unsigned int) 0x1F)
|
||||
#define RELOC_EXT_BITS_TYPE_SH_BIG 0
|
||||
#define RELOC_EXT_BITS_TYPE_LITTLE ((unsigned int) 0xF8)
|
||||
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
|
||||
|
||||
/* Bytes per relocation entry */
|
||||
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
|
||||
|
||||
enum reloc_type
|
||||
{
|
||||
/* simple relocations */
|
||||
RELOC_8, /* data[0:7] = addend + sv */
|
||||
RELOC_16, /* data[0:15] = addend + sv */
|
||||
RELOC_32, /* data[0:31] = addend + sv */
|
||||
/* pc-rel displacement */
|
||||
RELOC_DISP8, /* data[0:7] = addend - pc + sv */
|
||||
RELOC_DISP16, /* data[0:15] = addend - pc + sv */
|
||||
RELOC_DISP32, /* data[0:31] = addend - pc + sv */
|
||||
/* Special */
|
||||
RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
|
||||
RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
|
||||
RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
|
||||
RELOC_22, /* data[0:21] = (addend + sv) */
|
||||
RELOC_13, /* data[0:12] = (addend + sv) */
|
||||
RELOC_LO10, /* data[0:9] = (addend + sv) */
|
||||
RELOC_SFA_BASE,
|
||||
RELOC_SFA_OFF13,
|
||||
/* P.I.C. (base-relative) */
|
||||
RELOC_BASE10, /* Not sure - maybe we can do this the */
|
||||
RELOC_BASE13, /* right way now */
|
||||
RELOC_BASE22,
|
||||
/* for some sort of pc-rel P.I.C. (?) */
|
||||
RELOC_PC10,
|
||||
RELOC_PC22,
|
||||
/* P.I.C. jump table */
|
||||
RELOC_JMP_TBL,
|
||||
/* reputedly for shared libraries somehow */
|
||||
RELOC_SEGOFF16,
|
||||
RELOC_GLOB_DAT,
|
||||
RELOC_JMP_SLOT,
|
||||
RELOC_RELATIVE,
|
||||
|
||||
RELOC_11,
|
||||
RELOC_WDISP2_14,
|
||||
RELOC_WDISP19,
|
||||
RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
|
||||
RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
|
||||
|
||||
/* 29K relocation types */
|
||||
RELOC_JUMPTARG,
|
||||
RELOC_CONST,
|
||||
RELOC_CONSTH,
|
||||
|
||||
/* All the new ones I can think of, for sparc v9 */
|
||||
|
||||
RELOC_64, /* data[0:63] = addend + sv */
|
||||
RELOC_DISP64, /* data[0:63] = addend - pc + sv */
|
||||
RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */
|
||||
RELOC_DISP21, /* data[0:20] = addend - pc + sv */
|
||||
RELOC_DISP14, /* data[0:13] = addend - pc + sv */
|
||||
/* Q .
|
||||
What are the other ones,
|
||||
Since this is a clean slate, can we throw away the ones we dont
|
||||
understand ? Should we sort the values ? What about using a
|
||||
microcode format like the 68k ?
|
||||
*/
|
||||
NO_RELOC
|
||||
};
|
||||
|
||||
|
||||
struct reloc_internal {
|
||||
bfd_vma r_address; /* offset of of data to relocate */
|
||||
long r_index; /* symbol table index of symbol */
|
||||
enum reloc_type r_type; /* relocation type */
|
||||
bfd_vma r_addend; /* datum addend */
|
||||
};
|
||||
|
||||
/* Q.
|
||||
Should the length of the string table be 4 bytes or 8 bytes ?
|
||||
|
||||
Q.
|
||||
What about archive indexes ?
|
||||
|
||||
*/
|
||||
|
||||
#endif /* __A_OUT_64_H__ */
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
/* archive file definition for GNU software */
|
||||
|
||||
/* So far this is correct for BSDish archives. Don't forget that
|
||||
files must begin on an even byte boundary. */
|
||||
|
||||
#ifndef __GNU_AR_H__
|
||||
#define __GNU_AR_H__
|
||||
|
||||
/* Note that the usual '\n' in magic strings may translate to different
|
||||
characters, as allowed by ANSI. '\012' has a fixed value, and remains
|
||||
compatible with existing BSDish archives. */
|
||||
|
||||
#define ARMAG "!<arch>\012" /* For COFF and a.out archives */
|
||||
#define ARMAGB "!<bout>\012" /* For b.out archives */
|
||||
#define SARMAG 8
|
||||
#define ARFMAG "`\012"
|
||||
|
||||
/* The ar_date field of the armap (__.SYMDEF) member of an archive
|
||||
must be greater than the modified date of the entire file, or
|
||||
BSD-derived linkers complain. We originally write the ar_date with
|
||||
this offset from the real file's mod-time. After finishing the
|
||||
file, we rewrite ar_date if it's not still greater than the mod date. */
|
||||
|
||||
#define ARMAP_TIME_OFFSET 60
|
||||
|
||||
struct ar_hdr {
|
||||
char ar_name[16]; /* name of this member */
|
||||
char ar_date[12]; /* file mtime */
|
||||
char ar_uid[6]; /* owner uid; printed as decimal */
|
||||
char ar_gid[6]; /* owner gid; printed as decimal */
|
||||
char ar_mode[8]; /* file mode, printed as octal */
|
||||
char ar_size[10]; /* file size, printed as decimal */
|
||||
char ar_fmag[2]; /* should contain ARFMAG */
|
||||
};
|
||||
|
||||
#endif /* __GNU_AR_H__ */
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* a.out specifics for Sequent Symmetry running Dynix 3.x
|
||||
*/
|
||||
#ifndef A_OUT_DYNIX3_H
|
||||
#define A_OUT_DYNIX3_H
|
||||
|
||||
#define external_exec dynix_external_exec
|
||||
|
||||
/* struct exec for Dynix 3
|
||||
*
|
||||
* a_gdtbl and a_bootstrap are only for standalone binaries.
|
||||
* Shared data fields are not supported by the kernel as of Dynix 3.1,
|
||||
* but are supported by Dynix compiler programs.
|
||||
*/
|
||||
struct dynix_external_exec {
|
||||
unsigned char e_info[4];
|
||||
unsigned char e_text[4];
|
||||
unsigned char e_data[4];
|
||||
unsigned char e_bss[4];
|
||||
unsigned char e_syms[4];
|
||||
unsigned char e_entry[4];
|
||||
unsigned char e_trsize[4];
|
||||
unsigned char e_drsize[4];
|
||||
unsigned char e_g_code[8], e_g_data[8], e_g_desc[8];
|
||||
unsigned char e_shdata[4];
|
||||
unsigned char e_shbss[4];
|
||||
unsigned char e_shdrsize[4];
|
||||
unsigned char e_bootstrap[44];
|
||||
unsigned char e_reserved[12];
|
||||
unsigned char e_version[4];
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (128)
|
||||
|
||||
/*
|
||||
* All executables under Dynix are demand paged with read-only text,
|
||||
* Thus no NMAGIC.
|
||||
*
|
||||
* ZMAGIC has a page of 0s at virtual 0,
|
||||
* XMAGIC has an invalid page at virtual 0
|
||||
*/
|
||||
#define OMAGIC 0x12eb /* .o */
|
||||
#define ZMAGIC 0x22eb /* zero @ 0, demand load */
|
||||
#define XMAGIC 0x32eb /* invalid @ 0, demand load */
|
||||
#define SMAGIC 0x42eb /* standalone, not supported here */
|
||||
|
||||
#define N_BADMAG(x) ((OMAGIC != N_MAGIC(x)) && \
|
||||
(ZMAGIC != N_MAGIC(x)) && \
|
||||
(XMAGIC != N_MAGIC(x)) && \
|
||||
(SMAGIC != N_MAGIC(x)))
|
||||
|
||||
#define N_ADDRADJ(x) ((ZMAGIC == N_MAGIC(x) || XMAGIC == N_MAGIC(x)) ? 0x1000 : 0)
|
||||
|
||||
#define N_TXTOFF(x) (EXEC_BYTES_SIZE)
|
||||
#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
|
||||
#define N_SHDATOFF(x) (N_DATOFF(x) + (x).a_data)
|
||||
#define N_TRELOFF(x) (N_SHDATOFF(x) + (x).a_shdata)
|
||||
#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
|
||||
#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x).a_drsize)
|
||||
#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x).a_shdrsize)
|
||||
#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
|
||||
: TEXT_START_ADDR + EXEC_BYTES_SIZE)
|
||||
|
||||
#define N_TXTSIZE(x) \
|
||||
(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x).a_text) \
|
||||
: ((x).a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
|
||||
|
||||
#endif /* A_OUT_DYNIX3_H */
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
/* Yet Another Try at encapsulating bsd object files in coff.
|
||||
Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
|
||||
Written by Pace Willisson 12/9/88
|
||||
|
||||
This file is obsolete. It needs to be converted to just define a bunch
|
||||
of stuff that BFD can use to do coff-encapsulated files. --gnu@cygnus.com
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/*
|
||||
* We only use the coff headers to tell the kernel
|
||||
* how to exec the file. Therefore, the only fields that need to
|
||||
* be filled in are the scnptr and vaddr for the text and data
|
||||
* sections, and the vaddr for the bss. As far as coff is concerned,
|
||||
* there is no symbol table, relocation, or line numbers.
|
||||
*
|
||||
* A normal bsd header (struct exec) is placed after the coff headers,
|
||||
* and before the real text. I defined a the new fields 'a_machtype'
|
||||
* and a_flags. If a_machtype is M_386, and a_flags & A_ENCAP is
|
||||
* true, then the bsd header is preceeded by a coff header. Macros
|
||||
* like N_TXTOFF and N_TXTADDR use this field to find the bsd header.
|
||||
*
|
||||
* The only problem is to track down the bsd exec header. The
|
||||
* macros HEADER_OFFSET, etc do this.
|
||||
*/
|
||||
|
||||
#define N_FLAGS_COFF_ENCAPSULATE 0x20 /* coff header precedes bsd header */
|
||||
|
||||
/* Describe the COFF header used for encapsulation. */
|
||||
|
||||
struct coffheader
|
||||
{
|
||||
/* filehdr */
|
||||
unsigned short f_magic;
|
||||
unsigned short f_nscns;
|
||||
long f_timdat;
|
||||
long f_symptr;
|
||||
long f_nsyms;
|
||||
unsigned short f_opthdr;
|
||||
unsigned short f_flags;
|
||||
/* aouthdr */
|
||||
short magic;
|
||||
short vstamp;
|
||||
long tsize;
|
||||
long dsize;
|
||||
long bsize;
|
||||
long entry;
|
||||
long text_start;
|
||||
long data_start;
|
||||
struct coffscn
|
||||
{
|
||||
char s_name[8];
|
||||
long s_paddr;
|
||||
long s_vaddr;
|
||||
long s_size;
|
||||
long s_scnptr;
|
||||
long s_relptr;
|
||||
long s_lnnoptr;
|
||||
unsigned short s_nreloc;
|
||||
unsigned short s_nlnno;
|
||||
long s_flags;
|
||||
} scns[3];
|
||||
};
|
||||
|
||||
/* Describe some of the parameters of the encapsulation,
|
||||
including how to find the encapsulated BSD header. */
|
||||
|
||||
/* FIXME, this is dumb. The same tools can't handle a.outs for different
|
||||
architectures, just because COFF_MAGIC is different; so you need a
|
||||
separate GNU nm for every architecture!!? Unfortunately, it needs to
|
||||
be this way, since the COFF_MAGIC value is determined by the kernel
|
||||
we're trying to fool here. */
|
||||
|
||||
#define COFF_MAGIC_I386 0514 /* I386MAGIC */
|
||||
#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */
|
||||
#define COFF_MAGIC_A29K 0x17A /* Used by asm29k cross-tools */
|
||||
|
||||
#ifdef COFF_MAGIC
|
||||
short __header_offset_temp;
|
||||
#define HEADER_OFFSET(f) \
|
||||
(__header_offset_temp = 0, \
|
||||
fread ((char *)&__header_offset_temp, sizeof (short), 1, (f)), \
|
||||
fseek ((f), -sizeof (short), 1), \
|
||||
__header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0)
|
||||
#else
|
||||
#define HEADER_OFFSET(f) 0
|
||||
#endif
|
||||
|
||||
#define HEADER_SEEK(f) (fseek ((f), HEADER_OFFSET((f)), 1))
|
||||
|
||||
/* Describe the characteristics of the BSD header
|
||||
that appears inside the encapsulation. */
|
||||
|
||||
/* Encapsulated coff files that are linked ZMAGIC have a text segment
|
||||
offset just past the header (and a matching TXTADDR), excluding
|
||||
the headers from the text segment proper but keeping the physical
|
||||
layout and the virtual memory layout page-aligned.
|
||||
|
||||
Non-encapsulated a.out files that are linked ZMAGIC have a text
|
||||
segment that starts at 0 and an N_TXTADR similarly offset to 0.
|
||||
They too are page-aligned with each other, but they include the
|
||||
a.out header as part of the text.
|
||||
|
||||
The _N_HDROFF gets sizeof struct exec added to it, so we have
|
||||
to compensate here. See <a.out.gnu.h>. */
|
||||
|
||||
#undef _N_HDROFF
|
||||
#undef N_TXTADDR
|
||||
#undef N_DATADDR
|
||||
|
||||
#define _N_HDROFF(x) ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
|
||||
sizeof (struct coffheader) : 0)
|
||||
|
||||
/* Address of text segment in memory after it is loaded. */
|
||||
#define N_TXTADDR(x) \
|
||||
((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
|
||||
sizeof (struct coffheader) + sizeof (struct exec) : 0)
|
||||
#define SEGMENT_SIZE 0x400000
|
||||
|
||||
#define N_DATADDR(x) \
|
||||
((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
|
||||
(SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))) : \
|
||||
(N_TXTADDR(x)+(x).a_text))
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/* Parameters about the a.out format, based on the host system on which
|
||||
the program is compiled. */
|
||||
|
||||
/* Address of data segment in memory after it is loaded.
|
||||
It is up to you to define SEGMENT_SIZE
|
||||
on machines not listed here. */
|
||||
#ifndef SEGMENT_SIZE
|
||||
#if defined(hp300) || defined(pyr)
|
||||
#define SEGMENT_SIZE page_size
|
||||
#endif
|
||||
#ifdef sony
|
||||
#define SEGMENT_SIZE 0x1000
|
||||
#endif /* Sony. */
|
||||
#ifdef is68k
|
||||
#define SEGMENT_SIZE 0x20000
|
||||
#endif
|
||||
#if defined(m68k) && defined(PORTAR)
|
||||
#define TARGET_PAGE_SIZE 0x400
|
||||
#define SEGMENT_SIZE TARGET_PAGE_SIZE
|
||||
#endif
|
||||
#endif /*!defined(SEGMENT_SIZE)*/
|
||||
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
/* Special version of <a.out.h> for use under hp-ux.
|
||||
Copyright 1988, 1991 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* THIS FILE IS OBSOLETE. It needs to be revised as a variant "external"
|
||||
a.out format for use with BFD. */
|
||||
|
||||
/* The `exec' structure and overall layout must be close to HP's when
|
||||
we are running on an HP system, otherwise we will not be able to
|
||||
execute the resulting file. */
|
||||
|
||||
/* Allow this file to be included twice. */
|
||||
#ifndef __GNU_EXEC_MACROS__
|
||||
|
||||
struct exec
|
||||
{
|
||||
unsigned short a_machtype; /* machine type */
|
||||
unsigned short a_magic; /* magic number */
|
||||
unsigned long a_spare1;
|
||||
unsigned long a_spare2;
|
||||
unsigned long a_text; /* length of text, in bytes */
|
||||
unsigned long a_data; /* length of data, in bytes */
|
||||
unsigned long a_bss; /* length of uninitialized data area for file, in bytes */
|
||||
unsigned long a_trsize; /* length of relocation info for text, in bytes */
|
||||
unsigned long a_drsize; /* length of relocation info for data, in bytes */
|
||||
unsigned long a_spare3; /* HP = pascal interface size */
|
||||
unsigned long a_spare4; /* HP = symbol table size */
|
||||
unsigned long a_spare5; /* HP = debug name table size */
|
||||
unsigned long a_entry; /* start address */
|
||||
unsigned long a_spare6; /* HP = source line table size */
|
||||
unsigned long a_spare7; /* HP = value table size */
|
||||
unsigned long a_syms; /* length of symbol table data in file, in bytes */
|
||||
unsigned long a_spare8;
|
||||
};
|
||||
|
||||
/* Tell a.out.gnu.h not to define `struct exec'. */
|
||||
#define __STRUCT_EXEC_OVERRIDE__
|
||||
|
||||
#include "../a.out.gnu.h"
|
||||
|
||||
#undef N_MAGIC
|
||||
#undef N_MACHTYPE
|
||||
#undef N_FLAGS
|
||||
#undef N_SET_INFO
|
||||
#undef N_SET_MAGIC
|
||||
#undef N_SET_MACHTYPE
|
||||
#undef N_SET_FLAGS
|
||||
|
||||
#define N_MAGIC(exec) ((exec) . a_magic)
|
||||
#define N_MACHTYPE(exec) ((exec) . a_machtype)
|
||||
#define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
|
||||
#define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
|
||||
|
||||
#undef N_BADMAG
|
||||
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
|
||||
|
||||
#define _N_BADMACH(x) \
|
||||
(((N_MACHTYPE (x)) != HP9000S200_ID) && \
|
||||
((N_MACHTYPE (x)) != HP98x6_ID))
|
||||
|
||||
#define HP98x6_ID 0x20A
|
||||
#define HP9000S200_ID 0x20C
|
||||
|
||||
#undef _N_HDROFF
|
||||
#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
|
||||
|
||||
#define SEGMENT_SIZE 0x1000
|
||||
|
||||
#endif /* __GNU_EXEC_MACROS__ */
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
/* Special version of <a.out.h> for use under hp-ux.
|
||||
Copyright (C) 1988,1993 Free Software Foundation, Inc. */
|
||||
|
||||
struct hp300hpux_exec_bytes
|
||||
{
|
||||
unsigned char e_info[4]; /* a_machtype/a_magic */
|
||||
unsigned char e_spare1[4];
|
||||
unsigned char e_spare2[4];
|
||||
unsigned char e_text[4]; /* length of text, in bytes */
|
||||
unsigned char e_data[4]; /* length of data, in bytes */
|
||||
unsigned char e_bss[4]; /* length of uninitialized data area , in bytes */
|
||||
unsigned char e_trsize[4]; /* length of relocation info for text, in bytes*/
|
||||
unsigned char e_drsize[4]; /* length of relocation info for data, in bytes*/
|
||||
unsigned char e_passize[4];/* HP = pascal interface size */
|
||||
unsigned char e_syms[4]; /* HP = symbol table size */
|
||||
unsigned char e_spare5[4]; /* HP = debug name table size */
|
||||
unsigned char e_entry[4]; /* start address */
|
||||
unsigned char e_spare6[4]; /* HP = source line table size */
|
||||
unsigned char e_supsize[4];/* HP = value table size */
|
||||
unsigned char e_drelocs[4];
|
||||
unsigned char e_extension[4]; /* file offset of extension */
|
||||
};
|
||||
#define EXEC_BYTES_SIZE 64
|
||||
|
||||
struct hp300hpux_nlist_bytes
|
||||
{
|
||||
unsigned char e_value[4];
|
||||
unsigned char e_type[1];
|
||||
unsigned char e_length[1]; /* length of ascii symbol name */
|
||||
unsigned char e_almod[2]; /* alignment mod */
|
||||
unsigned char e_shlib[2]; /* info about dynamic linking */
|
||||
};
|
||||
#define EXTERNAL_NLIST_SIZE 10
|
||||
|
||||
struct hp300hpux_reloc
|
||||
{
|
||||
unsigned char r_address[4];/* offset of of data to relocate */
|
||||
unsigned char r_index[2]; /* symbol table index of symbol */
|
||||
unsigned char r_type[1]; /* relocation type */
|
||||
unsigned char r_length[1]; /* length of item to reloc */
|
||||
};
|
||||
|
||||
struct hp300hpux_header_extension
|
||||
{
|
||||
unsigned char e_syms[4];
|
||||
unsigned char unique_headers[12*4];
|
||||
unsigned char e_header[2]; /* type of header */
|
||||
unsigned char e_version[2]; /* version */
|
||||
unsigned char e_size[4]; /* bytes following*/
|
||||
unsigned char e_extension[4];/* file offset of next extension */
|
||||
};
|
||||
#define EXTERNAL_EXTENSION_HEADER_SIZE (16*4)
|
||||
|
||||
/* hpux separates object files (0x106) and impure executables (0x107) */
|
||||
/* but the bfd code does not distinguish between them. Since we want to*/
|
||||
/* read hpux .o files, we add an special define and use it below in */
|
||||
/* offset and address calculations. */
|
||||
|
||||
#define HPUX_DOT_O_MAGIC 0x106
|
||||
#define OMAGIC 0x107 /* object file or impure executable. */
|
||||
#define NMAGIC 0x108 /* Code indicating pure executable. */
|
||||
#define ZMAGIC 0x10B /* demand-paged executable. */
|
||||
|
||||
#define N_HEADER_IN_TEXT(x) 0
|
||||
|
||||
#if 0 /* libaout.h only uses the lower 8 bits */
|
||||
#define HP98x6_ID 0x20A
|
||||
#define HP9000S200_ID 0x20C
|
||||
#endif
|
||||
#define HP98x6_ID 0x0A
|
||||
#define HP9000S200_ID 0x0C
|
||||
|
||||
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
|
||||
|
||||
#define N_DATADDR(x) \
|
||||
((N_MAGIC(x)==OMAGIC || N_MAGIC(x)==HPUX_DOT_O_MAGIC) ? \
|
||||
(N_TXTADDR(x)+N_TXTSIZE(x)) \
|
||||
: (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
|
||||
|
||||
#define _N_BADMACH(x) \
|
||||
(((N_MACHTYPE (x)) != HP9000S200_ID) && \
|
||||
((N_MACHTYPE (x)) != HP98x6_ID))
|
||||
|
||||
#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
|
||||
&& N_MAGIC(x) != OMAGIC \
|
||||
&& N_MAGIC(x) != NMAGIC \
|
||||
&& N_MAGIC(x) != ZMAGIC )
|
||||
|
||||
#undef _N_HDROFF
|
||||
#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
|
||||
|
||||
#undef N_DATOFF
|
||||
#undef N_PASOFF
|
||||
#undef N_SYMOFF
|
||||
#undef N_SUPOFF
|
||||
#undef N_TRELOFF
|
||||
#undef N_DRELOFF
|
||||
#undef N_STROFF
|
||||
|
||||
#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
|
||||
#define N_PASOFF(x) ( N_DATOFF(x) + (x).a_data)
|
||||
#define N_SYMOFF(x) ( N_PASOFF(x) /* + (x).a_passize*/ )
|
||||
#define N_SUPOFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
#define N_TRELOFF(x) ( N_SUPOFF(x) /* + 0 (x).a_supsize*/ )
|
||||
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
|
||||
#define N_EXTHOFF(x) ( N_DRELOFF(x) /* + 0 (x).a_drsize */)
|
||||
#define N_STROFF(x) ( 0 /* no string table */ )
|
||||
|
||||
/* use these when the file has gnu symbol tables */
|
||||
#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
|
||||
#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
|
||||
#define N_GNU_SYMOFF(x) (N_GNU_DRELOFF(x) + (x).a_drsize)
|
||||
|
||||
#define TARGET_PAGE_SIZE 0x1000
|
||||
#define SEGMENT_SIZE 0x1000
|
||||
#define TEXT_START_ADDR 0
|
||||
|
||||
#undef N_SHARED_LIB
|
||||
#define N_SHARED_LIB(x) ( 0 /* no shared libraries */ )
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#include "filehdr.h"
|
||||
#include "aouthdr.h"
|
||||
#include "scnhdr.h"
|
||||
#include "spacehdr.h"
|
||||
#include "syms.h"
|
||||
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* ranlib.h -- archive library index member definition for GNU.
|
||||
Copyright 1990-1991 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* The Symdef member of an archive contains two things:
|
||||
a table that maps symbol-string offsets to file offsets,
|
||||
and a symbol-string table. All the symbol names are
|
||||
run together (each with trailing null) in the symbol-string
|
||||
table. There is a single longword bytecount on the front
|
||||
of each of these tables. Thus if we have two symbols,
|
||||
"foo" and "_bar", that are in archive members at offsets
|
||||
200 and 900, it would look like this:
|
||||
16 ; byte count of index table
|
||||
0 ; offset of "foo" in string table
|
||||
200 ; offset of foo-module in file
|
||||
4 ; offset of "bar" in string table
|
||||
900 ; offset of bar-module in file
|
||||
9 ; byte count of string table
|
||||
"foo\0_bar\0" ; string table */
|
||||
|
||||
#define RANLIBMAG "__.SYMDEF" /* Archive file name containing index */
|
||||
#define RANLIBSKEW 3 /* Creation time offset */
|
||||
|
||||
/* Format of __.SYMDEF:
|
||||
First, a longword containing the size of the 'symdef' data that follows.
|
||||
Second, zero or more 'symdef' structures.
|
||||
Third, a longword containing the length of symbol name strings.
|
||||
Fourth, zero or more symbol name strings (each followed by a null). */
|
||||
|
||||
struct symdef
|
||||
{
|
||||
union
|
||||
{
|
||||
unsigned long string_offset; /* In the file */
|
||||
char *name; /* In memory, sometimes */
|
||||
} s;
|
||||
/* this points to the front of the file header (AKA member header --
|
||||
a struct ar_hdr), not to the front of the file or into the file).
|
||||
in other words it only tells you which file to read */
|
||||
unsigned long file_offset;
|
||||
};
|
||||
|
||||
/* Compatability with BSD code */
|
||||
|
||||
#define ranlib symdef
|
||||
#define ran_un s
|
||||
#define ran_strx string_offset
|
||||
#define ran_name name
|
||||
#define ran_off file_offset
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/* reloc.h -- Header file for relocation information.
|
||||
Copyright 1989-1991 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Relocation types for a.out files using reloc_info_extended
|
||||
(SPARC and AMD 29000). */
|
||||
|
||||
#ifndef _RELOC_H_READ_
|
||||
#define _RELOC_H_READ_ 1
|
||||
|
||||
enum reloc_type
|
||||
{
|
||||
RELOC_8, RELOC_16, RELOC_32, /* simple relocations */
|
||||
RELOC_DISP8, RELOC_DISP16, RELOC_DISP32, /* pc-rel displacement */
|
||||
RELOC_WDISP30, RELOC_WDISP22,
|
||||
RELOC_HI22, RELOC_22,
|
||||
RELOC_13, RELOC_LO10,
|
||||
RELOC_SFA_BASE, RELOC_SFA_OFF13,
|
||||
RELOC_BASE10, RELOC_BASE13, RELOC_BASE22, /* P.I.C. (base-relative) */
|
||||
RELOC_PC10, RELOC_PC22, /* for some sort of pc-rel P.I.C. (?) */
|
||||
RELOC_JMP_TBL, /* P.I.C. jump table */
|
||||
RELOC_SEGOFF16, /* reputedly for shared libraries somehow */
|
||||
RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE,
|
||||
RELOC_11,
|
||||
RELOC_WDISP2_14,
|
||||
RELOC_WDISP19,
|
||||
RELOC_HHI22,
|
||||
RELOC_HLO10,
|
||||
|
||||
/* 29K relocation types */
|
||||
RELOC_JUMPTARG, RELOC_CONST, RELOC_CONSTH,
|
||||
|
||||
RELOC_WDISP14, RELOC_WDISP21,
|
||||
|
||||
NO_RELOC
|
||||
};
|
||||
|
||||
#define RELOC_TYPE_NAMES \
|
||||
"8", "16", "32", "DISP8", \
|
||||
"DISP16", "DISP32", "WDISP30", "WDISP22", \
|
||||
"HI22", "22", "13", "LO10", \
|
||||
"SFA_BASE", "SFAOFF13", "BASE10", "BASE13", \
|
||||
"BASE22", "PC10", "PC22", "JMP_TBL", \
|
||||
"SEGOFF16", "GLOB_DAT", "JMP_SLOT", "RELATIVE", \
|
||||
"11", "WDISP2_14", "WDISP19", "HHI22", \
|
||||
"HLO10", \
|
||||
"JUMPTARG", "CONST", "CONSTH", "WDISP14", \
|
||||
"WDISP21", \
|
||||
"NO_RELOC"
|
||||
|
||||
#endif /* _RELOC_H_READ_ */
|
||||
|
||||
/* end of reloc.h */
|
||||
|
|
@ -1,268 +0,0 @@
|
|||
/* Table of DBX symbol codes for the GNU system.
|
||||
Copyright (C) 1988, 91, 92, 93, 94, 95, 96, 1998
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files
|
||||
overlaps the N_UNDF used for ordinary symbols. In ELF files, the
|
||||
debug information is in a different file section, so there is no conflict.
|
||||
This symbol's n_value gives the size of the string section associated
|
||||
with this file. The symbol's n_strx (relative to the just-updated
|
||||
string section start address) gives the name of the source file,
|
||||
e.g. "foo.c", without any path information. The symbol's n_desc gives
|
||||
the count of upcoming symbols associated with this file (not including
|
||||
this one). */
|
||||
/* __define_stab (N_UNDF, 0x00, "UNDF") */
|
||||
|
||||
/* Global variable. Only the name is significant.
|
||||
To find the address, look in the corresponding external symbol. */
|
||||
__define_stab (N_GSYM, 0x20, "GSYM")
|
||||
|
||||
/* Function name for BSD Fortran. Only the name is significant.
|
||||
To find the address, look in the corresponding external symbol. */
|
||||
__define_stab (N_FNAME, 0x22, "FNAME")
|
||||
|
||||
/* Function name or text-segment variable for C. Value is its address.
|
||||
Desc is supposedly starting line number, but GCC doesn't set it
|
||||
and DBX seems not to miss it. */
|
||||
__define_stab (N_FUN, 0x24, "FUN")
|
||||
|
||||
/* Data-segment variable with internal linkage. Value is its address.
|
||||
"Static Sym". */
|
||||
__define_stab (N_STSYM, 0x26, "STSYM")
|
||||
|
||||
/* BSS-segment variable with internal linkage. Value is its address. */
|
||||
__define_stab (N_LCSYM, 0x28, "LCSYM")
|
||||
|
||||
/* Name of main routine. Only the name is significant. */
|
||||
__define_stab (N_MAIN, 0x2a, "MAIN")
|
||||
|
||||
/* Solaris2: Read-only data symbols. */
|
||||
__define_stab (N_ROSYM, 0x2c, "ROSYM")
|
||||
|
||||
/* Global symbol in Pascal.
|
||||
Supposedly the value is its line number; I'm skeptical. */
|
||||
__define_stab (N_PC, 0x30, "PC")
|
||||
|
||||
/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
|
||||
__define_stab (N_NSYMS, 0x32, "NSYMS")
|
||||
|
||||
/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
|
||||
__define_stab (N_NOMAP, 0x34, "NOMAP")
|
||||
|
||||
/* New stab from Solaris 2. Like N_SO, but for the object file. Two in
|
||||
a row provide the build directory and the relative path of the .o from it.
|
||||
Solaris2 uses this to avoid putting the stabs info into the linked
|
||||
executable; this stab goes into the ".stab.index" section, and the debugger
|
||||
reads the real stabs directly from the .o files instead. */
|
||||
__define_stab (N_OBJ, 0x38, "OBJ")
|
||||
|
||||
/* New stab from Solaris 2. Options for the debugger, related to the
|
||||
source language for this module. E.g. whether to use ANSI
|
||||
integral promotions or traditional integral promotions. */
|
||||
__define_stab (N_OPT, 0x3c, "OPT")
|
||||
|
||||
/* Register variable. Value is number of register. */
|
||||
__define_stab (N_RSYM, 0x40, "RSYM")
|
||||
|
||||
/* Modula-2 compilation unit. Can someone say what info it contains? */
|
||||
__define_stab (N_M2C, 0x42, "M2C")
|
||||
|
||||
/* Line number in text segment. Desc is the line number;
|
||||
value is corresponding address. On Solaris2, the line number is
|
||||
relative to the start of the current function. */
|
||||
__define_stab (N_SLINE, 0x44, "SLINE")
|
||||
|
||||
/* Similar, for data segment. */
|
||||
__define_stab (N_DSLINE, 0x46, "DSLINE")
|
||||
|
||||
/* Similar, for bss segment. */
|
||||
__define_stab (N_BSLINE, 0x48, "BSLINE")
|
||||
|
||||
/* Sun's source-code browser stabs. ?? Don't know what the fields are.
|
||||
Supposedly the field is "path to associated .cb file". THIS VALUE
|
||||
OVERLAPS WITH N_BSLINE! */
|
||||
__define_stab_duplicate (N_BROWS, 0x48, "BROWS")
|
||||
|
||||
/* GNU Modula-2 definition module dependency. Value is the modification time
|
||||
of the definition file. Other is non-zero if it is imported with the
|
||||
GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
|
||||
are enough empty fields? */
|
||||
__define_stab(N_DEFD, 0x4a, "DEFD")
|
||||
|
||||
/* New in Solaris2. Function start/body/end line numbers. */
|
||||
__define_stab(N_FLINE, 0x4C, "FLINE")
|
||||
|
||||
/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
|
||||
and one is for C++. Still,... */
|
||||
/* GNU C++ exception variable. Name is variable name. */
|
||||
__define_stab (N_EHDECL, 0x50, "EHDECL")
|
||||
/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
|
||||
__define_stab_duplicate (N_MOD2, 0x50, "MOD2")
|
||||
|
||||
/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
|
||||
this entry is immediately followed by a CAUGHT stab saying what exception
|
||||
was caught. Multiple CAUGHT stabs means that multiple exceptions
|
||||
can be caught here. If Desc is 0, it means all exceptions are caught
|
||||
here. */
|
||||
__define_stab (N_CATCH, 0x54, "CATCH")
|
||||
|
||||
/* Structure or union element. Value is offset in the structure. */
|
||||
__define_stab (N_SSYM, 0x60, "SSYM")
|
||||
|
||||
/* Solaris2: Last stab emitted for module. */
|
||||
__define_stab (N_ENDM, 0x62, "ENDM")
|
||||
|
||||
/* Name of main source file.
|
||||
Value is starting text address of the compilation.
|
||||
If multiple N_SO's appear, the first to contain a trailing / is the
|
||||
compilation directory. The first to not contain a trailing / is the
|
||||
source file name, relative to the compilation directory. Others (perhaps
|
||||
resulting from cfront) are ignored.
|
||||
On Solaris2, value is undefined, but desc is a source-language code. */
|
||||
|
||||
__define_stab (N_SO, 0x64, "SO")
|
||||
|
||||
/* SunPro F77: Name of alias. */
|
||||
__define_stab (N_ALIAS, 0x6c, "ALIAS")
|
||||
|
||||
/* Automatic variable in the stack. Value is offset from frame pointer.
|
||||
Also used for type descriptions. */
|
||||
__define_stab (N_LSYM, 0x80, "LSYM")
|
||||
|
||||
/* Beginning of an include file. Only Sun uses this.
|
||||
In an object file, only the name is significant.
|
||||
The Sun linker puts data into some of the other fields. */
|
||||
__define_stab (N_BINCL, 0x82, "BINCL")
|
||||
|
||||
/* Name of sub-source file (#include file).
|
||||
Value is starting text address of the compilation. */
|
||||
__define_stab (N_SOL, 0x84, "SOL")
|
||||
|
||||
/* Parameter variable. Value is offset from argument pointer.
|
||||
(On most machines the argument pointer is the same as the frame pointer. */
|
||||
__define_stab (N_PSYM, 0xa0, "PSYM")
|
||||
|
||||
/* End of an include file. No name.
|
||||
This and N_BINCL act as brackets around the file's output.
|
||||
In an object file, there is no significant data in this entry.
|
||||
The Sun linker puts data into some of the fields. */
|
||||
__define_stab (N_EINCL, 0xa2, "EINCL")
|
||||
|
||||
/* Alternate entry point. Value is its address. */
|
||||
__define_stab (N_ENTRY, 0xa4, "ENTRY")
|
||||
|
||||
/* Beginning of lexical block.
|
||||
The desc is the nesting level in lexical blocks.
|
||||
The value is the address of the start of the text for the block.
|
||||
The variables declared inside the block *precede* the N_LBRAC symbol.
|
||||
On Solaris2, the value is relative to the start of the current function. */
|
||||
__define_stab (N_LBRAC, 0xc0, "LBRAC")
|
||||
|
||||
/* Place holder for deleted include file. Replaces a N_BINCL and everything
|
||||
up to the corresponding N_EINCL. The Sun linker generates these when
|
||||
it finds multiple identical copies of the symbols from an include file.
|
||||
This appears only in output from the Sun linker. */
|
||||
__define_stab (N_EXCL, 0xc2, "EXCL")
|
||||
|
||||
/* Modula-2 scope information. Can someone say what info it contains? */
|
||||
__define_stab (N_SCOPE, 0xc4, "SCOPE")
|
||||
|
||||
/* End of a lexical block. Desc matches the N_LBRAC's desc.
|
||||
The value is the address of the end of the text for the block.
|
||||
On Solaris2, the value is relative to the start of the current function. */
|
||||
__define_stab (N_RBRAC, 0xe0, "RBRAC")
|
||||
|
||||
/* Begin named common block. Only the name is significant. */
|
||||
__define_stab (N_BCOMM, 0xe2, "BCOMM")
|
||||
|
||||
/* End named common block. Only the name is significant
|
||||
(and it should match the N_BCOMM). */
|
||||
__define_stab (N_ECOMM, 0xe4, "ECOMM")
|
||||
|
||||
/* Member of a common block; value is offset within the common block.
|
||||
This should occur within a BCOMM/ECOMM pair. */
|
||||
__define_stab (N_ECOML, 0xe8, "ECOML")
|
||||
|
||||
/* Solaris2: Pascal "with" statement: type,,0,0,offset */
|
||||
__define_stab (N_WITH, 0xea, "WITH")
|
||||
|
||||
/* These STAB's are used on Gould systems for Non-Base register symbols
|
||||
or something like that. FIXME. I have assigned the values at random
|
||||
since I don't have a Gould here. Fixups from Gould folk welcome... */
|
||||
__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
|
||||
__define_stab (N_NBDATA, 0xF2, "NBDATA")
|
||||
__define_stab (N_NBBSS, 0xF4, "NBBSS")
|
||||
__define_stab (N_NBSTS, 0xF6, "NBSTS")
|
||||
__define_stab (N_NBLCS, 0xF8, "NBLCS")
|
||||
|
||||
/* Second symbol entry containing a length-value for the preceding entry.
|
||||
The value is the length. */
|
||||
__define_stab (N_LENG, 0xfe, "LENG")
|
||||
|
||||
/* The above information, in matrix format.
|
||||
|
||||
STAB MATRIX
|
||||
_________________________________________________
|
||||
| 00 - 1F are not dbx stab symbols |
|
||||
| In most cases, the low bit is the EXTernal bit|
|
||||
|
||||
| 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
|
||||
| 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
|
||||
|
||||
| 08 BSS | 0A INDR | 0C FN_SEQ | 0E WEAKA |
|
||||
| 09 |EXT | 0B | 0D WEAKU | 0F WEAKT |
|
||||
|
||||
| 10 WEAKD | 12 COMM | 14 SETA | 16 SETT |
|
||||
| 11 WEAKB | 13 | 15 | 17 |
|
||||
|
||||
| 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
|
||||
| 19 | 1B | 1D | 1F FN |
|
||||
|
||||
|_______________________________________________|
|
||||
| Debug entries with bit 01 set are unused. |
|
||||
| 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
|
||||
| 28 LCSYM | 2A MAIN | 2C ROSYM | 2E |
|
||||
| 30 PC | 32 NSYMS | 34 NOMAP | 36 |
|
||||
| 38 OBJ | 3A | 3C OPT | 3E |
|
||||
| 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
|
||||
| 48 BSLINE*| 4A DEFD | 4C FLINE | 4E |
|
||||
| 50 EHDECL*| 52 | 54 CATCH | 56 |
|
||||
| 58 | 5A | 5C | 5E |
|
||||
| 60 SSYM | 62 ENDM | 64 SO | 66 |
|
||||
| 68 | 6A | 6C ALIAS | 6E |
|
||||
| 70 | 72 | 74 | 76 |
|
||||
| 78 | 7A | 7C | 7E |
|
||||
| 80 LSYM | 82 BINCL | 84 SOL | 86 |
|
||||
| 88 | 8A | 8C | 8E |
|
||||
| 90 | 92 | 94 | 96 |
|
||||
| 98 | 9A | 9C | 9E |
|
||||
| A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
|
||||
| A8 | AA | AC | AE |
|
||||
| B0 | B2 | B4 | B6 |
|
||||
| B8 | BA | BC | BE |
|
||||
| C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
|
||||
| C8 | CA | CC | CE |
|
||||
| D0 | D2 | D4 | D6 |
|
||||
| D8 | DA | DC | DE |
|
||||
| E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
|
||||
| E8 ECOML | EA WITH | EC | EE |
|
||||
| F0 | F2 | F4 | F6 |
|
||||
| F8 | FA | FC | FE LENG |
|
||||
+-----------------------------------------------+
|
||||
* 50 EHDECL is also MOD2.
|
||||
* 48 BSLINE is also BROWS.
|
||||
*/
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#ifndef __GNU_STAB__
|
||||
|
||||
/* Indicate the GNU stab.h is in use. */
|
||||
|
||||
#define __GNU_STAB__
|
||||
|
||||
#define __define_stab(NAME, CODE, STRING) NAME=CODE,
|
||||
#define __define_stab_duplicate(NAME, CODE, STRING) NAME=CODE,
|
||||
|
||||
enum __stab_debug_code
|
||||
{
|
||||
#include "aout/stab.def"
|
||||
LAST_UNUSED_STAB_CODE
|
||||
};
|
||||
|
||||
#undef __define_stab
|
||||
|
||||
/* Definitions of "desc" field for N_SO stabs in Solaris2. */
|
||||
|
||||
#define N_SO_AS 1
|
||||
#define N_SO_C 2
|
||||
#define N_SO_ANSI_C 3
|
||||
#define N_SO_CC 4 /* C++ */
|
||||
#define N_SO_FORTRAN 5
|
||||
#define N_SO_PASCAL 6
|
||||
|
||||
/* Solaris2: Floating point type values in basic types. */
|
||||
|
||||
#define NF_NONE 0
|
||||
#define NF_SINGLE 1 /* IEEE 32-bit */
|
||||
#define NF_DOUBLE 2 /* IEEE 64-bit */
|
||||
#define NF_COMPLEX 3 /* Fortran complex */
|
||||
#define NF_COMPLEX16 4 /* Fortran double complex */
|
||||
#define NF_COMPLEX32 5 /* Fortran complex*16 */
|
||||
#define NF_LDOUBLE 6 /* Long double (whatever that is) */
|
||||
|
||||
#endif /* __GNU_STAB_ */
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
/* SPARC-specific values for a.out files */
|
||||
|
||||
/* Some systems, e.g., AIX, may have defined this in header files already
|
||||
included. */
|
||||
#undef TARGET_PAGE_SIZE
|
||||
#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */
|
||||
/* Note that some SPARCs have 4K pages, some 8K, some others. */
|
||||
|
||||
#define SEG_SIZE_SPARC TARGET_PAGE_SIZE
|
||||
#define SEG_SIZE_SUN3 0x20000 /* Resolution of r/w protection hw */
|
||||
|
||||
#define TEXT_START_ADDR TARGET_PAGE_SIZE /* Location 0 is not accessible */
|
||||
#define N_HEADER_IN_TEXT(x) 1
|
||||
|
||||
/* Non-default definitions of the accessor macros... */
|
||||
|
||||
/* Segment size varies on Sun-3 versus Sun-4. */
|
||||
|
||||
#define N_SEGSIZE(x) (N_MACHTYPE(x) == M_SPARC? SEG_SIZE_SPARC: \
|
||||
N_MACHTYPE(x) == M_68020? SEG_SIZE_SUN3: \
|
||||
/* Guess? */ TARGET_PAGE_SIZE)
|
||||
|
||||
/* Virtual Address of text segment from the a.out file. For OMAGIC,
|
||||
(almost always "unlinked .o's" these days), should be zero.
|
||||
Sun added a kludge so that shared libraries linked ZMAGIC get
|
||||
an address of zero if a_entry (!!!) is lower than the otherwise
|
||||
expected text address. These kludges have gotta go!
|
||||
For linked files, should reflect reality if we know it. */
|
||||
|
||||
/* This differs from the version in aout64.h (which we override by defining
|
||||
it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
|
||||
they return 0). */
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
(N_MAGIC(x)==OMAGIC? 0 \
|
||||
: (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
|
||||
: TEXT_START_ADDR+EXEC_BYTES_SIZE)
|
||||
|
||||
/* When a file is linked against a shared library on SunOS 4, the
|
||||
dynamic bit in the exec header is set, and the first symbol in the
|
||||
symbol table is __DYNAMIC. Its value is the address of the
|
||||
following structure. */
|
||||
|
||||
struct external_sun4_dynamic
|
||||
{
|
||||
/* The version number of the structure. SunOS 4.1.x creates files
|
||||
with version number 3, which is what this structure is based on.
|
||||
According to gdb, version 2 is similar. I believe that version 2
|
||||
used a different type of procedure linkage table, and there may
|
||||
have been other differences. */
|
||||
bfd_byte ld_version[4];
|
||||
/* The virtual address of a 28 byte structure used in debugging.
|
||||
The contents are filled in at run time by ld.so. */
|
||||
bfd_byte ldd[4];
|
||||
/* The virtual address of another structure with information about
|
||||
how to relocate the executable at run time. */
|
||||
bfd_byte ld[4];
|
||||
};
|
||||
|
||||
/* The size of the debugging structure pointed to by the debugger
|
||||
field of __DYNAMIC. */
|
||||
#define EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE (24)
|
||||
|
||||
/* The structure pointed to by the linker field of __DYNAMIC. As far
|
||||
as I can tell, most of the addresses in this structure are offsets
|
||||
within the file, but some are actually virtual addresses. */
|
||||
|
||||
struct internal_sun4_dynamic_link
|
||||
{
|
||||
/* Linked list of loaded objects. This is filled in at runtime by
|
||||
ld.so and probably by dlopen. */
|
||||
unsigned long ld_loaded;
|
||||
|
||||
/* The address of the list of names of shared objects which must be
|
||||
included at runtime. Each entry in the list is 16 bytes: the 4
|
||||
byte address of the string naming the object (e.g., for -lc this
|
||||
is "c"); 4 bytes of flags--the high bit is whether to search for
|
||||
the object using the library path; the 2 byte major version
|
||||
number; the 2 byte minor version number; the 4 byte address of
|
||||
the next entry in the list (zero if this is the last entry). The
|
||||
version numbers seem to only be non-zero when doing library
|
||||
searching. */
|
||||
unsigned long ld_need;
|
||||
|
||||
/* The address of the path to search for the shared objects which
|
||||
must be included. This points to a string in PATH format which
|
||||
is generated from the -L arguments to the linker. According to
|
||||
the man page, ld.so implicitly adds ${LD_LIBRARY_PATH} to the
|
||||
beginning of this string and /lib:/usr/lib:/usr/local/lib to the
|
||||
end. The string is terminated by a null byte. This field is
|
||||
zero if there is no additional path. */
|
||||
unsigned long ld_rules;
|
||||
|
||||
/* The address of the global offset table. This appears to be a
|
||||
virtual address, not a file offset. The first entry in the
|
||||
global offset table seems to be the virtual address of the
|
||||
sun4_dynamic structure (the same value as the __DYNAMIC symbol).
|
||||
The global offset table is used for PIC code to hold the
|
||||
addresses of variables. A dynamically linked file which does not
|
||||
itself contain PIC code has a four byte global offset table. */
|
||||
unsigned long ld_got;
|
||||
|
||||
/* The address of the procedure linkage table. This appears to be a
|
||||
virtual address, not a file offset.
|
||||
|
||||
On a SPARC, the table is composed of 12 byte entries, each of
|
||||
which consists of three instructions. The first entry is
|
||||
sethi %hi(0),%g1
|
||||
jmp %g1
|
||||
nop
|
||||
These instructions are changed by ld.so into a jump directly into
|
||||
ld.so itself. Each subsequent entry is
|
||||
save %sp, -96, %sp
|
||||
call <address of first entry in procedure linkage table>
|
||||
<reloc_number | 0x01000000>
|
||||
The reloc_number is the number of the reloc to use to resolve
|
||||
this entry. The reloc will be a JMP_SLOT reloc against some
|
||||
symbol that is not defined in this object file but should be
|
||||
defined in a shared object (if it is not, ld.so will report a
|
||||
runtime error and exit). The constant 0x010000000 turns the
|
||||
reloc number into a sethi of %g0, which does nothing since %g0 is
|
||||
hardwired to zero.
|
||||
|
||||
When one of these entries is executed, it winds up calling into
|
||||
ld.so. ld.so looks at the reloc number, available via the return
|
||||
address, to determine which entry this is. It then looks at the
|
||||
reloc and patches up the entry in the table into a sethi and jmp
|
||||
to the real address followed by a nop. This means that the reloc
|
||||
lookup only has to happen once, and it also means that the
|
||||
relocation only needs to be done if the function is actually
|
||||
called. The relocation is expensive because ld.so must look up
|
||||
the symbol by name.
|
||||
|
||||
The size of the procedure linkage table is given by the ld_plt_sz
|
||||
field. */
|
||||
unsigned long ld_plt;
|
||||
|
||||
/* The address of the relocs. These are in the same format as
|
||||
ordinary relocs. Symbol index numbers refer to the symbols
|
||||
pointed to by ld_stab. I think the only way to determine the
|
||||
number of relocs is to assume that all the bytes from ld_rel to
|
||||
ld_hash contain reloc entries. */
|
||||
unsigned long ld_rel;
|
||||
|
||||
/* The address of a hash table of symbols. The hash table has
|
||||
roughly the same number of entries as there are dynamic symbols;
|
||||
I think the only way to get the exact size is to assume that
|
||||
every byte from ld_hash to ld_stab is devoted to the hash table.
|
||||
|
||||
Each entry in the hash table is eight bytes. The first four
|
||||
bytes are a symbol index into the dynamic symbols. The second
|
||||
four bytes are the index of the next hash table entry in the
|
||||
bucket. The ld_buckets field gives the number of buckets, say B.
|
||||
The first B entries in the hash table each start a bucket which
|
||||
is chained through the second four bytes of each entry. A value
|
||||
of zero ends the chain.
|
||||
|
||||
The hash function is simply
|
||||
h = 0;
|
||||
while (*string != '\0')
|
||||
h = (h << 1) + *string++;
|
||||
h &= 0x7fffffff;
|
||||
|
||||
To look up a symbol, compute the hash value of the name. Take
|
||||
the modulos of hash value and the number of buckets. Start at
|
||||
that entry in the hash table. See if the symbol (from the first
|
||||
four bytes of the hash table entry) has the name you are looking
|
||||
for. If not, use the chain field (the second four bytes of the
|
||||
hash table entry) to move on to the next entry in this bucket.
|
||||
If the chain field is zero you have reached the end of the
|
||||
bucket, and the symbol is not in the hash table. */
|
||||
unsigned long ld_hash;
|
||||
|
||||
/* The address of the symbol table. This is a list of
|
||||
external_nlist structures. The string indices are relative to
|
||||
the ld_symbols field. I think the only way to determine the
|
||||
number of symbols is to assume that all the bytes between ld_stab
|
||||
and ld_symbols are external_nlist structures. */
|
||||
unsigned long ld_stab;
|
||||
|
||||
/* I don't know what this is for. It seems to always be zero. */
|
||||
unsigned long ld_stab_hash;
|
||||
|
||||
/* The number of buckets in the hash table. */
|
||||
unsigned long ld_buckets;
|
||||
|
||||
/* The address of the symbol string table. The first string in this
|
||||
string table need not be the empty string. */
|
||||
unsigned long ld_symbols;
|
||||
|
||||
/* The size in bytes of the symbol string table. */
|
||||
unsigned long ld_symb_size;
|
||||
|
||||
/* The size in bytes of the text segment. */
|
||||
unsigned long ld_text;
|
||||
|
||||
/* The size in bytes of the procedure linkage table. */
|
||||
unsigned long ld_plt_sz;
|
||||
};
|
||||
|
||||
/* The external form of the structure. */
|
||||
|
||||
struct external_sun4_dynamic_link
|
||||
{
|
||||
bfd_byte ld_loaded[4];
|
||||
bfd_byte ld_need[4];
|
||||
bfd_byte ld_rules[4];
|
||||
bfd_byte ld_got[4];
|
||||
bfd_byte ld_plt[4];
|
||||
bfd_byte ld_rel[4];
|
||||
bfd_byte ld_hash[4];
|
||||
bfd_byte ld_stab[4];
|
||||
bfd_byte ld_stab_hash[4];
|
||||
bfd_byte ld_buckets[4];
|
||||
bfd_byte ld_symbols[4];
|
||||
bfd_byte ld_symb_size[4];
|
||||
bfd_byte ld_text[4];
|
||||
bfd_byte ld_plt_sz[4];
|
||||
};
|
||||
|
|
@ -1,515 +0,0 @@
|
|||
/* bfdlink.h -- header file for BFD link routines
|
||||
Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef BFDLINK_H
|
||||
#define BFDLINK_H
|
||||
|
||||
/* Which symbols to strip during a link. */
|
||||
enum bfd_link_strip
|
||||
{
|
||||
strip_none, /* Don't strip any symbols. */
|
||||
strip_debugger, /* Strip debugging symbols. */
|
||||
strip_some, /* keep_hash is the list of symbols to keep. */
|
||||
strip_all /* Strip all symbols. */
|
||||
};
|
||||
|
||||
/* Which local symbols to discard during a link. This is irrelevant
|
||||
if strip_all is used. */
|
||||
enum bfd_link_discard
|
||||
{
|
||||
discard_none, /* Don't discard any locals. */
|
||||
discard_l, /* Discard local temporary symbols. */
|
||||
discard_all /* Discard all locals. */
|
||||
};
|
||||
|
||||
/* These are the possible types of an entry in the BFD link hash
|
||||
table. */
|
||||
|
||||
enum bfd_link_hash_type
|
||||
{
|
||||
bfd_link_hash_new, /* Symbol is new. */
|
||||
bfd_link_hash_undefined, /* Symbol seen before, but undefined. */
|
||||
bfd_link_hash_undefweak, /* Symbol is weak and undefined. */
|
||||
bfd_link_hash_defined, /* Symbol is defined. */
|
||||
bfd_link_hash_defweak, /* Symbol is weak and defined. */
|
||||
bfd_link_hash_common, /* Symbol is common. */
|
||||
bfd_link_hash_indirect, /* Symbol is an indirect link. */
|
||||
bfd_link_hash_warning /* Like indirect, but warn if referenced. */
|
||||
};
|
||||
|
||||
/* The linking routines use a hash table which uses this structure for
|
||||
its elements. */
|
||||
|
||||
struct bfd_link_hash_entry
|
||||
{
|
||||
/* Base hash table entry structure. */
|
||||
struct bfd_hash_entry root;
|
||||
/* Type of this entry. */
|
||||
enum bfd_link_hash_type type;
|
||||
|
||||
/* Undefined and common symbols are kept in a linked list through
|
||||
this field. This field is not in the union because that would
|
||||
force us to remove entries from the list when we changed their
|
||||
type, which would force the list to be doubly linked, which would
|
||||
waste more memory. When an undefined or common symbol is
|
||||
created, it should be added to this list, the head of which is in
|
||||
the link hash table itself. As symbols are defined, they need
|
||||
not be removed from the list; anything which reads the list must
|
||||
doublecheck the symbol type.
|
||||
|
||||
Weak symbols are not kept on this list.
|
||||
|
||||
Defined and defweak symbols use this field as a reference marker.
|
||||
If the field is not NULL, or this structure is the tail of the
|
||||
undefined symbol list, the symbol has been referenced. If the
|
||||
symbol is undefined and becomes defined, this field will
|
||||
automatically be non-NULL since the symbol will have been on the
|
||||
undefined symbol list. */
|
||||
struct bfd_link_hash_entry *next;
|
||||
/* A union of information depending upon the type. */
|
||||
union
|
||||
{
|
||||
/* Nothing is kept for bfd_hash_new. */
|
||||
/* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
|
||||
struct
|
||||
{
|
||||
bfd *abfd; /* BFD symbol was found in. */
|
||||
} undef;
|
||||
/* bfd_link_hash_defined, bfd_link_hash_defweak. */
|
||||
struct
|
||||
{
|
||||
bfd_vma value; /* Symbol value. */
|
||||
asection *section; /* Symbol section. */
|
||||
} def;
|
||||
/* bfd_link_hash_indirect, bfd_link_hash_warning. */
|
||||
struct
|
||||
{
|
||||
struct bfd_link_hash_entry *link; /* Real symbol. */
|
||||
const char *warning; /* Warning (bfd_link_hash_warning only). */
|
||||
} i;
|
||||
/* bfd_link_hash_common. */
|
||||
struct
|
||||
{
|
||||
/* The linker needs to know three things about common
|
||||
symbols: the size, the alignment, and the section in
|
||||
which the symbol should be placed. We store the size
|
||||
here, and we allocate a small structure to hold the
|
||||
section and the alignment. The alignment is stored as a
|
||||
power of two. We don't store all the information
|
||||
directly because we don't want to increase the size of
|
||||
the union; this structure is a major space user in the
|
||||
linker. */
|
||||
bfd_size_type size; /* Common symbol size. */
|
||||
struct bfd_link_hash_common_entry
|
||||
{
|
||||
unsigned int alignment_power; /* Alignment. */
|
||||
asection *section; /* Symbol section. */
|
||||
} *p;
|
||||
} c;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* This is the link hash table. It is a derived class of
|
||||
bfd_hash_table. */
|
||||
|
||||
struct bfd_link_hash_table
|
||||
{
|
||||
/* The hash table itself. */
|
||||
struct bfd_hash_table table;
|
||||
/* The back end which created this hash table. This indicates the
|
||||
type of the entries in the hash table, which is sometimes
|
||||
important information when linking object files of different
|
||||
types together. */
|
||||
const bfd_target *creator;
|
||||
/* A linked list of undefined and common symbols, linked through the
|
||||
next field in the bfd_link_hash_entry structure. */
|
||||
struct bfd_link_hash_entry *undefs;
|
||||
/* Entries are added to the tail of the undefs list. */
|
||||
struct bfd_link_hash_entry *undefs_tail;
|
||||
};
|
||||
|
||||
/* Look up an entry in a link hash table. If FOLLOW is true, this
|
||||
follows bfd_link_hash_indirect and bfd_link_hash_warning links to
|
||||
the real symbol. */
|
||||
extern struct bfd_link_hash_entry *bfd_link_hash_lookup
|
||||
PARAMS ((struct bfd_link_hash_table *, const char *, boolean create,
|
||||
boolean copy, boolean follow));
|
||||
|
||||
/* Look up an entry in the main linker hash table if the symbol might
|
||||
be wrapped. This should only be used for references to an
|
||||
undefined symbol, not for definitions of a symbol. */
|
||||
|
||||
extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
|
||||
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean, boolean,
|
||||
boolean));
|
||||
|
||||
/* Traverse a link hash table. */
|
||||
extern void bfd_link_hash_traverse
|
||||
PARAMS ((struct bfd_link_hash_table *,
|
||||
boolean (*) (struct bfd_link_hash_entry *, PTR),
|
||||
PTR));
|
||||
|
||||
/* Add an entry to the undefs list. */
|
||||
extern void bfd_link_add_undef
|
||||
PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *));
|
||||
|
||||
/* This structure holds all the information needed to communicate
|
||||
between BFD and the linker when doing a link. */
|
||||
|
||||
struct bfd_link_info
|
||||
{
|
||||
/* Function callbacks. */
|
||||
const struct bfd_link_callbacks *callbacks;
|
||||
/* true if BFD should generate a relocateable object file. */
|
||||
boolean relocateable;
|
||||
/* true if BFD should generate a "task linked" object file,
|
||||
similar to relocatable but also with globals converted to statics. */
|
||||
boolean task_link;
|
||||
/* true if BFD should generate a shared object. */
|
||||
boolean shared;
|
||||
/* true if BFD should pre-bind symbols in a shared object. */
|
||||
boolean symbolic;
|
||||
/* true if shared objects should be linked directly, not shared. */
|
||||
boolean static_link;
|
||||
/* true if the output file should be in a traditional format. This
|
||||
is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
|
||||
on the output file, but may be checked when reading the input
|
||||
files. */
|
||||
boolean traditional_format;
|
||||
/* true if we want to produced optimized output files. This might
|
||||
need much more time and therefore must be explicitly selected. */
|
||||
boolean optimize;
|
||||
/* Which symbols to strip. */
|
||||
enum bfd_link_strip strip;
|
||||
/* Which local symbols to discard. */
|
||||
enum bfd_link_discard discard;
|
||||
/* true if symbols should be retained in memory, false if they
|
||||
should be freed and reread. */
|
||||
boolean keep_memory;
|
||||
/* The list of input BFD's involved in the link. These are chained
|
||||
together via the link_next field. */
|
||||
bfd *input_bfds;
|
||||
/* If a symbol should be created for each input BFD, this is section
|
||||
where those symbols should be placed. It must be a section in
|
||||
the output BFD. It may be NULL, in which case no such symbols
|
||||
will be created. This is to support CREATE_OBJECT_SYMBOLS in the
|
||||
linker command language. */
|
||||
asection *create_object_symbols_section;
|
||||
/* Hash table handled by BFD. */
|
||||
struct bfd_link_hash_table *hash;
|
||||
/* Hash table of symbols to keep. This is NULL unless strip is
|
||||
strip_some. */
|
||||
struct bfd_hash_table *keep_hash;
|
||||
/* true if every symbol should be reported back via the notice
|
||||
callback. */
|
||||
boolean notice_all;
|
||||
/* Hash table of symbols to report back via the notice callback. If
|
||||
this is NULL, and notice_all is false, then no symbols are
|
||||
reported back. */
|
||||
struct bfd_hash_table *notice_hash;
|
||||
/* Hash table of symbols which are being wrapped (the --wrap linker
|
||||
option). If this is NULL, no symbols are being wrapped. */
|
||||
struct bfd_hash_table *wrap_hash;
|
||||
/* If a base output file is wanted, then this points to it */
|
||||
PTR base_file;
|
||||
|
||||
/* If non-zero, specifies that branches which are problematic for the
|
||||
MPC860 C0 (or earlier) should be checked for and modified. It gives the
|
||||
number of bytes that should be checked at the end of each text page. */
|
||||
int mpc860c0;
|
||||
};
|
||||
|
||||
/* This structures holds a set of callback functions. These are
|
||||
called by the BFD linker routines. The first argument to each
|
||||
callback function is the bfd_link_info structure being used. Each
|
||||
function returns a boolean value. If the function returns false,
|
||||
then the BFD function which called it will return with a failure
|
||||
indication. */
|
||||
|
||||
struct bfd_link_callbacks
|
||||
{
|
||||
/* A function which is called when an object is added from an
|
||||
archive. ABFD is the archive element being added. NAME is the
|
||||
name of the symbol which caused the archive element to be pulled
|
||||
in. */
|
||||
boolean (*add_archive_element) PARAMS ((struct bfd_link_info *,
|
||||
bfd *abfd,
|
||||
const char *name));
|
||||
/* A function which is called when a symbol is found with multiple
|
||||
definitions. NAME is the symbol which is defined multiple times.
|
||||
OBFD is the old BFD, OSEC is the old section, OVAL is the old
|
||||
value, NBFD is the new BFD, NSEC is the new section, and NVAL is
|
||||
the new value. OBFD may be NULL. OSEC and NSEC may be
|
||||
bfd_com_section or bfd_ind_section. */
|
||||
boolean (*multiple_definition) PARAMS ((struct bfd_link_info *,
|
||||
const char *name,
|
||||
bfd *obfd,
|
||||
asection *osec,
|
||||
bfd_vma oval,
|
||||
bfd *nbfd,
|
||||
asection *nsec,
|
||||
bfd_vma nval));
|
||||
/* A function which is called when a common symbol is defined
|
||||
multiple times. NAME is the symbol appearing multiple times.
|
||||
OBFD is the BFD of the existing symbol; it may be NULL if this is
|
||||
not known. OTYPE is the type of the existing symbol, which may
|
||||
be bfd_link_hash_defined, bfd_link_hash_defweak,
|
||||
bfd_link_hash_common, or bfd_link_hash_indirect. If OTYPE is
|
||||
bfd_link_hash_common, OSIZE is the size of the existing symbol.
|
||||
NBFD is the BFD of the new symbol. NTYPE is the type of the new
|
||||
symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
|
||||
bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
|
||||
is the size of the new symbol. */
|
||||
boolean (*multiple_common) PARAMS ((struct bfd_link_info *,
|
||||
const char *name,
|
||||
bfd *obfd,
|
||||
enum bfd_link_hash_type otype,
|
||||
bfd_vma osize,
|
||||
bfd *nbfd,
|
||||
enum bfd_link_hash_type ntype,
|
||||
bfd_vma nsize));
|
||||
/* A function which is called to add a symbol to a set. ENTRY is
|
||||
the link hash table entry for the set itself (e.g.,
|
||||
__CTOR_LIST__). RELOC is the relocation to use for an entry in
|
||||
the set when generating a relocateable file, and is also used to
|
||||
get the size of the entry when generating an executable file.
|
||||
ABFD, SEC and VALUE identify the value to add to the set. */
|
||||
boolean (*add_to_set) PARAMS ((struct bfd_link_info *,
|
||||
struct bfd_link_hash_entry *entry,
|
||||
bfd_reloc_code_real_type reloc,
|
||||
bfd *abfd, asection *sec, bfd_vma value));
|
||||
/* A function which is called when the name of a g++ constructor or
|
||||
destructor is found. This is only called by some object file
|
||||
formats. CONSTRUCTOR is true for a constructor, false for a
|
||||
destructor. This will use BFD_RELOC_CTOR when generating a
|
||||
relocateable file. NAME is the name of the symbol found. ABFD,
|
||||
SECTION and VALUE are the value of the symbol. */
|
||||
boolean (*constructor) PARAMS ((struct bfd_link_info *,
|
||||
boolean constructor,
|
||||
const char *name, bfd *abfd, asection *sec,
|
||||
bfd_vma value));
|
||||
/* A function which is called to issue a linker warning. For
|
||||
example, this is called when there is a reference to a warning
|
||||
symbol. WARNING is the warning to be issued. SYMBOL is the name
|
||||
of the symbol which triggered the warning; it may be NULL if
|
||||
there is none. ABFD, SECTION and ADDRESS identify the location
|
||||
which trigerred the warning; either ABFD or SECTION or both may
|
||||
be NULL if the location is not known. */
|
||||
boolean (*warning) PARAMS ((struct bfd_link_info *,
|
||||
const char *warning, const char *symbol,
|
||||
bfd *abfd, asection *section,
|
||||
bfd_vma address));
|
||||
/* A function which is called when a relocation is attempted against
|
||||
an undefined symbol. NAME is the symbol which is undefined.
|
||||
ABFD, SECTION and ADDRESS identify the location from which the
|
||||
reference is made. In some cases SECTION may be NULL. */
|
||||
boolean (*undefined_symbol) PARAMS ((struct bfd_link_info *,
|
||||
const char *name, bfd *abfd,
|
||||
asection *section, bfd_vma address));
|
||||
/* A function which is called when a reloc overflow occurs. NAME is
|
||||
the name of the symbol or section the reloc is against,
|
||||
RELOC_NAME is the name of the relocation, and ADDEND is any
|
||||
addend that is used. ABFD, SECTION and ADDRESS identify the
|
||||
location at which the overflow occurs; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
boolean (*reloc_overflow) PARAMS ((struct bfd_link_info *,
|
||||
const char *name,
|
||||
const char *reloc_name, bfd_vma addend,
|
||||
bfd *abfd, asection *section,
|
||||
bfd_vma address));
|
||||
/* A function which is called when a dangerous reloc is performed.
|
||||
The canonical example is an a29k IHCONST reloc which does not
|
||||
follow an IHIHALF reloc. MESSAGE is an appropriate message.
|
||||
ABFD, SECTION and ADDRESS identify the location at which the
|
||||
problem occurred; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
boolean (*reloc_dangerous) PARAMS ((struct bfd_link_info *,
|
||||
const char *message,
|
||||
bfd *abfd, asection *section,
|
||||
bfd_vma address));
|
||||
/* A function which is called when a reloc is found to be attached
|
||||
to a symbol which is not being written out. NAME is the name of
|
||||
the symbol. ABFD, SECTION and ADDRESS identify the location of
|
||||
the reloc; if this is the result of a
|
||||
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
|
||||
ABFD will be NULL. */
|
||||
boolean (*unattached_reloc) PARAMS ((struct bfd_link_info *,
|
||||
const char *name,
|
||||
bfd *abfd, asection *section,
|
||||
bfd_vma address));
|
||||
/* A function which is called when a symbol in notice_hash is
|
||||
defined or referenced. NAME is the symbol. ABFD, SECTION and
|
||||
ADDRESS are the value of the symbol. If SECTION is
|
||||
bfd_und_section, this is a reference. */
|
||||
boolean (*notice) PARAMS ((struct bfd_link_info *, const char *name,
|
||||
bfd *abfd, asection *section, bfd_vma address));
|
||||
};
|
||||
|
||||
/* The linker builds link_order structures which tell the code how to
|
||||
include input data in the output file. */
|
||||
|
||||
/* These are the types of link_order structures. */
|
||||
|
||||
enum bfd_link_order_type
|
||||
{
|
||||
bfd_undefined_link_order, /* Undefined. */
|
||||
bfd_indirect_link_order, /* Built from a section. */
|
||||
bfd_fill_link_order, /* Fill with a 16 bit constant. */
|
||||
bfd_data_link_order, /* Set to explicit data. */
|
||||
bfd_section_reloc_link_order, /* Relocate against a section. */
|
||||
bfd_symbol_reloc_link_order /* Relocate against a symbol. */
|
||||
};
|
||||
|
||||
/* This is the link_order structure itself. These form a chain
|
||||
attached to the section whose contents they are describing. */
|
||||
|
||||
struct bfd_link_order
|
||||
{
|
||||
/* Next link_order in chain. */
|
||||
struct bfd_link_order *next;
|
||||
/* Type of link_order. */
|
||||
enum bfd_link_order_type type;
|
||||
/* Offset within output section. */
|
||||
bfd_vma offset;
|
||||
/* Size within output section. */
|
||||
bfd_size_type size;
|
||||
/* Type specific information. */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
/* Section to include. If this is used, then
|
||||
section->output_section must be the section the
|
||||
link_order is attached to, section->output_offset must
|
||||
equal the link_order offset field, and section->_raw_size
|
||||
must equal the link_order size field. Maybe these
|
||||
restrictions should be relaxed someday. */
|
||||
asection *section;
|
||||
} indirect;
|
||||
struct
|
||||
{
|
||||
/* Value to fill with. */
|
||||
unsigned int value;
|
||||
} fill;
|
||||
struct
|
||||
{
|
||||
/* Data to put into file. The size field gives the number
|
||||
of bytes which this field points to. */
|
||||
bfd_byte *contents;
|
||||
} data;
|
||||
struct
|
||||
{
|
||||
/* Description of reloc to generate. Used for
|
||||
bfd_section_reloc_link_order and
|
||||
bfd_symbol_reloc_link_order. */
|
||||
struct bfd_link_order_reloc *p;
|
||||
} reloc;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* A linker order of type bfd_section_reloc_link_order or
|
||||
bfd_symbol_reloc_link_order means to create a reloc against a
|
||||
section or symbol, respectively. This is used to implement -Ur to
|
||||
generate relocs for the constructor tables. The
|
||||
bfd_link_order_reloc structure describes the reloc that BFD should
|
||||
create. It is similar to a arelent, but I didn't use arelent
|
||||
because the linker does not know anything about most symbols, and
|
||||
any asymbol structure it creates will be partially meaningless.
|
||||
This information could logically be in the bfd_link_order struct,
|
||||
but I didn't want to waste the space since these types of relocs
|
||||
are relatively rare. */
|
||||
|
||||
struct bfd_link_order_reloc
|
||||
{
|
||||
/* Reloc type. */
|
||||
bfd_reloc_code_real_type reloc;
|
||||
|
||||
union
|
||||
{
|
||||
/* For type bfd_section_reloc_link_order, this is the section
|
||||
the reloc should be against. This must be a section in the
|
||||
output BFD, not any of the input BFDs. */
|
||||
asection *section;
|
||||
/* For type bfd_symbol_reloc_link_order, this is the name of the
|
||||
symbol the reloc should be against. */
|
||||
const char *name;
|
||||
} u;
|
||||
|
||||
/* Addend to use. The object file should contain zero. The BFD
|
||||
backend is responsible for filling in the contents of the object
|
||||
file correctly. For some object file formats (e.g., COFF) the
|
||||
addend must be stored into in the object file, and for some
|
||||
(e.g., SPARC a.out) it is kept in the reloc. */
|
||||
bfd_vma addend;
|
||||
};
|
||||
|
||||
/* Allocate a new link_order for a section. */
|
||||
extern struct bfd_link_order *bfd_new_link_order PARAMS ((bfd *, asection *));
|
||||
|
||||
/* These structures are used to describe version information for the
|
||||
ELF linker. These structures could be manipulated entirely inside
|
||||
BFD, but it would be a pain. Instead, the regular linker sets up
|
||||
these structures, and then passes them into BFD. */
|
||||
|
||||
/* Regular expressions for a version. */
|
||||
|
||||
struct bfd_elf_version_expr
|
||||
{
|
||||
/* Next regular expression for this version. */
|
||||
struct bfd_elf_version_expr *next;
|
||||
/* Regular expression. */
|
||||
const char *match;
|
||||
};
|
||||
|
||||
/* Version dependencies. */
|
||||
|
||||
struct bfd_elf_version_deps
|
||||
{
|
||||
/* Next dependency for this version. */
|
||||
struct bfd_elf_version_deps *next;
|
||||
/* The version which this version depends upon. */
|
||||
struct bfd_elf_version_tree *version_needed;
|
||||
};
|
||||
|
||||
/* A node in the version tree. */
|
||||
|
||||
struct bfd_elf_version_tree
|
||||
{
|
||||
/* Next version. */
|
||||
struct bfd_elf_version_tree *next;
|
||||
/* Name of this version. */
|
||||
const char *name;
|
||||
/* Version number. */
|
||||
unsigned int vernum;
|
||||
/* Regular expressions for global symbols in this version. */
|
||||
struct bfd_elf_version_expr *globals;
|
||||
/* Regular expressions for local symbols in this version. */
|
||||
struct bfd_elf_version_expr *locals;
|
||||
/* List of versions which this version depends upon. */
|
||||
struct bfd_elf_version_deps *deps;
|
||||
/* Index of the version name. This is used within BFD. */
|
||||
unsigned int name_indx;
|
||||
/* Whether this version tree was used. This is used within BFD. */
|
||||
int used;
|
||||
};
|
||||
|
||||
#endif
|
||||
182
include/bout.h
182
include/bout.h
|
|
@ -1,182 +0,0 @@
|
|||
/*
|
||||
* This file is a modified version of 'a.out.h'. It is to be used in all
|
||||
* GNU tools modified to support the i80960 (or tools that operate on
|
||||
* object files created by such tools).
|
||||
*
|
||||
* All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
|
||||
* object code is generated on, and executed under the direction of a symbolic
|
||||
* debugger running on, a host system. We do not want to be subject to the
|
||||
* vagaries of which host it is or whether it supports COFF or a.out format,
|
||||
* or anything else. We DO want to:
|
||||
*
|
||||
* o always generate the same format object files, regardless of host.
|
||||
*
|
||||
* o have an 'a.out' header that we can modify for our own purposes
|
||||
* (the 80960 is typically an embedded processor and may require
|
||||
* enhanced linker support that the normal a.out.h header can't
|
||||
* accommodate).
|
||||
*
|
||||
* As for byte-ordering, the following rules apply:
|
||||
*
|
||||
* o Text and data that is actually downloaded to the target is always
|
||||
* in i80960 (little-endian) order.
|
||||
*
|
||||
* o All other numbers (in the header, symbols, relocation directives)
|
||||
* are in host byte-order: object files CANNOT be lifted from a
|
||||
* little-end host and used on a big-endian (or vice versa) without
|
||||
* modification.
|
||||
* ==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER
|
||||
* FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO
|
||||
* USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <==
|
||||
*
|
||||
* o The downloader ('comm960') takes care to generate a pseudo-header
|
||||
* with correct (i80960) byte-ordering before shipping text and data
|
||||
* off to the NINDY monitor in the target systems. Symbols and
|
||||
* relocation info are never sent to the target.
|
||||
*/
|
||||
|
||||
|
||||
#define BMAGIC 0415
|
||||
/* We don't accept the following (see N_BADMAG macro).
|
||||
* They're just here so GNU code will compile.
|
||||
*/
|
||||
#define OMAGIC 0407 /* old impure format */
|
||||
#define NMAGIC 0410 /* read-only text */
|
||||
#define ZMAGIC 0413 /* demand load format */
|
||||
|
||||
/* FILE HEADER
|
||||
* All 'lengths' are given as a number of bytes.
|
||||
* All 'alignments' are for relinkable files only; an alignment of
|
||||
* 'n' indicates the corresponding segment must begin at an
|
||||
* address that is a multiple of (2**n).
|
||||
*/
|
||||
struct external_exec {
|
||||
/* Standard stuff */
|
||||
unsigned char e_info[4]; /* Identifies this as a b.out file */
|
||||
unsigned char e_text[4]; /* Length of text */
|
||||
unsigned char e_data[4]; /* Length of data */
|
||||
unsigned char e_bss[4]; /* Length of uninitialized data area */
|
||||
unsigned char e_syms[4]; /* Length of symbol table */
|
||||
unsigned char e_entry[4]; /* Runtime start address */
|
||||
unsigned char e_trsize[4]; /* Length of text relocation info */
|
||||
unsigned char e_drsize[4]; /* Length of data relocation info */
|
||||
|
||||
/* Added for i960 */
|
||||
unsigned char e_tload[4]; /* Text runtime load address */
|
||||
unsigned char e_dload[4]; /* Data runtime load address */
|
||||
unsigned char e_talign[1]; /* Alignment of text segment */
|
||||
unsigned char e_dalign[1]; /* Alignment of data segment */
|
||||
unsigned char e_balign[1]; /* Alignment of bss segment */
|
||||
unsigned char e_relaxable[1]; /* Assembled with enough info to allow linker to relax */
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (sizeof (struct external_exec))
|
||||
|
||||
/* These macros use the a_xxx field names, since they operate on the exec
|
||||
structure after it's been byte-swapped and realigned on the host machine. */
|
||||
#define N_BADMAG(x) (((x).a_info)!=BMAGIC)
|
||||
#define N_TXTOFF(x) EXEC_BYTES_SIZE
|
||||
#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
|
||||
#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
|
||||
#define N_TRELOFF N_TROFF
|
||||
#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
|
||||
#define N_DRELOFF N_DROFF
|
||||
#define N_SYMOFF(x) ( N_DROFF(x) + (x).a_drsize )
|
||||
#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
||||
#define N_DATADDR(x) ( (x).a_dload )
|
||||
|
||||
/* Address of text segment in memory after it is loaded. */
|
||||
#if !defined (N_TXTADDR)
|
||||
#define N_TXTADDR(x) 0
|
||||
#endif
|
||||
|
||||
/* A single entry in the symbol table
|
||||
*/
|
||||
struct nlist {
|
||||
union {
|
||||
char *n_name;
|
||||
struct nlist *n_next;
|
||||
long n_strx; /* Index into string table */
|
||||
} n_un;
|
||||
unsigned char n_type; /* See below */
|
||||
char n_other; /* Used in i80960 support -- see below */
|
||||
short n_desc;
|
||||
unsigned long n_value;
|
||||
};
|
||||
|
||||
|
||||
/* Legal values of n_type
|
||||
*/
|
||||
#define N_UNDF 0 /* Undefined symbol */
|
||||
#define N_ABS 2 /* Absolute symbol */
|
||||
#define N_TEXT 4 /* Text symbol */
|
||||
#define N_DATA 6 /* Data symbol */
|
||||
#define N_BSS 8 /* BSS symbol */
|
||||
#define N_FN 31 /* Filename symbol */
|
||||
|
||||
#define N_EXT 1 /* External symbol (OR'd in with one of above) */
|
||||
#define N_TYPE 036 /* Mask for all the type bits */
|
||||
#define N_STAB 0340 /* Mask for all bits used for SDB entries */
|
||||
|
||||
/* MEANING OF 'n_other'
|
||||
*
|
||||
* If non-zero, the 'n_other' fields indicates either a leaf procedure or
|
||||
* a system procedure, as follows:
|
||||
*
|
||||
* 1 <= n_other <= 32 :
|
||||
* The symbol is the entry point to a system procedure.
|
||||
* 'n_value' is the address of the entry, as for any other
|
||||
* procedure. The system procedure number (which can be used in
|
||||
* a 'calls' instruction) is (n_other-1). These entries come from
|
||||
* '.sysproc' directives.
|
||||
*
|
||||
* n_other == N_CALLNAME
|
||||
* the symbol is the 'call' entry point to a leaf procedure.
|
||||
* The *next* symbol in the symbol table must be the corresponding
|
||||
* 'bal' entry point to the procedure (see following). These
|
||||
* entries come from '.leafproc' directives in which two different
|
||||
* symbols are specified (the first one is represented here).
|
||||
*
|
||||
*
|
||||
* n_other == N_BALNAME
|
||||
* the symbol is the 'bal' entry point to a leaf procedure.
|
||||
* These entries result from '.leafproc' directives in which only
|
||||
* one symbol is specified, or in which the same symbol is
|
||||
* specified twice.
|
||||
*
|
||||
* Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
|
||||
* but not every N_BALNAME entry must have an N_CALLNAME entry.
|
||||
*/
|
||||
#define N_CALLNAME ((char)-1)
|
||||
#define N_BALNAME ((char)-2)
|
||||
#define IS_CALLNAME(x) (N_CALLNAME == (x))
|
||||
#define IS_BALNAME(x) (N_BALNAME == (x))
|
||||
#define IS_OTHER(x) ((x)>0 && (x) <=32)
|
||||
|
||||
#define b_out_relocation_info relocation_info
|
||||
struct relocation_info {
|
||||
int r_address; /* File address of item to be relocated */
|
||||
unsigned
|
||||
#define r_index r_symbolnum
|
||||
r_symbolnum:24,/* Index of symbol on which relocation is based,
|
||||
* if r_extern is set. Otherwise set to
|
||||
* either N_TEXT, N_DATA, or N_BSS to
|
||||
* indicate section on which relocation is
|
||||
* based.
|
||||
*/
|
||||
r_pcrel:1, /* 1 => relocate PC-relative; else absolute
|
||||
* On i960, pc-relative implies 24-bit
|
||||
* address, absolute implies 32-bit.
|
||||
*/
|
||||
r_length:2, /* Number of bytes to relocate:
|
||||
* 0 => 1 byte
|
||||
* 1 => 2 bytes -- used for 13 bit pcrel
|
||||
* 2 => 4 bytes
|
||||
*/
|
||||
r_extern:1,
|
||||
r_bsr:1, /* Something for the GNU NS32K assembler */
|
||||
r_disp:1, /* Something for the GNU NS32K assembler */
|
||||
r_callj:1, /* 1 if relocation target is an i960 'callj' */
|
||||
r_relaxable:1; /* 1 if enough info is left to relax
|
||||
the data */
|
||||
};
|
||||
|
|
@ -1,270 +0,0 @@
|
|||
/* Remote target system call callback support.
|
||||
Copyright 1997 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Solutions.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This interface isn't intended to be specific to any particular kind
|
||||
of remote (hardware, simulator, whatever). As such, support for it
|
||||
(e.g. sim/common/callback.c) should *not* live in the simulator source
|
||||
tree, nor should it live in the gdb source tree. */
|
||||
|
||||
/* There are various ways to handle system calls:
|
||||
|
||||
1) Have a simulator intercept the appropriate trap instruction and
|
||||
directly perform the system call on behalf of the target program.
|
||||
This is the typical way of handling system calls for embedded targets.
|
||||
[Handling system calls for embedded targets isn't that much of an
|
||||
oxymoron as running compiler testsuites make use of the capability.]
|
||||
|
||||
This method of system call handling is done when STATE_ENVIRONMENT
|
||||
is ENVIRONMENT_USER.
|
||||
|
||||
2) Have a simulator emulate the hardware as much as possible.
|
||||
If the program running on the real hardware communicates with some sort
|
||||
of target manager, one would want to be able to run this program on the
|
||||
simulator as well.
|
||||
|
||||
This method of system call handling is done when STATE_ENVIRONMENT
|
||||
is ENVIRONMENT_OPERATING.
|
||||
*/
|
||||
|
||||
#ifndef CALLBACK_H
|
||||
#define CALLBACK_H
|
||||
|
||||
/* ??? The reason why we check for va_start here should be documented. */
|
||||
|
||||
#ifndef va_start
|
||||
#include <ansidecl.h>
|
||||
#ifdef ANSI_PROTOTYPES
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Mapping of host/target values. */
|
||||
/* ??? For debugging purposes, one might want to add a string of the
|
||||
name of the symbol. */
|
||||
|
||||
typedef struct {
|
||||
int host_val;
|
||||
int target_val;
|
||||
} CB_TARGET_DEFS_MAP;
|
||||
|
||||
#define MAX_CALLBACK_FDS 10
|
||||
|
||||
/* Forward decl for stat/fstat. */
|
||||
struct stat;
|
||||
|
||||
typedef struct host_callback_struct host_callback;
|
||||
|
||||
struct host_callback_struct
|
||||
{
|
||||
int (*close) PARAMS ((host_callback *,int));
|
||||
int (*get_errno) PARAMS ((host_callback *));
|
||||
int (*isatty) PARAMS ((host_callback *, int));
|
||||
int (*lseek) PARAMS ((host_callback *, int, long , int));
|
||||
int (*open) PARAMS ((host_callback *, const char*, int mode));
|
||||
int (*read) PARAMS ((host_callback *,int, char *, int));
|
||||
int (*read_stdin) PARAMS (( host_callback *, char *, int));
|
||||
int (*rename) PARAMS ((host_callback *, const char *, const char *));
|
||||
int (*system) PARAMS ((host_callback *, const char *));
|
||||
long (*time) PARAMS ((host_callback *, long *));
|
||||
int (*unlink) PARAMS ((host_callback *, const char *));
|
||||
int (*write) PARAMS ((host_callback *,int, const char *, int));
|
||||
int (*write_stdout) PARAMS ((host_callback *, const char *, int));
|
||||
void (*flush_stdout) PARAMS ((host_callback *));
|
||||
int (*write_stderr) PARAMS ((host_callback *, const char *, int));
|
||||
void (*flush_stderr) PARAMS ((host_callback *));
|
||||
int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
|
||||
int (*fstat) PARAMS ((host_callback *, int, struct stat *));
|
||||
|
||||
/* When present, call to the client to give it the oportunity to
|
||||
poll any io devices for a request to quit (indicated by a nonzero
|
||||
return value). */
|
||||
int (*poll_quit) PARAMS ((host_callback *));
|
||||
|
||||
/* Used when the target has gone away, so we can close open
|
||||
handles and free memory etc etc. */
|
||||
int (*shutdown) PARAMS ((host_callback *));
|
||||
int (*init) PARAMS ((host_callback *));
|
||||
|
||||
/* depreciated, use vprintf_filtered - Talk to the user on a console. */
|
||||
void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
|
||||
|
||||
/* Talk to the user on a console. */
|
||||
void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
|
||||
|
||||
/* Same as vprintf_filtered but to stderr. */
|
||||
void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
|
||||
|
||||
/* Print an error message and "exit".
|
||||
In the case of gdb "exiting" means doing a longjmp back to the main
|
||||
command loop. */
|
||||
void (*error) PARAMS ((host_callback *, const char *, ...));
|
||||
|
||||
int last_errno; /* host format */
|
||||
|
||||
int fdmap[MAX_CALLBACK_FDS];
|
||||
char fdopen[MAX_CALLBACK_FDS];
|
||||
char alwaysopen[MAX_CALLBACK_FDS];
|
||||
|
||||
/* System call numbers. */
|
||||
CB_TARGET_DEFS_MAP *syscall_map;
|
||||
/* Errno values. */
|
||||
CB_TARGET_DEFS_MAP *errno_map;
|
||||
/* Flags to the open system call. */
|
||||
CB_TARGET_DEFS_MAP *open_map;
|
||||
/* Signal numbers. */
|
||||
CB_TARGET_DEFS_MAP *signal_map;
|
||||
/* Layout of `stat' struct.
|
||||
The format is a series of "name,length" pairs separated by colons.
|
||||
Empty space is indicated with a `name' of "space".
|
||||
All padding must be explicitly mentioned.
|
||||
Lengths are in bytes. If this needs to be extended to bits,
|
||||
use "name.bits".
|
||||
Example: "st_dev,4:st_ino,4:st_mode,4:..." */
|
||||
const char *stat_map;
|
||||
|
||||
/* Marker for those wanting to do sanity checks.
|
||||
This should remain the last member of this struct to help catch
|
||||
miscompilation errors. */
|
||||
#define HOST_CALLBACK_MAGIC 4705 /* teds constant */
|
||||
int magic;
|
||||
};
|
||||
|
||||
extern host_callback default_callback;
|
||||
|
||||
/* Canonical versions of system call numbers.
|
||||
It's not intended to willy-nilly throw every system call ever heard
|
||||
of in here. Only include those that have an important use.
|
||||
??? One can certainly start a discussion over the ones that are currently
|
||||
here, but that will always be true. */
|
||||
|
||||
/* These are used by the ANSI C support of libc. */
|
||||
#define CB_SYS_exit 1
|
||||
#define CB_SYS_open 2
|
||||
#define CB_SYS_close 3
|
||||
#define CB_SYS_read 4
|
||||
#define CB_SYS_write 5
|
||||
#define CB_SYS_lseek 6
|
||||
#define CB_SYS_unlink 7
|
||||
#define CB_SYS_getpid 8
|
||||
#define CB_SYS_kill 9
|
||||
#define CB_SYS_fstat 10
|
||||
/*#define CB_SYS_sbrk 11 - not currently a system call, but reserved. */
|
||||
|
||||
/* ARGV support. */
|
||||
#define CB_SYS_argvlen 12
|
||||
#define CB_SYS_argv 13
|
||||
|
||||
/* These are extras added for one reason or another. */
|
||||
#define CB_SYS_chdir 14
|
||||
#define CB_SYS_stat 15
|
||||
#define CB_SYS_chmod 16
|
||||
#define CB_SYS_utime 17
|
||||
#define CB_SYS_time 18
|
||||
|
||||
/* Struct use to pass and return information necessary to perform a
|
||||
system call. */
|
||||
/* FIXME: Need to consider target word size. */
|
||||
|
||||
typedef struct cb_syscall {
|
||||
/* The target's value of what system call to perform. */
|
||||
int func;
|
||||
/* The arguments to the syscall. */
|
||||
long arg1, arg2, arg3, arg4;
|
||||
|
||||
/* The result. */
|
||||
long result;
|
||||
/* Some system calls have two results. */
|
||||
long result2;
|
||||
/* The target's errno value, or 0 if success.
|
||||
This is converted to the target's value with host_to_target_errno. */
|
||||
int errcode;
|
||||
|
||||
/* Working space to be used by memory read/write callbacks. */
|
||||
PTR p1;
|
||||
PTR p2;
|
||||
long x1,x2;
|
||||
|
||||
/* Callbacks for reading/writing memory (e.g. for read/write syscalls).
|
||||
??? long or unsigned long might be better to use for the `count'
|
||||
argument here. We mimic sim_{read,write} for now. Be careful to
|
||||
test any changes with -Wall -Werror, mixed signed comparisons
|
||||
will get you. */
|
||||
int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
|
||||
unsigned long /*taddr*/, char * /*buf*/,
|
||||
int /*bytes*/));
|
||||
int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
|
||||
unsigned long /*taddr*/, const char * /*buf*/,
|
||||
int /*bytes*/));
|
||||
|
||||
/* For sanity checking, should be last entry. */
|
||||
int magic;
|
||||
} CB_SYSCALL;
|
||||
|
||||
/* Magic number sanity checker. */
|
||||
#define CB_SYSCALL_MAGIC 0x12344321
|
||||
|
||||
/* Macro to initialize CB_SYSCALL. Called first, before filling in
|
||||
any fields. */
|
||||
#define CB_SYSCALL_INIT(sc) \
|
||||
do { \
|
||||
memset ((sc), 0, sizeof (*(sc))); \
|
||||
(sc)->magic = CB_SYSCALL_MAGIC; \
|
||||
} while (0)
|
||||
|
||||
/* Return codes for various interface routines. */
|
||||
|
||||
typedef enum {
|
||||
CB_RC_OK = 0,
|
||||
/* generic error */
|
||||
CB_RC_ERR,
|
||||
/* either file not found or no read access */
|
||||
CB_RC_ACCESS,
|
||||
CB_RC_NO_MEM
|
||||
} CB_RC;
|
||||
|
||||
/* Read in target values for system call numbers, errno values, signals. */
|
||||
CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *));
|
||||
|
||||
/* Translate target to host syscall function numbers. */
|
||||
int cb_target_to_host_syscall PARAMS ((host_callback *, int));
|
||||
|
||||
/* Translate host to target errno value. */
|
||||
int cb_host_to_target_errno PARAMS ((host_callback *, int));
|
||||
|
||||
/* Translate target to host open flags. */
|
||||
int cb_target_to_host_open PARAMS ((host_callback *, int));
|
||||
|
||||
/* Translate target signal number to host. */
|
||||
int cb_target_to_host_signal PARAMS ((host_callback *, int));
|
||||
|
||||
/* Translate host signal number to target. */
|
||||
int cb_host_to_target_signal PARAMS ((host_callback *, int));
|
||||
|
||||
/* Translate host stat struct to target.
|
||||
If stat struct ptr is NULL, just compute target stat struct size.
|
||||
Result is size of target stat struct or 0 if error. */
|
||||
int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR));
|
||||
|
||||
/* Perform a system call. */
|
||||
CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
|
||||
|
||||
#endif
|
||||
|
|
@ -1,752 +0,0 @@
|
|||
Sun Dec 6 21:36:37 1998 Mark Elbrecht <snowball3@usa.net>
|
||||
|
||||
* internal.h (C_WEAKEXT): Define.
|
||||
|
||||
Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
|
||||
|
||||
* coff/arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
|
||||
Changed values to avoid clashing with IMAGE_FILE_* coff header
|
||||
flag values.
|
||||
|
||||
Wed Apr 1 16:06:15 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* internal.h: Document numbers associated with Thumb symbol
|
||||
types.
|
||||
|
||||
Fri Mar 27 17:16:57 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (ISPTR, ISFCN, ISARY): Add casts to unsigned long.
|
||||
|
||||
Mon Feb 2 17:10:38 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
|
||||
|
||||
* tic30.h: New file.
|
||||
|
||||
Tue Dec 2 10:21:40 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* arm.h (COFFARM): New define.
|
||||
|
||||
Sat Nov 22 15:10:14 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to
|
||||
define static and external functions.
|
||||
|
||||
* arm.h: Add bits to support PIC and APCS-FLOAT type binaries,
|
||||
when implemented.
|
||||
|
||||
Tue Jul 22 18:18:58 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
|
||||
|
||||
* go32exe.h: New file.
|
||||
|
||||
Tue Jun 3 16:44:18 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* internal.h: Add storage classes for Thumb symbols
|
||||
|
||||
Fri Apr 18 11:52:55 1997 Niklas Hallqvist <niklas@appli.se>
|
||||
|
||||
* alpha.h (ALPHA_ECOFF_BADMAG): Recognize *BSD/alpha magic too.
|
||||
(ALPHA_R_LITERALSLEAZY): Define.
|
||||
* ecoff.h (ALPHA_MAGIC_BSD): Define.
|
||||
|
||||
Wed Jan 29 11:31:51 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* i960.h (R_IPR13, R_ALIGN): Define.
|
||||
|
||||
Mon Jan 27 13:34:30 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): Move definitions
|
||||
from here...
|
||||
* i960.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): ...to here.
|
||||
|
||||
Thu Dec 19 16:18:11 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* arm.h (_LIT): Define.
|
||||
|
||||
Fri Jun 28 12:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* pe.h (FILHSZ): Define.
|
||||
|
||||
Wed Jun 26 16:24:26 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* All files: Define FILHSZ, AOUTSZ, AOUTHDRSZ, SCNHSZ, SYMESZ,
|
||||
AUXESZ, LINESZ, RELSZ as numeric constants rather than uses of
|
||||
sizeof. Define AOUTHDRSZ in all files.
|
||||
* pe.h (AOUTSZ): Define by adding to AOUTHDRSZ.
|
||||
|
||||
Fri Jun 21 11:17:46 1996 Richard Henderson <rth@tamu.edu>
|
||||
|
||||
* alpha.h: Add declarations for relocation types added for Alpha
|
||||
OSF/1 3.0.
|
||||
|
||||
Tue Jun 18 16:04:29 1996 Jeffrey A. Law <law@rtl.cygnus.com>
|
||||
|
||||
* h8300.h (H8300SMAGIC): Define.
|
||||
(H8300SBADMAG): Define.
|
||||
|
||||
Mon Jun 10 11:53:28 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* internal.h (R_BCC_INV, R_JMP_DEL): New relocations for
|
||||
relaxing in the H8/300 series.
|
||||
|
||||
Thu May 16 15:49:22 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* sh.h (R_SH_CODE, R_SH_DATA, R_SH_LABEL): Define.
|
||||
|
||||
Tue May 7 00:36:39 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* internal.h (R_JMPL2): Renamed from R_JMPL_B8 to be
|
||||
consistent with other similar relocs.
|
||||
|
||||
* internal.h (H8/300 specific relocs): Add comments better
|
||||
explaining what each reloc is used for.
|
||||
(R_MOV16B1, R_MOV16B2): Renamed from R_MOVB1 and R_MOVB2.
|
||||
(R_MOV24B1, R_MOV24B2): Renamed from R_MOVLB1 and R_MOVLB2.
|
||||
(R_MOVL1, R_MOVL2): New relocs.
|
||||
|
||||
Fri May 3 13:01:12 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* internal.h (R_PCRWORD_B): Define for the h8300 relaxing
|
||||
linker.
|
||||
|
||||
Wed May 1 19:21:03 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (SCNNMLEN): Define.
|
||||
(struct internal_scnhdr): Use SCNNMLEN for s_name field.
|
||||
|
||||
Fri Mar 29 13:41:25 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* pe.h: Define IMAGE_COMDAT codes.
|
||||
|
||||
Wed Mar 27 17:29:42 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* arm.h (union external_auxent): Add x_checksum, x_associated, and
|
||||
x_comdat fields to x_scn struct.
|
||||
* i386.h (union external_auxent): Likewise.
|
||||
* powerpc.h (union external_auxent): Likewise.
|
||||
* internal.h (union internal_auxent): Likewise.
|
||||
|
||||
Thu Mar 21 16:25:57 1996 David Mosberger-Tang <davidm@azstarnet.com>
|
||||
|
||||
* ecoff.h (struct ecoff_find_line): Add caching fields.
|
||||
|
||||
Thu Mar 14 15:22:44 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* internal.h (R_MEM_INDIRECT): New reloc for the h8300.
|
||||
|
||||
Fri Feb 9 10:44:11 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* aux-coff.h: Rename from aux.h, to avoid problems on hapless DOS
|
||||
systems which think that aux is a com port.
|
||||
|
||||
Mon Feb 5 18:35:00 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* i960.h (F_I960HX): Define.
|
||||
|
||||
Wed Jan 31 13:11:54 1996 Richard Henderson <rth@tamu.edu>
|
||||
|
||||
* aux.h: New file.
|
||||
* internal.h, m68k.h: Protect against multiple inclusion.
|
||||
|
||||
Wed Nov 22 13:48:39 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* ecoff.h (_RCONST, STYP_RCONST, RELOC_SECTION_RCONST): Define.
|
||||
(NUM_RELOC_SECTIONS): Update.
|
||||
* symconst.h (scRConst): Define.
|
||||
|
||||
Tue Nov 14 18:54:29 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (C_NT_WEAK): Define.
|
||||
|
||||
Thu Nov 9 14:08:30 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* rs6000.h (STYP_OVRFLO): Define.
|
||||
|
||||
Tue Nov 7 14:38:45 1995 Kim Knuttila <krk@cygnus.com>
|
||||
|
||||
* coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
|
||||
* coff/pe.h: Added defines for file level flags
|
||||
|
||||
Mon Nov 6 17:28:01 1995 Harry Dolan <dolan@ssd.intel.com>
|
||||
|
||||
* i860.h: New file, based on i386.h.
|
||||
|
||||
Wed Nov 1 15:25:18 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
|
||||
|
||||
* m68k.h (PAGEMAGICEXECSWAPPED): Define.
|
||||
(PAGEMAGICPEXECSWAPPED): Define.
|
||||
(PAGEMAGICPEXECTSHLIB): Define.
|
||||
(PAGEMAGICPEXECPAGED): Define.
|
||||
(_COMMENT): DEFINE.
|
||||
* m88k.h (_COMMENT): Define.
|
||||
|
||||
Wed Oct 18 18:36:19 1995 Geoffrey Noer <noer@cygnus.com>
|
||||
|
||||
* sym.h: #if 0'd out runtime_pdr struct because it chokes
|
||||
Visual C++ and there aren't any references to it elsewhere in gdb.
|
||||
|
||||
Mon Oct 16 11:12:24 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* rs6000.h (SMALL_AOUTSZ): Define.
|
||||
|
||||
* internal.h (XMC_TD): Define.
|
||||
|
||||
Tue Oct 10 18:41:03 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (struct internal_aouthdr): Add o_cputype field.
|
||||
* rs6000.h (AOUTHDR): Rename o_resv1 to o_cputype.
|
||||
|
||||
Mon Oct 9 14:45:46 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* rs6000.h (AOUTHDR): Add o_maxdata field. Add comments.
|
||||
(_PAD, _LOADER): Define.
|
||||
(STYP_LOADER): Define.
|
||||
* internal.h (struct internal_aouthdr): Add o_maxdata field.
|
||||
|
||||
Thu Oct 5 10:02:57 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* ecoff.h: Define section name macros and STYP macros for various
|
||||
Alpha sections: .got, .hash, .dynsym, .dynstr, .rel.dyn, .conflic,
|
||||
.comment, .liblist, .dynamic.
|
||||
|
||||
Wed Oct 4 10:56:35 1995 Kim Knuttila <krk@cygnus.com>
|
||||
|
||||
* pe.h: Moved DOSMAGIC and NT_SIGNATURE defines here
|
||||
* powerpc.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
|
||||
Also removed other unused defines (various MAGIC ones)
|
||||
* i386.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
|
||||
* arm.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
|
||||
* apollo.h: removed unused DEFAULT_* defines
|
||||
* alpha.h: removed unused DEFAULT_* defines
|
||||
* h8500.h: removed unused DEFAULT_* defines
|
||||
* h8300.h: removed unused DEFAULT_* defines
|
||||
* i960.h: removed unused DEFAULT_* defines
|
||||
* m88k.h: removed unused DEFAULT_* defines
|
||||
* we32k.h: removed unused DEFAULT_* defines
|
||||
* rs6000.h: removed unused DEFAULT_* defines
|
||||
* mips.h: removed unused DEFAULT_* defines
|
||||
* m68k.h: removed unused DEFAULT_* defines
|
||||
* z8k.h: removed unused DEFAULT_* defines
|
||||
* w65.h: removed unused DEFAULT_* defines
|
||||
* sparc.h: removed unused DEFAULT_* defines
|
||||
* sh.h: removed unused DEFAULT_* defines
|
||||
|
||||
Fri Sep 29 08:40:08 1995 Kim Knuttila <krk@cygnus.com>
|
||||
|
||||
* powerpc.h: Reformatted to GNU coding conventions.
|
||||
|
||||
Wed Sep 27 06:50:50 1995 Kim Knuttila <krk@nellie>
|
||||
|
||||
* pe.h: added defines for more section characteristics
|
||||
* powerpc.h (new file): base coff definitions for ppc PE
|
||||
|
||||
Tue Sep 12 12:08:20 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (struct internal_syment): Change n_numaux field from
|
||||
char to unsigned char.
|
||||
|
||||
Fri Sep 1 15:39:36 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
|
||||
|
||||
* mips.h (struct rpdr_ext): Define.
|
||||
|
||||
Thu Aug 31 16:51:50 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* internal.h (internal_aouthdr, internal_filehdr):
|
||||
don't indirect the pe stuff.
|
||||
|
||||
Tue Aug 29 14:16:07 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* i386.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Make the same
|
||||
as 'the other' compiler.
|
||||
* internal.h (NT_IMAGE_BASE): Deleted.
|
||||
(NT_EXE_IMAGE_BASE, NT_DLL_IMAGE_BASE): New.
|
||||
(PE_DEF_SECTION_ALIGNMENT, PE_DEF_FILE_ALIGNMENT): New.
|
||||
(R_IMAGEBASE): New.
|
||||
|
||||
Mon Aug 21 18:12:19 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* internal.h: (internal_filehdr): Moved PE stuff into
|
||||
internal_extra_pe_filehdr.
|
||||
(internal_aouthdr): Moved PE stuff into
|
||||
interanl_extra_pe_aouthdr.
|
||||
|
||||
Mon Jul 24 14:05:39 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h: Move R_SH_* relocs from here...
|
||||
* sh.h: ...to here.
|
||||
(R_SH_SWITCH16, R_SH_SWITCH32): Define.
|
||||
(R_SH_USES, R_SH_COUNT, R_SH_ALIGN): Define.
|
||||
|
||||
Thu Jun 29 00:04:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* internal.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Increase a lot.
|
||||
|
||||
Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||
|
||||
* internal.h (NT_subsystem, NT_stack_heap): Delete
|
||||
|
||||
Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||
|
||||
* internal.h (NT_subsystem, NT_stack_heap): Now extern.
|
||||
|
||||
Tue Feb 14 17:59:37 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* ecoff.h (struct ecoff_fdrtab_entry): Define.
|
||||
(struct ecoff_find_line): Define.
|
||||
|
||||
Sat Feb 4 14:38:03 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
|
||||
|
||||
* sym.h (struct pdr): field "prof" added.
|
||||
|
||||
* alpha.h (PDR_BITS1_PROF_*): added, macros for PDR_BITS*_RESERVED_*
|
||||
updated accordingly.
|
||||
|
||||
Sun Jan 15 18:38:33 1995 Steve Chamberlain <sac@splat>
|
||||
|
||||
* w65.h: New file.
|
||||
|
||||
Wed Nov 23 22:43:38 1994 Steve Chamberlain (sac@jonny.cygnus.com)
|
||||
|
||||
* sh.h (SH_ARCH_MAGIC_BIG, SH_ARCH_MAGIC_LITTLE): New.
|
||||
(SHBADMAG): Changed to suit.
|
||||
|
||||
Tue Jul 26 17:46:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
|
||||
|
||||
* i960.h (F_I960JX): New macro.
|
||||
|
||||
Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* alpha.h: Add definitions for alpha file header flags, encoding
|
||||
the object type of the file.
|
||||
|
||||
Mon Jun 20 13:47:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||
|
||||
* ecoff.h (ecoff_swap_tir_in): Remove declaration.
|
||||
(ecoff_swap_tir_out): Likewise.
|
||||
(ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
|
||||
(struct ecoff_debug_swap): Add new fields: swap_tir_in,
|
||||
swap_rndx_in, swap_tir_out, swap_rndx_out, read_debug_info.
|
||||
|
||||
Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* symconst.h: Pick up SGI define for stIndirect.
|
||||
|
||||
Fri Apr 22 13:05:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (REGINFO): Don't define.
|
||||
(struct ecoff_reginfo): Don't define.
|
||||
|
||||
* sh.h (SH_ARCH_MAGIC): Rename from SHMAGIC. SHMAGIC is used by
|
||||
several targets to mean a shared library.
|
||||
(SHBADMAG): Corresponding change.
|
||||
|
||||
Thu Apr 14 13:00:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (RELOC_BITS3_TYPE_BIG): Changed from 0x1e to 0x3e.
|
||||
(RELOC_BITS3_TYPEHI_LITTLE): Define.
|
||||
(RELOC_BITS3_TYPEHI_SH_LITTLE): Define.
|
||||
(MIPS_R_PCREL16): Change value from 8 to 12 to match Irix 4.
|
||||
(MIPS_R_RELHI): Define.
|
||||
(MIPS_R_RELLO): Define.
|
||||
(MIPS_R_SWITCH): Change value from 9 to 22.
|
||||
|
||||
Thu Apr 7 14:19:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (MIPS_R_SWITCH): Define.
|
||||
|
||||
Thu Mar 31 19:28:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
|
||||
|
||||
* internal.h (internal_aouthdr): Added comments for Apollo fields.
|
||||
|
||||
Thu Mar 31 16:28:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (STYP_ECOFF_LIB): Define as used on Irix 4.
|
||||
|
||||
Fri Mar 25 17:16:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (struct ecoff_debug_info): Add adjust field.
|
||||
(struct ecoff_value_adjust): Define.
|
||||
|
||||
Tue Mar 22 13:22:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (MIPS_R_PCREL16): Define.
|
||||
|
||||
Sat Feb 26 10:26:38 1994 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* ecoff.h: Add casts to avoid warnings from SVR4 cc.
|
||||
|
||||
Mon Feb 21 09:48:46 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
|
||||
|
||||
* sym.h (struct runtime_pdr): Make field adr bfd_vma, not unsigned
|
||||
long.
|
||||
(SYMR): Make field value bfd_vma, not long.
|
||||
|
||||
Fri Feb 4 23:35:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* rs6000.h (STYP_DEBUG): Define.
|
||||
|
||||
Wed Feb 2 14:31:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* internal.h (union internal_auxent): Change x_csect.x_scnlen into
|
||||
a union of a long and a pointer to a symbol. XCOFF sometimes uses
|
||||
this field as a symbol index.
|
||||
|
||||
Mon Jan 10 23:54:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (ecoff_debug_info): Remove fields line_end,
|
||||
external_dnr_end, external_pdr_end, external_sym_end,
|
||||
external_opt_end, external_aux_end, ss_end, external_fdr_end.
|
||||
Replace ifdbase with ifdmap.
|
||||
|
||||
Wed Jan 5 17:05:36 1994 Ken Raeburn (raeburn@deneb.cygnus.com)
|
||||
|
||||
* ecoff.h (STYP_EXTENDESC, STYP_COMMENT, STYP_XDATA, STYP_PDATA):
|
||||
Define.
|
||||
|
||||
Wed Jan 5 16:58:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (NUM_RELOC_SECTIONS): Define.
|
||||
|
||||
Tue Dec 21 09:24:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
|
||||
|
||||
* sparc.h (struct external_reloc): Rename field r_addend to
|
||||
r_offset.
|
||||
|
||||
Sat Dec 11 16:12:32 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h (R_DISP7, R_SH_IMM16): New reloc types.
|
||||
|
||||
Tue Nov 23 14:23:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (struct ecoff_debug_swap): Added *_end fields for all
|
||||
the symbolic information pointers.
|
||||
|
||||
* sym.h: Named the EXTR structure ecoff_extr.
|
||||
|
||||
Fri Nov 19 08:21:18 1993 Ken Raeburn (raeburn@rover.cygnus.com)
|
||||
|
||||
* sparc.h (RELSZ): Use correct size.
|
||||
|
||||
Wed Nov 17 17:18:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (struct ecoff_debug_info): Define.
|
||||
|
||||
Tue Nov 2 17:56:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (struct ecoff_debug_swap): Define.
|
||||
|
||||
Thu Oct 28 17:07:50 1993 Stan Shebs (shebs@rtl.cygnus.com)
|
||||
|
||||
* i386.h (I386LYNXMAGIC): Rename to LYNXCOFFMAGIC.
|
||||
* m68k.h (LYNXCOFFMAGIC): Define.
|
||||
* sparc.h: New file.
|
||||
|
||||
Tue Oct 19 15:34:50 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* alpha.h (external_aouthdr): Split four byte padding field into
|
||||
two byte bldrev field and two byte padding field.
|
||||
|
||||
* ecoff.h (_LITA, _PDATA, _XDATA, STYP_LITA): Defined.
|
||||
|
||||
Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com)
|
||||
|
||||
Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au)
|
||||
|
||||
* coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos
|
||||
as well as R_DIR16.
|
||||
|
||||
* coff/apollo.h: New file
|
||||
|
||||
Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (REGINFO, struct ecoff_reginfo): Define.
|
||||
|
||||
Tue Oct 5 10:52:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* rs6000.h: Change non-ASCII characters in comment to octal
|
||||
escapes.
|
||||
|
||||
Tue Sep 28 03:27:04 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* ecoff.h (_FINI, STYP_ECOFF_FINI): Add to support .fini section.
|
||||
|
||||
Fri Sep 24 11:53:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3.
|
||||
* ecoff.h: Define MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3.
|
||||
|
||||
Thu Sep 23 21:07:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2.
|
||||
* ecoff.h: Define MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2.
|
||||
|
||||
Thu Sep 16 20:27:21 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
|
||||
|
||||
* sym.h, symconst.h: Add comment stating these files are not part
|
||||
of GDB, GAS, etc. In 1991, when we asked rms whether we could
|
||||
include these files in GDB (although they are copyrighted by
|
||||
someone besides the FSF), he said it was OK if they were not
|
||||
considered part of GDB.
|
||||
|
||||
Fri Sep 10 17:40:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (AUX_PUT_ANY): Cast val argument to bfd_vma.
|
||||
|
||||
* alpha.c (external_aouthdr): Need four bytes of padding between
|
||||
vstamp and tsize.
|
||||
|
||||
Tue Sep 7 14:20:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff.h (AUX_GET_ANY, AUX_PUT_ANY): Changed to reflect further
|
||||
change in bfd swapping routine names.
|
||||
|
||||
Tue Sep 7 10:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* ecoff.h (AUX_GET_ANY): Change name of _do_getb32 to reflect bfd
|
||||
changes.
|
||||
|
||||
Fri Aug 13 14:30:32 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* ecoff.h (RELOC_SECTION_NONE): Define.
|
||||
|
||||
Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* alpha.h (struct external_reloc): Add r_symndx field.
|
||||
(RELSZ): Correct.
|
||||
(RELOC_BITS*): Correct.
|
||||
(ALPHA_R_*): Define.
|
||||
* ecoff.h (RELOC_SECTION_{XDATA,PDATA,FINI,LITA,ABS}): Define.
|
||||
(r_extern): Undefine.
|
||||
* internal.h (struct internal_reloc): Make r_vaddr bfd_vma rather
|
||||
than long. Add r_extern field.
|
||||
|
||||
* alpha.h (PDR_BITS*): Define.
|
||||
* sym.h (PDR): Give correct names to new fields.
|
||||
|
||||
* ecoff.h: Moved MIPS reloc definitions from here...
|
||||
* mips.h: to here.
|
||||
|
||||
Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* alpha.h: Corrected external symbolic debugging structures to
|
||||
match actual usage.
|
||||
* internal.h (internal_filehdr, internal_aouthdr,
|
||||
internal_scnhdr): Changed type of some fields to bfd_vma so they
|
||||
can hold 64 bits.
|
||||
* sym.h (HDRR, FDR, PDR, EXTR): Likewise.
|
||||
(PDR): Added new fields found on Alpha.
|
||||
* symconst.h (magicSym2): Define; new value found on Alpha.
|
||||
|
||||
* ecoff.h: New file.
|
||||
* alpha.h, mips.h: Moved common information into ecoff.h. Moved
|
||||
external structure definitions in from ecoff-ext.h.
|
||||
* ecoff-ext.h: Removed; information now in alpha.h and mips.h.
|
||||
|
||||
Sun Jul 18 21:43:59 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
|
||||
|
||||
* i386.h: Recognize I386PTXMAGIC.
|
||||
|
||||
Fri Jul 16 09:54:35 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* mips.h (MIPS_AOUT_{OZ}MAGIC): Renamed from {OZ}MAGIC.
|
||||
|
||||
Thu Jul 15 12:23:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* m88k.h (union external_auxent): Move x_fcn back inside x_fcnary.
|
||||
({GET,PUT}_FCN_{LNNOPTR,ENDNDX}): Adjust accordingly.
|
||||
|
||||
Sun Jul 11 18:00:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* m68k.h: Define MC68KBCSMAGIC.
|
||||
|
||||
Thu Jun 10 11:46:28 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* mips.h (_INIT, STYP_MIPS_INIT): Define (used on Irix4).
|
||||
(STYP_OTHER_LOAD): Define as STYP_MIPS_INIT.
|
||||
|
||||
Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* mips.h (OMAGIC): Define.
|
||||
|
||||
Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h, sh.h: Support for SH.
|
||||
|
||||
Sat Apr 24 21:34:59 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||
|
||||
* a29k.h: Define _LIT.
|
||||
|
||||
Fri Apr 23 18:41:23 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* alpha.h: New file.
|
||||
|
||||
Thu Apr 8 12:36:34 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* internal.h (C_SHADOW, C_VERSION): Copied in from m88k.h.
|
||||
* m88k.h, i386.h, we32k.h: Don't define all the storage classes;
|
||||
they're already in internal.h.
|
||||
|
||||
Wed Apr 7 11:51:24 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||
|
||||
* internal.h: Change n_sclass to unsigned char.
|
||||
Change C_EFCN to 0xff, change RS/6000 dbx symbols
|
||||
to no longer be signed.
|
||||
|
||||
Fri Mar 19 14:52:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h: Add H8/500 reloc types.
|
||||
|
||||
Wed Mar 17 09:46:03 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* ecoff-ext.h (AUX_PUT_ANY): Don't use void values in branches of
|
||||
conditional expression.
|
||||
|
||||
Thu Mar 4 14:12:06 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* ecoff-ext.h (AUX_GET_*): Rewrote to use new macro AUX_GET_ANY.
|
||||
(AUX_PUT_*): New macros corresponding to the AUX_GET macros.
|
||||
(ecoff_swap_tir_out): Added prototype.
|
||||
|
||||
* mips.h (N_BTMASK, N_TMASK, N_BTSHFT, N_TSHIFT): Define; these
|
||||
are needed to interpret gcc debugging output.
|
||||
|
||||
Tue Feb 9 07:43:27 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* we32k.h (BTYPE, ISPTR, ISFCN, ISARY, DECREF): Removed
|
||||
more definitions duplicated in internal.h.
|
||||
|
||||
Wed Feb 3 09:18:24 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* mips.h (RELOC_BITS3_TYPE_*): Correct for big endian machines.
|
||||
|
||||
Mon Jan 25 11:35:51 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* internal.h (internal_aouthdr): Added additional fields used only
|
||||
by MIPS ECOFF.
|
||||
|
||||
Thu Jan 21 10:28:38 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* mips.h (AOUTHDR): Added additional fields used by ECOFF.
|
||||
|
||||
Tue Jan 19 12:21:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* i386.h, we32k.h (N_*, T_*, DT_*): Removed still more definitions
|
||||
duplicated in internal.h.
|
||||
|
||||
* mips.h (RELOC_SECTION_*, ECOFF_R_*): Defined constants for ECOFF
|
||||
relocs.
|
||||
|
||||
Fri Jan 15 18:17:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff-ext.h: Added prototypes for new ECOFF swapping functions.
|
||||
(opt_ext): New structure.
|
||||
* mips.h (ZMAGIC): Defined to be 0413.
|
||||
(_LIB): Defined to be ".lib"
|
||||
(external_reloc): MIPS ECOFF relocs are only 8 bytes. Added
|
||||
macros to aid in swapping.
|
||||
|
||||
Fri Jan 8 16:19:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* ecoff-ext.h: Added prototypes for ECOFF swapping functions.
|
||||
* internal.h (internal_scnhdr): Always provide s_align field, not
|
||||
just on i960.
|
||||
(internal_reloc): Always provide r_size field, not just on
|
||||
RS/6000.
|
||||
* mips.h (_RDATA, _SDATA, _SBSS, _LIT4, _LIT8, STYP_RDATA,
|
||||
STYP_SDATA, STYP_SBSS, STYP_LIT4, STYP_LIT8): Defined.
|
||||
(CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB, MIPS_UNMARK_STAB,
|
||||
STABS_SYMBOL): Moved in from gdb/mipsread.c.
|
||||
|
||||
Wed Jan 6 14:01:46 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* i386.h, we32k.h: removed STYP_* defines, since they duplicated
|
||||
those in internal.h.
|
||||
|
||||
Tue Dec 29 15:40:07 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* i386.h: define I386AIXMAGIC for Danbury AIX PS/2 compiler.
|
||||
|
||||
Sat Dec 12 16:07:57 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* i386.h: don't define BTYPE, ISPTR, ISFCN, ISARY, DECREF: they
|
||||
are defined in internal.h.
|
||||
|
||||
Thu Nov 12 09:52:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h: (internal_reloc): r_offset is now a long.
|
||||
* z8k.h: slight comment enhancement
|
||||
|
||||
Wed Sep 30 07:46:08 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h: changed z8k reloc types
|
||||
|
||||
Fri Aug 28 10:16:31 1992 Brendan Kehoe (brendan@cygnus.com)
|
||||
|
||||
* we32k.h: new file
|
||||
|
||||
Thu Aug 27 13:00:01 1992 Brendan Kehoe (brendan@cygnus.com)
|
||||
|
||||
* symconst.h: comment out cruft at the end of #endif
|
||||
|
||||
Tue Aug 25 15:06:49 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h: added #define for STYP_LIT, removed from a29k and
|
||||
h8300.
|
||||
|
||||
* z8k.h: added z8000 support
|
||||
|
||||
Thu Jul 16 16:32:00 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* internal.h: added R_RELLONG_NEG reloc type
|
||||
|
||||
Fri Jun 12 20:11:04 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* symconst.h: Fix unterminated comment.
|
||||
|
||||
Wed Jun 10 07:57:49 1992 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||
|
||||
* i386.h: a.out magic numbers from
|
||||
mohring@informatik.tu-muenchen.de
|
||||
|
||||
Mon Jun 8 20:13:33 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* ecoff-ext.h, mips.h: Use unsigned chars everywhere.
|
||||
(Suggested by Antti Miettinen.)
|
||||
|
||||
Tue Apr 14 15:18:44 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* sym.h: Add comments.
|
||||
* symconst.h: Merge with Fred's changes.
|
||||
|
||||
Tue Apr 14 14:30:05 1992 Fred Fish (fnf@cygnus.com)
|
||||
|
||||
* symconst.h: Pick up SGI defines for stStruct, stUnion, stEnum,
|
||||
langCplusplus, and langCplusplusV2.
|
||||
|
||||
Thu Apr 2 19:47:43 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* sym.h, symconst.h: MIPS has provided redistributable versions
|
||||
of these files. Thanks!
|
||||
* ecoff-ext.h: Add weakext bit to match new sym.h.
|
||||
|
||||
Fri Mar 6 00:10:46 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* ecoff-ext.h: Add relative file descriptors.
|
||||
|
||||
Thu Feb 27 11:53:04 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* ecoff-ext.h: New file for external (in-file) form of ecoff
|
||||
symbol structures.
|
||||
|
||||
Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||
|
||||
* h8300.h: made the external_lineno l_lnno field 4 bytes wide.
|
||||
andded GET/PUT_LINENO_LNNO macros
|
||||
|
||||
Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||
|
||||
* ChangeLog, a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h,
|
||||
m88k.h, mips.h, rs6000.h: move from above coff-<foo>.h
|
||||
|
||||
|
||||
Local Variables:
|
||||
version-control: never
|
||||
End:
|
||||
|
|
@ -1,305 +0,0 @@
|
|||
/* COFF spec for AMD 290*0
|
||||
Contributed by David Wood @ New York University.
|
||||
*/
|
||||
|
||||
#ifndef AMD
|
||||
# define AMD
|
||||
#endif
|
||||
|
||||
/****************************************************************/
|
||||
|
||||
/*
|
||||
** File Header and related definitions
|
||||
*/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*
|
||||
** Magic numbers for Am29000
|
||||
** (AT&T will assign the "real" magic number)
|
||||
*/
|
||||
|
||||
#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB) */
|
||||
#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */
|
||||
|
||||
|
||||
#define A29K_MAGIC_BIG SIPFBOMAGIC
|
||||
#define A29K_MAGIC_LITTLE SIPRBOMAGIC
|
||||
#define A29KBADMAG(x) (((x).f_magic!=A29K_MAGIC_BIG) && \
|
||||
((x).f_magic!=A29K_MAGIC_LITTLE))
|
||||
|
||||
#define OMAGIC A29K_MAGIC_BIG
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*
|
||||
** File header flags currently known to us.
|
||||
**
|
||||
** Am29000 will use the F_AR32WR and F_AR32W flags to indicate
|
||||
** the byte ordering in the file.
|
||||
*/
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
** Optional (a.out) header
|
||||
*/
|
||||
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
} AOUTHDR;
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
/* aouthdr magic numbers */
|
||||
#define NMAGIC 0410 /* separate i/d executable */
|
||||
#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
|
||||
(writable text) */
|
||||
|
||||
#define _ETEXT "_etext"
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
** Section header and related definitions
|
||||
*/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _LIT ".lit"
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*
|
||||
** Section types - with additional section type for global
|
||||
** registers which will be relocatable for the Am29000.
|
||||
**
|
||||
** In instances where it is necessary for a linker to produce an
|
||||
** output file which contains text or data not based at virtual
|
||||
** address 0, e.g. for a ROM, then the linker should accept
|
||||
** address base information as command input and use PAD sections
|
||||
** to skip over unused addresses.
|
||||
*/
|
||||
|
||||
#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
|
||||
#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
|
||||
#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
** Relocation information declaration and related definitions
|
||||
*/
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4]; /* (virtual) address of reference */
|
||||
char r_symndx[4]; /* index into symbol table */
|
||||
char r_type[2]; /* relocation type */
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10 /* sizeof (RELOC) */
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*
|
||||
** Relocation types for the Am29000
|
||||
*/
|
||||
|
||||
#define R_ABS 0 /* reference is absolute */
|
||||
|
||||
#define R_IREL 030 /* instruction relative (jmp/call) */
|
||||
#define R_IABS 031 /* instruction absolute (jmp/call) */
|
||||
#define R_ILOHALF 032 /* instruction low half (const) */
|
||||
#define R_IHIHALF 033 /* instruction high half (consth) part 1 */
|
||||
#define R_IHCONST 034 /* instruction high half (consth) part 2 */
|
||||
/* constant offset of R_IHIHALF relocation */
|
||||
#define R_BYTE 035 /* relocatable byte value */
|
||||
#define R_HWORD 036 /* relocatable halfword value */
|
||||
#define R_WORD 037 /* relocatable word value */
|
||||
|
||||
#define R_IGLBLRC 040 /* instruction global register RC */
|
||||
#define R_IGLBLRA 041 /* instruction global register RA */
|
||||
#define R_IGLBLRB 042 /* instruction global register RB */
|
||||
|
||||
/*
|
||||
NOTE:
|
||||
All the "I" forms refer to 29000 instruction formats. The linker is
|
||||
expected to know how the numeric information is split and/or aligned
|
||||
within the instruction word(s). R_BYTE works for instructions, too.
|
||||
|
||||
If the parameter to a CONSTH instruction is a relocatable type, two
|
||||
relocation records are written. The first has an r_type of R_IHIHALF
|
||||
(33 octal) and a normal r_vaddr and r_symndx. The second relocation
|
||||
record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which
|
||||
is redundant), and an r_symndx containing the 32-bit constant offset
|
||||
to the relocation instead of the actual symbol table index. This
|
||||
second record is always written, even if the constant offset is zero.
|
||||
The constant fields of the instruction are set to zero.
|
||||
*/
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
** Line number entry declaration and related definitions
|
||||
*/
|
||||
|
||||
struct external_lineno
|
||||
{
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6 /* sizeof (LINENO) */
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
** Symbol entry declaration and related definitions
|
||||
*/
|
||||
|
||||
#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*
|
||||
** Storage class definitions - new classes for global registers.
|
||||
*/
|
||||
|
||||
#define C_GLBLREG 19 /* global register */
|
||||
#define C_EXTREG 20 /* external global register */
|
||||
#define C_DEFREG 21 /* ext. def. of global register */
|
||||
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*
|
||||
** Derived symbol mask/shifts.
|
||||
*/
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
** Auxiliary symbol table entry declaration and related
|
||||
** definitions.
|
||||
*/
|
||||
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
};
|
||||
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
|
@ -1,362 +0,0 @@
|
|||
/* ECOFF support on Alpha machines.
|
||||
coff/ecoff.h must be included before this file. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
unsigned char f_magic[2]; /* magic number */
|
||||
unsigned char f_nscns[2]; /* number of sections */
|
||||
unsigned char f_timdat[4]; /* time & date stamp */
|
||||
unsigned char f_symptr[8]; /* file pointer to symtab */
|
||||
unsigned char f_nsyms[4]; /* number of symtab entries */
|
||||
unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
unsigned char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* Magic numbers are defined in coff/ecoff.h. */
|
||||
#define ALPHA_ECOFF_BADMAG(x) \
|
||||
((x).f_magic != ALPHA_MAGIC && (x).f_magic != ALPHA_MAGIC_BSD)
|
||||
|
||||
/* The object type is encoded in the f_flags. */
|
||||
#define F_ALPHA_OBJECT_TYPE_MASK 0x3000
|
||||
#define F_ALPHA_NO_SHARED 0x1000
|
||||
#define F_ALPHA_SHARABLE 0x2000
|
||||
#define F_ALPHA_CALL_SHARED 0x3000
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 24
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char bldrev[2]; /* ?? */
|
||||
unsigned char padding[2]; /* pad to quadword boundary */
|
||||
unsigned char tsize[8]; /* text size in bytes */
|
||||
unsigned char dsize[8]; /* initialized data " " */
|
||||
unsigned char bsize[8]; /* uninitialized data " " */
|
||||
unsigned char entry[8]; /* entry pt. */
|
||||
unsigned char text_start[8]; /* base of text used for this file */
|
||||
unsigned char data_start[8]; /* base of data used for this file */
|
||||
unsigned char bss_start[8]; /* base of bss used for this file */
|
||||
unsigned char gprmask[4]; /* bitmask of general registers used */
|
||||
unsigned char fprmask[4]; /* bitmask of floating point registers used */
|
||||
unsigned char gp_value[8]; /* value for gp register */
|
||||
} AOUTHDR;
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
#define AOUTSZ 80
|
||||
#define AOUTHDRSZ 80
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr {
|
||||
unsigned char s_name[8]; /* section name */
|
||||
unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
|
||||
unsigned char s_vaddr[8]; /* virtual address */
|
||||
unsigned char s_size[8]; /* section size */
|
||||
unsigned char s_scnptr[8]; /* file ptr to raw data for section */
|
||||
unsigned char s_relptr[8]; /* file ptr to relocation */
|
||||
unsigned char s_lnnoptr[8]; /* file ptr to line numbers */
|
||||
unsigned char s_nreloc[2]; /* number of relocation entries */
|
||||
unsigned char s_nlnno[2]; /* number of line number entries*/
|
||||
unsigned char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 64
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc {
|
||||
unsigned char r_vaddr[8];
|
||||
unsigned char r_symndx[4];
|
||||
unsigned char r_bits[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
/* Constants to unpack the r_bits field. The Alpha seems to always be
|
||||
little endian, so I haven't bothered to define big endian variants
|
||||
of these. */
|
||||
|
||||
#define RELOC_BITS0_TYPE_LITTLE 0xff
|
||||
#define RELOC_BITS0_TYPE_SH_LITTLE 0
|
||||
|
||||
#define RELOC_BITS1_EXTERN_LITTLE 0x01
|
||||
|
||||
#define RELOC_BITS1_OFFSET_LITTLE 0x7e
|
||||
#define RELOC_BITS1_OFFSET_SH_LITTLE 1
|
||||
|
||||
#define RELOC_BITS1_RESERVED_LITTLE 0x80
|
||||
#define RELOC_BITS1_RESERVED_SH_LITTLE 7
|
||||
#define RELOC_BITS2_RESERVED_LITTLE 0xff
|
||||
#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1
|
||||
#define RELOC_BITS3_RESERVED_LITTLE 0x03
|
||||
#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9
|
||||
|
||||
#define RELOC_BITS3_SIZE_LITTLE 0xfc
|
||||
#define RELOC_BITS3_SIZE_SH_LITTLE 2
|
||||
|
||||
/* The r_type field in a reloc is one of the following values. */
|
||||
#define ALPHA_R_IGNORE 0
|
||||
#define ALPHA_R_REFLONG 1
|
||||
#define ALPHA_R_REFQUAD 2
|
||||
#define ALPHA_R_GPREL32 3
|
||||
#define ALPHA_R_LITERAL 4
|
||||
#define ALPHA_R_LITUSE 5
|
||||
#define ALPHA_R_GPDISP 6
|
||||
#define ALPHA_R_BRADDR 7
|
||||
#define ALPHA_R_HINT 8
|
||||
#define ALPHA_R_SREL16 9
|
||||
#define ALPHA_R_SREL32 10
|
||||
#define ALPHA_R_SREL64 11
|
||||
#define ALPHA_R_OP_PUSH 12
|
||||
#define ALPHA_R_OP_STORE 13
|
||||
#define ALPHA_R_OP_PSUB 14
|
||||
#define ALPHA_R_OP_PRSHIFT 15
|
||||
#define ALPHA_R_GPVALUE 16
|
||||
#define ALPHA_R_GPRELHIGH 17
|
||||
#define ALPHA_R_GPRELLOW 18
|
||||
#define ALPHA_R_IMMED 19
|
||||
|
||||
/* Overloaded reloc value used by Net- and OpenBSD. */
|
||||
#define ALPHA_R_LITERALSLEAZY 17
|
||||
|
||||
/* With ALPHA_R_LITUSE, the r_size field is one of the following values. */
|
||||
#define ALPHA_R_LU_BASE 1
|
||||
#define ALPHA_R_LU_BYTOFF 2
|
||||
#define ALPHA_R_LU_JSR 3
|
||||
|
||||
/* With ALPHA_R_IMMED, the r_size field is one of the following values. */
|
||||
#define ALPHA_R_IMMED_GP_16 1
|
||||
#define ALPHA_R_IMMED_GP_HI32 2
|
||||
#define ALPHA_R_IMMED_SCN_HI32 3
|
||||
#define ALPHA_R_IMMED_BR_HI32 4
|
||||
#define ALPHA_R_IMMED_LO32 5
|
||||
|
||||
/********************** SYMBOLIC INFORMATION **********************/
|
||||
|
||||
/* Written by John Gilmore. */
|
||||
|
||||
/* ECOFF uses COFF-like section structures, but its own symbol format.
|
||||
This file defines the symbol format in fields whose size and alignment
|
||||
will not vary on different host systems. */
|
||||
|
||||
/* File header as a set of bytes */
|
||||
|
||||
struct hdr_ext {
|
||||
unsigned char h_magic[2];
|
||||
unsigned char h_vstamp[2];
|
||||
unsigned char h_ilineMax[4];
|
||||
unsigned char h_idnMax[4];
|
||||
unsigned char h_ipdMax[4];
|
||||
unsigned char h_isymMax[4];
|
||||
unsigned char h_ioptMax[4];
|
||||
unsigned char h_iauxMax[4];
|
||||
unsigned char h_issMax[4];
|
||||
unsigned char h_issExtMax[4];
|
||||
unsigned char h_ifdMax[4];
|
||||
unsigned char h_crfd[4];
|
||||
unsigned char h_iextMax[4];
|
||||
unsigned char h_cbLine[8];
|
||||
unsigned char h_cbLineOffset[8];
|
||||
unsigned char h_cbDnOffset[8];
|
||||
unsigned char h_cbPdOffset[8];
|
||||
unsigned char h_cbSymOffset[8];
|
||||
unsigned char h_cbOptOffset[8];
|
||||
unsigned char h_cbAuxOffset[8];
|
||||
unsigned char h_cbSsOffset[8];
|
||||
unsigned char h_cbSsExtOffset[8];
|
||||
unsigned char h_cbFdOffset[8];
|
||||
unsigned char h_cbRfdOffset[8];
|
||||
unsigned char h_cbExtOffset[8];
|
||||
};
|
||||
|
||||
/* File descriptor external record */
|
||||
|
||||
struct fdr_ext {
|
||||
unsigned char f_adr[8];
|
||||
unsigned char f_cbLineOffset[8];
|
||||
unsigned char f_cbLine[8];
|
||||
unsigned char f_cbSs[8];
|
||||
unsigned char f_rss[4];
|
||||
unsigned char f_issBase[4];
|
||||
unsigned char f_isymBase[4];
|
||||
unsigned char f_csym[4];
|
||||
unsigned char f_ilineBase[4];
|
||||
unsigned char f_cline[4];
|
||||
unsigned char f_ioptBase[4];
|
||||
unsigned char f_copt[4];
|
||||
unsigned char f_ipdFirst[4];
|
||||
unsigned char f_cpd[4];
|
||||
unsigned char f_iauxBase[4];
|
||||
unsigned char f_caux[4];
|
||||
unsigned char f_rfdBase[4];
|
||||
unsigned char f_crfd[4];
|
||||
unsigned char f_bits1[1];
|
||||
unsigned char f_bits2[3];
|
||||
unsigned char f_padding[4];
|
||||
};
|
||||
|
||||
#define FDR_BITS1_LANG_BIG 0xF8
|
||||
#define FDR_BITS1_LANG_SH_BIG 3
|
||||
#define FDR_BITS1_LANG_LITTLE 0x1F
|
||||
#define FDR_BITS1_LANG_SH_LITTLE 0
|
||||
|
||||
#define FDR_BITS1_FMERGE_BIG 0x04
|
||||
#define FDR_BITS1_FMERGE_LITTLE 0x20
|
||||
|
||||
#define FDR_BITS1_FREADIN_BIG 0x02
|
||||
#define FDR_BITS1_FREADIN_LITTLE 0x40
|
||||
|
||||
#define FDR_BITS1_FBIGENDIAN_BIG 0x01
|
||||
#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
|
||||
|
||||
#define FDR_BITS2_GLEVEL_BIG 0xC0
|
||||
#define FDR_BITS2_GLEVEL_SH_BIG 6
|
||||
#define FDR_BITS2_GLEVEL_LITTLE 0x03
|
||||
#define FDR_BITS2_GLEVEL_SH_LITTLE 0
|
||||
|
||||
/* We ignore the `reserved' field in bits2. */
|
||||
|
||||
/* Procedure descriptor external record */
|
||||
|
||||
struct pdr_ext {
|
||||
unsigned char p_adr[8];
|
||||
unsigned char p_cbLineOffset[8];
|
||||
unsigned char p_isym[4];
|
||||
unsigned char p_iline[4];
|
||||
unsigned char p_regmask[4];
|
||||
unsigned char p_regoffset[4];
|
||||
unsigned char p_iopt[4];
|
||||
unsigned char p_fregmask[4];
|
||||
unsigned char p_fregoffset[4];
|
||||
unsigned char p_frameoffset[4];
|
||||
unsigned char p_lnLow[4];
|
||||
unsigned char p_lnHigh[4];
|
||||
unsigned char p_gp_prologue[1];
|
||||
unsigned char p_bits1[1];
|
||||
unsigned char p_bits2[1];
|
||||
unsigned char p_localoff[1];
|
||||
unsigned char p_framereg[2];
|
||||
unsigned char p_pcreg[2];
|
||||
};
|
||||
|
||||
#define PDR_BITS1_GP_USED_BIG 0x80
|
||||
#define PDR_BITS1_REG_FRAME_BIG 0x40
|
||||
#define PDR_BITS1_PROF_BIG 0x20
|
||||
#define PDR_BITS1_RESERVED_BIG 0x1f
|
||||
#define PDR_BITS1_RESERVED_SH_LEFT_BIG 8
|
||||
#define PDR_BITS2_RESERVED_BIG 0xff
|
||||
#define PDR_BITS2_RESERVED_SH_BIG 0
|
||||
|
||||
#define PDR_BITS1_GP_USED_LITTLE 0x01
|
||||
#define PDR_BITS1_REG_FRAME_LITTLE 0x02
|
||||
#define PDR_BITS1_PROF_LITTLE 0x04
|
||||
#define PDR_BITS1_RESERVED_LITTLE 0xf8
|
||||
#define PDR_BITS1_RESERVED_SH_LITTLE 3
|
||||
#define PDR_BITS2_RESERVED_LITTLE 0xff
|
||||
#define PDR_BITS2_RESERVED_SH_LEFT_LITTLE 5
|
||||
|
||||
/* Line numbers */
|
||||
|
||||
struct line_ext {
|
||||
unsigned char l_line[4];
|
||||
};
|
||||
|
||||
/* Symbol external record */
|
||||
|
||||
struct sym_ext {
|
||||
unsigned char s_value[8];
|
||||
unsigned char s_iss[4];
|
||||
unsigned char s_bits1[1];
|
||||
unsigned char s_bits2[1];
|
||||
unsigned char s_bits3[1];
|
||||
unsigned char s_bits4[1];
|
||||
};
|
||||
|
||||
#define SYM_BITS1_ST_BIG 0xFC
|
||||
#define SYM_BITS1_ST_SH_BIG 2
|
||||
#define SYM_BITS1_ST_LITTLE 0x3F
|
||||
#define SYM_BITS1_ST_SH_LITTLE 0
|
||||
|
||||
#define SYM_BITS1_SC_BIG 0x03
|
||||
#define SYM_BITS1_SC_SH_LEFT_BIG 3
|
||||
#define SYM_BITS1_SC_LITTLE 0xC0
|
||||
#define SYM_BITS1_SC_SH_LITTLE 6
|
||||
|
||||
#define SYM_BITS2_SC_BIG 0xE0
|
||||
#define SYM_BITS2_SC_SH_BIG 5
|
||||
#define SYM_BITS2_SC_LITTLE 0x07
|
||||
#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
|
||||
|
||||
#define SYM_BITS2_RESERVED_BIG 0x10
|
||||
#define SYM_BITS2_RESERVED_LITTLE 0x08
|
||||
|
||||
#define SYM_BITS2_INDEX_BIG 0x0F
|
||||
#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
|
||||
#define SYM_BITS2_INDEX_LITTLE 0xF0
|
||||
#define SYM_BITS2_INDEX_SH_LITTLE 4
|
||||
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
|
||||
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
|
||||
|
||||
/* External symbol external record */
|
||||
|
||||
struct ext_ext {
|
||||
struct sym_ext es_asym;
|
||||
unsigned char es_bits1[1];
|
||||
unsigned char es_bits2[3];
|
||||
unsigned char es_ifd[4];
|
||||
};
|
||||
|
||||
#define EXT_BITS1_JMPTBL_BIG 0x80
|
||||
#define EXT_BITS1_JMPTBL_LITTLE 0x01
|
||||
|
||||
#define EXT_BITS1_COBOL_MAIN_BIG 0x40
|
||||
#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
|
||||
|
||||
#define EXT_BITS1_WEAKEXT_BIG 0x20
|
||||
#define EXT_BITS1_WEAKEXT_LITTLE 0x04
|
||||
|
||||
/* Dense numbers external record */
|
||||
|
||||
struct dnr_ext {
|
||||
unsigned char d_rfd[4];
|
||||
unsigned char d_index[4];
|
||||
};
|
||||
|
||||
/* Relative file descriptor */
|
||||
|
||||
struct rfd_ext {
|
||||
unsigned char rfd[4];
|
||||
};
|
||||
|
||||
/* Optimizer symbol external record */
|
||||
|
||||
struct opt_ext {
|
||||
unsigned char o_bits1[1];
|
||||
unsigned char o_bits2[1];
|
||||
unsigned char o_bits3[1];
|
||||
unsigned char o_bits4[1];
|
||||
struct rndx_ext o_rndx;
|
||||
unsigned char o_offset[4];
|
||||
};
|
||||
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
|
||||
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
|
||||
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
|
||||
|
|
@ -1,252 +0,0 @@
|
|||
/*** coff information for Apollo M68K */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
/* Motorola 68000/68008/68010/68020 */
|
||||
#define MC68MAGIC 0520
|
||||
#define MC68KWRMAGIC 0520 /* writeable text segments */
|
||||
#define MC68TVMAGIC 0521
|
||||
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
|
||||
#define MC68KPGMAGIC 0522 /* demand paged text segments */
|
||||
#define M68MAGIC 0210
|
||||
#define M68TVMAGIC 0211
|
||||
|
||||
/* Apollo 68000-based machines have a different magic number. This comes
|
||||
* from /usr/include/apollo/filehdr.h
|
||||
*/
|
||||
#define APOLLOM68KMAGIC 0627
|
||||
|
||||
#define OMAGIC M68MAGIC
|
||||
#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
|
||||
((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \
|
||||
((x).f_magic!=APOLLOM68KMAGIC) )
|
||||
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
char o_sri[4]; /* Apollo specific - .sri data pointer */
|
||||
char o_inlib[4]; /* Apollo specific - .inlib data pointer */
|
||||
char vid[8]; /* Apollo specific - 64 bit version ID */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define APOLLO_COFF_VERSION_NUMBER 1 /* the value of the aouthdr magic */
|
||||
#define AOUTHDRSZ 44
|
||||
#define AOUTSZ 44
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr {
|
||||
/* Apollo allow for larger section names by allowing it to be in
|
||||
* the string table.
|
||||
*/
|
||||
char s_name[8];
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/* If s_zeores is all zeroes, s_offset gives the real location of the name
|
||||
* in the string table.
|
||||
*/
|
||||
|
||||
#define s_zeroes section_name.s_name
|
||||
#define s_offset (section_name.s_name+4)
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _TV ".tv"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
#define _LINES ".lines"
|
||||
#define _BLOCKS ".blocks"
|
||||
#define _SRI ".sri" /* Static Resource Information (systype,
|
||||
et al.) */
|
||||
#define _MIR ".mir" /* Module Information Records */
|
||||
#define _APTV ".aptv" /* Apollo-style transfer vectors. */
|
||||
#define _INLIB ".inlib" /* Shared Library information */
|
||||
#define _RWDI ".rwdi" /* Read/write data initialization directives for
|
||||
compressed sections */
|
||||
#define _UNWIND ".unwind" /* Stack unwind information */
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
char r_offset[4];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
#define RELSZ 14
|
||||
#else
|
||||
#define RELSZ 10
|
||||
#endif
|
||||
|
||||
/* Apollo specific STYP flags */
|
||||
|
||||
#define STYP_RELOCATED_NOT_LOADED 0x00010000 /* Section is relocated normally during linking, but need
|
||||
not be loaded during program execution */
|
||||
#define STYP_DEBUG 0x00020000 /* debug section */
|
||||
#define STYP_OVERLAY 0x00040000 /* Section is overlayed */
|
||||
#define STYP_INSTRUCTION 0x00200000 /* Section contains executable code */
|
||||
|
||||
#define STYP_ZERO 0x00800000 /* Section is initialized to zero */
|
||||
#define STYP_INSTALLED 0x02000000 /* Section should be installable in KGT */
|
||||
#define STYP_LOOK_INSTALLED 0x04000000 /* Look for section in KGT */
|
||||
#define STYP_SECALIGN1 0x08000000 /* Specially aligned section */
|
||||
#define STYP_SECALIGN2 0x10000000 /* " " " */
|
||||
#define STYP_COMPRESSED 0x20000000 /* No section data per se (s_scnptr = 0), but there are
|
||||
initialization directives for it in .rwdi section
|
||||
(used in conjunction with STYP_BSS) */
|
||||
|
|
@ -1,259 +0,0 @@
|
|||
/*** coff information for the ARM */
|
||||
|
||||
#define COFFARM 1
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_INTERWORK file supports switching between ARM and Thumb instruction sets
|
||||
* F_INTERWORK_SET the F_INTERWORK bit is valid
|
||||
* F_APCS_FLOAT code passes float arguments in float registers
|
||||
* F_PIC code is reentrant/position-independent
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
* F_APCS_26 file uses 26 bit ARM Procedure Calling Standard
|
||||
* F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
#define F_INTERWORK (0x0010)
|
||||
#define F_INTERWORK_SET (0x0020)
|
||||
#define F_APCS_FLOAT (0x0040)
|
||||
#undef F_AR16WR
|
||||
#define F_PIC (0x0080)
|
||||
#define F_AR32WR (0x0100)
|
||||
#define F_APCS_26 (0x0400)
|
||||
#define F_APCS_SET (0x0800)
|
||||
|
||||
/* Bits stored in flags field of the internal_f structure */
|
||||
|
||||
#define F_INTERWORK (0x0010)
|
||||
#define F_APCS_FLOAT (0x0040)
|
||||
#define F_PIC (0x0080)
|
||||
#define F_APCS26 (0x1000)
|
||||
#define F_ARM_ARCHITECTURE_MASK (0x4000+0x0800+0x0400)
|
||||
#define F_ARM_2 (0x0400)
|
||||
#define F_ARM_2a (0x0800)
|
||||
#define F_ARM_3 (0x0c00)
|
||||
#define F_ARM_3M (0x4000)
|
||||
#define F_ARM_4 (0x4400)
|
||||
#define F_ARM_4T (0x4800)
|
||||
#define F_ARM_spare (0x4c00)
|
||||
|
||||
/*
|
||||
* ARMMAGIC ought to encoded the procesor type,
|
||||
* but it is too late to change it now, instead
|
||||
* the flags field of the internal_f structure
|
||||
* is used as shown above.
|
||||
*
|
||||
* XXX - NC 5/6/97
|
||||
*/
|
||||
|
||||
#define ARMMAGIC 0xa00 /* I just made this up */
|
||||
|
||||
#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
|
||||
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
|
||||
/* define some NT default values */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIB ".lib"
|
||||
|
||||
/* We use the .rdata section to hold read only data. */
|
||||
#define _LIT ".rdata"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
char x_checksum[4]; /* section COMDAT checksum */
|
||||
char x_associated[2]; /* COMDAT associated section index */
|
||||
char x_comdat[1]; /* COMDAT selection number */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
# define _ETEXT "etext"
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char r_offset[4];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 14
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/* Modifications of internal.h and m68k.h needed by A/UX
|
||||
Suggested by Ian Lance Taylor <ian@cygnus.com> */
|
||||
|
||||
#ifndef GNU_COFF_AUX_H
|
||||
#define GNU_COFF_AUX_H 1
|
||||
|
||||
#include "coff/internal.h"
|
||||
#include "coff/m68k.h"
|
||||
|
||||
/* Section contains 64-byte padded pathnames of shared libraries */
|
||||
#undef STYP_LIB
|
||||
#define STYP_LIB 0x200
|
||||
|
||||
/* Section contains shared library initialization code */
|
||||
#undef STYP_INIT
|
||||
#define STYP_INIT 0x400
|
||||
|
||||
/* Section contains .ident information */
|
||||
#undef STYP_IDENT
|
||||
#define STYP_IDENT 0x800
|
||||
|
||||
/* Section types used by bfd and gas not defined (directly) by A/UX */
|
||||
#undef STYP_OVER
|
||||
#define STYP_OVER 0
|
||||
#undef STYP_INFO
|
||||
#define STYP_INFO STYP_IDENT
|
||||
|
||||
/* Traditional name of the section tagged with STYP_LIB */
|
||||
#define _LIB ".lib"
|
||||
|
||||
#endif /* GNU_COFF_AUX_H */
|
||||
|
|
@ -1,421 +0,0 @@
|
|||
#ifndef ECOFF_H
|
||||
#define ECOFF_H
|
||||
|
||||
/* Generic ECOFF support.
|
||||
This does not include symbol information, found in sym.h and
|
||||
symconst.h. */
|
||||
|
||||
/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
|
||||
little endian machines. MIPS_MAGIC_BIG is used on big endian
|
||||
machines. Where is MIPS_MAGIC_1 from? */
|
||||
#define MIPS_MAGIC_1 0x0180
|
||||
#define MIPS_MAGIC_LITTLE 0x0162
|
||||
#define MIPS_MAGIC_BIG 0x0160
|
||||
|
||||
/* These are the magic numbers used for MIPS code compiled at ISA
|
||||
level 2. */
|
||||
#define MIPS_MAGIC_LITTLE2 0x0166
|
||||
#define MIPS_MAGIC_BIG2 0x0163
|
||||
|
||||
/* These are the magic numbers used for MIPS code compiled at ISA
|
||||
level 3. */
|
||||
#define MIPS_MAGIC_LITTLE3 0x142
|
||||
#define MIPS_MAGIC_BIG3 0x140
|
||||
|
||||
/* Alpha magic numbers used in filehdr. */
|
||||
#define ALPHA_MAGIC 0x183
|
||||
#define ALPHA_MAGIC_BSD 0x185
|
||||
|
||||
/* Magic numbers used in a.out header. */
|
||||
#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */
|
||||
#define ECOFF_AOUT_ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
|
||||
/* Names of special sections. */
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _RDATA ".rdata"
|
||||
#define _SDATA ".sdata"
|
||||
#define _SBSS ".sbss"
|
||||
#define _LITA ".lita"
|
||||
#define _LIT4 ".lit4"
|
||||
#define _LIT8 ".lit8"
|
||||
#define _LIB ".lib"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
#define _PDATA ".pdata"
|
||||
#define _XDATA ".xdata"
|
||||
#define _GOT ".got"
|
||||
#define _HASH ".hash"
|
||||
#define _DYNSYM ".dynsym"
|
||||
#define _DYNSTR ".dynstr"
|
||||
#define _RELDYN ".rel.dyn"
|
||||
#define _CONFLIC ".conflic"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIBLIST ".liblist"
|
||||
#define _DYNAMIC ".dynamic"
|
||||
#define _RCONST ".rconst"
|
||||
|
||||
/* ECOFF uses some additional section flags. */
|
||||
#define STYP_RDATA 0x100
|
||||
#define STYP_SDATA 0x200
|
||||
#define STYP_SBSS 0x400
|
||||
#define STYP_GOT 0x1000
|
||||
#define STYP_DYNAMIC 0x2000
|
||||
#define STYP_DYNSYM 0x4000
|
||||
#define STYP_RELDYN 0x8000
|
||||
#define STYP_DYNSTR 0x10000
|
||||
#define STYP_HASH 0x20000
|
||||
#define STYP_LIBLIST 0x40000
|
||||
#define STYP_CONFLIC 0x100000
|
||||
#define STYP_ECOFF_FINI 0x1000000
|
||||
#define STYP_EXTENDESC 0x2000000 /* 0x02FFF000 bits => scn type, rest clr */
|
||||
#define STYP_LITA 0x4000000
|
||||
#define STYP_LIT8 0x8000000
|
||||
#define STYP_LIT4 0x10000000
|
||||
#define STYP_ECOFF_LIB 0x40000000
|
||||
#define STYP_ECOFF_INIT 0x80000000
|
||||
#define STYP_OTHER_LOAD (STYP_ECOFF_INIT | STYP_ECOFF_FINI)
|
||||
|
||||
/* extended section types */
|
||||
#define STYP_COMMENT 0x2100000
|
||||
#define STYP_RCONST 0x2200000
|
||||
#define STYP_XDATA 0x2400000
|
||||
#define STYP_PDATA 0x2800000
|
||||
|
||||
/* The linker needs a section to hold small common variables while
|
||||
linking. There is no convenient way to create it when the linker
|
||||
needs it, so we always create one for each BFD. We then avoid
|
||||
writing it out. */
|
||||
#define SCOMMON ".scommon"
|
||||
|
||||
/* If the extern bit in a reloc is 1, then r_symndx is an index into
|
||||
the external symbol table. If the extern bit is 0, then r_symndx
|
||||
indicates a section, and is one of the following values. */
|
||||
#define RELOC_SECTION_NONE 0
|
||||
#define RELOC_SECTION_TEXT 1
|
||||
#define RELOC_SECTION_RDATA 2
|
||||
#define RELOC_SECTION_DATA 3
|
||||
#define RELOC_SECTION_SDATA 4
|
||||
#define RELOC_SECTION_SBSS 5
|
||||
#define RELOC_SECTION_BSS 6
|
||||
#define RELOC_SECTION_INIT 7
|
||||
#define RELOC_SECTION_LIT8 8
|
||||
#define RELOC_SECTION_LIT4 9
|
||||
#define RELOC_SECTION_XDATA 10
|
||||
#define RELOC_SECTION_PDATA 11
|
||||
#define RELOC_SECTION_FINI 12
|
||||
#define RELOC_SECTION_LITA 13
|
||||
#define RELOC_SECTION_ABS 14
|
||||
#define RELOC_SECTION_RCONST 15
|
||||
|
||||
#define NUM_RELOC_SECTIONS 16
|
||||
|
||||
/********************** STABS **********************/
|
||||
|
||||
/* gcc uses mips-tfile to output type information in special stabs
|
||||
entries. These must match the corresponding definition in
|
||||
gcc/config/mips.h. At some point, these should probably go into a
|
||||
shared include file, but currently gcc and gdb do not share any
|
||||
directories. */
|
||||
#define CODE_MASK 0x8F300
|
||||
#define ECOFF_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK)
|
||||
#define ECOFF_MARK_STAB(code) ((code)+CODE_MASK)
|
||||
#define ECOFF_UNMARK_STAB(code) ((code)-CODE_MASK)
|
||||
#define STABS_SYMBOL "@stabs"
|
||||
|
||||
/********************** COFF **********************/
|
||||
|
||||
/* gcc also uses mips-tfile to output COFF debugging information.
|
||||
These are the values it uses when outputting the .type directive.
|
||||
These should also be in a shared include file. */
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
/********************** AUX **********************/
|
||||
|
||||
/* The auxiliary type information is the same on all known ECOFF
|
||||
targets. I can't see any reason that it would ever change, so I am
|
||||
going to gamble and define the external structures here, in the
|
||||
target independent ECOFF header file. The internal forms are
|
||||
defined in coff/sym.h, which was originally donated by MIPS
|
||||
Computer Systems. */
|
||||
|
||||
/* Type information external record */
|
||||
|
||||
struct tir_ext {
|
||||
unsigned char t_bits1[1];
|
||||
unsigned char t_tq45[1];
|
||||
unsigned char t_tq01[1];
|
||||
unsigned char t_tq23[1];
|
||||
};
|
||||
|
||||
#define TIR_BITS1_FBITFIELD_BIG ((unsigned int) 0x80)
|
||||
#define TIR_BITS1_FBITFIELD_LITTLE ((unsigned int) 0x01)
|
||||
|
||||
#define TIR_BITS1_CONTINUED_BIG ((unsigned int) 0x40)
|
||||
#define TIR_BITS1_CONTINUED_LITTLE ((unsigned int) 0x02)
|
||||
|
||||
#define TIR_BITS1_BT_BIG ((unsigned int) 0x3F)
|
||||
#define TIR_BITS1_BT_SH_BIG 0
|
||||
#define TIR_BITS1_BT_LITTLE ((unsigned int) 0xFC)
|
||||
#define TIR_BITS1_BT_SH_LITTLE 2
|
||||
|
||||
#define TIR_BITS_TQ4_BIG ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ4_SH_BIG 4
|
||||
#define TIR_BITS_TQ5_BIG ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ5_SH_BIG 0
|
||||
#define TIR_BITS_TQ4_LITTLE ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ4_SH_LITTLE 0
|
||||
#define TIR_BITS_TQ5_LITTLE ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ5_SH_LITTLE 4
|
||||
|
||||
#define TIR_BITS_TQ0_BIG ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ0_SH_BIG 4
|
||||
#define TIR_BITS_TQ1_BIG ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ1_SH_BIG 0
|
||||
#define TIR_BITS_TQ0_LITTLE ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ0_SH_LITTLE 0
|
||||
#define TIR_BITS_TQ1_LITTLE ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ1_SH_LITTLE 4
|
||||
|
||||
#define TIR_BITS_TQ2_BIG ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ2_SH_BIG 4
|
||||
#define TIR_BITS_TQ3_BIG ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ3_SH_BIG 0
|
||||
#define TIR_BITS_TQ2_LITTLE ((unsigned int) 0x0F)
|
||||
#define TIR_BITS_TQ2_SH_LITTLE 0
|
||||
#define TIR_BITS_TQ3_LITTLE ((unsigned int) 0xF0)
|
||||
#define TIR_BITS_TQ3_SH_LITTLE 4
|
||||
|
||||
/* Relative symbol external record */
|
||||
|
||||
struct rndx_ext {
|
||||
unsigned char r_bits[4];
|
||||
};
|
||||
|
||||
#define RNDX_BITS0_RFD_SH_LEFT_BIG 4
|
||||
#define RNDX_BITS1_RFD_BIG ((unsigned int) 0xF0)
|
||||
#define RNDX_BITS1_RFD_SH_BIG 4
|
||||
|
||||
#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0
|
||||
#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F)
|
||||
#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8
|
||||
|
||||
#define RNDX_BITS1_INDEX_BIG ((unsigned int) 0x0F)
|
||||
#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16
|
||||
#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8
|
||||
#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0
|
||||
|
||||
#define RNDX_BITS1_INDEX_LITTLE ((unsigned int) 0xF0)
|
||||
#define RNDX_BITS1_INDEX_SH_LITTLE 4
|
||||
#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4
|
||||
#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12
|
||||
|
||||
/* Auxiliary symbol information external record */
|
||||
|
||||
union aux_ext {
|
||||
struct tir_ext a_ti;
|
||||
struct rndx_ext a_rndx;
|
||||
unsigned char a_dnLow[4];
|
||||
unsigned char a_dnHigh[4];
|
||||
unsigned char a_isym[4];
|
||||
unsigned char a_iss[4];
|
||||
unsigned char a_width[4];
|
||||
unsigned char a_count[4];
|
||||
};
|
||||
|
||||
#define AUX_GET_ANY(bigend, ax, field) \
|
||||
((bigend) ? bfd_getb32 ((ax)->field) : bfd_getl32 ((ax)->field))
|
||||
|
||||
#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)
|
||||
#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)
|
||||
#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)
|
||||
#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)
|
||||
#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)
|
||||
#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)
|
||||
|
||||
#define AUX_PUT_ANY(bigend, val, ax, field) \
|
||||
((bigend) \
|
||||
? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \
|
||||
: (bfd_putl32 ((bfd_vma) (val), (ax)->field), 0))
|
||||
|
||||
#define AUX_PUT_DNLOW(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)
|
||||
#define AUX_PUT_DNHIGH(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)
|
||||
#define AUX_PUT_ISYM(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_isym)
|
||||
#define AUX_PUT_ISS(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_iss)
|
||||
#define AUX_PUT_WIDTH(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_width)
|
||||
#define AUX_PUT_COUNT(bigend, val, ax) \
|
||||
AUX_PUT_ANY ((bigend), (val), (ax), a_count)
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
/* For efficiency, gdb deals directly with the unswapped symbolic
|
||||
information (that way it only takes the time to swap information
|
||||
that it really needs to read). gdb originally retrieved the
|
||||
information directly from the BFD backend information, but that
|
||||
strategy, besides being sort of ugly, does not work for MIPS ELF,
|
||||
which also uses ECOFF debugging information. This structure holds
|
||||
pointers to the (mostly) unswapped symbolic information. */
|
||||
|
||||
struct ecoff_debug_info
|
||||
{
|
||||
/* The swapped ECOFF symbolic header. */
|
||||
HDRR symbolic_header;
|
||||
|
||||
/* Pointers to the unswapped symbolic information. Note that the
|
||||
pointers to external structures point to different sorts of
|
||||
information on different ECOFF targets. The ecoff_debug_swap
|
||||
structure provides the sizes of the structures and the functions
|
||||
needed to swap the information in and out. These pointers are
|
||||
all pointers to arrays, not single structures. They will be NULL
|
||||
if there are no instances of the relevant structure. These
|
||||
fields are also used by the assembler to output ECOFF debugging
|
||||
information. */
|
||||
unsigned char *line;
|
||||
PTR external_dnr; /* struct dnr_ext */
|
||||
PTR external_pdr; /* struct pdr_ext */
|
||||
PTR external_sym; /* struct sym_ext */
|
||||
PTR external_opt; /* struct opt_ext */
|
||||
union aux_ext *external_aux;
|
||||
char *ss;
|
||||
char *ssext;
|
||||
PTR external_fdr; /* struct fdr_ext */
|
||||
PTR external_rfd; /* struct rfd_ext */
|
||||
PTR external_ext; /* struct ext_ext */
|
||||
|
||||
/* These fields are used when linking. They may disappear at some
|
||||
point. */
|
||||
char *ssext_end;
|
||||
PTR external_ext_end;
|
||||
|
||||
/* When linking, this field holds a mapping from the input FDR
|
||||
numbers to the output numbers, and is used when writing out the
|
||||
external symbols. It is NULL if no mapping is required. */
|
||||
RFDT *ifdmap;
|
||||
|
||||
/* The swapped FDR information. Currently this is never NULL, but
|
||||
code using this structure should probably double-check in case
|
||||
this changes in the future. This is a pointer to an array, not a
|
||||
single structure. */
|
||||
FDR *fdr;
|
||||
|
||||
/* When relaxing MIPS embedded PIC code, we may need to adjust
|
||||
symbol values when they are output. This is a linked list of
|
||||
structures indicating how values should be adjusted. There is no
|
||||
requirement that the entries be in any order, or that they not
|
||||
overlap. This field is normally NULL, in which case no
|
||||
adjustments need to be made. */
|
||||
struct ecoff_value_adjust *adjust;
|
||||
};
|
||||
|
||||
/* This structure describes how to adjust symbol values when
|
||||
outputting MIPS embedded PIC code. These adjustments only apply to
|
||||
the internal symbols, as the external symbol values will come from
|
||||
the hash table and have already been adjusted. */
|
||||
|
||||
struct ecoff_value_adjust
|
||||
{
|
||||
/* Next entry on adjustment list. */
|
||||
struct ecoff_value_adjust *next;
|
||||
/* Starting VMA of adjustment. This is the VMA in the ECOFF file,
|
||||
not the offset from the start of the section. Thus it should
|
||||
indicate a particular section. */
|
||||
bfd_vma start;
|
||||
/* Ending VMA of adjustment. */
|
||||
bfd_vma end;
|
||||
/* Adjustment. This should be added to the value of the symbol, or
|
||||
FDR. This is zero for the last entry in the array. */
|
||||
long adjust;
|
||||
};
|
||||
|
||||
/* These structures are used by the ECOFF find_nearest_line function. */
|
||||
|
||||
struct ecoff_fdrtab_entry
|
||||
{
|
||||
/* Base address in .text of this FDR. */
|
||||
bfd_vma base_addr;
|
||||
FDR *fdr;
|
||||
};
|
||||
|
||||
struct ecoff_find_line
|
||||
{
|
||||
/* Allocated memory to hold function and file names. */
|
||||
char *find_buffer;
|
||||
|
||||
/* FDR table, sorted by address: */
|
||||
long fdrtab_len;
|
||||
struct ecoff_fdrtab_entry *fdrtab;
|
||||
|
||||
/* Cache entry for most recently found line information. The sect
|
||||
field is NULL if this cache does not contain valid information. */
|
||||
struct
|
||||
{
|
||||
asection *sect;
|
||||
bfd_vma start;
|
||||
bfd_vma stop;
|
||||
const char *filename;
|
||||
const char *functionname;
|
||||
unsigned int line_num;
|
||||
} cache;
|
||||
};
|
||||
|
||||
/********************** SWAPPING **********************/
|
||||
|
||||
/* The generic ECOFF code needs to be able to swap debugging
|
||||
information in and out in the specific format used by a particular
|
||||
ECOFF implementation. This structure provides the information
|
||||
needed to do this. */
|
||||
|
||||
struct ecoff_debug_swap
|
||||
{
|
||||
/* Symbol table magic number. */
|
||||
int sym_magic;
|
||||
/* Alignment of debugging information. E.g., 4. */
|
||||
bfd_size_type debug_align;
|
||||
/* Sizes of external symbolic information. */
|
||||
bfd_size_type external_hdr_size;
|
||||
bfd_size_type external_dnr_size;
|
||||
bfd_size_type external_pdr_size;
|
||||
bfd_size_type external_sym_size;
|
||||
bfd_size_type external_opt_size;
|
||||
bfd_size_type external_fdr_size;
|
||||
bfd_size_type external_rfd_size;
|
||||
bfd_size_type external_ext_size;
|
||||
/* Functions to swap in external symbolic data. */
|
||||
void (*swap_hdr_in) PARAMS ((bfd *, PTR, HDRR *));
|
||||
void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *));
|
||||
void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *));
|
||||
void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *));
|
||||
void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *));
|
||||
void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *));
|
||||
void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *));
|
||||
void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *));
|
||||
void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *));
|
||||
void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *));
|
||||
/* Functions to swap out external symbolic data. */
|
||||
void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR));
|
||||
void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR));
|
||||
void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR));
|
||||
void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR));
|
||||
void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR));
|
||||
void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR));
|
||||
void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR));
|
||||
void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR));
|
||||
void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *));
|
||||
void (*swap_rndx_out) PARAMS ((int, const RNDXR *, struct rndx_ext *));
|
||||
/* Function to read symbol data and set up pointers in
|
||||
ecoff_debug_info structure. The section argument is used for
|
||||
ELF, not straight ECOFF. */
|
||||
boolean (*read_debug_info) PARAMS ((bfd *, asection *,
|
||||
struct ecoff_debug_info *));
|
||||
};
|
||||
|
||||
#endif /* ! defined (ECOFF_H) */
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/* COFF information for PC running go32. */
|
||||
|
||||
#define STUBSIZE 2048
|
||||
|
||||
struct external_filehdr_go32_exe {
|
||||
char stub[STUBSIZE]; /* the stub to load the image */
|
||||
/* the standard COFF header */
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#undef FILHDR
|
||||
#define FILHDR struct external_filehdr_go32_exe
|
||||
#undef FILHSZ
|
||||
#define FILHSZ STUBSIZE+20
|
||||
|
|
@ -1,204 +0,0 @@
|
|||
/*** coff information for Hitachi H8/300 and H8/300-H */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define H8300MAGIC 0x8300
|
||||
#define H8300HMAGIC 0x8301
|
||||
#define H8300SMAGIC 0x8302
|
||||
|
||||
#define H8300BADMAG(x) (((x).f_magic!=H8300MAGIC))
|
||||
#define H8300HBADMAG(x) (((x).f_magic!=H8300HMAGIC))
|
||||
#define H8300SBADMAG(x) (((x).f_magic!=H8300SMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes */
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
/*** coff information for Hitachi H8/500 */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define H8500MAGIC 0x8500
|
||||
|
||||
|
||||
#define H8500BADMAG(x) ((0xffff && ((x).f_magic)!=H8500MAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes */
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,228 +0,0 @@
|
|||
/*** coff information for Intel 386/486. */
|
||||
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
|
||||
|
||||
#define I386MAGIC 0x14c
|
||||
#define I386PTXMAGIC 0x154
|
||||
#define I386AIXMAGIC 0x175
|
||||
|
||||
/* This is Lynx's all-platform magic number for executables. */
|
||||
|
||||
#define LYNXCOFFMAGIC 0415
|
||||
|
||||
#define I386BADMAG(x) (((x).f_magic != I386MAGIC) \
|
||||
&& (x).f_magic != I386AIXMAGIC \
|
||||
&& (x).f_magic != I386PTXMAGIC \
|
||||
&& (x).f_magic != LYNXCOFFMAGIC)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
|
||||
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
|
||||
/* define some NT default values */
|
||||
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
|
||||
#define NT_SECTION_ALIGNMENT 0x1000
|
||||
#define NT_FILE_ALIGNMENT 0x200
|
||||
#define NT_DEF_RESERVE 0x100000
|
||||
#define NT_DEF_COMMIT 0x1000
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIB ".lib"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
char x_checksum[4]; /* section COMDAT checksum */
|
||||
char x_associated[2]; /* COMDAT associated section index */
|
||||
char x_comdat[1]; /* COMDAT selection number */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
# define _ETEXT "etext"
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
|
|
@ -1,205 +0,0 @@
|
|||
/* This file was hacked from i386.h [dolan@ssd.intel.com] */
|
||||
|
||||
/*** coff information for Intel 860. */
|
||||
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
|
||||
|
||||
#define I860MAGIC 0x14d
|
||||
|
||||
#define I860BADMAG(x) ((x).f_magic != I860MAGIC)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
/* FIXME: What are the a.out magic numbers? */
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIB ".lib"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
# define _ETEXT "etext"
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
|
@ -1,275 +0,0 @@
|
|||
/*** coff information for 80960. Origins: Intel corp, natch. */
|
||||
|
||||
/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define OMAGIC (0407) /* old impure format. data immediately
|
||||
follows text. both sections are rw. */
|
||||
#define NMAGIC (0410) /* split i&d, read-only text */
|
||||
|
||||
/*
|
||||
* Intel 80960 (I960) processor flags.
|
||||
* F_I960TYPE == mask for processor type field.
|
||||
*/
|
||||
|
||||
#define F_I960TYPE (0xf000)
|
||||
#define F_I960CORE (0x1000)
|
||||
#define F_I960KB (0x2000)
|
||||
#define F_I960SB (0x2000)
|
||||
#define F_I960MC (0x3000)
|
||||
#define F_I960XA (0x4000)
|
||||
#define F_I960CA (0x5000)
|
||||
#define F_I960KA (0x6000)
|
||||
#define F_I960SA (0x6000)
|
||||
#define F_I960JX (0x7000)
|
||||
#define F_I960HX (0x8000)
|
||||
|
||||
|
||||
/** i80960 Magic Numbers
|
||||
*/
|
||||
|
||||
#define I960ROMAGIC (0x160) /* read-only text segments */
|
||||
#define I960RWMAGIC (0x161) /* read-write text segments */
|
||||
|
||||
#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct {
|
||||
unsigned long phys_addr;
|
||||
unsigned long bitarray;
|
||||
} TAGBITS;
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
char tagentries[4]; /* number of tag entries to follow */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
/* return a pointer to the tag bits array */
|
||||
|
||||
#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1))
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
/*#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))*/
|
||||
#define AOUTSZ 32
|
||||
#define AOUTHDRSZ 32
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
char s_align[4]; /* section alignment */
|
||||
};
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 44
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
char padding[2]; /* force alignment */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_flags[2];
|
||||
char e_type[4];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
char pad2[2];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (0x1f)
|
||||
#define N_TMASK (0x60)
|
||||
#define N_BTSHFT (5)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
/******************************************
|
||||
* I960-specific *2nd* aux. entry formats
|
||||
******************************************/
|
||||
struct {
|
||||
/* This is a very old typo that keeps getting propagated. */
|
||||
#define x_stdindx x_stindx
|
||||
char x_stindx[4]; /* sys. table entry */
|
||||
} x_sc; /* system call entry */
|
||||
|
||||
struct {
|
||||
char x_balntry[4]; /* BAL entry point */
|
||||
} x_bal; /* BAL-callable function */
|
||||
|
||||
struct {
|
||||
char x_timestamp[4]; /* time stamp */
|
||||
char x_idstring[20]; /* producer identity string */
|
||||
} x_ident; /* Producer ident info */
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 24
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 24
|
||||
|
||||
# define _ETEXT "_etext"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char pad[2];
|
||||
};
|
||||
|
||||
/* r_type values for the i960. */
|
||||
|
||||
/* The i960 uses R_RELLONG, which is defined in internal.h as 0x11.
|
||||
It is an absolute 32 bit relocation. */
|
||||
|
||||
#define R_IPRMED (0x19) /* 24-bit ip-relative relocation */
|
||||
#define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */
|
||||
#define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */
|
||||
|
||||
/* The following relocation types are defined use by relaxing linkers,
|
||||
which convert 32 bit calls (which require a 64 bit instruction)
|
||||
into 24 bit calls (which require a 32 bit instruction) when
|
||||
possible. It will be possible whenever the target of the call is
|
||||
within a 24 bit range of the call instruction.
|
||||
|
||||
It is always safe to ignore these relocations. They only serve to
|
||||
mark points which the relaxing linker will have to consider. The
|
||||
assembler must ensure that the correct code is generated even if
|
||||
the relocations are ignored. In particular, this means that the
|
||||
R_IPR13 relocation may not appear with an external symbol. */
|
||||
|
||||
#define R_IPR13 (0x1d) /* 13 bit ip-relative branch */
|
||||
#define R_ALIGN (0x1e) /* alignment marker. This has no
|
||||
associated symbol. Instead, the
|
||||
r_symndx field indicates the
|
||||
require alignment at this point in
|
||||
the file. It must be a power of 2. */
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 12
|
||||
|
||||
|
|
@ -1,721 +0,0 @@
|
|||
/* Internal format of COFF object file data structures, for GNU BFD.
|
||||
This file is part of BFD, the Binary File Descriptor library. */
|
||||
|
||||
#ifndef GNU_COFF_INTERNAL_H
|
||||
#define GNU_COFF_INTERNAL_H 1
|
||||
|
||||
/* First, make "signed char" work, even on old compilers. */
|
||||
#ifndef signed
|
||||
#ifndef __STDC__
|
||||
#define signed /**/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
/* extra stuff in a PE header. */
|
||||
|
||||
struct internal_extra_pe_filehdr
|
||||
{
|
||||
/* DOS header data follows for PE stuff */
|
||||
unsigned short e_magic; /* Magic number, 0x5a4d */
|
||||
unsigned short e_cblp; /* Bytes on last page of file, 0x90 */
|
||||
unsigned short e_cp; /* Pages in file, 0x3 */
|
||||
unsigned short e_crlc; /* Relocations, 0x0 */
|
||||
unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */
|
||||
unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */
|
||||
unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */
|
||||
unsigned short e_ss; /* Initial (relative) SS value, 0x0 */
|
||||
unsigned short e_sp; /* Initial SP value, 0xb8 */
|
||||
unsigned short e_csum; /* Checksum, 0x0 */
|
||||
unsigned short e_ip; /* Initial IP value, 0x0 */
|
||||
unsigned short e_cs; /* Initial (relative) CS value, 0x0 */
|
||||
unsigned short e_lfarlc; /* File address of relocation table, 0x40 */
|
||||
unsigned short e_ovno; /* Overlay number, 0x0 */
|
||||
unsigned short e_res[4]; /* Reserved words, all 0x0 */
|
||||
unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */
|
||||
unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */
|
||||
unsigned short e_res2[10]; /* Reserved words, all 0x0 */
|
||||
bfd_vma e_lfanew; /* File address of new exe header, 0x80 */
|
||||
unsigned long dos_message[16]; /* text which always follows dos header */
|
||||
bfd_vma nt_signature; /* required NT signature, 0x4550 */
|
||||
};
|
||||
|
||||
struct internal_filehdr
|
||||
{
|
||||
struct internal_extra_pe_filehdr pe;
|
||||
|
||||
/* standard coff internal info */
|
||||
unsigned short f_magic; /* magic number */
|
||||
unsigned short f_nscns; /* number of sections */
|
||||
long f_timdat; /* time & date stamp */
|
||||
bfd_vma f_symptr; /* file pointer to symtab */
|
||||
long f_nsyms; /* number of symtab entries */
|
||||
unsigned short f_opthdr; /* sizeof(optional hdr) */
|
||||
unsigned short f_flags; /* flags */
|
||||
};
|
||||
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR16WR file is 16-bit little-endian
|
||||
* F_AR32WR file is 32-bit little-endian
|
||||
* F_AR32W file is 32-bit big-endian
|
||||
* F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
|
||||
* F_SHROBJ rs/6000 aix: file is a shared object
|
||||
* F_DLL PE format DLL
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
#define F_AR16WR (0x0080)
|
||||
#define F_AR32WR (0x0100)
|
||||
#define F_AR32W (0x0200)
|
||||
#define F_DYNLOAD (0x1000)
|
||||
#define F_SHROBJ (0x2000)
|
||||
#define F_DLL (0x2000)
|
||||
|
||||
/* extra structure which is used in the optional header */
|
||||
typedef struct _IMAGE_DATA_DIRECTORY
|
||||
{
|
||||
bfd_vma VirtualAddress;
|
||||
long Size;
|
||||
} IMAGE_DATA_DIRECTORY;
|
||||
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
|
||||
|
||||
/* default image base for NT */
|
||||
#define NT_EXE_IMAGE_BASE 0x400000
|
||||
#define NT_DLL_IMAGE_BASE 0x10000000
|
||||
|
||||
/* Extra stuff in a PE aouthdr */
|
||||
|
||||
#define PE_DEF_SECTION_ALIGNMENT 0x1000
|
||||
#define PE_DEF_FILE_ALIGNMENT 0x200
|
||||
|
||||
struct internal_extra_pe_aouthdr
|
||||
{
|
||||
/* PE stuff */
|
||||
bfd_vma ImageBase; /* address of specific location in memory that
|
||||
file is located, NT default 0x10000 */
|
||||
|
||||
bfd_vma SectionAlignment; /* section alignment default 0x1000 */
|
||||
bfd_vma FileAlignment; /* file alignment default 0x200 */
|
||||
short MajorOperatingSystemVersion; /* minimum version of the operating */
|
||||
short MinorOperatingSystemVersion; /* system req'd for exe, default to 1*/
|
||||
short MajorImageVersion; /* user defineable field to store version of */
|
||||
short MinorImageVersion; /* exe or dll being created, default to 0 */
|
||||
short MajorSubsystemVersion; /* minimum subsystem version required to */
|
||||
short MinorSubsystemVersion; /* run exe; default to 3.1 */
|
||||
long Reserved1; /* seems to be 0 */
|
||||
long SizeOfImage; /* size of memory to allocate for prog */
|
||||
long SizeOfHeaders; /* size of PE header and section table */
|
||||
long CheckSum; /* set to 0 */
|
||||
short Subsystem;
|
||||
|
||||
/* type of subsystem exe uses for user interface,
|
||||
possible values:
|
||||
1 - NATIVE Doesn't require a subsystem
|
||||
2 - WINDOWS_GUI runs in Windows GUI subsystem
|
||||
3 - WINDOWS_CUI runs in Windows char sub. (console app)
|
||||
5 - OS2_CUI runs in OS/2 character subsystem
|
||||
7 - POSIX_CUI runs in Posix character subsystem */
|
||||
short DllCharacteristics; /* flags for DLL init, use 0 */
|
||||
bfd_vma SizeOfStackReserve; /* amount of memory to reserve */
|
||||
bfd_vma SizeOfStackCommit; /* amount of memory initially committed for
|
||||
initial thread's stack, default is 0x1000 */
|
||||
bfd_vma SizeOfHeapReserve; /* amount of virtual memory to reserve and */
|
||||
bfd_vma SizeOfHeapCommit; /* commit, don't know what to defaut it to */
|
||||
long LoaderFlags; /* can probably set to 0 */
|
||||
long NumberOfRvaAndSizes; /* number of entries in next entry, 16 */
|
||||
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
|
||||
};
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
struct internal_aouthdr
|
||||
{
|
||||
short magic; /* type of file */
|
||||
short vstamp; /* version stamp */
|
||||
bfd_vma tsize; /* text size in bytes, padded to FW bdry*/
|
||||
bfd_vma dsize; /* initialized data " " */
|
||||
bfd_vma bsize; /* uninitialized data " " */
|
||||
bfd_vma entry; /* entry pt. */
|
||||
bfd_vma text_start; /* base of text used for this file */
|
||||
bfd_vma data_start; /* base of data used for this file */
|
||||
|
||||
/* i960 stuff */
|
||||
unsigned long tagentries; /* number of tag entries to follow */
|
||||
|
||||
/* RS/6000 stuff */
|
||||
unsigned long o_toc; /* address of TOC */
|
||||
short o_snentry; /* section number for entry point */
|
||||
short o_sntext; /* section number for text */
|
||||
short o_sndata; /* section number for data */
|
||||
short o_sntoc; /* section number for toc */
|
||||
short o_snloader; /* section number for loader section */
|
||||
short o_snbss; /* section number for bss */
|
||||
short o_algntext; /* max alignment for text */
|
||||
short o_algndata; /* max alignment for data */
|
||||
short o_modtype; /* Module type field, 1R,RE,RO */
|
||||
short o_cputype; /* Encoded CPU type */
|
||||
unsigned long o_maxstack; /* max stack size allowed. */
|
||||
unsigned long o_maxdata; /* max data size allowed. */
|
||||
|
||||
/* ECOFF stuff */
|
||||
bfd_vma bss_start; /* Base of bss section. */
|
||||
bfd_vma gp_value; /* GP register value. */
|
||||
unsigned long gprmask; /* General registers used. */
|
||||
unsigned long cprmask[4]; /* Coprocessor registers used. */
|
||||
unsigned long fprmask; /* Floating pointer registers used. */
|
||||
|
||||
/* Apollo stuff */
|
||||
long o_inlib; /* inlib data */
|
||||
long o_sri; /* Static Resource Information */
|
||||
long vid[2]; /* Version id */
|
||||
|
||||
|
||||
struct internal_extra_pe_aouthdr pe;
|
||||
|
||||
};
|
||||
|
||||
/********************** STORAGE CLASSES **********************/
|
||||
|
||||
/* This used to be defined as -1, but now n_sclass is unsigned. */
|
||||
#define C_EFCN 0xff /* physical end of function */
|
||||
#define C_NULL 0
|
||||
#define C_AUTO 1 /* automatic variable */
|
||||
#define C_EXT 2 /* external symbol */
|
||||
#define C_STAT 3 /* static */
|
||||
#define C_REG 4 /* register variable */
|
||||
#define C_EXTDEF 5 /* external definition */
|
||||
#define C_LABEL 6 /* label */
|
||||
#define C_ULABEL 7 /* undefined label */
|
||||
#define C_MOS 8 /* member of structure */
|
||||
#define C_ARG 9 /* function argument */
|
||||
#define C_STRTAG 10 /* structure tag */
|
||||
#define C_MOU 11 /* member of union */
|
||||
#define C_UNTAG 12 /* union tag */
|
||||
#define C_TPDEF 13 /* type definition */
|
||||
#define C_USTATIC 14 /* undefined static */
|
||||
#define C_ENTAG 15 /* enumeration tag */
|
||||
#define C_MOE 16 /* member of enumeration */
|
||||
#define C_REGPARM 17 /* register parameter */
|
||||
#define C_FIELD 18 /* bit field */
|
||||
#define C_AUTOARG 19 /* auto argument */
|
||||
#define C_LASTENT 20 /* dummy entry (end of block) */
|
||||
#define C_BLOCK 100 /* ".bb" or ".eb" */
|
||||
#define C_FCN 101 /* ".bf" or ".ef" */
|
||||
#define C_EOS 102 /* end of structure */
|
||||
#define C_FILE 103 /* file name */
|
||||
#define C_LINE 104 /* line # reformatted as symbol table entry */
|
||||
#define C_ALIAS 105 /* duplicate tag */
|
||||
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
|
||||
|
||||
#define C_WEAKEXT 127 /* weak symbol -- GNU extension */
|
||||
|
||||
/* New storage classes for WINDOWS_NT */
|
||||
#define C_SECTION 104 /* section name */
|
||||
#define C_NT_WEAK 105 /* weak external */
|
||||
|
||||
/* New storage classes for 80960 */
|
||||
|
||||
/* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */
|
||||
#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
|
||||
|
||||
#define C_SCALL 107 /* Procedure reachable via system call */
|
||||
#define C_LEAFEXT 108 /* External leaf */
|
||||
#define C_LEAFSTAT 113 /* Static leaf */
|
||||
#define C_OPTVAR 109 /* Optimized variable */
|
||||
#define C_DEFINE 110 /* Preprocessor #define */
|
||||
#define C_PRAGMA 111 /* Advice to compiler or linker */
|
||||
#define C_SEGMENT 112 /* 80960 segment name */
|
||||
|
||||
/* Storage classes for m88k */
|
||||
#define C_SHADOW 107 /* shadow symbol */
|
||||
#define C_VERSION 108 /* coff version symbol */
|
||||
|
||||
/* New storage classes for RS/6000 */
|
||||
#define C_HIDEXT 107 /* Un-named external symbol */
|
||||
#define C_BINCL 108 /* Marks beginning of include file */
|
||||
#define C_EINCL 109 /* Marks ending of include file */
|
||||
|
||||
/* storage classes for stab symbols for RS/6000 */
|
||||
#define C_GSYM (0x80)
|
||||
#define C_LSYM (0x81)
|
||||
#define C_PSYM (0x82)
|
||||
#define C_RSYM (0x83)
|
||||
#define C_RPSYM (0x84)
|
||||
#define C_STSYM (0x85)
|
||||
#define C_TCSYM (0x86)
|
||||
#define C_BCOMM (0x87)
|
||||
#define C_ECOML (0x88)
|
||||
#define C_ECOMM (0x89)
|
||||
#define C_DECL (0x8c)
|
||||
#define C_ENTRY (0x8d)
|
||||
#define C_FUN (0x8e)
|
||||
#define C_BSTAT (0x8f)
|
||||
#define C_ESTAT (0x90)
|
||||
|
||||
/* Storage classes for Thumb symbols */
|
||||
#define C_THUMBEXT (128 + C_EXT) /* 130 */
|
||||
#define C_THUMBSTAT (128 + C_STAT) /* 131 */
|
||||
#define C_THUMBLABEL (128 + C_LABEL) /* 134 */
|
||||
#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */
|
||||
#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
#define SCNNMLEN (8)
|
||||
|
||||
struct internal_scnhdr
|
||||
{
|
||||
char s_name[SCNNMLEN]; /* section name */
|
||||
|
||||
/* Physical address, aliased s_nlib.
|
||||
In the pei format, this field is the virtual section size
|
||||
(the size of the section after being loaded int memory),
|
||||
NOT the physical address. */
|
||||
bfd_vma s_paddr;
|
||||
|
||||
bfd_vma s_vaddr; /* virtual address */
|
||||
bfd_vma s_size; /* section size */
|
||||
bfd_vma s_scnptr; /* file ptr to raw data for section */
|
||||
bfd_vma s_relptr; /* file ptr to relocation */
|
||||
bfd_vma s_lnnoptr; /* file ptr to line numbers */
|
||||
unsigned long s_nreloc; /* number of relocation entries */
|
||||
unsigned long s_nlnno; /* number of line number entries*/
|
||||
long s_flags; /* flags */
|
||||
long s_align; /* used on I960 */
|
||||
};
|
||||
|
||||
/*
|
||||
* s_flags "type"
|
||||
*/
|
||||
#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */
|
||||
#define STYP_DSECT (0x0001) /* "dummy": relocated only*/
|
||||
#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */
|
||||
#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */
|
||||
#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */
|
||||
#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated,
|
||||
loaded; reloc & lineno entries processed normally */
|
||||
#define STYP_TEXT (0x0020) /* section contains text only */
|
||||
#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile
|
||||
will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will
|
||||
update all process invocations. */
|
||||
#define STYP_DATA (0x0040) /* section contains data only */
|
||||
#define STYP_BSS (0x0080) /* section contains bss only */
|
||||
#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */
|
||||
#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */
|
||||
#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */
|
||||
#define STYP_LIB (0x0800) /* for .lib: same as INFO */
|
||||
#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
|
||||
#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions wherever padding is necessary and there is a
|
||||
|
||||
word of contiguous bytes
|
||||
beginning on a word boundary. */
|
||||
|
||||
#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
|
||||
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
|
||||
struct internal_lineno
|
||||
{
|
||||
union
|
||||
{
|
||||
long l_symndx; /* function name symbol index, iff l_lnno == 0*/
|
||||
long l_paddr; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
unsigned long l_lnno; /* line number */
|
||||
};
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define FILNMLEN 14 /* # characters in a file name */
|
||||
#define DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct internal_syment
|
||||
{
|
||||
union
|
||||
{
|
||||
char _n_name[SYMNMLEN]; /* old COFF version */
|
||||
struct
|
||||
{
|
||||
long _n_zeroes; /* new == 0 */
|
||||
long _n_offset; /* offset into string table */
|
||||
} _n_n;
|
||||
char *_n_nptr[2]; /* allows for overlaying */
|
||||
} _n;
|
||||
long n_value; /* value of symbol */
|
||||
short n_scnum; /* section number */
|
||||
unsigned short n_flags; /* copy of flags from filhdr */
|
||||
unsigned short n_type; /* type and derived type */
|
||||
unsigned char n_sclass; /* storage class */
|
||||
unsigned char n_numaux; /* number of aux. entries */
|
||||
};
|
||||
|
||||
#define n_name _n._n_name
|
||||
#define n_zeroes _n._n_n._n_zeroes
|
||||
#define n_offset _n._n_n._n_offset
|
||||
|
||||
|
||||
/* Relocatable symbols have number of the section in which they are defined,
|
||||
or one of the following: */
|
||||
|
||||
#define N_UNDEF ((short)0) /* undefined symbol */
|
||||
#define N_ABS ((short)-1) /* value of symbol is absolute */
|
||||
#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */
|
||||
#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
|
||||
#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
|
||||
|
||||
/*
|
||||
* Type of a symbol, in low N bits of the word
|
||||
*/
|
||||
#define T_NULL 0
|
||||
#define T_VOID 1 /* function argument (only used by compiler) */
|
||||
#define T_CHAR 2 /* character */
|
||||
#define T_SHORT 3 /* short integer */
|
||||
#define T_INT 4 /* integer */
|
||||
#define T_LONG 5 /* long integer */
|
||||
#define T_FLOAT 6 /* floating point */
|
||||
#define T_DOUBLE 7 /* double word */
|
||||
#define T_STRUCT 8 /* structure */
|
||||
#define T_UNION 9 /* union */
|
||||
#define T_ENUM 10 /* enumeration */
|
||||
#define T_MOE 11 /* member of enumeration*/
|
||||
#define T_UCHAR 12 /* unsigned character */
|
||||
#define T_USHORT 13 /* unsigned short */
|
||||
#define T_UINT 14 /* unsigned integer */
|
||||
#define T_ULONG 15 /* unsigned long */
|
||||
#define T_LNGDBL 16 /* long double */
|
||||
|
||||
/*
|
||||
* derived types, in n_type
|
||||
*/
|
||||
#define DT_NON (0) /* no derived type */
|
||||
#define DT_PTR (1) /* pointer */
|
||||
#define DT_FCN (2) /* function */
|
||||
#define DT_ARY (3) /* array */
|
||||
|
||||
#define BTYPE(x) ((x) & N_BTMASK)
|
||||
|
||||
#define ISPTR(x) \
|
||||
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT))
|
||||
#define ISFCN(x) \
|
||||
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_FCN << N_BTSHFT))
|
||||
#define ISARY(x) \
|
||||
(((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_ARY << N_BTSHFT))
|
||||
#define ISTAG(x) \
|
||||
((x) == C_STRTAG || (x) == C_UNTAG || (x) == C_ENTAG)
|
||||
#define DECREF(x) \
|
||||
((((x) >> N_TSHIFT) & ~ N_BTMASK) | ((x) & N_BTMASK))
|
||||
|
||||
union internal_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
||||
union
|
||||
{
|
||||
long l; /* str, un, or enum tag indx */
|
||||
struct coff_ptr_struct *p;
|
||||
} x_tagndx;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned short x_lnno; /* declaration line number */
|
||||
unsigned short x_size; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
long x_fsize; /* size of function */
|
||||
} x_misc;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{ /* if ISFCN, tag, or .bb */
|
||||
long x_lnnoptr; /* ptr to fcn line # */
|
||||
union
|
||||
{ /* entry ndx past block end */
|
||||
long l;
|
||||
struct coff_ptr_struct *p;
|
||||
} x_endndx;
|
||||
} x_fcn;
|
||||
|
||||
struct
|
||||
{ /* if ISARY, up to 4 dimen. */
|
||||
unsigned short x_dimen[DIMNUM];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
|
||||
unsigned short x_tvndx; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union
|
||||
{
|
||||
char x_fname[FILNMLEN];
|
||||
struct
|
||||
{
|
||||
long x_zeroes;
|
||||
long x_offset;
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct
|
||||
{
|
||||
long x_scnlen; /* section length */
|
||||
unsigned short x_nreloc; /* # relocation entries */
|
||||
unsigned short x_nlinno; /* # line numbers */
|
||||
unsigned long x_checksum; /* section COMDAT checksum for PE */
|
||||
unsigned short x_associated; /* COMDAT associated section index for PE */
|
||||
unsigned char x_comdat; /* COMDAT selection number for PE */
|
||||
} x_scn;
|
||||
|
||||
struct
|
||||
{
|
||||
long x_tvfill; /* tv fill value */
|
||||
unsigned short x_tvlen; /* length of .tv */
|
||||
unsigned short x_tvran[2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
/******************************************
|
||||
* RS/6000-specific auxent - last auxent for every external symbol
|
||||
******************************************/
|
||||
struct
|
||||
{
|
||||
union
|
||||
{ /* csect length or enclosing csect */
|
||||
long l;
|
||||
struct coff_ptr_struct *p;
|
||||
} x_scnlen;
|
||||
long x_parmhash; /* parm type hash index */
|
||||
unsigned short x_snhash; /* sect num with parm hash */
|
||||
unsigned char x_smtyp; /* symbol align and type */
|
||||
/* 0-4 - Log 2 of alignment */
|
||||
/* 5-7 - symbol type */
|
||||
unsigned char x_smclas; /* storage mapping class */
|
||||
long x_stab; /* dbx stab info index */
|
||||
unsigned short x_snstab; /* sect num with dbx stab */
|
||||
} x_csect; /* csect definition information */
|
||||
|
||||
/* x_smtyp values: */
|
||||
|
||||
#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
|
||||
#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
|
||||
/* Symbol type values: */
|
||||
#define XTY_ER 0 /* External reference */
|
||||
#define XTY_SD 1 /* Csect definition */
|
||||
#define XTY_LD 2 /* Label definition */
|
||||
#define XTY_CM 3 /* .BSS */
|
||||
#define XTY_EM 4 /* Error message */
|
||||
#define XTY_US 5 /* "Reserved for internal use" */
|
||||
|
||||
/* x_smclas values: */
|
||||
|
||||
#define XMC_PR 0 /* Read-only program code */
|
||||
#define XMC_RO 1 /* Read-only constant */
|
||||
#define XMC_DB 2 /* Read-only debug dictionary table */
|
||||
#define XMC_TC 3 /* Read-write general TOC entry */
|
||||
#define XMC_UA 4 /* Read-write unclassified */
|
||||
#define XMC_RW 5 /* Read-write data */
|
||||
#define XMC_GL 6 /* Read-only global linkage */
|
||||
#define XMC_XO 7 /* Read-only extended operation */
|
||||
#define XMC_SV 8 /* Read-only supervisor call */
|
||||
#define XMC_BS 9 /* Read-write BSS */
|
||||
#define XMC_DS 10 /* Read-write descriptor csect */
|
||||
#define XMC_UC 11 /* Read-write unnamed Fortran common */
|
||||
#define XMC_TI 12 /* Read-only traceback index csect */
|
||||
#define XMC_TB 13 /* Read-only traceback table csect */
|
||||
/* 14 ??? */
|
||||
#define XMC_TC0 15 /* Read-write TOC anchor */
|
||||
#define XMC_TD 16 /* Read-write data in TOC */
|
||||
|
||||
/******************************************
|
||||
* I960-specific *2nd* aux. entry formats
|
||||
******************************************/
|
||||
struct
|
||||
{
|
||||
/* This is a very old typo that keeps getting propagated. */
|
||||
#define x_stdindx x_stindx
|
||||
long x_stindx; /* sys. table entry */
|
||||
} x_sc; /* system call entry */
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned long x_balntry; /* BAL entry point */
|
||||
} x_bal; /* BAL-callable function */
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned long x_timestamp; /* time stamp */
|
||||
char x_idstring[20]; /* producer identity string */
|
||||
} x_ident; /* Producer ident info */
|
||||
|
||||
};
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct internal_reloc
|
||||
{
|
||||
bfd_vma r_vaddr; /* Virtual address of reference */
|
||||
long r_symndx; /* Index into symbol table */
|
||||
unsigned short r_type; /* Relocation type */
|
||||
unsigned char r_size; /* Used by RS/6000 and ECOFF */
|
||||
unsigned char r_extern; /* Used by ECOFF */
|
||||
unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */
|
||||
};
|
||||
|
||||
#define R_RELBYTE 017
|
||||
#define R_RELWORD 020
|
||||
#define R_PCRBYTE 022
|
||||
#define R_PCRWORD 023
|
||||
#define R_PCRLONG 024
|
||||
|
||||
#define R_DIR16 01
|
||||
#define R_DIR32 06
|
||||
#define R_PCLONG 020
|
||||
#define R_RELBYTE 017
|
||||
#define R_RELWORD 020
|
||||
#define R_IMAGEBASE 07
|
||||
|
||||
|
||||
#define R_PCR16L 128
|
||||
#define R_PCR26L 129
|
||||
#define R_VRT16 130
|
||||
#define R_HVRT16 131
|
||||
#define R_LVRT16 132
|
||||
#define R_VRT32 133
|
||||
#define R_RELLONG (0x11) /* Direct 32-bit relocation */
|
||||
#define R_IPRSHORT (0x18)
|
||||
#define R_IPRLONG (0x1a)
|
||||
#define R_GETSEG (0x1d)
|
||||
#define R_GETPA (0x1e)
|
||||
#define R_TAGWORD (0x1f)
|
||||
#define R_JUMPTARG 0x20 /* strange 29k 00xx00xx reloc */
|
||||
|
||||
|
||||
/* This reloc identifies mov.b instructions with a 16bit absolute
|
||||
address. The linker tries to turn insns with this reloc into
|
||||
an absolute 8-bit address. */
|
||||
#define R_MOV16B1 0x41
|
||||
|
||||
/* This reloc identifies mov.b instructions which had a 16bit
|
||||
absolute address which have been shortened into a 8-bit
|
||||
absolute address. */
|
||||
#define R_MOV16B2 0x42
|
||||
|
||||
/* This reloc identifies jmp insns with a 16bit target address;
|
||||
the linker tries to turn these insns into bra insns with
|
||||
an 8bit pc-relative target. */
|
||||
#define R_JMP1 0x43
|
||||
|
||||
/* This reloc identifies a bra with an 8-bit pc-relative
|
||||
target that was formerlly a jmp insn with a 16bit target. */
|
||||
#define R_JMP2 0x44
|
||||
|
||||
/* ??? */
|
||||
#define R_RELLONG_NEG 0x45
|
||||
|
||||
/* This reloc identifies jmp insns with a 24bit target address;
|
||||
the linker tries to turn these insns into bra insns with
|
||||
an 8bit pc-relative target. */
|
||||
#define R_JMPL1 0x46
|
||||
|
||||
/* This reloc identifies a bra with an 8-bit pc-relative
|
||||
target that was formerlly a jmp insn with a 24bit target. */
|
||||
#define R_JMPL2 0x47
|
||||
|
||||
/* This reloc identifies mov.b instructions with a 24bit absolute
|
||||
address. The linker tries to turn insns with this reloc into
|
||||
an absolute 8-bit address. */
|
||||
|
||||
#define R_MOV24B1 0x48
|
||||
|
||||
/* This reloc identifies mov.b instructions which had a 24bit
|
||||
absolute address which have been shortened into a 8-bit
|
||||
absolute address. */
|
||||
#define R_MOV24B2 0x49
|
||||
|
||||
/* An h8300 memory indirect jump/call. Forces the address of the jump/call
|
||||
target into the function vector (in page zero), and the address of the
|
||||
vector entry to be placed in the jump/call instruction. */
|
||||
#define R_MEM_INDIRECT 0x4a
|
||||
|
||||
/* This reloc identifies a 16bit pc-relative branch target which was
|
||||
shortened into an 8bit pc-relative branch target. */
|
||||
#define R_PCRWORD_B 0x4b
|
||||
|
||||
/* This reloc identifies mov.[wl] instructions with a 32/24 bit
|
||||
absolute address; the linker may turn this into a mov.[wl]
|
||||
insn with a 16bit absolute address. */
|
||||
#define R_MOVL1 0x4c
|
||||
|
||||
/* This reloc identifies mov.[wl] insns which formerlly had
|
||||
a 32/24bit absolute address and how have a 16bit absolute address. */
|
||||
#define R_MOVL2 0x4d
|
||||
|
||||
/* This reloc identifies a bCC:8 which will have it's condition
|
||||
inverted and its target redirected to the target of the branch
|
||||
in the following insn. */
|
||||
#define R_BCC_INV 0x4e
|
||||
|
||||
/* This reloc identifies a jmp instruction that has been deleted. */
|
||||
#define R_JMP_DEL 0x4f
|
||||
|
||||
/* Z8k modes */
|
||||
#define R_IMM16 0x01 /* 16 bit abs */
|
||||
#define R_JR 0x02 /* jr 8 bit disp */
|
||||
#define R_IMM4L 0x23 /* low nibble */
|
||||
#define R_IMM8 0x22 /* 8 bit abs */
|
||||
#define R_IMM32 R_RELLONG /* 32 bit abs */
|
||||
#define R_CALL R_DA /* Absolute address which could be a callr */
|
||||
#define R_JP R_DA /* Absolute address which could be a jp */
|
||||
#define R_REL16 0x04 /* 16 bit PC rel */
|
||||
#define R_CALLR 0x05 /* callr 12 bit disp */
|
||||
#define R_SEG 0x10 /* set if in segmented mode */
|
||||
#define R_IMM4H 0x24 /* high nibble */
|
||||
#define R_DISP7 0x25 /* djnz displacement */
|
||||
|
||||
/* H8500 modes */
|
||||
|
||||
#define R_H8500_IMM8 1 /* 8 bit immediate */
|
||||
#define R_H8500_IMM16 2 /* 16 bit immediate */
|
||||
#define R_H8500_PCREL8 3 /* 8 bit pcrel */
|
||||
#define R_H8500_PCREL16 4 /* 16 bit pcrel */
|
||||
#define R_H8500_HIGH8 5 /* high 8 bits of 24 bit address */
|
||||
#define R_H8500_LOW16 7 /* low 16 bits of 24 bit immediate */
|
||||
#define R_H8500_IMM24 6 /* 24 bit immediate */
|
||||
#define R_H8500_IMM32 8 /* 32 bit immediate */
|
||||
#define R_H8500_HIGH16 9 /* high 16 bits of 32 bit immediate */
|
||||
|
||||
/* W65 modes */
|
||||
|
||||
#define R_W65_ABS8 1 /* addr & 0xff */
|
||||
#define R_W65_ABS16 2 /* addr & 0xffff */
|
||||
#define R_W65_ABS24 3 /* addr & 0xffffff */
|
||||
|
||||
#define R_W65_ABS8S8 4 /* (addr >> 8) & 0xff */
|
||||
#define R_W65_ABS8S16 5 /* (addr >> 16) & 0xff */
|
||||
|
||||
#define R_W65_ABS16S8 6 /* (addr >> 8) & 0ffff */
|
||||
#define R_W65_ABS16S16 7 /* (addr >> 16) & 0ffff */
|
||||
|
||||
#define R_W65_PCR8 8
|
||||
#define R_W65_PCR16 9
|
||||
|
||||
#define R_W65_DP 10 /* direct page 8 bits only */
|
||||
|
||||
#endif /* GNU_COFF_INTERNAL_H */
|
||||
|
|
@ -1,225 +0,0 @@
|
|||
/*** coff information for M68K */
|
||||
|
||||
#ifndef GNU_COFF_M68K_H
|
||||
#define GNU_COFF_M68K_H 1
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
/* Motorola 68000/68008/68010/68020 */
|
||||
#define MC68MAGIC 0520
|
||||
#define MC68KWRMAGIC 0520 /* writeable text segments */
|
||||
#define MC68TVMAGIC 0521
|
||||
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
|
||||
#define MC68KPGMAGIC 0522 /* demand paged text segments */
|
||||
#define M68MAGIC 0210
|
||||
#define M68TVMAGIC 0211
|
||||
|
||||
/* this is the magic of the Bull dpx/2 */
|
||||
#define MC68KBCSMAGIC 0526
|
||||
|
||||
/* This is Lynx's all-platform magic number for executables. */
|
||||
|
||||
#define LYNXCOFFMAGIC 0415
|
||||
|
||||
#define OMAGIC M68MAGIC
|
||||
|
||||
/* This intentionally does not include MC68KBCSMAGIC; it only includes
|
||||
magic numbers which imply that names do not have underscores. */
|
||||
#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
|
||||
((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && ((x).f_magic!=LYNXCOFFMAGIC) )
|
||||
|
||||
/* Magic numbers for the a.out header. */
|
||||
|
||||
#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
|
||||
#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
|
||||
#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
|
||||
#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
char r_offset[4];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
|
||||
#ifdef M68K_COFF_OFFSET
|
||||
#define RELSZ 14
|
||||
#else
|
||||
#define RELSZ 10
|
||||
#endif
|
||||
|
||||
#endif /* GNU_COFF_M68K_H */
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
/*** coff information for 88k bcs */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define MC88MAGIC 0540 /* 88k BCS executable */
|
||||
#define MC88DMAGIC 0541 /* DG/UX executable */
|
||||
#define MC88OMAGIC 0555 /* Object file */
|
||||
|
||||
#define MC88BADMAG(x) (((x).f_magic!=MC88MAGIC) &&((x).f_magic!=MC88DMAGIC) && ((x).f_magic != MC88OMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
|
||||
#define PAGEMAGICBCS 0413
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[4]; /* number of relocation entries */
|
||||
char s_nlnno[4]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 44
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno{
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
|
||||
char l_lnno[4];
|
||||
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
char pad2[2];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK 017
|
||||
#define N_TMASK 060
|
||||
#define N_BTSHFT 4
|
||||
#define N_TSHIFT 2
|
||||
|
||||
|
||||
/* Note that this isn't the same shape as other coffs */
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
/* 4 */
|
||||
union {
|
||||
char x_fsize[4]; /* size of function */
|
||||
struct {
|
||||
char x_lnno[4]; /* declaration line number */
|
||||
char x_size[4]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
} x_misc;
|
||||
|
||||
/* 12 */
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
/* 20 */
|
||||
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[4]; /* # relocation entries */
|
||||
char x_nlinno[4]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
};
|
||||
|
||||
#define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
|
||||
#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
|
||||
#define PUT_FCN_LNNOPTR(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
|
||||
#define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
|
||||
#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
|
||||
#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
|
||||
#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
|
||||
#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
|
||||
#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
|
||||
#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc)
|
||||
#define GET_SCN_NLINNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno)
|
||||
#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
|
||||
#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
|
||||
#define PUT_SCN_NLINNO(abfd,in, ext) bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno))
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 20
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 20
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char r_offset[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 12
|
||||
|
||||
#define NO_TVNDX
|
||||
|
|
@ -1,369 +0,0 @@
|
|||
/* ECOFF support on MIPS machines.
|
||||
coff/ecoff.h must be included before this file. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
unsigned char f_magic[2]; /* magic number */
|
||||
unsigned char f_nscns[2]; /* number of sections */
|
||||
unsigned char f_timdat[4]; /* time & date stamp */
|
||||
unsigned char f_symptr[4]; /* file pointer to symtab */
|
||||
unsigned char f_nsyms[4]; /* number of symtab entries */
|
||||
unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
unsigned char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* Magic numbers are defined in coff/ecoff.h. */
|
||||
#define MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \
|
||||
((x).f_magic!=MIPS_MAGIC_LITTLE) &&\
|
||||
((x).f_magic!=MIPS_MAGIC_BIG) && \
|
||||
((x).f_magic!=MIPS_MAGIC_LITTLE2) && \
|
||||
((x).f_magic!=MIPS_MAGIC_BIG2) && \
|
||||
((x).f_magic!=MIPS_MAGIC_LITTLE3) && \
|
||||
((x).f_magic!=MIPS_MAGIC_BIG3))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct external_aouthdr
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
unsigned char dsize[4]; /* initialized data " " */
|
||||
unsigned char bsize[4]; /* uninitialized data " " */
|
||||
unsigned char entry[4]; /* entry pt. */
|
||||
unsigned char text_start[4]; /* base of text used for this file */
|
||||
unsigned char data_start[4]; /* base of data used for this file */
|
||||
unsigned char bss_start[4]; /* base of bss used for this file */
|
||||
unsigned char gprmask[4]; /* ?? */
|
||||
unsigned char cprmask[4][4]; /* ?? */
|
||||
unsigned char gp_value[4]; /* value for gp register */
|
||||
} AOUTHDR;
|
||||
|
||||
/* compute size of a header */
|
||||
|
||||
#define AOUTSZ 56
|
||||
#define AOUTHDRSZ 56
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr {
|
||||
unsigned char s_name[8]; /* section name */
|
||||
unsigned char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
unsigned char s_vaddr[4]; /* virtual address */
|
||||
unsigned char s_size[4]; /* section size */
|
||||
unsigned char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
unsigned char s_relptr[4]; /* file ptr to relocation */
|
||||
unsigned char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
unsigned char s_nreloc[2]; /* number of relocation entries */
|
||||
unsigned char s_nlnno[2]; /* number of line number entries*/
|
||||
unsigned char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc {
|
||||
unsigned char r_vaddr[4];
|
||||
unsigned char r_bits[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 8
|
||||
|
||||
/* MIPS ECOFF uses a packed 8 byte format for relocs. These constants
|
||||
are used to unpack the r_bits field. */
|
||||
|
||||
#define RELOC_BITS0_SYMNDX_SH_LEFT_BIG 16
|
||||
#define RELOC_BITS0_SYMNDX_SH_LEFT_LITTLE 0
|
||||
|
||||
#define RELOC_BITS1_SYMNDX_SH_LEFT_BIG 8
|
||||
#define RELOC_BITS1_SYMNDX_SH_LEFT_LITTLE 8
|
||||
|
||||
#define RELOC_BITS2_SYMNDX_SH_LEFT_BIG 0
|
||||
#define RELOC_BITS2_SYMNDX_SH_LEFT_LITTLE 16
|
||||
|
||||
/* Originally, ECOFF used four bits for the reloc type and had three
|
||||
reserved bits. Irix 4 added another bit for the reloc type, which
|
||||
was easy because it was big endian and one of the spare bits became
|
||||
the new most significant bit. To make this also work for little
|
||||
endian ECOFF, we need to wrap one of the reserved bits around to
|
||||
become the most significant bit of the reloc type. */
|
||||
#define RELOC_BITS3_TYPE_BIG 0x3E
|
||||
#define RELOC_BITS3_TYPE_SH_BIG 1
|
||||
#define RELOC_BITS3_TYPE_LITTLE 0x78
|
||||
#define RELOC_BITS3_TYPE_SH_LITTLE 3
|
||||
#define RELOC_BITS3_TYPEHI_LITTLE 0x04
|
||||
#define RELOC_BITS3_TYPEHI_SH_LITTLE 2
|
||||
|
||||
#define RELOC_BITS3_EXTERN_BIG 0x01
|
||||
#define RELOC_BITS3_EXTERN_LITTLE 0x80
|
||||
|
||||
/* The r_type field in a reloc is one of the following values. I
|
||||
don't know if any other values can appear. These seem to be all
|
||||
that occur in the Ultrix 4.2 libraries. */
|
||||
#define MIPS_R_IGNORE 0
|
||||
#define MIPS_R_REFHALF 1
|
||||
#define MIPS_R_REFWORD 2
|
||||
#define MIPS_R_JMPADDR 3
|
||||
#define MIPS_R_REFHI 4
|
||||
#define MIPS_R_REFLO 5
|
||||
#define MIPS_R_GPREL 6
|
||||
#define MIPS_R_LITERAL 7
|
||||
|
||||
/* These reloc types are a Cygnus extension used when generating
|
||||
position independent code for embedded systems. The numbers are
|
||||
taken from Irix 4, but at least for internal relocs Irix 5 does not
|
||||
give them the same meaning. For an internal reloc the symbol index
|
||||
of RELHI and RELLO is modified as described below for
|
||||
MIPS_R_SWITCH. */
|
||||
#define MIPS_R_PCREL16 12
|
||||
#define MIPS_R_RELHI 13
|
||||
#define MIPS_R_RELLO 14
|
||||
|
||||
/* This reloc type is a Cygnus extension used when generating position
|
||||
independent code for embedded systems. It is used for an entry in
|
||||
a switch table, which looks like this:
|
||||
.word $L3-$LS12
|
||||
The object file will contain the correct difference, and does not
|
||||
require adjustment. However, when the linker is relaxing PC
|
||||
relative calls, it is possible for $L3 to move farther away. This
|
||||
reloc always appears in the .text section, and is always against
|
||||
the .text section. However, the symbol index is not
|
||||
RELOC_SECTION_TEXT. It is, instead, the distance between this
|
||||
switch table entry and $LS12. Thus, the original value of $L12 is
|
||||
vaddr - symndx
|
||||
and the original value of $L3 is
|
||||
vaddr - symndx + addend
|
||||
where addend is the value in the object file. Knowing this, the
|
||||
linker can know whether the addend in the object file must be
|
||||
adjusted. */
|
||||
#define MIPS_R_SWITCH 22
|
||||
|
||||
/********************** STABS **********************/
|
||||
|
||||
#define MIPS_IS_STAB ECOFF_IS_STAB
|
||||
#define MIPS_MARK_STAB ECOFF_MARK_STAB
|
||||
#define MIPS_UNMARK_STAB ECOFF_UNMARK_STAB
|
||||
|
||||
/********************** SYMBOLIC INFORMATION **********************/
|
||||
|
||||
/* Written by John Gilmore. */
|
||||
|
||||
/* ECOFF uses COFF-like section structures, but its own symbol format.
|
||||
This file defines the symbol format in fields whose size and alignment
|
||||
will not vary on different host systems. */
|
||||
|
||||
/* File header as a set of bytes */
|
||||
|
||||
struct hdr_ext {
|
||||
unsigned char h_magic[2];
|
||||
unsigned char h_vstamp[2];
|
||||
unsigned char h_ilineMax[4];
|
||||
unsigned char h_cbLine[4];
|
||||
unsigned char h_cbLineOffset[4];
|
||||
unsigned char h_idnMax[4];
|
||||
unsigned char h_cbDnOffset[4];
|
||||
unsigned char h_ipdMax[4];
|
||||
unsigned char h_cbPdOffset[4];
|
||||
unsigned char h_isymMax[4];
|
||||
unsigned char h_cbSymOffset[4];
|
||||
unsigned char h_ioptMax[4];
|
||||
unsigned char h_cbOptOffset[4];
|
||||
unsigned char h_iauxMax[4];
|
||||
unsigned char h_cbAuxOffset[4];
|
||||
unsigned char h_issMax[4];
|
||||
unsigned char h_cbSsOffset[4];
|
||||
unsigned char h_issExtMax[4];
|
||||
unsigned char h_cbSsExtOffset[4];
|
||||
unsigned char h_ifdMax[4];
|
||||
unsigned char h_cbFdOffset[4];
|
||||
unsigned char h_crfd[4];
|
||||
unsigned char h_cbRfdOffset[4];
|
||||
unsigned char h_iextMax[4];
|
||||
unsigned char h_cbExtOffset[4];
|
||||
};
|
||||
|
||||
/* File descriptor external record */
|
||||
|
||||
struct fdr_ext {
|
||||
unsigned char f_adr[4];
|
||||
unsigned char f_rss[4];
|
||||
unsigned char f_issBase[4];
|
||||
unsigned char f_cbSs[4];
|
||||
unsigned char f_isymBase[4];
|
||||
unsigned char f_csym[4];
|
||||
unsigned char f_ilineBase[4];
|
||||
unsigned char f_cline[4];
|
||||
unsigned char f_ioptBase[4];
|
||||
unsigned char f_copt[4];
|
||||
unsigned char f_ipdFirst[2];
|
||||
unsigned char f_cpd[2];
|
||||
unsigned char f_iauxBase[4];
|
||||
unsigned char f_caux[4];
|
||||
unsigned char f_rfdBase[4];
|
||||
unsigned char f_crfd[4];
|
||||
unsigned char f_bits1[1];
|
||||
unsigned char f_bits2[3];
|
||||
unsigned char f_cbLineOffset[4];
|
||||
unsigned char f_cbLine[4];
|
||||
};
|
||||
|
||||
#define FDR_BITS1_LANG_BIG 0xF8
|
||||
#define FDR_BITS1_LANG_SH_BIG 3
|
||||
#define FDR_BITS1_LANG_LITTLE 0x1F
|
||||
#define FDR_BITS1_LANG_SH_LITTLE 0
|
||||
|
||||
#define FDR_BITS1_FMERGE_BIG 0x04
|
||||
#define FDR_BITS1_FMERGE_LITTLE 0x20
|
||||
|
||||
#define FDR_BITS1_FREADIN_BIG 0x02
|
||||
#define FDR_BITS1_FREADIN_LITTLE 0x40
|
||||
|
||||
#define FDR_BITS1_FBIGENDIAN_BIG 0x01
|
||||
#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
|
||||
|
||||
#define FDR_BITS2_GLEVEL_BIG 0xC0
|
||||
#define FDR_BITS2_GLEVEL_SH_BIG 6
|
||||
#define FDR_BITS2_GLEVEL_LITTLE 0x03
|
||||
#define FDR_BITS2_GLEVEL_SH_LITTLE 0
|
||||
|
||||
/* We ignore the `reserved' field in bits2. */
|
||||
|
||||
/* Procedure descriptor external record */
|
||||
|
||||
struct pdr_ext {
|
||||
unsigned char p_adr[4];
|
||||
unsigned char p_isym[4];
|
||||
unsigned char p_iline[4];
|
||||
unsigned char p_regmask[4];
|
||||
unsigned char p_regoffset[4];
|
||||
unsigned char p_iopt[4];
|
||||
unsigned char p_fregmask[4];
|
||||
unsigned char p_fregoffset[4];
|
||||
unsigned char p_frameoffset[4];
|
||||
unsigned char p_framereg[2];
|
||||
unsigned char p_pcreg[2];
|
||||
unsigned char p_lnLow[4];
|
||||
unsigned char p_lnHigh[4];
|
||||
unsigned char p_cbLineOffset[4];
|
||||
};
|
||||
|
||||
/* Runtime procedure table */
|
||||
|
||||
struct rpdr_ext {
|
||||
unsigned char p_adr[4];
|
||||
unsigned char p_regmask[4];
|
||||
unsigned char p_regoffset[4];
|
||||
unsigned char p_fregmask[4];
|
||||
unsigned char p_fregoffset[4];
|
||||
unsigned char p_frameoffset[4];
|
||||
unsigned char p_framereg[2];
|
||||
unsigned char p_pcreg[2];
|
||||
unsigned char p_irpss[4];
|
||||
unsigned char p_reserved[4];
|
||||
unsigned char p_exception_info[4];
|
||||
};
|
||||
|
||||
/* Line numbers */
|
||||
|
||||
struct line_ext {
|
||||
unsigned char l_line[4];
|
||||
};
|
||||
|
||||
/* Symbol external record */
|
||||
|
||||
struct sym_ext {
|
||||
unsigned char s_iss[4];
|
||||
unsigned char s_value[4];
|
||||
unsigned char s_bits1[1];
|
||||
unsigned char s_bits2[1];
|
||||
unsigned char s_bits3[1];
|
||||
unsigned char s_bits4[1];
|
||||
};
|
||||
|
||||
#define SYM_BITS1_ST_BIG 0xFC
|
||||
#define SYM_BITS1_ST_SH_BIG 2
|
||||
#define SYM_BITS1_ST_LITTLE 0x3F
|
||||
#define SYM_BITS1_ST_SH_LITTLE 0
|
||||
|
||||
#define SYM_BITS1_SC_BIG 0x03
|
||||
#define SYM_BITS1_SC_SH_LEFT_BIG 3
|
||||
#define SYM_BITS1_SC_LITTLE 0xC0
|
||||
#define SYM_BITS1_SC_SH_LITTLE 6
|
||||
|
||||
#define SYM_BITS2_SC_BIG 0xE0
|
||||
#define SYM_BITS2_SC_SH_BIG 5
|
||||
#define SYM_BITS2_SC_LITTLE 0x07
|
||||
#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
|
||||
|
||||
#define SYM_BITS2_RESERVED_BIG 0x10
|
||||
#define SYM_BITS2_RESERVED_LITTLE 0x08
|
||||
|
||||
#define SYM_BITS2_INDEX_BIG 0x0F
|
||||
#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
|
||||
#define SYM_BITS2_INDEX_LITTLE 0xF0
|
||||
#define SYM_BITS2_INDEX_SH_LITTLE 4
|
||||
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
|
||||
#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
|
||||
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
|
||||
#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
|
||||
|
||||
/* External symbol external record */
|
||||
|
||||
struct ext_ext {
|
||||
unsigned char es_bits1[1];
|
||||
unsigned char es_bits2[1];
|
||||
unsigned char es_ifd[2];
|
||||
struct sym_ext es_asym;
|
||||
};
|
||||
|
||||
#define EXT_BITS1_JMPTBL_BIG 0x80
|
||||
#define EXT_BITS1_JMPTBL_LITTLE 0x01
|
||||
|
||||
#define EXT_BITS1_COBOL_MAIN_BIG 0x40
|
||||
#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
|
||||
|
||||
#define EXT_BITS1_WEAKEXT_BIG 0x20
|
||||
#define EXT_BITS1_WEAKEXT_LITTLE 0x04
|
||||
|
||||
/* Dense numbers external record */
|
||||
|
||||
struct dnr_ext {
|
||||
unsigned char d_rfd[4];
|
||||
unsigned char d_index[4];
|
||||
};
|
||||
|
||||
/* Relative file descriptor */
|
||||
|
||||
struct rfd_ext {
|
||||
unsigned char rfd[4];
|
||||
};
|
||||
|
||||
/* Optimizer symbol external record */
|
||||
|
||||
struct opt_ext {
|
||||
unsigned char o_bits1[1];
|
||||
unsigned char o_bits2[1];
|
||||
unsigned char o_bits3[1];
|
||||
unsigned char o_bits4[1];
|
||||
struct rndx_ext o_rndx;
|
||||
unsigned char o_offset[4];
|
||||
};
|
||||
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
|
||||
#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
|
||||
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
|
||||
#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
|
||||
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
|
||||
#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
/* PE COFF header information */
|
||||
|
||||
#ifndef _PE_H
|
||||
#define _PE_H
|
||||
|
||||
/* NT specific file attributes */
|
||||
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
|
||||
#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
|
||||
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
|
||||
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
|
||||
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
|
||||
#define IMAGE_FILE_32BIT_MACHINE 0x0100
|
||||
#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
|
||||
#define IMAGE_FILE_SYSTEM 0x1000
|
||||
#define IMAGE_FILE_DLL 0x2000
|
||||
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
|
||||
|
||||
/* additional flags to be set for section headers to allow the NT loader to
|
||||
read and write to the section data (to replace the addresses of data in
|
||||
dlls for one thing); also to execute the section in .text's case */
|
||||
#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
|
||||
#define IMAGE_SCN_MEM_EXECUTE 0x20000000
|
||||
#define IMAGE_SCN_MEM_READ 0x40000000
|
||||
#define IMAGE_SCN_MEM_WRITE 0x80000000
|
||||
|
||||
/*
|
||||
* Section characteristics added for ppc-nt
|
||||
*/
|
||||
|
||||
#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */
|
||||
|
||||
#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */
|
||||
#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */
|
||||
#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */
|
||||
|
||||
#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */
|
||||
#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */
|
||||
#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */
|
||||
#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */
|
||||
|
||||
#define IMAGE_SCN_MEM_FARDATA 0x00008000
|
||||
|
||||
#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
|
||||
#define IMAGE_SCN_MEM_16BIT 0x00020000
|
||||
#define IMAGE_SCN_MEM_LOCKED 0x00040000
|
||||
#define IMAGE_SCN_MEM_PRELOAD 0x00080000
|
||||
|
||||
#define IMAGE_SCN_ALIGN_1BYTES 0x00100000
|
||||
#define IMAGE_SCN_ALIGN_2BYTES 0x00200000
|
||||
#define IMAGE_SCN_ALIGN_4BYTES 0x00300000
|
||||
#define IMAGE_SCN_ALIGN_8BYTES 0x00400000
|
||||
#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default alignment if no others are specified. */
|
||||
#define IMAGE_SCN_ALIGN_32BYTES 0x00600000
|
||||
#define IMAGE_SCN_ALIGN_64BYTES 0x00700000
|
||||
|
||||
|
||||
#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */
|
||||
#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */
|
||||
#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */
|
||||
#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */
|
||||
|
||||
/* COMDAT selection codes. */
|
||||
|
||||
#define IMAGE_COMDAT_SELECT_NODUPLICATES (1) /* Warn if duplicates. */
|
||||
#define IMAGE_COMDAT_SELECT_ANY (2) /* No warning. */
|
||||
#define IMAGE_COMDAT_SELECT_SAME_SIZE (3) /* Warn if different size. */
|
||||
#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */
|
||||
#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */
|
||||
|
||||
/* Magic values that are true for all dos/nt implementations */
|
||||
#define DOSMAGIC 0x5a4d
|
||||
#define NT_SIGNATURE 0x00004550
|
||||
|
||||
/* NT allows long filenames, we want to accommodate this. This may break
|
||||
some of the bfd functions */
|
||||
#undef FILNMLEN
|
||||
#define FILNMLEN 18 /* # characters in a file name */
|
||||
|
||||
|
||||
#ifdef COFF_IMAGE_WITH_PE
|
||||
/* The filehdr is only weired in images */
|
||||
|
||||
#undef FILHDR
|
||||
struct external_PE_filehdr
|
||||
{
|
||||
/* DOS header fields */
|
||||
char e_magic[2]; /* Magic number, 0x5a4d */
|
||||
char e_cblp[2]; /* Bytes on last page of file, 0x90 */
|
||||
char e_cp[2]; /* Pages in file, 0x3 */
|
||||
char e_crlc[2]; /* Relocations, 0x0 */
|
||||
char e_cparhdr[2]; /* Size of header in paragraphs, 0x4 */
|
||||
char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0 */
|
||||
char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF */
|
||||
char e_ss[2]; /* Initial (relative) SS value, 0x0 */
|
||||
char e_sp[2]; /* Initial SP value, 0xb8 */
|
||||
char e_csum[2]; /* Checksum, 0x0 */
|
||||
char e_ip[2]; /* Initial IP value, 0x0 */
|
||||
char e_cs[2]; /* Initial (relative) CS value, 0x0 */
|
||||
char e_lfarlc[2]; /* File address of relocation table, 0x40 */
|
||||
char e_ovno[2]; /* Overlay number, 0x0 */
|
||||
char e_res[4][2]; /* Reserved words, all 0x0 */
|
||||
char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0 */
|
||||
char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0 */
|
||||
char e_res2[10][2]; /* Reserved words, all 0x0 */
|
||||
char e_lfanew[4]; /* File address of new exe header, 0x80 */
|
||||
char dos_message[16][4]; /* other stuff, always follow DOS header */
|
||||
char nt_signature[4]; /* required NT signature, 0x4550 */
|
||||
|
||||
/* From standard header */
|
||||
|
||||
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define FILHDR struct external_PE_filehdr
|
||||
#undef FILHSZ
|
||||
#define FILHSZ 152
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AOUTHDR standard;
|
||||
|
||||
/* NT extra fields; see internal.h for descriptions */
|
||||
char ImageBase[4];
|
||||
char SectionAlignment[4];
|
||||
char FileAlignment[4];
|
||||
char MajorOperatingSystemVersion[2];
|
||||
char MinorOperatingSystemVersion[2];
|
||||
char MajorImageVersion[2];
|
||||
char MinorImageVersion[2];
|
||||
char MajorSubsystemVersion[2];
|
||||
char MinorSubsystemVersion[2];
|
||||
char Reserved1[4];
|
||||
char SizeOfImage[4];
|
||||
char SizeOfHeaders[4];
|
||||
char CheckSum[4];
|
||||
char Subsystem[2];
|
||||
char DllCharacteristics[2];
|
||||
char SizeOfStackReserve[4];
|
||||
char SizeOfStackCommit[4];
|
||||
char SizeOfHeapReserve[4];
|
||||
char SizeOfHeapCommit[4];
|
||||
char LoaderFlags[4];
|
||||
char NumberOfRvaAndSizes[4];
|
||||
/* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
|
||||
char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars */
|
||||
|
||||
} PEAOUTHDR;
|
||||
|
||||
|
||||
#undef AOUTSZ
|
||||
#define AOUTSZ (AOUTHDRSZ + 196)
|
||||
|
||||
#undef E_FILNMLEN
|
||||
#define E_FILNMLEN 18 /* # characters in a file name */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
/* Basic coff information for the PowerPC
|
||||
*
|
||||
* Based on coff/rs6000.h, coff/i386.h and others.
|
||||
*
|
||||
* Initial release: Kim Knuttila (krk@cygnus.com)
|
||||
*/
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
/* extra NT defines */
|
||||
#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
|
||||
#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
|
||||
#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
|
||||
|
||||
/* from winnt.h */
|
||||
#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
|
||||
|
||||
#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries */
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIB ".lib"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0 */
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
|
||||
/* Allow the file name length to be overridden in the including file */
|
||||
#ifndef E_FILNMLEN
|
||||
#define E_FILNMLEN 14
|
||||
#endif
|
||||
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
char x_checksum[4]; /* section COMDAT checksum */
|
||||
char x_associated[2]; /* COMDAT associated section index */
|
||||
char x_comdat[1]; /* COMDAT selection number */
|
||||
} x_scn;
|
||||
};
|
||||
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
#define _ETEXT "etext"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
|
|
@ -1,243 +0,0 @@
|
|||
/* IBM RS/6000 "XCOFF" file definitions for BFD.
|
||||
Copyright (C) 1990, 1991 Free Software Foundation, Inc.
|
||||
FIXME: Can someone provide a transliteration of this name into ASCII?
|
||||
Using the following chars caused a compiler warning on HIUX (so I replaced
|
||||
them with octal escapes), and isn't useful without an understanding of what
|
||||
character set it is.
|
||||
Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
|
||||
and John Gilmore of Cygnus Support. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
/* IBM RS/6000 */
|
||||
#define U802WRMAGIC 0730 /* writeable text segments **chh** */
|
||||
#define U802ROMAGIC 0735 /* readonly sharable text segments */
|
||||
#define U802TOCMAGIC 0737 /* readonly text segments and TOC */
|
||||
|
||||
#define BADMAG(x) \
|
||||
((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \
|
||||
(x).f_magic != U802TOCMAGIC)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char magic[2]; /* type of file */
|
||||
unsigned char vstamp[2]; /* version stamp */
|
||||
unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */
|
||||
unsigned char dsize[4]; /* initialized data " " */
|
||||
unsigned char bsize[4]; /* uninitialized data " " */
|
||||
unsigned char entry[4]; /* entry pt. */
|
||||
unsigned char text_start[4]; /* base of text used for this file */
|
||||
unsigned char data_start[4]; /* base of data used for this file */
|
||||
unsigned char o_toc[4]; /* address of TOC */
|
||||
unsigned char o_snentry[2]; /* section number of entry point */
|
||||
unsigned char o_sntext[2]; /* section number of .text section */
|
||||
unsigned char o_sndata[2]; /* section number of .data section */
|
||||
unsigned char o_sntoc[2]; /* section number of TOC */
|
||||
unsigned char o_snloader[2]; /* section number of .loader section */
|
||||
unsigned char o_snbss[2]; /* section number of .bss section */
|
||||
unsigned char o_algntext[2]; /* .text alignment */
|
||||
unsigned char o_algndata[2]; /* .data alignment */
|
||||
unsigned char o_modtype[2]; /* module type (??) */
|
||||
unsigned char o_cputype[2]; /* cpu type */
|
||||
unsigned char o_maxstack[4]; /* max stack size (??) */
|
||||
unsigned char o_maxdata[4]; /* max data size (??) */
|
||||
unsigned char o_resv2[12]; /* reserved */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 72
|
||||
#define SMALL_AOUTSZ (28)
|
||||
#define AOUTHDRSZ 72
|
||||
|
||||
#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
|
||||
#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
|
||||
#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _PAD ".pad"
|
||||
#define _LOADER ".loader"
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/* XCOFF uses a special .loader section with type STYP_LOADER. */
|
||||
#define STYP_LOADER 0x1000
|
||||
|
||||
/* XCOFF uses a special .debug section with type STYP_DEBUG. */
|
||||
#define STYP_DEBUG 0x2000
|
||||
|
||||
/* XCOFF handles line number or relocation overflow by creating
|
||||
another section header with STYP_OVRFLO set. */
|
||||
#define STYP_OVRFLO 0x8000
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
struct {
|
||||
unsigned char x_scnlen[4];
|
||||
unsigned char x_parmhash[4];
|
||||
unsigned char x_snhash[2];
|
||||
unsigned char x_smtyp[1];
|
||||
unsigned char x_smclas[1];
|
||||
unsigned char x_stab[4];
|
||||
unsigned char x_snstab[2];
|
||||
} x_csect;
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
#define DBXMASK 0x80 /* for dbx storage mask */
|
||||
#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_size[1];
|
||||
char r_type[1];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
#define DEFAULT_DATA_SECTION_ALIGNMENT 4
|
||||
#define DEFAULT_BSS_SECTION_ALIGNMENT 4
|
||||
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
|
||||
/* For new sections we havn't heard of before */
|
||||
#define DEFAULT_SECTION_ALIGNMENT 4
|
||||
|
|
@ -1,269 +0,0 @@
|
|||
/*** coff information for Hitachi SH */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define SH_ARCH_MAGIC_BIG 0x0500
|
||||
#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
|
||||
|
||||
|
||||
#define SHBADMAG(x) \
|
||||
(((x).f_magic!=SH_ARCH_MAGIC_BIG) && \
|
||||
((x).f_magic!=SH_ARCH_MAGIC_LITTLE))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the h8 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes */
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
/* SH relocation types. Not all of these are actually used. */
|
||||
|
||||
#define R_SH_UNUSED 0 /* only used internally */
|
||||
#define R_SH_PCREL8 3 /* 8 bit pcrel */
|
||||
#define R_SH_PCREL16 4 /* 16 bit pcrel */
|
||||
#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */
|
||||
#define R_SH_LOW16 7 /* low 16 bits of 24 bit immediate */
|
||||
#define R_SH_IMM24 6 /* 24 bit immediate */
|
||||
#define R_SH_PCDISP8BY4 9 /* PC rel 8 bits *4 +ve */
|
||||
#define R_SH_PCDISP8BY2 10 /* PC rel 8 bits *2 +ve */
|
||||
#define R_SH_PCDISP8 11 /* 8 bit branch */
|
||||
#define R_SH_PCDISP 12 /* 12 bit branch */
|
||||
#define R_SH_IMM32 14 /* 32 bit immediate */
|
||||
#define R_SH_IMM8 16 /* 8 bit immediate */
|
||||
#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */
|
||||
#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */
|
||||
#define R_SH_IMM4 19 /* 4 bit immediate */
|
||||
#define R_SH_IMM4BY2 20 /* 4 bit immediate *2 */
|
||||
#define R_SH_IMM4BY4 21 /* 4 bit immediate *4 */
|
||||
#define R_SH_PCRELIMM8BY2 22 /* PC rel 8 bits *2 unsigned */
|
||||
#define R_SH_PCRELIMM8BY4 23 /* PC rel 8 bits *4 unsigned */
|
||||
#define R_SH_IMM16 24 /* 16 bit immediate */
|
||||
|
||||
/* The switch table reloc types are used for relaxing. They are
|
||||
generated for expressions such as
|
||||
.word L1 - L2
|
||||
The r_offset field holds the difference between the reloc address
|
||||
and L2. */
|
||||
#define R_SH_SWITCH8 33 /* 8 bit switch table entry */
|
||||
#define R_SH_SWITCH16 25 /* 16 bit switch table entry */
|
||||
#define R_SH_SWITCH32 26 /* 32 bit switch table entry */
|
||||
|
||||
/* The USES reloc type is used for relaxing. The compiler will
|
||||
generate .uses pseudo-ops when it finds a function call which it
|
||||
can relax. The r_offset field of the USES reloc holds the PC
|
||||
relative offset to the instruction which loads the register used in
|
||||
the function call. */
|
||||
#define R_SH_USES 27 /* .uses pseudo-op */
|
||||
|
||||
/* The COUNT reloc type is used for relaxing. The assembler will
|
||||
generate COUNT relocs for addresses referred to by the register
|
||||
loads associated with USES relocs. The r_offset field of the COUNT
|
||||
reloc holds the number of times the address is referenced in the
|
||||
object file. */
|
||||
#define R_SH_COUNT 28 /* Count of constant pool uses */
|
||||
|
||||
/* The ALIGN reloc type is used for relaxing. The r_offset field is
|
||||
the power of two to which subsequent portions of the object file
|
||||
must be aligned. */
|
||||
#define R_SH_ALIGN 29 /* .align pseudo-op */
|
||||
|
||||
/* The CODE and DATA reloc types are used for aligning load and store
|
||||
instructions. The assembler will generate a CODE reloc before a
|
||||
block of instructions. It will generate a DATA reloc before data.
|
||||
A section should be processed assuming it contains data, unless a
|
||||
CODE reloc is seen. The only relevant pieces of information in the
|
||||
CODE and DATA relocs are the section and the address. The symbol
|
||||
and offset are meaningless. */
|
||||
#define R_SH_CODE 30 /* start of code */
|
||||
#define R_SH_DATA 31 /* start of data */
|
||||
|
||||
/* The LABEL reloc type is used for aligning load and store
|
||||
instructions. The assembler will generate a LABEL reloc for each
|
||||
label within a block of instructions. This permits the linker to
|
||||
avoid swapping instructions which are the targets of branches. */
|
||||
#define R_SH_LABEL 32 /* label */
|
||||
|
||||
/* NB: R_SH_SWITCH8 is 33 */
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
/*** coff information for Sparc. */
|
||||
|
||||
/* This file is an amalgamation of several standard include files that
|
||||
define coff format, such as filehdr.h, aouthdr.h, and so forth. In
|
||||
addition, all datatypes have been translated into character arrays of
|
||||
(presumed) equivalent size. This is necessary so that this file can
|
||||
be used with different systems while still yielding the same results. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr
|
||||
{
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
#define F_RELFLG (0x0001) /* relocation info stripped */
|
||||
#define F_EXEC (0x0002) /* file is executable */
|
||||
#define F_LNNO (0x0004) /* line numbers stripped */
|
||||
#define F_LSYMS (0x0008) /* local symbols stripped */
|
||||
|
||||
#define SPARCMAGIC (0540)
|
||||
|
||||
/* This is Lynx's all-platform magic number for executables. */
|
||||
|
||||
#define LYNXCOFFMAGIC (0415)
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
#define OMAGIC 0404 /* object files, eg as output */
|
||||
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
|
||||
#define STMAGIC 0401 /* target shlib */
|
||||
#define SHMAGIC 0443 /* host shlib */
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
struct external_scnhdr
|
||||
{
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/* Names of "special" sections. */
|
||||
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _TV ".tv"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
#define _COMMENT ".comment"
|
||||
#define _LIB ".lib"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
Line numbers are grouped on a per function basis; first entry in a function
|
||||
grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
symbol table index of the function name. */
|
||||
|
||||
struct external_lineno
|
||||
{
|
||||
union {
|
||||
char l_symndx[4]; /* fn name symbol index, iff l_lnno == 0 */
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ (6)
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN (8) /* # characters in a symbol name */
|
||||
#define E_FILNMLEN (14) /* # characters in a file name */
|
||||
#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
#if 0 /* of doubtful value */
|
||||
char e_nptr[2][4];
|
||||
struct {
|
||||
char e_leading_zero[1];
|
||||
char e_dbx_type[1];
|
||||
char e_dbx_desc[2];
|
||||
} e_dbx;
|
||||
#endif
|
||||
} e;
|
||||
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
char padding[2];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent
|
||||
{
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* .tv section info (in auxent of sym .tv)) */
|
||||
|
||||
char x_fill[20]; /* forces to 20-byte size */
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 20
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 20
|
||||
|
||||
#define _ETEXT "etext"
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
char r_spare[2];
|
||||
char r_offset[4];
|
||||
};
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
|
@ -1,484 +0,0 @@
|
|||
/* Declarations of internal format of MIPS ECOFF symbols.
|
||||
Originally contributed by MIPS Computer Systems and Third Eye Software.
|
||||
Changes contributed by Cygnus Support are in the public domain.
|
||||
|
||||
This file is just aggregated with the files that make up the GNU
|
||||
release; it is not considered part of GAS, GDB, or other GNU
|
||||
programs. */
|
||||
|
||||
/*
|
||||
* |-----------------------------------------------------------|
|
||||
* | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
|
||||
* | MIPS Computer Systems, Inc. grants reproduction and use |
|
||||
* | rights to all parties, PROVIDED that this comment is |
|
||||
* | maintained in the copy. |
|
||||
* |-----------------------------------------------------------|
|
||||
*/
|
||||
#ifndef _SYM_H
|
||||
#define _SYM_H
|
||||
|
||||
/* (C) Copyright 1984 by Third Eye Software, Inc.
|
||||
*
|
||||
* Third Eye Software, Inc. grants reproduction and use rights to
|
||||
* all parties, PROVIDED that this comment is maintained in the copy.
|
||||
*
|
||||
* Third Eye makes no claims about the applicability of this
|
||||
* symbol table to a particular use.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the definition of the Third Eye Symbol Table.
|
||||
*
|
||||
* Symbols are assumed to be in 'encounter order' - i.e. the order that
|
||||
* the things they represent were encountered by the compiler/assembler/loader.
|
||||
* EXCEPT for globals! These are assumed to be bunched together,
|
||||
* probably right after the last 'normal' symbol. Globals ARE sorted
|
||||
* in ascending order.
|
||||
*
|
||||
* -----------------------------------------------------------------------
|
||||
* A brief word about Third Eye naming/use conventions:
|
||||
*
|
||||
* All arrays and index's are 0 based.
|
||||
* All "ifooMax" values are the highest legal value PLUS ONE. This makes
|
||||
* them good for allocating arrays, etc. All checks are "ifoo < ifooMax".
|
||||
*
|
||||
* "isym" Index into the SYMbol table.
|
||||
* "ipd" Index into the Procedure Descriptor array.
|
||||
* "ifd" Index into the File Descriptor array.
|
||||
* "iss" Index into String Space.
|
||||
* "cb" Count of Bytes.
|
||||
* "rgPd" array whose domain is "0..ipdMax-1" and RanGe is PDR.
|
||||
* "rgFd" array whose domain is "0..ifdMax-1" and RanGe is FDR.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Symbolic Header (HDR) structure.
|
||||
* As long as all the pointers are set correctly,
|
||||
* we don't care WHAT order the various sections come out in!
|
||||
*
|
||||
* A file produced solely for the use of CDB will probably NOT have
|
||||
* any instructions or data areas in it, as these are available
|
||||
* in the original.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
short magic; /* to verify validity of the table */
|
||||
short vstamp; /* version stamp */
|
||||
long ilineMax; /* number of line number entries */
|
||||
bfd_vma cbLine; /* number of bytes for line number entries */
|
||||
bfd_vma cbLineOffset; /* offset to start of line number entries*/
|
||||
long idnMax; /* max index into dense number table */
|
||||
bfd_vma cbDnOffset; /* offset to start dense number table */
|
||||
long ipdMax; /* number of procedures */
|
||||
bfd_vma cbPdOffset; /* offset to procedure descriptor table */
|
||||
long isymMax; /* number of local symbols */
|
||||
bfd_vma cbSymOffset; /* offset to start of local symbols*/
|
||||
long ioptMax; /* max index into optimization symbol entries */
|
||||
bfd_vma cbOptOffset; /* offset to optimization symbol entries */
|
||||
long iauxMax; /* number of auxillary symbol entries */
|
||||
bfd_vma cbAuxOffset; /* offset to start of auxillary symbol entries*/
|
||||
long issMax; /* max index into local strings */
|
||||
bfd_vma cbSsOffset; /* offset to start of local strings */
|
||||
long issExtMax; /* max index into external strings */
|
||||
bfd_vma cbSsExtOffset; /* offset to start of external strings */
|
||||
long ifdMax; /* number of file descriptor entries */
|
||||
bfd_vma cbFdOffset; /* offset to file descriptor table */
|
||||
long crfd; /* number of relative file descriptor entries */
|
||||
bfd_vma cbRfdOffset; /* offset to relative file descriptor table */
|
||||
long iextMax; /* max index into external symbols */
|
||||
bfd_vma cbExtOffset; /* offset to start of external symbol entries*/
|
||||
/* If you add machine dependent fields, add them here */
|
||||
} HDRR, *pHDRR;
|
||||
#define cbHDRR sizeof(HDRR)
|
||||
#define hdrNil ((pHDRR)0)
|
||||
|
||||
/*
|
||||
* The FDR and PDR structures speed mapping of address <-> name.
|
||||
* They are sorted in ascending memory order and are kept in
|
||||
* memory by CDB at runtime.
|
||||
*/
|
||||
|
||||
/*
|
||||
* File Descriptor
|
||||
*
|
||||
* There is one of these for EVERY FILE, whether compiled with
|
||||
* full debugging symbols or not. The name of a file should be
|
||||
* the path name given to the compiler. This allows the user
|
||||
* to simply specify the names of the directories where the COMPILES
|
||||
* were done, and we will be able to find their files.
|
||||
* A field whose comment starts with "R - " indicates that it will be
|
||||
* setup at runtime.
|
||||
*/
|
||||
typedef struct fdr {
|
||||
bfd_vma adr; /* memory address of beginning of file */
|
||||
long rss; /* file name (of source, if known) */
|
||||
long issBase; /* file's string space */
|
||||
bfd_vma cbSs; /* number of bytes in the ss */
|
||||
long isymBase; /* beginning of symbols */
|
||||
long csym; /* count file's of symbols */
|
||||
long ilineBase; /* file's line symbols */
|
||||
long cline; /* count of file's line symbols */
|
||||
long ioptBase; /* file's optimization entries */
|
||||
long copt; /* count of file's optimization entries */
|
||||
unsigned short ipdFirst;/* start of procedures for this file */
|
||||
short cpd; /* count of procedures for this file */
|
||||
long iauxBase; /* file's auxiliary entries */
|
||||
long caux; /* count of file's auxiliary entries */
|
||||
long rfdBase; /* index into the file indirect table */
|
||||
long crfd; /* count file indirect entries */
|
||||
unsigned lang: 5; /* language for this file */
|
||||
unsigned fMerge : 1; /* whether this file can be merged */
|
||||
unsigned fReadin : 1; /* true if it was read in (not just created) */
|
||||
unsigned fBigendian : 1;/* if set, was compiled on big endian machine */
|
||||
/* aux's will be in compile host's sex */
|
||||
unsigned glevel : 2; /* level this file was compiled with */
|
||||
unsigned reserved : 22; /* reserved for future use */
|
||||
bfd_vma cbLineOffset; /* byte offset from header for this file ln's */
|
||||
bfd_vma cbLine; /* size of lines for this file */
|
||||
} FDR, *pFDR;
|
||||
#define cbFDR sizeof(FDR)
|
||||
#define fdNil ((pFDR)0)
|
||||
#define ifdNil -1
|
||||
#define ifdTemp 0
|
||||
#define ilnNil -1
|
||||
|
||||
|
||||
/*
|
||||
* Procedure Descriptor
|
||||
*
|
||||
* There is one of these for EVERY TEXT LABEL.
|
||||
* If a procedure is in a file with full symbols, then isym
|
||||
* will point to the PROC symbols, else it will point to the
|
||||
* global symbol for the label.
|
||||
*/
|
||||
|
||||
typedef struct pdr {
|
||||
bfd_vma adr; /* memory address of start of procedure */
|
||||
long isym; /* start of local symbol entries */
|
||||
long iline; /* start of line number entries*/
|
||||
long regmask; /* save register mask */
|
||||
long regoffset; /* save register offset */
|
||||
long iopt; /* start of optimization symbol entries*/
|
||||
long fregmask; /* save floating point register mask */
|
||||
long fregoffset; /* save floating point register offset */
|
||||
long frameoffset; /* frame size */
|
||||
short framereg; /* frame pointer register */
|
||||
short pcreg; /* offset or reg of return pc */
|
||||
long lnLow; /* lowest line in the procedure */
|
||||
long lnHigh; /* highest line in the procedure */
|
||||
bfd_vma cbLineOffset; /* byte offset for this procedure from the fd base */
|
||||
/* These fields are new for 64 bit ECOFF. */
|
||||
unsigned gp_prologue : 8; /* byte size of GP prologue */
|
||||
unsigned gp_used : 1; /* true if the procedure uses GP */
|
||||
unsigned reg_frame : 1; /* true if register frame procedure */
|
||||
unsigned prof : 1; /* true if compiled with -pg */
|
||||
unsigned reserved : 13; /* reserved: must be zero */
|
||||
unsigned localoff : 8; /* offset of local variables from vfp */
|
||||
} PDR, *pPDR;
|
||||
#define cbPDR sizeof(PDR)
|
||||
#define pdNil ((pPDR) 0)
|
||||
#define ipdNil -1
|
||||
|
||||
/*
|
||||
* The structure of the runtime procedure descriptor created by the loader
|
||||
* for use by the static exception system.
|
||||
*/
|
||||
/*
|
||||
* If 0'd out because exception_info chokes Visual C++ and because there
|
||||
* don't seem to be any references to this structure elsewhere in gdb.
|
||||
*/
|
||||
#if 0
|
||||
typedef struct runtime_pdr {
|
||||
bfd_vma adr; /* memory address of start of procedure */
|
||||
long regmask; /* save register mask */
|
||||
long regoffset; /* save register offset */
|
||||
long fregmask; /* save floating point register mask */
|
||||
long fregoffset; /* save floating point register offset */
|
||||
long frameoffset; /* frame size */
|
||||
short framereg; /* frame pointer register */
|
||||
short pcreg; /* offset or reg of return pc */
|
||||
long irpss; /* index into the runtime string table */
|
||||
long reserved;
|
||||
struct exception_info *exception_info;/* pointer to exception array */
|
||||
} RPDR, *pRPDR;
|
||||
#define cbRPDR sizeof(RPDR)
|
||||
#define rpdNil ((pRPDR) 0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Line Numbers
|
||||
*
|
||||
* Line Numbers are segregated from the normal symbols because they
|
||||
* are [1] smaller , [2] are of no interest to your
|
||||
* average loader, and [3] are never needed in the middle of normal
|
||||
* scanning and therefore slow things down.
|
||||
*
|
||||
* By definition, the first LINER for any given procedure will have
|
||||
* the first line of a procedure and represent the first address.
|
||||
*/
|
||||
|
||||
typedef long LINER, *pLINER;
|
||||
#define lineNil ((pLINER)0)
|
||||
#define cbLINER sizeof(LINER)
|
||||
#define ilineNil -1
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The Symbol Structure (GFW, to those who Know!)
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
long iss; /* index into String Space of name */
|
||||
bfd_vma value; /* value of symbol */
|
||||
unsigned st : 6; /* symbol type */
|
||||
unsigned sc : 5; /* storage class - text, data, etc */
|
||||
unsigned reserved : 1; /* reserved */
|
||||
unsigned index : 20; /* index into sym/aux table */
|
||||
} SYMR, *pSYMR;
|
||||
#define symNil ((pSYMR)0)
|
||||
#define cbSYMR sizeof(SYMR)
|
||||
#define isymNil -1
|
||||
#define indexNil 0xfffff
|
||||
#define issNil -1
|
||||
#define issNull 0
|
||||
|
||||
|
||||
/* The following converts a memory resident string to an iss.
|
||||
* This hack is recognized in SbFIss, in sym.c of the debugger.
|
||||
*/
|
||||
#define IssFSb(sb) (0x80000000 | ((unsigned long)(sb)))
|
||||
|
||||
/* E X T E R N A L S Y M B O L R E C O R D
|
||||
*
|
||||
* Same as the SYMR except it contains file context to determine where
|
||||
* the index is.
|
||||
*/
|
||||
typedef struct ecoff_extr {
|
||||
unsigned jmptbl:1; /* symbol is a jump table entry for shlibs */
|
||||
unsigned cobol_main:1; /* symbol is a cobol main procedure */
|
||||
unsigned weakext:1; /* symbol is weak external */
|
||||
unsigned reserved:13; /* reserved for future use */
|
||||
int ifd; /* where the iss and index fields point into */
|
||||
SYMR asym; /* symbol for the external */
|
||||
} EXTR, *pEXTR;
|
||||
#define extNil ((pEXTR)0)
|
||||
#define cbEXTR sizeof(EXTR)
|
||||
|
||||
|
||||
/* A U X I L L A R Y T Y P E I N F O R M A T I O N */
|
||||
|
||||
/*
|
||||
* Type Information Record
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned fBitfield : 1; /* set if bit width is specified */
|
||||
unsigned continued : 1; /* indicates additional TQ info in next AUX */
|
||||
unsigned bt : 6; /* basic type */
|
||||
unsigned tq4 : 4;
|
||||
unsigned tq5 : 4;
|
||||
/* ---- 16 bit boundary ---- */
|
||||
unsigned tq0 : 4;
|
||||
unsigned tq1 : 4; /* 6 type qualifiers - tqPtr, etc. */
|
||||
unsigned tq2 : 4;
|
||||
unsigned tq3 : 4;
|
||||
} TIR, *pTIR;
|
||||
#define cbTIR sizeof(TIR)
|
||||
#define tiNil ((pTIR)0)
|
||||
#define itqMax 6
|
||||
|
||||
/*
|
||||
* Relative symbol record
|
||||
*
|
||||
* If the rfd field is 4095, the index field indexes into the global symbol
|
||||
* table.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned rfd : 12; /* index into the file indirect table */
|
||||
unsigned index : 20; /* index int sym/aux/iss tables */
|
||||
} RNDXR, *pRNDXR;
|
||||
#define cbRNDXR sizeof(RNDXR)
|
||||
#define rndxNil ((pRNDXR)0)
|
||||
|
||||
/* dense numbers or sometimes called block numbers are stored in this type,
|
||||
* a rfd of 0xffffffff is an index into the global table.
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned long rfd; /* index into the file table */
|
||||
unsigned long index; /* index int sym/aux/iss tables */
|
||||
} DNR, *pDNR;
|
||||
#define cbDNR sizeof(DNR)
|
||||
#define dnNil ((pDNR)0)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Auxillary information occurs only if needed.
|
||||
* It ALWAYS occurs in this order when present.
|
||||
|
||||
isymMac used by stProc only
|
||||
TIR type info
|
||||
TIR additional TQ info (if first TIR was not enough)
|
||||
rndx if (bt == btStruct,btUnion,btEnum,btSet,btRange,
|
||||
btTypedef):
|
||||
rsym.index == iaux for btSet or btRange
|
||||
else rsym.index == isym
|
||||
dimLow btRange, btSet
|
||||
dimMac btRange, btSet
|
||||
rndx0 As many as there are tq arrays
|
||||
dimLow0
|
||||
dimHigh0
|
||||
...
|
||||
rndxMax-1
|
||||
dimLowMax-1
|
||||
dimHighMax-1
|
||||
width in bits if (bit field), width in bits.
|
||||
*/
|
||||
#define cAuxMax (6 + (idimMax*3))
|
||||
|
||||
/* a union of all possible info in the AUX universe */
|
||||
typedef union {
|
||||
TIR ti; /* type information record */
|
||||
RNDXR rndx; /* relative index into symbol table */
|
||||
long dnLow; /* low dimension */
|
||||
long dnHigh; /* high dimension */
|
||||
long isym; /* symbol table index (end of proc) */
|
||||
long iss; /* index into string space (not used) */
|
||||
long width; /* width for non-default sized struc fields */
|
||||
long count; /* count of ranges for variant arm */
|
||||
} AUXU, *pAUXU;
|
||||
#define cbAUXU sizeof(AUXU)
|
||||
#define auxNil ((pAUXU)0)
|
||||
#define iauxNil -1
|
||||
|
||||
|
||||
/*
|
||||
* Optimization symbols
|
||||
*
|
||||
* Optimization symbols contain some overlap information with the normal
|
||||
* symbol table. In particular, the proc information
|
||||
* is somewhat redundant but necessary to easily find the other information
|
||||
* present.
|
||||
*
|
||||
* All of the offsets are relative to the beginning of the last otProc
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned ot: 8; /* optimization type */
|
||||
unsigned value: 24; /* address where we are moving it to */
|
||||
RNDXR rndx; /* points to a symbol or opt entry */
|
||||
unsigned long offset; /* relative offset this occured */
|
||||
} OPTR, *pOPTR;
|
||||
#define optNil ((pOPTR) 0)
|
||||
#define cbOPTR sizeof(OPTR)
|
||||
#define ioptNil -1
|
||||
|
||||
/*
|
||||
* File Indirect
|
||||
*
|
||||
* When a symbol is referenced across files the following procedure is used:
|
||||
* 1) use the file index to get the File indirect entry.
|
||||
* 2) use the file indirect entry to get the File descriptor.
|
||||
* 3) add the sym index to the base of that file's sym table
|
||||
*
|
||||
*/
|
||||
|
||||
typedef long RFDT, *pRFDT;
|
||||
#define cbRFDT sizeof(RFDT)
|
||||
#define rfdNil -1
|
||||
|
||||
/*
|
||||
* The file indirect table in the mips loader is known as an array of FITs.
|
||||
* This is done to keep the code in the loader readable in the area where
|
||||
* these tables are merged. Note this is only a name change.
|
||||
*/
|
||||
typedef long FIT, *pFIT;
|
||||
#define cbFIT sizeof(FIT)
|
||||
#define ifiNil -1
|
||||
#define fiNil ((pFIT) 0)
|
||||
|
||||
#ifdef _LANGUAGE_PASCAL
|
||||
#define ifdNil -1
|
||||
#define ilnNil -1
|
||||
#define ipdNil -1
|
||||
#define ilineNil -1
|
||||
#define isymNil -1
|
||||
#define indexNil 16#fffff
|
||||
#define issNil -1
|
||||
#define issNull 0
|
||||
#define itqMax 6
|
||||
#define iauxNil -1
|
||||
#define ioptNil -1
|
||||
#define rfdNil -1
|
||||
#define ifiNil -1
|
||||
#endif /* _LANGUAGE_PASCAL */
|
||||
|
||||
|
||||
/* Dense numbers
|
||||
*
|
||||
* Rather than use file index, symbol index pairs to represent symbols
|
||||
* and globals, we use dense number so that they can be easily embeded
|
||||
* in intermediate code and the programs that process them can
|
||||
* use direct access tabls instead of hash table (which would be
|
||||
* necesary otherwise because of the sparse name space caused by
|
||||
* file index, symbol index pairs. Dense number are represented
|
||||
* by RNDXRs.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following table defines the meaning of each SYM field as
|
||||
* a function of the "st". (scD/B == scData OR scBss)
|
||||
*
|
||||
* Note: the value "isymMac" is used by symbols that have the concept
|
||||
* of enclosing a block of related information. This value is the
|
||||
* isym of the first symbol AFTER the end associated with the primary
|
||||
* symbol. For example if a procedure was at isym==90 and had an
|
||||
* isymMac==155, the associated end would be at isym==154, and the
|
||||
* symbol at 155 would probably (although not necessarily) be the
|
||||
* symbol for the next procedure. This allows rapid skipping over
|
||||
* internal information of various sorts. "stEnd"s ALWAYS have the
|
||||
* isym of the primary symbol that started the block.
|
||||
*
|
||||
|
||||
ST SC VALUE INDEX
|
||||
-------- ------ -------- ------
|
||||
stFile scText address isymMac
|
||||
stLabel scText address ---
|
||||
stGlobal scD/B address iaux
|
||||
stStatic scD/B address iaux
|
||||
stParam scAbs offset iaux
|
||||
stLocal scAbs offset iaux
|
||||
stProc scText address iaux (isymMac is first AUX)
|
||||
stStaticProc scText address iaux (isymMac is first AUX)
|
||||
|
||||
stMember scNil ordinal --- (if member of enum)
|
||||
(mipsread thinks the case below has a bit, not byte, offset.)
|
||||
stMember scNil byte offset iaux (if member of struct/union)
|
||||
stMember scBits bit offset iaux (bit field spec)
|
||||
|
||||
stBlock scText address isymMac (text block)
|
||||
(the code seems to think that rather than scNil, we see scInfo for
|
||||
the two cases below.)
|
||||
stBlock scNil cb isymMac (struct/union member define)
|
||||
stBlock scNil cMembers isymMac (enum member define)
|
||||
|
||||
(New types added by SGI to simplify things:)
|
||||
stStruct scInfo cb isymMac (struct type define)
|
||||
stUnion scInfo cb isymMac (union type define)
|
||||
stEnum scInfo cMembers isymMac (enum type define)
|
||||
|
||||
stEnd scText address isymStart
|
||||
stEnd scNil ------- isymStart (struct/union/enum)
|
||||
|
||||
stTypedef scNil ------- iaux
|
||||
stRegReloc sc??? value old register number
|
||||
stForward sc??? new address isym to original symbol
|
||||
|
||||
stConstant scInfo value --- (scalar)
|
||||
stConstant scInfo iss --- (complex, e.g. string)
|
||||
|
||||
*
|
||||
*/
|
||||
#endif
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
/* Declarations of constants for internal format of MIPS ECOFF symbols.
|
||||
Originally contributed by MIPS Computer Systems and Third Eye Software.
|
||||
Changes contributed by Cygnus Support are in the public domain.
|
||||
|
||||
This file is just aggregated with the files that make up the GNU
|
||||
release; it is not considered part of GAS, GDB, or other GNU
|
||||
programs. */
|
||||
|
||||
/*
|
||||
* |-----------------------------------------------------------|
|
||||
* | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
|
||||
* | MIPS Computer Systems, Inc. grants reproduction and use |
|
||||
* | rights to all parties, PROVIDED that this comment is |
|
||||
* | maintained in the copy. |
|
||||
* |-----------------------------------------------------------|
|
||||
*/
|
||||
|
||||
/* (C) Copyright 1984 by Third Eye Software, Inc.
|
||||
*
|
||||
* Third Eye Software, Inc. grants reproduction and use rights to
|
||||
* all parties, PROVIDED that this comment is maintained in the copy.
|
||||
*
|
||||
* Third Eye makes no claims about the applicability of this
|
||||
* symbol table to a particular use.
|
||||
*/
|
||||
|
||||
/* glevels for field in FDR */
|
||||
#define GLEVEL_0 2
|
||||
#define GLEVEL_1 1
|
||||
#define GLEVEL_2 0 /* for upward compat reasons. */
|
||||
#define GLEVEL_3 3
|
||||
|
||||
/* magic number fo symheader */
|
||||
#define magicSym 0x7009
|
||||
/* The Alpha uses this value instead, for some reason. */
|
||||
#define magicSym2 0x1992
|
||||
|
||||
/* Language codes */
|
||||
#define langC 0
|
||||
#define langPascal 1
|
||||
#define langFortran 2
|
||||
#define langAssembler 3 /* one Assembley inst might map to many mach */
|
||||
#define langMachine 4
|
||||
#define langNil 5
|
||||
#define langAda 6
|
||||
#define langPl1 7
|
||||
#define langCobol 8
|
||||
#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
|
||||
#define langCplusplus 9 /* FIXME: Collides with langStdc */
|
||||
#define langCplusplusV2 10 /* SGI addition */
|
||||
#define langMax 11 /* maximun allowed 32 -- 5 bits */
|
||||
|
||||
/* The following are value definitions for the fields in the SYMR */
|
||||
|
||||
/*
|
||||
* Storage Classes
|
||||
*/
|
||||
|
||||
#define scNil 0
|
||||
#define scText 1 /* text symbol */
|
||||
#define scData 2 /* initialized data symbol */
|
||||
#define scBss 3 /* un-initialized data symbol */
|
||||
#define scRegister 4 /* value of symbol is register number */
|
||||
#define scAbs 5 /* value of symbol is absolute */
|
||||
#define scUndefined 6 /* who knows? */
|
||||
#define scCdbLocal 7 /* variable's value is IN se->va.?? */
|
||||
#define scBits 8 /* this is a bit field */
|
||||
#define scCdbSystem 9 /* variable's value is IN CDB's address space */
|
||||
#define scDbx 9 /* overlap dbx internal use */
|
||||
#define scRegImage 10 /* register value saved on stack */
|
||||
#define scInfo 11 /* symbol contains debugger information */
|
||||
#define scUserStruct 12 /* address in struct user for current process */
|
||||
#define scSData 13 /* load time only small data */
|
||||
#define scSBss 14 /* load time only small common */
|
||||
#define scRData 15 /* load time only read only data */
|
||||
#define scVar 16 /* Var parameter (fortran,pascal) */
|
||||
#define scCommon 17 /* common variable */
|
||||
#define scSCommon 18 /* small common */
|
||||
#define scVarRegister 19 /* Var parameter in a register */
|
||||
#define scVariant 20 /* Variant record */
|
||||
#define scSUndefined 21 /* small undefined(external) data */
|
||||
#define scInit 22 /* .init section symbol */
|
||||
#define scBasedVar 23 /* Fortran or PL/1 ptr based var */
|
||||
#define scXData 24 /* exception handling data */
|
||||
#define scPData 25 /* Procedure section */
|
||||
#define scFini 26 /* .fini section */
|
||||
#define scRConst 27 /* .rconst section */
|
||||
#define scMax 32
|
||||
|
||||
|
||||
/*
|
||||
* Symbol Types
|
||||
*/
|
||||
|
||||
#define stNil 0 /* Nuthin' special */
|
||||
#define stGlobal 1 /* external symbol */
|
||||
#define stStatic 2 /* static */
|
||||
#define stParam 3 /* procedure argument */
|
||||
#define stLocal 4 /* local variable */
|
||||
#define stLabel 5 /* label */
|
||||
#define stProc 6 /* " " Procedure */
|
||||
#define stBlock 7 /* beginnning of block */
|
||||
#define stEnd 8 /* end (of anything) */
|
||||
#define stMember 9 /* member (of anything - struct/union/enum */
|
||||
#define stTypedef 10 /* type definition */
|
||||
#define stFile 11 /* file name */
|
||||
#define stRegReloc 12 /* register relocation */
|
||||
#define stForward 13 /* forwarding address */
|
||||
#define stStaticProc 14 /* load time only static procs */
|
||||
#define stConstant 15 /* const */
|
||||
#define stStaParam 16 /* Fortran static parameters */
|
||||
/* These new symbol types have been recently added to SGI machines. */
|
||||
#define stStruct 26 /* Beginning of block defining a struct type */
|
||||
#define stUnion 27 /* Beginning of block defining a union type */
|
||||
#define stEnum 28 /* Beginning of block defining an enum type */
|
||||
#define stIndirect 34 /* Indirect type specification */
|
||||
/* Pseudo-symbols - internal to debugger */
|
||||
#define stStr 60 /* string */
|
||||
#define stNumber 61 /* pure number (ie. 4 NOR 2+2) */
|
||||
#define stExpr 62 /* 2+2 vs. 4 */
|
||||
#define stType 63 /* post-coersion SER */
|
||||
#define stMax 64
|
||||
|
||||
/* definitions for fields in TIR */
|
||||
|
||||
/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
|
||||
#define tqNil 0 /* bt is what you see */
|
||||
#define tqPtr 1 /* pointer */
|
||||
#define tqProc 2 /* procedure */
|
||||
#define tqArray 3 /* duh */
|
||||
#define tqFar 4 /* longer addressing - 8086/8 land */
|
||||
#define tqVol 5 /* volatile */
|
||||
#define tqConst 6 /* const */
|
||||
#define tqMax 8
|
||||
|
||||
/* basic types as seen in ti.bt */
|
||||
#define btNil 0 /* undefined (also, enum members) */
|
||||
#define btAdr 1 /* address - integer same size as pointer */
|
||||
#define btChar 2 /* character */
|
||||
#define btUChar 3 /* unsigned character */
|
||||
#define btShort 4 /* short */
|
||||
#define btUShort 5 /* unsigned short */
|
||||
#define btInt 6 /* int */
|
||||
#define btUInt 7 /* unsigned int */
|
||||
#define btLong 8 /* long */
|
||||
#define btULong 9 /* unsigned long */
|
||||
#define btFloat 10 /* float (real) */
|
||||
#define btDouble 11 /* Double (real) */
|
||||
#define btStruct 12 /* Structure (Record) */
|
||||
#define btUnion 13 /* Union (variant) */
|
||||
#define btEnum 14 /* Enumerated */
|
||||
#define btTypedef 15 /* defined via a typedef, isymRef points */
|
||||
#define btRange 16 /* subrange of int */
|
||||
#define btSet 17 /* pascal sets */
|
||||
#define btComplex 18 /* fortran complex */
|
||||
#define btDComplex 19 /* fortran double complex */
|
||||
#define btIndirect 20 /* forward or unnamed typedef */
|
||||
#define btFixedDec 21 /* Fixed Decimal */
|
||||
#define btFloatDec 22 /* Float Decimal */
|
||||
#define btString 23 /* Varying Length Character String */
|
||||
#define btBit 24 /* Aligned Bit String */
|
||||
#define btPicture 25 /* Picture */
|
||||
#define btVoid 26 /* void */
|
||||
#define btLongLong 27 /* long long */
|
||||
#define btULongLong 28 /* unsigned long long */
|
||||
#define btMax 64
|
||||
|
||||
#if (_MFG == _MIPS)
|
||||
/* optimization type codes */
|
||||
#define otNil 0
|
||||
#define otReg 1 /* move var to reg */
|
||||
#define otBlock 2 /* begin basic block */
|
||||
#define otProc 3 /* procedure */
|
||||
#define otInline 4 /* inline procedure */
|
||||
#define otEnd 5 /* whatever you started */
|
||||
#define otMax 6 /* KEEP UP TO DATE */
|
||||
#endif /* (_MFG == _MIPS) */
|
||||
|
|
@ -1,203 +0,0 @@
|
|||
/*** coff information for Texas Instruments TMS320C3X */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
#define TIC30MAGIC 0xC000
|
||||
|
||||
#define TIC30BADMAG(x) (((x).f_magic!=TIC30MAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the z8k don't have room in the instruction for the entire
|
||||
offset - eg with segments */
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
/* TMS320C30 relocation types. */
|
||||
|
||||
#define R_TIC30_ABS16 0x100 /* 16 bit absolute. */
|
||||
#define R_TIC30_ABS24 0x101 /* 24 bit absolute. */
|
||||
#define R_TIC30_ABS32 0x102 /* 32 bit absolute. */
|
||||
#define R_TIC30_LDP 0x103 /* LDP bits 23-16 to 7-0. */
|
||||
#define R_TIC30_PC16 0x104 /* 16 bit pc relative. */
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
/*** coff information for WDC 65816 */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define W65MAGIC 0x6500
|
||||
|
||||
|
||||
#define W65BADMAG(x) (((x).f_magic!=W65MAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the w65 don't have room in the instruction for the entire
|
||||
offset - eg the strange jump and high page addressing modes */
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
/*** coff information for we32k */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
*/
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
#define F_BM32B (0020000)
|
||||
#define F_BM32MAU (0040000)
|
||||
|
||||
#define WE32KMAGIC 0x170 /* we32k sans transfer vector */
|
||||
#define FBOMAGIC 0x170 /* we32k sans transfer vector */
|
||||
#define MTVMAGIC 0x171 /* we32k with transfer vector */
|
||||
#define RBOMAGIC 0x172 /* reserved */
|
||||
#define WE32KBADMAG(x) (((x).f_magic != WE32KMAGIC) \
|
||||
&& ((x).f_magic != FBOMAGIC) \
|
||||
&& ((x).f_magic != RBOMAGIC) \
|
||||
&& ((x).f_magic != MTVMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
#define AOUTSZ 28
|
||||
#define AOUTHDRSZ 28
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
#define _TV ".tv"
|
||||
#define _INIT ".init"
|
||||
#define _FINI ".fini"
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[2]; /* line number */
|
||||
};
|
||||
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 6
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
#define N_BTMASK (0xf)
|
||||
#define N_TMASK (0x30)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
# define _ETEXT "etext"
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_type[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 10
|
||||
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
/*** coff information for Zilog Z800N */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
|
||||
|
||||
/* Type of cpu is stored in flags */
|
||||
#define F_Z8001 0x1000
|
||||
#define F_Z8002 0x2000
|
||||
#define F_MACHMASK 0xf000
|
||||
|
||||
#define Z8KMAGIC 0x8000
|
||||
|
||||
#define Z8KBADMAG(x) (((x).f_magic!=Z8KMAGIC))
|
||||
|
||||
#define FILHDR struct external_filehdr
|
||||
#define FILHSZ 20
|
||||
|
||||
|
||||
/********************** AOUT "OPTIONAL HEADER" **********************/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char magic[2]; /* type of file */
|
||||
char vstamp[2]; /* version stamp */
|
||||
char tsize[4]; /* text size in bytes, padded to FW bdry*/
|
||||
char dsize[4]; /* initialized data " " */
|
||||
char bsize[4]; /* uninitialized data " " */
|
||||
char entry[4]; /* entry pt. */
|
||||
char text_start[4]; /* base of text used for this file */
|
||||
char data_start[4]; /* base of data used for this file */
|
||||
}
|
||||
AOUTHDR;
|
||||
|
||||
|
||||
#define AOUTHDRSZ 28
|
||||
#define AOUTSZ 28
|
||||
|
||||
|
||||
|
||||
|
||||
/********************** SECTION HEADER **********************/
|
||||
|
||||
|
||||
struct external_scnhdr {
|
||||
char s_name[8]; /* section name */
|
||||
char s_paddr[4]; /* physical address, aliased s_nlib */
|
||||
char s_vaddr[4]; /* virtual address */
|
||||
char s_size[4]; /* section size */
|
||||
char s_scnptr[4]; /* file ptr to raw data for section */
|
||||
char s_relptr[4]; /* file ptr to relocation */
|
||||
char s_lnnoptr[4]; /* file ptr to line numbers */
|
||||
char s_nreloc[2]; /* number of relocation entries */
|
||||
char s_nlnno[2]; /* number of line number entries*/
|
||||
char s_flags[4]; /* flags */
|
||||
};
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
*/
|
||||
#define _TEXT ".text"
|
||||
#define _DATA ".data"
|
||||
#define _BSS ".bss"
|
||||
|
||||
|
||||
#define SCNHDR struct external_scnhdr
|
||||
#define SCNHSZ 40
|
||||
|
||||
|
||||
/********************** LINE NUMBERS **********************/
|
||||
|
||||
/* 1 line number entry for every "breakpointable" source line in a section.
|
||||
* Line numbers are grouped on a per function basis; first entry in a function
|
||||
* grouping will have l_lnno = 0 and in place of physical address will be the
|
||||
* symbol table index of the function name.
|
||||
*/
|
||||
struct external_lineno {
|
||||
union {
|
||||
char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
|
||||
char l_paddr[4]; /* (physical) address of line number */
|
||||
} l_addr;
|
||||
char l_lnno[4]; /* line number */
|
||||
};
|
||||
|
||||
#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
|
||||
#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
|
||||
|
||||
#define LINENO struct external_lineno
|
||||
#define LINESZ 8
|
||||
|
||||
|
||||
/********************** SYMBOLS **********************/
|
||||
|
||||
#define E_SYMNMLEN 8 /* # characters in a symbol name */
|
||||
#define E_FILNMLEN 14 /* # characters in a file name */
|
||||
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
|
||||
|
||||
struct external_syment
|
||||
{
|
||||
union {
|
||||
char e_name[E_SYMNMLEN];
|
||||
struct {
|
||||
char e_zeroes[4];
|
||||
char e_offset[4];
|
||||
} e;
|
||||
} e;
|
||||
char e_value[4];
|
||||
char e_scnum[2];
|
||||
char e_type[2];
|
||||
char e_sclass[1];
|
||||
char e_numaux[1];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define N_BTMASK (017)
|
||||
#define N_TMASK (060)
|
||||
#define N_BTSHFT (4)
|
||||
#define N_TSHIFT (2)
|
||||
|
||||
|
||||
union external_auxent {
|
||||
struct {
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
union {
|
||||
struct {
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
char x_fsize[4]; /* size of function */
|
||||
} x_misc;
|
||||
union {
|
||||
struct { /* if ISFCN, tag, or .bb */
|
||||
char x_lnnoptr[4]; /* ptr to fcn line # */
|
||||
char x_endndx[4]; /* entry ndx past block end */
|
||||
} x_fcn;
|
||||
struct { /* if ISARY, up to 4 dimen. */
|
||||
char x_dimen[E_DIMNUM][2];
|
||||
} x_ary;
|
||||
} x_fcnary;
|
||||
char x_tvndx[2]; /* tv index */
|
||||
} x_sym;
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
|
||||
struct {
|
||||
char x_tvfill[4]; /* tv fill value */
|
||||
char x_tvlen[2]; /* length of .tv */
|
||||
char x_tvran[2][2]; /* tv range */
|
||||
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define SYMENT struct external_syment
|
||||
#define SYMESZ 18
|
||||
#define AUXENT union external_auxent
|
||||
#define AUXESZ 18
|
||||
|
||||
|
||||
|
||||
/********************** RELOCATION DIRECTIVES **********************/
|
||||
|
||||
/* The external reloc has an offset field, because some of the reloc
|
||||
types on the z8k don't have room in the instruction for the entire
|
||||
offset - eg with segments */
|
||||
|
||||
struct external_reloc {
|
||||
char r_vaddr[4];
|
||||
char r_symndx[4];
|
||||
char r_offset[4];
|
||||
char r_type[2];
|
||||
char r_stuff[2];
|
||||
};
|
||||
|
||||
|
||||
#define RELOC struct external_reloc
|
||||
#define RELSZ 16
|
||||
|
||||
|
|
@ -1,241 +0,0 @@
|
|||
/* Interface between the opcode library and its callers.
|
||||
Written by Cygnus Support, 1993.
|
||||
|
||||
The opcode library (libopcodes.a) provides instruction decoders for
|
||||
a large variety of instruction sets, callable with an identical
|
||||
interface, for making instruction-processing programs more independent
|
||||
of the instruction set being processed. */
|
||||
|
||||
#ifndef DIS_ASM_H
|
||||
#define DIS_ASM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "bfd.h"
|
||||
|
||||
typedef int (*fprintf_ftype) PARAMS((PTR, const char*, ...));
|
||||
|
||||
enum dis_insn_type {
|
||||
dis_noninsn, /* Not a valid instruction */
|
||||
dis_nonbranch, /* Not a branch instruction */
|
||||
dis_branch, /* Unconditional branch */
|
||||
dis_condbranch, /* Conditional branch */
|
||||
dis_jsr, /* Jump to subroutine */
|
||||
dis_condjsr, /* Conditional jump to subroutine */
|
||||
dis_dref, /* Data reference instruction */
|
||||
dis_dref2 /* Two data references in instruction */
|
||||
};
|
||||
|
||||
/* This struct is passed into the instruction decoding routine,
|
||||
and is passed back out into each callback. The various fields are used
|
||||
for conveying information from your main routine into your callbacks,
|
||||
for passing information into the instruction decoders (such as the
|
||||
addresses of the callback functions), or for passing information
|
||||
back from the instruction decoders to their callers.
|
||||
|
||||
It must be initialized before it is first passed; this can be done
|
||||
by hand, or using one of the initialization macros below. */
|
||||
|
||||
typedef struct disassemble_info {
|
||||
fprintf_ftype fprintf_func;
|
||||
PTR stream;
|
||||
PTR application_data;
|
||||
|
||||
/* Target description. We could replace this with a pointer to the bfd,
|
||||
but that would require one. There currently isn't any such requirement
|
||||
so to avoid introducing one we record these explicitly. */
|
||||
/* The bfd_flavour. This can be bfd_target_unknown_flavour. */
|
||||
enum bfd_flavour flavour;
|
||||
/* The bfd_arch value. */
|
||||
enum bfd_architecture arch;
|
||||
/* The bfd_mach value. */
|
||||
unsigned long mach;
|
||||
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
|
||||
enum bfd_endian endian;
|
||||
|
||||
/* An array of pointers to symbols either at the location being disassembled
|
||||
or at the start of the function being disassembled. The array is sorted
|
||||
so that the first symbol is intended to be the one used. The others are
|
||||
present for any misc. purposes. This is not set reliably, but if it is
|
||||
not NULL, it is correct. */
|
||||
asymbol **symbols;
|
||||
/* Number of symbols in array. */
|
||||
int num_symbols;
|
||||
|
||||
/* For use by the disassembler.
|
||||
The top 16 bits are reserved for public use (and are documented here).
|
||||
The bottom 16 bits are for the internal use of the disassembler. */
|
||||
unsigned long flags;
|
||||
#define INSN_HAS_RELOC 0x80000000
|
||||
PTR private_data;
|
||||
|
||||
/* Function used to get bytes to disassemble. MEMADDR is the
|
||||
address of the stuff to be disassembled, MYADDR is the address to
|
||||
put the bytes in, and LENGTH is the number of bytes to read.
|
||||
INFO is a pointer to this struct.
|
||||
Returns an errno value or 0 for success. */
|
||||
int (*read_memory_func)
|
||||
PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
|
||||
struct disassemble_info *info));
|
||||
|
||||
/* Function which should be called if we get an error that we can't
|
||||
recover from. STATUS is the errno value from read_memory_func and
|
||||
MEMADDR is the address that we were trying to read. INFO is a
|
||||
pointer to this struct. */
|
||||
void (*memory_error_func)
|
||||
PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
|
||||
|
||||
/* Function called to print ADDR. */
|
||||
void (*print_address_func)
|
||||
PARAMS ((bfd_vma addr, struct disassemble_info *info));
|
||||
|
||||
/* Function called to determine if there is a symbol at the given ADDR.
|
||||
If there is, the function returns 1, otherwise it returns 0.
|
||||
This is used by ports which support an overlay manager where
|
||||
the overlay number is held in the top part of an address. In
|
||||
some circumstances we want to include the overlay number in the
|
||||
address, (normally because there is a symbol associated with
|
||||
that address), but sometimes we want to mask out the overlay bits. */
|
||||
int (* symbol_at_address_func)
|
||||
PARAMS ((bfd_vma addr, struct disassemble_info * info));
|
||||
|
||||
/* These are for buffer_read_memory. */
|
||||
bfd_byte *buffer;
|
||||
bfd_vma buffer_vma;
|
||||
int buffer_length;
|
||||
|
||||
/* This variable may be set by the instruction decoder. It suggests
|
||||
the number of bytes objdump should display on a single line. If
|
||||
the instruction decoder sets this, it should always set it to
|
||||
the same value in order to get reasonable looking output. */
|
||||
int bytes_per_line;
|
||||
|
||||
/* the next two variables control the way objdump displays the raw data */
|
||||
/* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
|
||||
/* output will look like this:
|
||||
00: 00000000 00000000
|
||||
with the chunks displayed according to "display_endian". */
|
||||
int bytes_per_chunk;
|
||||
enum bfd_endian display_endian;
|
||||
|
||||
/* Results from instruction decoders. Not all decoders yet support
|
||||
this information. This info is set each time an instruction is
|
||||
decoded, and is only valid for the last such instruction.
|
||||
|
||||
To determine whether this decoder supports this information, set
|
||||
insn_info_valid to 0, decode an instruction, then check it. */
|
||||
|
||||
char insn_info_valid; /* Branch info has been set. */
|
||||
char branch_delay_insns; /* How many sequential insn's will run before
|
||||
a branch takes effect. (0 = normal) */
|
||||
char data_size; /* Size of data reference in insn, in bytes */
|
||||
enum dis_insn_type insn_type; /* Type of instruction */
|
||||
bfd_vma target; /* Target address of branch or dref, if known;
|
||||
zero if unknown. */
|
||||
bfd_vma target2; /* Second target address for dref2 */
|
||||
|
||||
} disassemble_info;
|
||||
|
||||
|
||||
/* Standard disassemblers. Disassemble one instruction at the given
|
||||
target address. Return number of bytes processed. */
|
||||
typedef int (*disassembler_ftype)
|
||||
PARAMS((bfd_vma, disassemble_info *));
|
||||
|
||||
extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8300 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern disassembler_ftype arc_get_disassembler PARAMS ((int, int));
|
||||
extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_m32r PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
|
||||
|
||||
/* Fetch the disassembler for a given BFD, if that support is available. */
|
||||
extern disassembler_ftype disassembler PARAMS ((bfd *));
|
||||
|
||||
|
||||
/* This block of definitions is for particular callers who read instructions
|
||||
into a buffer before calling the instruction decoder. */
|
||||
|
||||
/* Here is a function which callers may wish to use for read_memory_func.
|
||||
It gets bytes from a buffer. */
|
||||
extern int buffer_read_memory
|
||||
PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
|
||||
|
||||
/* This function goes with buffer_read_memory.
|
||||
It prints a message using info->fprintf_func and info->stream. */
|
||||
extern void perror_memory PARAMS ((int, bfd_vma, struct disassemble_info *));
|
||||
|
||||
|
||||
/* Just print the address in hex. This is included for completeness even
|
||||
though both GDB and objdump provide their own (to print symbolic
|
||||
addresses). */
|
||||
extern void generic_print_address
|
||||
PARAMS ((bfd_vma, struct disassemble_info *));
|
||||
|
||||
/* Always true. */
|
||||
extern int generic_symbol_at_address
|
||||
PARAMS ((bfd_vma, struct disassemble_info *));
|
||||
|
||||
/* Macro to initialize a disassemble_info struct. This should be called
|
||||
by all applications creating such a struct. */
|
||||
#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
|
||||
(INFO).flavour = bfd_target_unknown_flavour, \
|
||||
(INFO).arch = bfd_arch_unknown, \
|
||||
(INFO).mach = 0, \
|
||||
(INFO).endian = BFD_ENDIAN_UNKNOWN, \
|
||||
INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
|
||||
|
||||
/* Call this macro to initialize only the internal variables for the
|
||||
disassembler. Architecture dependent things such as byte order, or machine
|
||||
variant are not touched by this macro. This makes things much easier for
|
||||
GDB which must initialize these things seperatly. */
|
||||
|
||||
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
|
||||
(INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
|
||||
(INFO).stream = (PTR)(STREAM), \
|
||||
(INFO).symbols = NULL, \
|
||||
(INFO).num_symbols = 0, \
|
||||
(INFO).buffer = NULL, \
|
||||
(INFO).buffer_vma = 0, \
|
||||
(INFO).buffer_length = 0, \
|
||||
(INFO).read_memory_func = buffer_read_memory, \
|
||||
(INFO).memory_error_func = perror_memory, \
|
||||
(INFO).print_address_func = generic_print_address, \
|
||||
(INFO).symbol_at_address_func = generic_symbol_at_address, \
|
||||
(INFO).flags = 0, \
|
||||
(INFO).bytes_per_line = 0, \
|
||||
(INFO).bytes_per_chunk = 0, \
|
||||
(INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
|
||||
(INFO).insn_info_valid = 0
|
||||
|
||||
#endif /* ! defined (DIS_ASM_H) */
|
||||
|
|
@ -1,672 +0,0 @@
|
|||
|
||||
1999-03-10 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* common.h: Add definitions for a few more Solaris ELF extensions.
|
||||
|
||||
1999-02-02 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* dwarf2.h (DWARF2_External_ARange): New structure.
|
||||
(DWARF2_Internal_ARange): New structure.
|
||||
|
||||
Mon Feb 1 11:33:56 1999 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* arm.h: Renumber relocs to conform to standard.
|
||||
(EF_NEW_ABI): Define.
|
||||
(EF_OLD_ABI): Define.
|
||||
* arm-oabi.h: New file.
|
||||
|
||||
1999-01-28 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* fr30.h: Add R_FR30_GNU_VT{INHERIT,ENTRY} relocs.
|
||||
|
||||
1999-01-27 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* dwarf2.h: Add typedefs for structures found in dwarf2 sections.
|
||||
|
||||
1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
|
||||
|
||||
* mips.h (EF_MIPS_ABI,E_MIPS_ABI_O32,E_MIPS_ABI_O64,
|
||||
E_MIPS_ABI_EABI32,E_MIPS_ABI_EABI64):
|
||||
|
||||
1998-12-03 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* fr30.h: Add R_FR30_48 reloc.
|
||||
|
||||
1998-12-02 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* mips.h: Add external data type for conflict section.
|
||||
|
||||
* mips.h: Add more LL_* options from Irix 6.5.
|
||||
|
||||
* mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately.
|
||||
|
||||
Tue Nov 10 15:12:28 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value.
|
||||
|
||||
Tue Nov 10 15:17:28 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* d10v.h: Add vtable relocs.
|
||||
|
||||
Wed Nov 4 15:56:50 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_FR30): New machine number.
|
||||
|
||||
* fr30.h: New file: Definitions for the FR30.
|
||||
|
||||
Fri Oct 30 11:54:15 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
From Philip Blundell <pb@nexus.co.uk>:
|
||||
* arm.h (R_ARM_COPY, et al.): New relocs, used by Linux for PIC.
|
||||
(EF_ALIGN8): New flag.
|
||||
|
||||
Tue Oct 20 11:19:50 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* common.h (NT_LWPSTATUS): Close comment accidentally left open.
|
||||
|
||||
Mon Oct 19 20:24:11 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* sh.h: Add vtable relocs.
|
||||
|
||||
Mon Oct 19 01:44:42 1998 Felix Lee <flee@cygnus.com>
|
||||
|
||||
* common.h (NT_PSTATUS, NT_FPREGS, NT_PSINFO,
|
||||
NT_LWPSTATUS,NT_LWPSINFO): added.
|
||||
* internal.h (Elf_Internal_Note): new structure members.
|
||||
|
||||
Fri Oct 16 14:11:25 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* m32r.h: Add vtable relocs.
|
||||
|
||||
Tue Oct 6 09:22:22 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* sparc.h: Add vtable relocs.
|
||||
|
||||
Mon Oct 5 09:39:22 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* v850.h: Add vtable relocs.
|
||||
|
||||
Sun Oct 4 21:17:51 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* i386.h (R_386_max): Change from 252 to 24.
|
||||
|
||||
Mon Sep 21 12:24:44 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* i386.h: Change vtable reloc numbers.
|
||||
|
||||
Sun Sep 20 00:54:22 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* m68k.h: Add vtable relocs and R_68K_max.
|
||||
|
||||
Tue Sep 15 09:56:49 CDT 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* arm.h: Add vtable relocs.
|
||||
|
||||
Mon Aug 31 11:25:27 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* arm.h: Define STT_ARM_TFUNC. Remove ST_THUMB_xxxx
|
||||
definitions.
|
||||
|
||||
Sat Aug 29 22:25:51 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* i386.h: Add vtable relocs.
|
||||
|
||||
1998-08-25 16:42 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* common.h: Add SYMINFO_* macros to access Elf*_Syminfo information.
|
||||
|
||||
* external.h: Add Elf_External_Syminfo definition.
|
||||
|
||||
* internal.h: Add Elf_Internal_Syminfo, Elf32_Internal_Syminfo,
|
||||
and Elf64_Syminfo definitions.
|
||||
|
||||
Sun Aug 9 20:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* arm.h: Add ST_THUMB definitions.
|
||||
|
||||
Wed Aug 5 15:52:35 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* arm.h: Add ELF header flags to specify compile time optins:
|
||||
EF_INTERWORK: New flag.
|
||||
EF_APCS_26: New flag.
|
||||
EF_APCS_FLOAT: New flag.
|
||||
EF_PIC: New flag.
|
||||
|
||||
1998-07-31 21:28 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* mips.h: Add missing RHF_* constants.
|
||||
|
||||
Fri Jul 31 10:01:40 1998 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* arm.h: Add R_ARM_THM_PC9 relocation.
|
||||
|
||||
1998-07-30 16:25 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* common.h: Add new DT_* entries and there flag macros from Solaris.
|
||||
|
||||
Tue Jul 28 18:14:07 1998 Stan Cox <scox@equinox.cygnus.com>
|
||||
|
||||
* sparc.h: (R_SPARC_REV32): Added for little endian data e.g. sparc 86x.
|
||||
|
||||
Fri Jul 24 11:22:06 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* mn10300.h: Add R_MN10300_24 relocation.
|
||||
|
||||
1998-07-24 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* mips.h: Add MIPS64 relocation names and values.
|
||||
|
||||
Wed Jul 22 19:29:00 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* arm.h: Rename relocations.
|
||||
|
||||
1998-07-22 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* ppc.h: Define enum as elf_ppc_reloc_type.
|
||||
|
||||
Wed Jul 22 16:22:11 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* reloc-macros.h: New file. Provides relocation macros:
|
||||
START_RELOC_NUMBERS, RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC and
|
||||
END_RELOC_NUMBERS used by other elf header files.
|
||||
|
||||
* alpha.h: Use reloc-macros.h.
|
||||
* arc.h: Use reloc-macros.h.
|
||||
* arm.h: Use reloc-macros.h.
|
||||
* d10v.h: Use reloc-macros.h.
|
||||
* d30v.h: Use reloc-macros.h.
|
||||
* hppa.h: Use reloc-macros.h.
|
||||
* i386.h: Use reloc-macros.h.
|
||||
* m32r.h: Use reloc-macros.h.
|
||||
* m68k.h: Use reloc-macros.h.
|
||||
* mips.h: Use reloc-macros.h.
|
||||
* mn10200.h: Use reloc-macros.h.
|
||||
* mn10300.h: Use reloc-macros.h.
|
||||
* ppc.h: Use reloc-macros.h.
|
||||
* sh.h: Use reloc-macros.h.
|
||||
* sparc.h: Use reloc-macros.h.
|
||||
* v850.h: Use reloc-macros.h.
|
||||
|
||||
1998-07-22 13:07 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* mn10300.h: Rewrite relocation definition using macros.
|
||||
* mips.h: Likewise.
|
||||
* ppc.h: Likewise.
|
||||
* alpha.h: Likewise.
|
||||
* arm.h: Likewise.
|
||||
* d10v.h: Likewise.
|
||||
* d30v.h: Likewise.
|
||||
* m32r.h: Likewise.
|
||||
* m68k.h: Likewise.
|
||||
* mn10200.h: Likewise.
|
||||
* sh.h: Likewise.
|
||||
* sparc.h: Likewise.
|
||||
|
||||
1998-07-21 13:07 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* arm.h: New file.
|
||||
* d10v.h: New file.
|
||||
* d30v.h: New file.
|
||||
* i386.h: New file.
|
||||
* m68k.h: New file.
|
||||
* mn10200.h: New file.
|
||||
* sh.h: New file.
|
||||
|
||||
* mips.h: Add R_MIPS_* and SHT_MIPS_* entries.
|
||||
|
||||
* mn10300.h: Add R_MN10300_* entries.
|
||||
|
||||
* ppc.h: Add R_PPC_* entries.
|
||||
|
||||
1998-07-20 07:11 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* mips.h: Add ODK_*, OEX_*, OPAD_*, OHW_*, and OGP_* constants.
|
||||
Define Elf32_External_Lib.
|
||||
|
||||
1998-07-19 15:24 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* mips.h (PT_MIPS_OPTIONS): New symbol.
|
||||
Add lots of DT_MIPS_* symbols.
|
||||
|
||||
Fri Jun 26 10:46:35 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* mn10300.h: New file.
|
||||
|
||||
Thu Jun 18 19:27:56 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h (EM_960, EM_V800, EM_FR20, EM_RH32, EM_MMA,
|
||||
EM_OLD_ALPHA): Add these constants.
|
||||
|
||||
Thu Jun 11 17:59:01 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h (EM_486, EM_S370): Add these constants.
|
||||
|
||||
Tue Jun 9 09:35:29 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h (EM_ARM): Add this constant.
|
||||
|
||||
Wed May 6 09:45:30 1998 Gavin Koch <gavin@cygnus.com>
|
||||
|
||||
* mips.h (EF_MIPS_MACH,E_MIPS_MACH_*): Added.
|
||||
|
||||
Sat Apr 25 18:35:06 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* alpha.h (STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New.
|
||||
|
||||
Wed Apr 15 15:42:45 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* common.h (EM_SPARC64): Move and rename to EM_OLD_SPARCV9.
|
||||
(EM_SPARCV9): New. This is the official ABI name and number.
|
||||
|
||||
Sat Feb 28 17:04:41 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* alpha.h (EF_ALPHA_32BIT, EF_ALPHA_CANRELAX): New.
|
||||
|
||||
Mon Dec 15 15:07:49 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* m32r.h (EF_M32R_ARCH, E_M32R_ARCH): New flags to
|
||||
specify machine architecture.
|
||||
(E_M32RX_ARCH): New flag for m32rx architecture.
|
||||
|
||||
Fri Dec 5 11:20:08 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* v850.h: New constants: SHN_V850_SCOMMON, SHN_V850_TCOMMON,
|
||||
SHN_V850_ZCOMMON, SHT_V850_SCOMMON, SHT_V850_TCOMMON,
|
||||
SHT_V850_ZCOMMON to handle v850 common sections.
|
||||
enum reloc_type renamed to v850_reloc_type to avoid name
|
||||
conflict.
|
||||
|
||||
Thu Oct 23 13:55:24 1997 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* sparc.h (enum elf_sparc_reloc_type): Add UA64 & UA16.
|
||||
|
||||
Thu Oct 23 00:42:04 1997 Richard Henderson <rth@dot.cygnus.com>
|
||||
|
||||
* sparc.h (DT_SPARC_REGISTER): New macro.
|
||||
(DT_SPARC_PLTFMT): In support of old sparc64-linux .plts; will
|
||||
go away soon.
|
||||
|
||||
Tue Sep 30 13:26:58 1997 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* sparc.h (EF_SPARC_HAL_R1, EF_SPARC_EXT_MASK): New macros.
|
||||
(EF_SPARCV9_{MM,TSO,PSO,RMO}): New macros.
|
||||
(SHN_BEFORE,SHN_AFTER): New macros.
|
||||
(SHF_EXCLUDE,SHF_ORDERED): New macros.
|
||||
(STT_REGISTER): New macro.
|
||||
(R_SPARC_GLOB_JMP): Deleted, but slot reserved.
|
||||
(R_SPARC_{DISP64,PLT64,HIX22,LOX10}): New relocations.
|
||||
(R_SPARC_{H44,M44,L44,REGISTER}): New relocations.
|
||||
(ELF64_R_TYPE_{DATA,ID,INFO}): New macros.
|
||||
|
||||
Wed Sep 17 16:41:42 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* v850.h: Add R_V850_CALLT_6_7_OFFSET and R_V850_CALLT_16_16_OFFSET.
|
||||
|
||||
Tue Sep 16 14:16:17 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* v850.h (reloc_type): Add R_V850_TDA_16_16_OFFSET.
|
||||
|
||||
Wed Sep 3 15:11:14 1997 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* mips.h: Correct typo in comment.
|
||||
|
||||
Wed Sep 3 11:25:57 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* v850.h (reloc_type): Remove R_V850_16_PCREL.
|
||||
|
||||
Tue Sep 2 17:41:05 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h: Remove magic number for V850E.
|
||||
* common.h: Remove magic number for V850EA.
|
||||
* v850.h: Add new flags for e_flags field in elf header.
|
||||
|
||||
Mon Aug 25 16:06:47 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_V850E): backend magic number for v850e.
|
||||
* common.h (EM_CYGNUS_V850EA): backend magic number for v850ea.
|
||||
|
||||
Mon Aug 18 11:05:23 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* v850.h (reloc_type): Add 16 bit PC relative relocation.
|
||||
|
||||
Fri Aug 15 05:10:09 1997 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* arc.h (enum reloc): Move here from elf32-arc.c.
|
||||
|
||||
Fri Aug 8 17:05:29 1997 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* arc.h: New file.
|
||||
* common.h (EM_CYGNUS_ARC): Define.
|
||||
|
||||
Mon Jun 16 14:46:12 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (Elf_Internal_Ehdr): Change e_phoff and e_shoff from
|
||||
bfd_signed_vma to bfd_size_type, as they are not signed.
|
||||
|
||||
Wed Mar 5 15:35:26 1997 Doug Evans <dje@seba.cygnus.com>
|
||||
|
||||
* m32r.h (SHF_M32R_CAN_RELAX): Define.
|
||||
|
||||
Mon Feb 24 17:49:01 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* external.h: Dump the 32/64 bit specific forms of the version
|
||||
structures, and just define them as size independent.
|
||||
|
||||
* common.h (VERSYM_HIDDEN, VERSYM_VERSION): Define.
|
||||
|
||||
Fri Feb 21 13:00:34 1997 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* m32r.h (enum reloc_type): Add R_M32R_SDA16.
|
||||
(SHN_M32R_SCOMMON): Define.
|
||||
|
||||
Wed Feb 19 15:35:31 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
From Eric Youngdale <eric@andante.jic.com>:
|
||||
* external.h, internal.h, common.h: Added new structures and
|
||||
definitions for ELF versions.
|
||||
|
||||
Tue Feb 18 17:40:36 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_D30V): Define.
|
||||
|
||||
Mon Jan 27 11:54:44 1997 Doug Evans <dje@seba.cygnus.com>
|
||||
|
||||
* m32r.h (enum reloc_type): Add R_M32R_HI16_[SU]LO,R_M32R_LO16.
|
||||
|
||||
Fri Jan 3 11:32:51 1997 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* v850.h (V850_OTHER_{TDA_BYTE,ERROR}): New bits for the st_other
|
||||
field.
|
||||
(SHN_V850_*): Remove v850 specific section indexes, which are not
|
||||
needed.
|
||||
(enum reloc_type): Move the v850 relocations here from
|
||||
elf32-v850.c
|
||||
|
||||
Thu Jan 2 19:30:23 1997 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* v850.h: New file, provide V850 specific definitions.
|
||||
|
||||
Tue Dec 31 14:44:32 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* common.h (DT_AUXILIARY): Define.
|
||||
(DT_FILTER): Define.
|
||||
|
||||
Wed Dec 4 05:03:37 1996 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* dwarf2.h: Update.
|
||||
|
||||
Tue Nov 26 10:44:47 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* mips.h (STO_MIPS16): Define.
|
||||
|
||||
Tue Nov 12 15:45:42 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
|
||||
|
||||
* d10v.h: Remove empty file.
|
||||
|
||||
Tue Oct 8 11:31:24 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* mips.h (EF_MIPS_ABI2): Define.
|
||||
|
||||
Thu Oct 3 10:01:40 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* common.h: Break mn10x00 support into mn10200 and mn10300.
|
||||
|
||||
Wed Oct 2 21:26:43 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* common.h (EM_CYGNUS_MN10x00): Define.
|
||||
|
||||
Mon Sep 23 09:18:04 1996 Doug Evans <dje@seba.cygnus.com>
|
||||
|
||||
* m32r.h: New file.
|
||||
|
||||
Fri Aug 30 17:06:21 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* common.h (EM_SH): Define.
|
||||
|
||||
Tue Aug 20 14:47:54 1996 J.T. Conklin <jtc@hippo.cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_V850): Define.
|
||||
|
||||
Mon Aug 19 10:59:10 1996 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_M32R): Define.
|
||||
|
||||
Mon Jul 22 18:59:55 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* mips.h (SHT_MIPS_IFACE, SHT_MIPS_CONTENT): Define.
|
||||
(SHT_MIPS_SYMBOL_LIB): Define.
|
||||
(SHF_MIPS_MERGE, SHF_MIPS_ADDR32, SHF_MIPS_ADDR64): Define.
|
||||
(SHF_MIPS_NOSTRIP, SHF_MIPS_LOCAL, SHF_MIPS_NAMES): Define.
|
||||
|
||||
Thu Jul 18 19:12:15 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* dwarf2.h: New file.
|
||||
|
||||
Jul 18 13:20:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
|
||||
|
||||
* common.h (EM_CYGNUS_D10V): Define.
|
||||
* d10v.h: New file.
|
||||
|
||||
Fri Jun 21 12:33:24 1996 Richard Henderson <rth@tamu.edu>
|
||||
|
||||
* alpha.h: New file.
|
||||
* common.h (EM_ALPHA): Define.
|
||||
|
||||
Fri May 31 17:28:05 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* mips.h (Elf_External_Options, Elf_Internal_Options): Define.
|
||||
(bfd_mips_elf_swap_options_in): Declare.
|
||||
(bfd_mips_elf_swap_options_out): Declare.
|
||||
(ODK_*): Define.
|
||||
(Elf64_External_RegInfo, Elf64_Internal_RegInfo): Define.
|
||||
(bfd_mips_elf64_swap_reginfo_in): Declare.
|
||||
(bfd_mips_elf64_swap_reginfo_out): Declare.
|
||||
|
||||
Thu May 30 12:35:57 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* mips.h (E_MIPS_ARCH_4): Define.
|
||||
|
||||
Wed May 29 15:35:33 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* mips.h (Elf64_Mips_External_Rel): Define.
|
||||
(Elf64_Mips_Internal_Rel): Define.
|
||||
(Elf64_Mips_External_Rela, Elf64_Mips_Internal_Rela): Define.
|
||||
(RSS_*): Define.
|
||||
|
||||
Mon Apr 22 18:26:30 1996 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* sparc.h (R_SPARC_[56]): Always define.
|
||||
|
||||
Mon Feb 19 01:55:56 1996 Doug Evans <dje@charmed.cygnus.com>
|
||||
|
||||
* sparc.h (R_SPARC_{PLT32,HIPLT22,LOPLT10,PCPLT32,PCPLT22,
|
||||
PCPLT10,5,6}): Don't define ifdef SPARC64_OLD_RELOCS.
|
||||
|
||||
Tue Feb 6 11:33:58 1996 Doug Evans <dje@charmed.cygnus.com>
|
||||
|
||||
* sparc.h (enum sparc_elf_reloc_type): Define.
|
||||
|
||||
Wed Jan 17 09:09:16 1996 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* common.h: Define EM_SPARC32PLUS.
|
||||
* sparc.h: New file.
|
||||
|
||||
Thu Jan 11 16:27:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* ppc.h (SHF_EXCLUDE, SHT_ORDERED): New fields from the abi.
|
||||
|
||||
Thu Nov 30 16:47:18 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (struct elf_segment_map): Add includes_filehdr and
|
||||
includes_phdrs fields.
|
||||
|
||||
Tue Nov 28 16:58:10 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* internal.h (struct elf_segment_map): Define.
|
||||
|
||||
Tue Oct 31 15:19:36 1995 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* common.h, dwarf.h, external.h, hppa.h, internal.h,
|
||||
mips.h, ppc.h: Protect against multiple inclusions.
|
||||
|
||||
Thu Sep 21 13:51:58 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* ppc.h (EF_PPC_RELOCATABLE_LIB): Add new flag bit.
|
||||
|
||||
Fri Sep 1 15:32:17 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
|
||||
|
||||
* mips.h: Add some definitions used on Irix 5.
|
||||
|
||||
Tue Jun 20 10:18:28 1995 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* hppa.h (CPU_PA_RISC1_0): Protect from redefinitions.
|
||||
(CPU_PA_RISC1_1): Likewise.
|
||||
|
||||
Wed Mar 8 18:14:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* ppc.h: New file for PowerPC support.
|
||||
|
||||
Tue Feb 14 13:59:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* common.h (EM_PPC): Use offical value of 20, not 17.
|
||||
(EM_PPC_OLD): Define this to be the old value of EM_PPC.
|
||||
|
||||
Tue Jan 24 09:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* common.h (EM_PPC): New macro, PowerPC machine id.
|
||||
|
||||
Tue Jan 17 10:51:38 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
* mips.h (SHT_MIPS_MSYM, SHT_MIPS_DWARF, SHT_MIPS_EVENTS): Define.
|
||||
|
||||
Mon Oct 17 13:43:59 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
* internal.h (Elf_Internal_Shdr): Remove rawdata and size fields.
|
||||
Add bfd_section field.
|
||||
|
||||
Tue May 24 16:11:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (Elf32_External_gptab): Define.
|
||||
|
||||
Mon May 16 13:22:04 1994 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* common.h (EM_HPPA): Delete.
|
||||
(EM_PARISC): Add.
|
||||
* hppa.h: New file.
|
||||
|
||||
Mon May 9 13:27:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* common.h (SHN_LORESERVE): Rename from SHN_LORESERV.
|
||||
(ELF32_R_TYPE, ELF32_R_INFO): Don't rely on size of unsigned char.
|
||||
(ELF64_R_TYPE): Don't rely on size of unsigned long.
|
||||
|
||||
Mon Apr 25 15:53:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* internal.h (Elf_Internal_Shdr): Use PTR, not void *.
|
||||
|
||||
Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* mips.h (SHN_MIPS_TEXT, SHN_MIPS_DATA): Define.
|
||||
|
||||
Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* internal.h: Remove Elf32_*, Elf64_* typedefs. These names
|
||||
cause conflicts with system headers, e.g. link.h in gdb/solib.c.
|
||||
Combine 32- and 64-bit versions of *_Internal_Dyn.
|
||||
* common.h: Replace uses of Elf64_Word, Elf64_Xword typedefs
|
||||
by their expansion.
|
||||
* mips.h: Replace uses of Elf32_Word, Elf32_Sword, Elf32_Addr
|
||||
typedefs by their expansion. Add DT_MIPS_RLD_MAP definition.
|
||||
|
||||
Fri Feb 18 10:39:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* common.h (EM_CYGNUS_POWERPC): Define. This may be temporary,
|
||||
depending upon how quickly I can find a real PowerPC ABI.
|
||||
|
||||
Mon Feb 7 08:27:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
|
||||
|
||||
Wed Feb 2 14:12:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* common.h: Add comments regarding value of EM_HPPA and how to
|
||||
pick an unofficial value.
|
||||
|
||||
Wed Nov 17 17:14:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h (SHT_MIPS_OPTIONS): Define.
|
||||
|
||||
Mon Nov 8 17:57:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* mips.h: Added some more MIPS ABI macro definitions.
|
||||
|
||||
Wed Nov 3 22:07:17 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
|
||||
|
||||
* common.h (EM_MIPS_RS4_BE): New macro.
|
||||
|
||||
Tue Oct 12 07:28:18 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* mips.h: New file. MIPS ABI specific information.
|
||||
|
||||
Mon Jun 21 13:13:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
|
||||
|
||||
* internal.h: Combined 32- and 64-bit versions of all structures
|
||||
except *_Internal_Dyn. This will simply the assembler interface,
|
||||
and some bfd code.
|
||||
|
||||
Tue May 25 02:00:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
||||
|
||||
* external.h, internal.h, common.h: Added 64-bit versions of some
|
||||
structures and macros. Renamed old versions to put "32" in the
|
||||
name. Some are unchanged.
|
||||
|
||||
Thu Apr 29 12:12:20 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
|
||||
|
||||
* common.h (EM_HPPA, NT_VERSION, STN_UNDEF, DT_*): New macros.
|
||||
* external.h (Elf_External_Dyn): New type.
|
||||
|
||||
* internal.h (Elf_Intenral_Shdr): New field `size'.
|
||||
(Elf_Internal_Dyn): New type.
|
||||
|
||||
Tue Apr 20 16:03:45 1993 Fred Fish (fnf@cygnus.com)
|
||||
|
||||
* dwarf.h (LANG_CHILL): Change value to one randomly picked in
|
||||
the user defined range, to reduce probability of collisions.
|
||||
|
||||
Sun Nov 15 09:34:02 1992 Fred Fish (fnf@cygnus.com)
|
||||
|
||||
* dwarf.h (AT_src_coords): Whitespace change only.
|
||||
* dwarf.h (AT_body_begin, AT_body_end, LANG_MODULA2):
|
||||
Add from latest gcc.
|
||||
* dwarf.h (LANG_CHILL): Add as GNU extension.
|
||||
|
||||
Sat Aug 1 13:46:53 1992 Fred Fish (fnf@cygnus.com)
|
||||
|
||||
* dwarf.h: Replace with current version from gcc distribution.
|
||||
|
||||
Fri Jun 19 19:05:09 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* internal.h: Add real struct tags to all the Type_Defs, so they
|
||||
can be used in prototypes where the Type_Defs are not known.
|
||||
|
||||
Fri Apr 3 20:58:58 1992 Mark Eichin (eichin at cygnus.com)
|
||||
|
||||
* common.h: added ELF_R_{SYM,TYPE,INFO} for handling relocation
|
||||
info
|
||||
added EM_MIPS, and corrected value of EM_860 based on System V ABI
|
||||
manual.
|
||||
|
||||
* external.h: added Elf_External_{Rel,Rela}.
|
||||
|
||||
* internal.h: added Elf_Internal_{Rel,Rela}.
|
||||
added rawdata to Elf_Internal_Shdr.
|
||||
|
||||
Sat Nov 30 20:43:59 1991 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||
|
||||
* common.h, dwarf.h, external.h, internal.h, ChangeLog; moved from
|
||||
../elf-<foo>
|
||||
|
||||
|
||||
Local Variables:
|
||||
version-control: never
|
||||
End:
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
/* ALPHA ELF support for BFD.
|
||||
Copyright (C) 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
By Eric Youngdale, <eric@aib.com>. No processor supplement available
|
||||
for this platform.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the ALPHA ELF ABI. Note
|
||||
that most of this is not actually implemented by BFD. */
|
||||
|
||||
#ifndef _ELF_ALPHA_H
|
||||
#define _ELF_ALPHA_H
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* All addresses must be below 2GB. */
|
||||
#define EF_ALPHA_32BIT 0x00000001
|
||||
|
||||
/* All relocations needed for relaxation with code movement are present. */
|
||||
#define EF_ALPHA_CANRELAX 0x00000002
|
||||
|
||||
/* Processor specific section flags. */
|
||||
|
||||
/* This section must be in the global data area. */
|
||||
#define SHF_ALPHA_GPREL 0x10000000
|
||||
|
||||
/* Section contains some sort of debugging information. The exact
|
||||
format is unspecified. It's probably ECOFF symbols. */
|
||||
#define SHT_ALPHA_DEBUG 0x70000001
|
||||
|
||||
/* Section contains register usage information. */
|
||||
#define SHT_ALPHA_REGINFO 0x70000002
|
||||
|
||||
/* A section of type SHT_MIPS_REGINFO contains the following
|
||||
structure. */
|
||||
typedef struct
|
||||
{
|
||||
/* Mask of general purpose registers used. */
|
||||
unsigned long ri_gprmask;
|
||||
/* Mask of co-processor registers used. */
|
||||
unsigned long ri_cprmask[4];
|
||||
/* GP register value for this object file. */
|
||||
long ri_gp_value;
|
||||
} Elf64_RegInfo;
|
||||
|
||||
/* Special values for the st_other field in the symbol table. */
|
||||
|
||||
#define STO_ALPHA_NOPV 0x80
|
||||
#define STO_ALPHA_STD_GPLOAD 0x88
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Alpha relocs. */
|
||||
START_RELOC_NUMBERS (elf_alpha_reloc_type)
|
||||
RELOC_NUMBER (R_ALPHA_NONE, 0) /* No reloc */
|
||||
RELOC_NUMBER (R_ALPHA_REFLONG, 1) /* Direct 32 bit */
|
||||
RELOC_NUMBER (R_ALPHA_REFQUAD, 2) /* Direct 64 bit */
|
||||
RELOC_NUMBER (R_ALPHA_GPREL32, 3) /* GP relative 32 bit */
|
||||
RELOC_NUMBER (R_ALPHA_LITERAL, 4) /* GP relative 16 bit w/optimization */
|
||||
RELOC_NUMBER (R_ALPHA_LITUSE, 5) /* Optimization hint for LITERAL */
|
||||
RELOC_NUMBER (R_ALPHA_GPDISP, 6) /* Add displacement to GP */
|
||||
RELOC_NUMBER (R_ALPHA_BRADDR, 7) /* PC+4 relative 23 bit shifted */
|
||||
RELOC_NUMBER (R_ALPHA_HINT, 8) /* PC+4 relative 16 bit shifted */
|
||||
RELOC_NUMBER (R_ALPHA_SREL16, 9) /* PC relative 16 bit */
|
||||
RELOC_NUMBER (R_ALPHA_SREL32, 10) /* PC relative 32 bit */
|
||||
RELOC_NUMBER (R_ALPHA_SREL64, 11) /* PC relative 64 bit */
|
||||
|
||||
/* Inherited these from ECOFF, but they are not particularly useful
|
||||
and are depreciated. And not implemented in the BFD, btw. */
|
||||
RELOC_NUMBER (R_ALPHA_OP_PUSH, 12) /* OP stack push */
|
||||
RELOC_NUMBER (R_ALPHA_OP_STORE, 13) /* OP stack pop and store */
|
||||
RELOC_NUMBER (R_ALPHA_OP_PSUB, 14) /* OP stack subtract */
|
||||
RELOC_NUMBER (R_ALPHA_OP_PRSHIFT, 15) /* OP stack right shift */
|
||||
|
||||
RELOC_NUMBER (R_ALPHA_GPVALUE, 16)
|
||||
RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17)
|
||||
RELOC_NUMBER (R_ALPHA_GPRELLOW, 18)
|
||||
RELOC_NUMBER (R_ALPHA_IMMED_GP_16, 19)
|
||||
RELOC_NUMBER (R_ALPHA_IMMED_GP_HI32, 20)
|
||||
RELOC_NUMBER (R_ALPHA_IMMED_SCN_HI32, 21)
|
||||
RELOC_NUMBER (R_ALPHA_IMMED_BR_HI32, 22)
|
||||
RELOC_NUMBER (R_ALPHA_IMMED_LO32, 23)
|
||||
|
||||
/* These relocations are specific to shared libraries. */
|
||||
RELOC_NUMBER (R_ALPHA_COPY, 24) /* Copy symbol at runtime */
|
||||
RELOC_NUMBER (R_ALPHA_GLOB_DAT, 25) /* Create GOT entry */
|
||||
RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */
|
||||
RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */
|
||||
|
||||
EMPTY_RELOC (R_ALPHA_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif /* _ELF_ALPHA_H */
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/* ARC ELF support for BFD.
|
||||
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Doug Evans, (dje@cygnus.com)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the ARC ELF ABI. */
|
||||
|
||||
#ifndef _ELF_ARC_H
|
||||
#define _ELF_ARC_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_arc_reloc_type)
|
||||
RELOC_NUMBER (R_ARC_NONE, 0)
|
||||
RELOC_NUMBER (R_ARC_32, 1)
|
||||
RELOC_NUMBER (R_ARC_B26, 2)
|
||||
RELOC_NUMBER (R_ARC_B22_PCREL, 3)
|
||||
EMPTY_RELOC (R_ARC_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* Four bit ARC machine type field. */
|
||||
#define EF_ARC_MACH 0x0000000f
|
||||
|
||||
/* Various CPU types. */
|
||||
#define E_ARC_MACH_BASE 0x00000000
|
||||
#define E_ARC_MACH_UNUSED1 0x00000001
|
||||
#define E_ARC_MACH_UNUSED2 0x00000002
|
||||
#define E_ARC_MACH_UNUSED4 0x00000003
|
||||
|
||||
/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types.
|
||||
Highly unlikely, but what the heck. */
|
||||
|
||||
/* File contains position independent code. */
|
||||
#define EF_ARC_PIC 0x00000100
|
||||
|
||||
#endif /* _ELF_ARC_H */
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
/* ARM ELF support for BFD.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_ARM_H
|
||||
#define _ELF_ARM_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
#define EF_ARM_RELEXEC 0x01
|
||||
#define EF_ARM_HASENTRY 0x02
|
||||
#define EF_INTERWORK 0x04
|
||||
#define EF_APCS_26 0x08
|
||||
#define EF_APCS_FLOAT 0x10
|
||||
#define EF_PIC 0x20
|
||||
#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */
|
||||
#define EF_NEW_ABI 0x80
|
||||
#define EF_OLD_ABI 0x100
|
||||
|
||||
/* Local aliases for some flags to match names used by COFF port. */
|
||||
#define F_INTERWORK EF_INTERWORK
|
||||
#define F_APCS26 EF_APCS_26
|
||||
#define F_APCS_FLOAT EF_APCS_FLOAT
|
||||
#define F_PIC EF_PIC
|
||||
|
||||
/* Additional symbol types for Thumb */
|
||||
#define STT_ARM_TFUNC 0xd
|
||||
|
||||
/* ARM-specific values for sh_flags */
|
||||
#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point */
|
||||
#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step */
|
||||
|
||||
/* ARM-specific program header flags */
|
||||
#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */
|
||||
|
||||
/* Relocation types. */
|
||||
START_RELOC_NUMBERS (elf_arm_reloc_type)
|
||||
RELOC_NUMBER (R_ARM_NONE, 0)
|
||||
RELOC_NUMBER (R_ARM_PC24, 1)
|
||||
RELOC_NUMBER (R_ARM_ABS32, 2)
|
||||
RELOC_NUMBER (R_ARM_REL32, 3)
|
||||
RELOC_NUMBER (R_ARM_ABS8, 4)
|
||||
RELOC_NUMBER (R_ARM_ABS16, 5)
|
||||
RELOC_NUMBER (R_ARM_ABS12, 6)
|
||||
RELOC_NUMBER (R_ARM_THM_ABS5, 7)
|
||||
RELOC_NUMBER (R_ARM_THM_PC22, 8)
|
||||
RELOC_NUMBER (R_ARM_SBREL32, 9)
|
||||
RELOC_NUMBER (R_ARM_AMP_VCALL9, 10)
|
||||
RELOC_NUMBER (R_ARM_THM_PC11, 11) /* cygnus extension to abi: thumb unconditional branch */
|
||||
RELOC_NUMBER (R_ARM_THM_PC9, 12) /* cygnus extension to abi: thumb conditional branch */
|
||||
RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 13)
|
||||
RELOC_NUMBER (R_ARM_GNU_VTENTRY, 14)
|
||||
RELOC_NUMBER (R_ARM_COPY, 20) /* copy symbol at runtime */
|
||||
RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* create GOT entry */
|
||||
RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* create PLT entry */
|
||||
RELOC_NUMBER (R_ARM_RELATIVE, 23) /* adjust by program base */
|
||||
RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT */
|
||||
RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT */
|
||||
RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry */
|
||||
RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address */
|
||||
FAKE_RELOC (FIRST_INVALID_RELOC, 28)
|
||||
FAKE_RELOC (LAST_INVALID_RELOC, 249)
|
||||
RELOC_NUMBER (R_ARM_RSBREL32, 250)
|
||||
RELOC_NUMBER (R_ARM_THM_RPC22, 251)
|
||||
RELOC_NUMBER (R_ARM_RREL32, 252)
|
||||
RELOC_NUMBER (R_ARM_RABS32, 253)
|
||||
RELOC_NUMBER (R_ARM_RPC24, 254)
|
||||
RELOC_NUMBER (R_ARM_RBASE, 255)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
/* ARM ELF support for BFD.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_ARM_H
|
||||
#define _ELF_ARM_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
#define EF_ARM_RELEXEC 0x01
|
||||
#define EF_ARM_HASENTRY 0x02
|
||||
#define EF_INTERWORK 0x04
|
||||
#define EF_APCS_26 0x08
|
||||
#define EF_APCS_FLOAT 0x10
|
||||
#define EF_PIC 0x20
|
||||
#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */
|
||||
#define EF_NEW_ABI 0x80
|
||||
#define EF_OLD_ABI 0x100
|
||||
|
||||
/* Local aliases for some flags to match names used by COFF port. */
|
||||
#define F_INTERWORK EF_INTERWORK
|
||||
#define F_APCS26 EF_APCS_26
|
||||
#define F_APCS_FLOAT EF_APCS_FLOAT
|
||||
#define F_PIC EF_PIC
|
||||
|
||||
/* Additional symbol types for Thumb */
|
||||
#define STT_ARM_TFUNC 0xd
|
||||
|
||||
/* ARM-specific values for sh_flags */
|
||||
#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point */
|
||||
#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step */
|
||||
|
||||
/* ARM-specific program header flags */
|
||||
#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */
|
||||
|
||||
/* Relocation types. */
|
||||
START_RELOC_NUMBERS (elf_arm_reloc_type)
|
||||
RELOC_NUMBER (R_ARM_NONE, 0)
|
||||
RELOC_NUMBER (R_ARM_PC24, 1)
|
||||
RELOC_NUMBER (R_ARM_ABS32, 2)
|
||||
RELOC_NUMBER (R_ARM_REL32, 3)
|
||||
RELOC_NUMBER (R_ARM_PC13, 4)
|
||||
RELOC_NUMBER (R_ARM_ABS16, 5)
|
||||
RELOC_NUMBER (R_ARM_ABS12, 6)
|
||||
RELOC_NUMBER (R_ARM_THM_ABS5, 7)
|
||||
RELOC_NUMBER (R_ARM_ABS8, 8)
|
||||
RELOC_NUMBER (R_ARM_SBREL32, 9)
|
||||
RELOC_NUMBER (R_ARM_THM_PC22, 10)
|
||||
RELOC_NUMBER (R_ARM_THM_PC8, 11)
|
||||
RELOC_NUMBER (R_ARM_AMP_VCALL9, 12)
|
||||
RELOC_NUMBER (R_ARM_SWI24, 13)
|
||||
RELOC_NUMBER (R_ARM_THM_SWI8, 14)
|
||||
RELOC_NUMBER (R_ARM_XPC25, 15)
|
||||
RELOC_NUMBER (R_ARM_THM_XPC22, 16)
|
||||
RELOC_NUMBER (R_ARM_COPY, 20) /* copy symbol at runtime */
|
||||
RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* create GOT entry */
|
||||
RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* create PLT entry */
|
||||
RELOC_NUMBER (R_ARM_RELATIVE, 23) /* adjust by program base */
|
||||
RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT */
|
||||
RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT */
|
||||
RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry */
|
||||
RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address */
|
||||
FAKE_RELOC (FIRST_INVALID_RELOC1, 28)
|
||||
FAKE_RELOC (LAST_INVALID_RELOC1, 99)
|
||||
RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100)
|
||||
RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101)
|
||||
RELOC_NUMBER (R_ARM_THM_PC11, 102) /* cygnus extension to abi: thumb unconditional branch */
|
||||
RELOC_NUMBER (R_ARM_THM_PC9, 103) /* cygnus extension to abi: thumb conditional branch */
|
||||
FAKE_RELOC (FIRST_INVALID_RELOC2, 104)
|
||||
FAKE_RELOC (LAST_INVALID_RELOC2, 248)
|
||||
RELOC_NUMBER (R_ARM_RXPC25, 249)
|
||||
RELOC_NUMBER (R_ARM_RSBREL32, 250)
|
||||
RELOC_NUMBER (R_ARM_THM_RPC22, 251)
|
||||
RELOC_NUMBER (R_ARM_RREL32, 252)
|
||||
RELOC_NUMBER (R_ARM_RABS32, 253)
|
||||
RELOC_NUMBER (R_ARM_RPC24, 254)
|
||||
RELOC_NUMBER (R_ARM_RBASE, 255)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,422 +0,0 @@
|
|||
/* ELF support for BFD.
|
||||
Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
|
||||
|
||||
Written by Fred Fish @ Cygnus Support, from information published
|
||||
in "UNIX System V Release 4, Programmers Guide: ANSI C and
|
||||
Programming Support Tools".
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* This file is part of ELF support for BFD, and contains the portions
|
||||
that are common to both the internal and external representations.
|
||||
For example, ELFMAG0 is the byte 0x7F in both the internal (in-memory)
|
||||
and external (in-file) representations. */
|
||||
|
||||
#ifndef _ELF_COMMON_H
|
||||
#define _ELF_COMMON_H
|
||||
|
||||
/* Fields in e_ident[] */
|
||||
|
||||
#define EI_MAG0 0 /* File identification byte 0 index */
|
||||
#define ELFMAG0 0x7F /* Magic number byte 0 */
|
||||
|
||||
#define EI_MAG1 1 /* File identification byte 1 index */
|
||||
#define ELFMAG1 'E' /* Magic number byte 1 */
|
||||
|
||||
#define EI_MAG2 2 /* File identification byte 2 index */
|
||||
#define ELFMAG2 'L' /* Magic number byte 2 */
|
||||
|
||||
#define EI_MAG3 3 /* File identification byte 3 index */
|
||||
#define ELFMAG3 'F' /* Magic number byte 3 */
|
||||
|
||||
#define EI_CLASS 4 /* File class */
|
||||
#define ELFCLASSNONE 0 /* Invalid class */
|
||||
#define ELFCLASS32 1 /* 32-bit objects */
|
||||
#define ELFCLASS64 2 /* 64-bit objects */
|
||||
|
||||
#define EI_DATA 5 /* Data encoding */
|
||||
#define ELFDATANONE 0 /* Invalid data encoding */
|
||||
#define ELFDATA2LSB 1 /* 2's complement, little endian */
|
||||
#define ELFDATA2MSB 2 /* 2's complement, big endian */
|
||||
|
||||
#define EI_VERSION 6 /* File version */
|
||||
|
||||
#define EI_OSABI 7 /* Operating System/ABI indication */
|
||||
#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
|
||||
#define ELFOSABI_HPUX 1 /* HP-UX operating system */
|
||||
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
|
||||
#define ELFOSABI_ARM 97 /* ARM */
|
||||
|
||||
#define EI_ABIVERSION 8 /* ABI version */
|
||||
|
||||
#define EI_PAD 9 /* Start of padding bytes */
|
||||
|
||||
|
||||
/* Values for e_type, which identifies the object file type */
|
||||
|
||||
#define ET_NONE 0 /* No file type */
|
||||
#define ET_REL 1 /* Relocatable file */
|
||||
#define ET_EXEC 2 /* Executable file */
|
||||
#define ET_DYN 3 /* Shared object file */
|
||||
#define ET_CORE 4 /* Core file */
|
||||
#define ET_LOPROC 0xFF00 /* Processor-specific */
|
||||
#define ET_HIPROC 0xFFFF /* Processor-specific */
|
||||
|
||||
/* Values for e_machine, which identifies the architecture */
|
||||
|
||||
#define EM_NONE 0 /* No machine */
|
||||
#define EM_M32 1 /* AT&T WE 32100 */
|
||||
#define EM_SPARC 2 /* SUN SPARC */
|
||||
#define EM_386 3 /* Intel 80386 */
|
||||
#define EM_68K 4 /* Motorola m68k family */
|
||||
#define EM_88K 5 /* Motorola m88k family */
|
||||
#define EM_486 6 /* Intel 80486 */
|
||||
#define EM_860 7 /* Intel 80860 */
|
||||
#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
|
||||
#define EM_S370 9 /* Amdahl */
|
||||
#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
|
||||
|
||||
#define EM_PARISC 15 /* HPPA */
|
||||
|
||||
#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
|
||||
#define EM_960 19 /* Intel 80960 */
|
||||
#define EM_PPC 20 /* PowerPC */
|
||||
|
||||
#define EM_V800 36 /* NEC V800 series */
|
||||
#define EM_FR20 37 /* Fujitsu FR20 */
|
||||
#define EM_RH32 38 /* TRW RH32 */
|
||||
#define EM_MMA 39 /* Fujitsu MMA */
|
||||
#define EM_ARM 40 /* ARM */
|
||||
#define EM_OLD_ALPHA 41 /* Digital Alpha */
|
||||
#define EM_SH 42 /* Hitachi SH */
|
||||
#define EM_SPARCV9 43 /* SPARC v9 64-bit */
|
||||
|
||||
/* If it is necessary to assign new unofficial EM_* values, please pick large
|
||||
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
|
||||
with official or non-GNU unofficial values.
|
||||
|
||||
NOTE: Do not just increment the most recent number by one.
|
||||
Somebody else somewhere will do exactly the same thing, and you
|
||||
will have a collision. Instead, pick a random number. */
|
||||
|
||||
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
|
||||
#define EM_CYGNUS_POWERPC 0x9025
|
||||
|
||||
/* Old version of Sparc v9, from before the ABI; this should be
|
||||
removed shortly. */
|
||||
#define EM_OLD_SPARCV9 11
|
||||
|
||||
/* Old version of PowerPC, this should be removed shortly. */
|
||||
#define EM_PPC_OLD 17
|
||||
|
||||
/* Cygnus ARC ELF backend. Written in the absence of an ABI. */
|
||||
#define EM_CYGNUS_ARC 0x9040
|
||||
|
||||
/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
|
||||
#define EM_CYGNUS_M32R 0x9041
|
||||
|
||||
/* Alpha backend magic number. Written in the absence of an ABI. */
|
||||
#define EM_ALPHA 0x9026
|
||||
|
||||
/* D10V backend magic number. Written in the absence of an ABI. */
|
||||
#define EM_CYGNUS_D10V 0x7650
|
||||
|
||||
/* D30V backend magic number. Written in the absence of an ABI. */
|
||||
#define EM_CYGNUS_D30V 0x7676
|
||||
|
||||
/* V850 backend magic number. Written in the absense of an ABI. */
|
||||
#define EM_CYGNUS_V850 0x9080
|
||||
|
||||
/* mn10200 and mn10300 backend magic numbers.
|
||||
Written in the absense of an ABI. */
|
||||
#define EM_CYGNUS_MN10200 0xdead
|
||||
#define EM_CYGNUS_MN10300 0xbeef
|
||||
|
||||
/* FR30 magic number - no EABI available. */
|
||||
#define EM_CYGNUS_FR30 0x3330
|
||||
|
||||
/* See the above comment before you add a new EM_* value here. */
|
||||
|
||||
/* Values for e_version */
|
||||
|
||||
#define EV_NONE 0 /* Invalid ELF version */
|
||||
#define EV_CURRENT 1 /* Current version */
|
||||
|
||||
/* Values for program header, p_type field */
|
||||
|
||||
#define PT_NULL 0 /* Program header table entry unused */
|
||||
#define PT_LOAD 1 /* Loadable program segment */
|
||||
#define PT_DYNAMIC 2 /* Dynamic linking information */
|
||||
#define PT_INTERP 3 /* Program interpreter */
|
||||
#define PT_NOTE 4 /* Auxiliary information */
|
||||
#define PT_SHLIB 5 /* Reserved, unspecified semantics */
|
||||
#define PT_PHDR 6 /* Entry for header table itself */
|
||||
#define PT_LOPROC 0x70000000 /* Processor-specific */
|
||||
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
|
||||
|
||||
/* Program segment permissions, in program header p_flags field */
|
||||
|
||||
#define PF_X (1 << 0) /* Segment is executable */
|
||||
#define PF_W (1 << 1) /* Segment is writable */
|
||||
#define PF_R (1 << 2) /* Segment is readable */
|
||||
#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
|
||||
|
||||
/* Values for section header, sh_type field */
|
||||
|
||||
#define SHT_NULL 0 /* Section header table entry unused */
|
||||
#define SHT_PROGBITS 1 /* Program specific (private) data */
|
||||
#define SHT_SYMTAB 2 /* Link editing symbol table */
|
||||
#define SHT_STRTAB 3 /* A string table */
|
||||
#define SHT_RELA 4 /* Relocation entries with addends */
|
||||
#define SHT_HASH 5 /* A symbol hash table */
|
||||
#define SHT_DYNAMIC 6 /* Information for dynamic linking */
|
||||
#define SHT_NOTE 7 /* Information that marks file */
|
||||
#define SHT_NOBITS 8 /* Section occupies no space in file */
|
||||
#define SHT_REL 9 /* Relocation entries, no addends */
|
||||
#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
|
||||
#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
|
||||
|
||||
/* The next three section types are defined by Solaris, and are named
|
||||
SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU*
|
||||
versions. */
|
||||
#define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
|
||||
#define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
|
||||
#define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
|
||||
|
||||
#define SHT_GNU_verdef SHT_SUNW_verdef
|
||||
#define SHT_GNU_verneed SHT_SUNW_verneed
|
||||
#define SHT_GNU_versym SHT_SUNW_versym
|
||||
|
||||
#define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */
|
||||
#define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */
|
||||
#define SHT_LOUSER 0x80000000 /* Application-specific semantics */
|
||||
#define SHT_HIUSER 0x8FFFFFFF /* Application-specific semantics */
|
||||
|
||||
/* Values for section header, sh_flags field */
|
||||
|
||||
#define SHF_WRITE (1 << 0) /* Writable data during execution */
|
||||
#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */
|
||||
#define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */
|
||||
#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
|
||||
|
||||
/* Values of note segment descriptor types for core files. */
|
||||
|
||||
#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
|
||||
#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
|
||||
#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
|
||||
|
||||
/* Note segments for core files on dir-style procfs systems. */
|
||||
|
||||
#define NT_PSTATUS 10 /* Has a struct pstatus */
|
||||
#define NT_FPREGS 12 /* Has a struct fpregset */
|
||||
#define NT_PSINFO 13 /* Has a struct psinfo */
|
||||
#define NT_LWPSTATUS 16 /* Has a struct lwpstatus_t */
|
||||
#define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */
|
||||
|
||||
/* Values of note segment descriptor types for object files. */
|
||||
/* (Only for hppa right now. Should this be moved elsewhere?) */
|
||||
|
||||
#define NT_VERSION 1 /* Contains a version string. */
|
||||
|
||||
/* These three macros disassemble and assemble a symbol table st_info field,
|
||||
which contains the symbol binding and symbol type. The STB_ and STT_
|
||||
defines identify the binding and type. */
|
||||
|
||||
#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4)
|
||||
#define ELF_ST_TYPE(val) ((val) & 0xF)
|
||||
#define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF))
|
||||
|
||||
#define STN_UNDEF 0 /* undefined symbol index */
|
||||
|
||||
#define STB_LOCAL 0 /* Symbol not visible outside obj */
|
||||
#define STB_GLOBAL 1 /* Symbol visible outside obj */
|
||||
#define STB_WEAK 2 /* Like globals, lower precedence */
|
||||
#define STB_LOPROC 13 /* Application-specific semantics */
|
||||
#define STB_HIPROC 15 /* Application-specific semantics */
|
||||
|
||||
#define STT_NOTYPE 0 /* Symbol type is unspecified */
|
||||
#define STT_OBJECT 1 /* Symbol is a data object */
|
||||
#define STT_FUNC 2 /* Symbol is a code object */
|
||||
#define STT_SECTION 3 /* Symbol associated with a section */
|
||||
#define STT_FILE 4 /* Symbol gives a file name */
|
||||
#define STT_LOPROC 13 /* Application-specific semantics */
|
||||
#define STT_HIPROC 15 /* Application-specific semantics */
|
||||
|
||||
/* Special section indices, which may show up in st_shndx fields, among
|
||||
other places. */
|
||||
|
||||
#define SHN_UNDEF 0 /* Undefined section reference */
|
||||
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
|
||||
#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */
|
||||
#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
|
||||
#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
|
||||
#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
|
||||
#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
|
||||
|
||||
/* relocation info handling macros */
|
||||
|
||||
#define ELF32_R_SYM(i) ((i) >> 8)
|
||||
#define ELF32_R_TYPE(i) ((i) & 0xff)
|
||||
#define ELF32_R_INFO(s,t) (((s) << 8) + ((t) & 0xff))
|
||||
|
||||
#define ELF64_R_SYM(i) ((i) >> 32)
|
||||
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
|
||||
#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
|
||||
|
||||
/* Dynamic section tags */
|
||||
|
||||
#define DT_NULL 0
|
||||
#define DT_NEEDED 1
|
||||
#define DT_PLTRELSZ 2
|
||||
#define DT_PLTGOT 3
|
||||
#define DT_HASH 4
|
||||
#define DT_STRTAB 5
|
||||
#define DT_SYMTAB 6
|
||||
#define DT_RELA 7
|
||||
#define DT_RELASZ 8
|
||||
#define DT_RELAENT 9
|
||||
#define DT_STRSZ 10
|
||||
#define DT_SYMENT 11
|
||||
#define DT_INIT 12
|
||||
#define DT_FINI 13
|
||||
#define DT_SONAME 14
|
||||
#define DT_RPATH 15
|
||||
#define DT_SYMBOLIC 16
|
||||
#define DT_REL 17
|
||||
#define DT_RELSZ 18
|
||||
#define DT_RELENT 19
|
||||
#define DT_PLTREL 20
|
||||
#define DT_DEBUG 21
|
||||
#define DT_TEXTREL 22
|
||||
#define DT_JMPREL 23
|
||||
|
||||
/* The next four dynamic tags are used on Solaris. We support them
|
||||
everywhere. */
|
||||
#define DT_VALRNGLO 0x6ffffd00
|
||||
#define DT_PLTPADSZ 0x6ffffdf9
|
||||
#define DT_MOVEENT 0x6ffffdfa
|
||||
#define DT_MOVESZ 0x6ffffdfb
|
||||
#define DT_FEATURE_1 0x6ffffdfc
|
||||
#define DT_POSFLAG_1 0x6ffffdfd
|
||||
#define DT_SYMINSZ 0x6ffffdfe
|
||||
#define DT_SYMINENT 0x6ffffdff
|
||||
#define DT_VALRNGHI 0x6ffffdff
|
||||
|
||||
#define DT_ADDRRNGLO 0x6ffffe00
|
||||
#define DT_SYMINFO 0x6ffffeff
|
||||
#define DT_ADDRRNGHI 0x6ffffeff
|
||||
|
||||
#define DT_RELACOUNT 0x6ffffff9
|
||||
#define DT_RELCOUNT 0x6ffffffa
|
||||
#define DT_FLAGS_1 0x6ffffffb
|
||||
#define DT_VERDEF 0x6ffffffc
|
||||
#define DT_VERDEFNUM 0x6ffffffd
|
||||
#define DT_VERNEED 0x6ffffffe
|
||||
#define DT_VERNEEDNUM 0x6fffffff
|
||||
|
||||
/* This tag is a GNU extension to the Solaris version scheme. */
|
||||
#define DT_VERSYM 0x6ffffff0
|
||||
|
||||
#define DT_LOPROC 0x70000000
|
||||
#define DT_HIPROC 0x7fffffff
|
||||
|
||||
/* These section tags are used on Solaris. We support them
|
||||
everywhere, and hope they do not conflict. */
|
||||
|
||||
#define DT_AUXILIARY 0x7ffffffd
|
||||
#define DT_USED 0x7ffffffe
|
||||
#define DT_FILTER 0x7fffffff
|
||||
|
||||
/* Values used in DT_FEATURE_1 .dynamic entry. */
|
||||
#define DTF_1_PARINIT 0x00000001
|
||||
|
||||
/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
|
||||
#define DF_P1_LAZYLOAD 0x00000001
|
||||
#define DF_P1_GROUPPERM 0x00000002
|
||||
|
||||
/* Flag value in in the DT_1_FLAGS .dynamic entry. */
|
||||
#define DF_1_NOW 0x00000001
|
||||
#define DF_1_GLOBAL 0x00000002
|
||||
#define DF_1_GROUP 0x00000004
|
||||
#define DF_1_NODELETE 0x00000008
|
||||
#define DF_1_LOADFLTR 0x00000010
|
||||
#define DF_1_INITFIRST 0x00000020
|
||||
#define DF_1_NOOPEN 0x00000040
|
||||
#define DF_1_ORIGIN 0x00000080
|
||||
#define DF_1_DIRECT 0x00000100
|
||||
#define DF_1_TRANS 0x00000200
|
||||
#define DF_1_INTERPOSE 0x00000400
|
||||
|
||||
/* These constants are used for the version number of a Elf32_Verdef
|
||||
structure. */
|
||||
|
||||
#define VER_DEF_NONE 0
|
||||
#define VER_DEF_CURRENT 1
|
||||
|
||||
/* These constants appear in the vd_flags field of a Elf32_Verdef
|
||||
structure. */
|
||||
|
||||
#define VER_FLG_BASE 0x1
|
||||
#define VER_FLG_WEAK 0x2
|
||||
|
||||
/* These special constants can be found in an Elf32_Versym field. */
|
||||
|
||||
#define VER_NDX_LOCAL 0
|
||||
#define VER_NDX_GLOBAL 1
|
||||
|
||||
/* These constants are used for the version number of a Elf32_Verneed
|
||||
structure. */
|
||||
|
||||
#define VER_NEED_NONE 0
|
||||
#define VER_NEED_CURRENT 1
|
||||
|
||||
/* This flag appears in a Versym structure. It means that the symbol
|
||||
is hidden, and is only visible with an explicit version number.
|
||||
This is a GNU extension. */
|
||||
|
||||
#define VERSYM_HIDDEN 0x8000
|
||||
|
||||
/* This is the mask for the rest of the Versym information. */
|
||||
|
||||
#define VERSYM_VERSION 0x7fff
|
||||
|
||||
/* This is a special token which appears as part of a symbol name. It
|
||||
indictes that the rest of the name is actually the name of a
|
||||
version node, and is not part of the actual name. This is a GNU
|
||||
extension. For example, the symbol name `stat@ver2' is taken to
|
||||
mean the symbol `stat' in version `ver2'. */
|
||||
|
||||
#define ELF_VER_CHR '@'
|
||||
|
||||
/* Possible values for si_boundto. */
|
||||
#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */
|
||||
#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */
|
||||
#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */
|
||||
|
||||
/* Possible bitmasks for si_flags. */
|
||||
#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */
|
||||
#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */
|
||||
#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */
|
||||
#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy
|
||||
loaded */
|
||||
/* Syminfo version values. */
|
||||
#define SYMINFO_NONE 0
|
||||
#define SYMINFO_CURRENT 1
|
||||
#define SYMINFO_NUM 2
|
||||
|
||||
#endif /* _ELF_COMMON_H */
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/* d10v ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_D10V_H
|
||||
#define _ELF_D10V_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocation types. */
|
||||
START_RELOC_NUMBERS (elf_d10v_reloc_type)
|
||||
RELOC_NUMBER (R_D10V_NONE, 0)
|
||||
RELOC_NUMBER (R_D10V_10_PCREL_R, 1)
|
||||
RELOC_NUMBER (R_D10V_10_PCREL_L, 2)
|
||||
RELOC_NUMBER (R_D10V_16, 3)
|
||||
RELOC_NUMBER (R_D10V_18, 4)
|
||||
RELOC_NUMBER (R_D10V_18_PCREL, 5)
|
||||
RELOC_NUMBER (R_D10V_32, 6)
|
||||
RELOC_NUMBER (R_D10V_GNU_VTINHERIT, 7)
|
||||
RELOC_NUMBER (R_D10V_GNU_VTENTRY, 8)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
/* d30v ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_D30V_H
|
||||
#define _ELF_D30V_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_d30v_reloc_type)
|
||||
RELOC_NUMBER (R_D30V_NONE, 0)
|
||||
RELOC_NUMBER (R_D30V_6, 1)
|
||||
RELOC_NUMBER (R_D30V_9_PCREL, 2)
|
||||
RELOC_NUMBER (R_D30V_9_PCREL_R, 3)
|
||||
RELOC_NUMBER (R_D30V_15, 4)
|
||||
RELOC_NUMBER (R_D30V_15_PCREL, 5)
|
||||
RELOC_NUMBER (R_D30V_15_PCREL_R, 6)
|
||||
RELOC_NUMBER (R_D30V_21, 7)
|
||||
RELOC_NUMBER (R_D30V_21_PCREL, 8)
|
||||
RELOC_NUMBER (R_D30V_21_PCREL_R, 9)
|
||||
RELOC_NUMBER (R_D30V_32, 10)
|
||||
RELOC_NUMBER (R_D30V_32_PCREL, 11)
|
||||
RELOC_NUMBER (R_D30V_32_NORMAL, 12)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,319 +0,0 @@
|
|||
/* Declarations and definitions of codes relating to the DWARF symbolic
|
||||
debugging information format.
|
||||
|
||||
Written by Ron Guilmette (rfg@ncd.com)
|
||||
|
||||
Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file is derived from the DWARF specification (a public document)
|
||||
Revision 1.0.1 (April 8, 1992) developed by the UNIX International
|
||||
Programming Languages Special Interest Group (UI/PLSIG) and distributed
|
||||
by UNIX International. Copies of this specification are available from
|
||||
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
|
||||
*/
|
||||
|
||||
#ifndef _ELF_DWARF_H
|
||||
#define _ELF_DWARF_H
|
||||
|
||||
/* Tag names and codes. */
|
||||
|
||||
enum dwarf_tag {
|
||||
TAG_padding = 0x0000,
|
||||
TAG_array_type = 0x0001,
|
||||
TAG_class_type = 0x0002,
|
||||
TAG_entry_point = 0x0003,
|
||||
TAG_enumeration_type = 0x0004,
|
||||
TAG_formal_parameter = 0x0005,
|
||||
TAG_global_subroutine = 0x0006,
|
||||
TAG_global_variable = 0x0007,
|
||||
/* 0x0008 -- reserved */
|
||||
/* 0x0009 -- reserved */
|
||||
TAG_label = 0x000a,
|
||||
TAG_lexical_block = 0x000b,
|
||||
TAG_local_variable = 0x000c,
|
||||
TAG_member = 0x000d,
|
||||
/* 0x000e -- reserved */
|
||||
TAG_pointer_type = 0x000f,
|
||||
TAG_reference_type = 0x0010,
|
||||
TAG_compile_unit = 0x0011,
|
||||
TAG_string_type = 0x0012,
|
||||
TAG_structure_type = 0x0013,
|
||||
TAG_subroutine = 0x0014,
|
||||
TAG_subroutine_type = 0x0015,
|
||||
TAG_typedef = 0x0016,
|
||||
TAG_union_type = 0x0017,
|
||||
TAG_unspecified_parameters = 0x0018,
|
||||
TAG_variant = 0x0019,
|
||||
TAG_common_block = 0x001a,
|
||||
TAG_common_inclusion = 0x001b,
|
||||
TAG_inheritance = 0x001c,
|
||||
TAG_inlined_subroutine = 0x001d,
|
||||
TAG_module = 0x001e,
|
||||
TAG_ptr_to_member_type = 0x001f,
|
||||
TAG_set_type = 0x0020,
|
||||
TAG_subrange_type = 0x0021,
|
||||
TAG_with_stmt = 0x0022,
|
||||
|
||||
/* GNU extensions */
|
||||
|
||||
TAG_format_label = 0x8000, /* for FORTRAN 77 and Fortran 90 */
|
||||
TAG_namelist = 0x8001, /* For Fortran 90 */
|
||||
TAG_function_template = 0x8002, /* for C++ */
|
||||
TAG_class_template = 0x8003 /* for C++ */
|
||||
};
|
||||
|
||||
#define TAG_lo_user 0x8000 /* implementation-defined range start */
|
||||
#define TAG_hi_user 0xffff /* implementation-defined range end */
|
||||
#define TAG_source_file TAG_compile_unit /* for backward compatibility */
|
||||
|
||||
/* Form names and codes. */
|
||||
|
||||
enum dwarf_form {
|
||||
FORM_ADDR = 0x1,
|
||||
FORM_REF = 0x2,
|
||||
FORM_BLOCK2 = 0x3,
|
||||
FORM_BLOCK4 = 0x4,
|
||||
FORM_DATA2 = 0x5,
|
||||
FORM_DATA4 = 0x6,
|
||||
FORM_DATA8 = 0x7,
|
||||
FORM_STRING = 0x8
|
||||
};
|
||||
|
||||
/* Attribute names and codes. */
|
||||
|
||||
enum dwarf_attribute {
|
||||
AT_sibling = (0x0010|FORM_REF),
|
||||
AT_location = (0x0020|FORM_BLOCK2),
|
||||
AT_name = (0x0030|FORM_STRING),
|
||||
AT_fund_type = (0x0050|FORM_DATA2),
|
||||
AT_mod_fund_type = (0x0060|FORM_BLOCK2),
|
||||
AT_user_def_type = (0x0070|FORM_REF),
|
||||
AT_mod_u_d_type = (0x0080|FORM_BLOCK2),
|
||||
AT_ordering = (0x0090|FORM_DATA2),
|
||||
AT_subscr_data = (0x00a0|FORM_BLOCK2),
|
||||
AT_byte_size = (0x00b0|FORM_DATA4),
|
||||
AT_bit_offset = (0x00c0|FORM_DATA2),
|
||||
AT_bit_size = (0x00d0|FORM_DATA4),
|
||||
/* (0x00e0|FORM_xxxx) -- reserved */
|
||||
AT_element_list = (0x00f0|FORM_BLOCK4),
|
||||
AT_stmt_list = (0x0100|FORM_DATA4),
|
||||
AT_low_pc = (0x0110|FORM_ADDR),
|
||||
AT_high_pc = (0x0120|FORM_ADDR),
|
||||
AT_language = (0x0130|FORM_DATA4),
|
||||
AT_member = (0x0140|FORM_REF),
|
||||
AT_discr = (0x0150|FORM_REF),
|
||||
AT_discr_value = (0x0160|FORM_BLOCK2),
|
||||
/* (0x0170|FORM_xxxx) -- reserved */
|
||||
/* (0x0180|FORM_xxxx) -- reserved */
|
||||
AT_string_length = (0x0190|FORM_BLOCK2),
|
||||
AT_common_reference = (0x01a0|FORM_REF),
|
||||
AT_comp_dir = (0x01b0|FORM_STRING),
|
||||
AT_const_value_string = (0x01c0|FORM_STRING),
|
||||
AT_const_value_data2 = (0x01c0|FORM_DATA2),
|
||||
AT_const_value_data4 = (0x01c0|FORM_DATA4),
|
||||
AT_const_value_data8 = (0x01c0|FORM_DATA8),
|
||||
AT_const_value_block2 = (0x01c0|FORM_BLOCK2),
|
||||
AT_const_value_block4 = (0x01c0|FORM_BLOCK4),
|
||||
AT_containing_type = (0x01d0|FORM_REF),
|
||||
AT_default_value_addr = (0x01e0|FORM_ADDR),
|
||||
AT_default_value_data2 = (0x01e0|FORM_DATA2),
|
||||
AT_default_value_data4 = (0x01e0|FORM_DATA4),
|
||||
AT_default_value_data8 = (0x01e0|FORM_DATA8),
|
||||
AT_default_value_string = (0x01e0|FORM_STRING),
|
||||
AT_friends = (0x01f0|FORM_BLOCK2),
|
||||
AT_inline = (0x0200|FORM_STRING),
|
||||
AT_is_optional = (0x0210|FORM_STRING),
|
||||
AT_lower_bound_ref = (0x0220|FORM_REF),
|
||||
AT_lower_bound_data2 = (0x0220|FORM_DATA2),
|
||||
AT_lower_bound_data4 = (0x0220|FORM_DATA4),
|
||||
AT_lower_bound_data8 = (0x0220|FORM_DATA8),
|
||||
AT_private = (0x0240|FORM_STRING),
|
||||
AT_producer = (0x0250|FORM_STRING),
|
||||
AT_program = (0x0230|FORM_STRING),
|
||||
AT_protected = (0x0260|FORM_STRING),
|
||||
AT_prototyped = (0x0270|FORM_STRING),
|
||||
AT_public = (0x0280|FORM_STRING),
|
||||
AT_pure_virtual = (0x0290|FORM_STRING),
|
||||
AT_return_addr = (0x02a0|FORM_BLOCK2),
|
||||
AT_abstract_origin = (0x02b0|FORM_REF),
|
||||
AT_start_scope = (0x02c0|FORM_DATA4),
|
||||
AT_stride_size = (0x02e0|FORM_DATA4),
|
||||
AT_upper_bound_ref = (0x02f0|FORM_REF),
|
||||
AT_upper_bound_data2 = (0x02f0|FORM_DATA2),
|
||||
AT_upper_bound_data4 = (0x02f0|FORM_DATA4),
|
||||
AT_upper_bound_data8 = (0x02f0|FORM_DATA8),
|
||||
AT_virtual = (0x0300|FORM_STRING),
|
||||
|
||||
/* GNU extensions. */
|
||||
|
||||
AT_sf_names = (0x8000|FORM_DATA4),
|
||||
AT_src_info = (0x8010|FORM_DATA4),
|
||||
AT_mac_info = (0x8020|FORM_DATA4),
|
||||
AT_src_coords = (0x8030|FORM_DATA4),
|
||||
AT_body_begin = (0x8040|FORM_ADDR),
|
||||
AT_body_end = (0x8050|FORM_ADDR)
|
||||
};
|
||||
|
||||
#define AT_lo_user 0x8000 /* implementation-defined range start */
|
||||
#define AT_hi_user 0xffff /* implementation-defined range end */
|
||||
|
||||
/* Location atom names and codes. */
|
||||
|
||||
enum dwarf_location_atom {
|
||||
OP_REG = 0x01,
|
||||
OP_BASEREG = 0x02,
|
||||
OP_ADDR = 0x03,
|
||||
OP_CONST = 0x04,
|
||||
OP_DEREF2 = 0x05,
|
||||
OP_DEREF4 = 0x06,
|
||||
OP_ADD = 0x07
|
||||
};
|
||||
|
||||
#define OP_LO_USER 0x80 /* implementation-defined range start */
|
||||
#define OP_HI_USER 0xff /* implementation-defined range end */
|
||||
|
||||
/* Fundamental type names and codes. */
|
||||
|
||||
enum dwarf_fundamental_type {
|
||||
FT_char = 0x0001,
|
||||
FT_signed_char = 0x0002,
|
||||
FT_unsigned_char = 0x0003,
|
||||
FT_short = 0x0004,
|
||||
FT_signed_short = 0x0005,
|
||||
FT_unsigned_short = 0x0006,
|
||||
FT_integer = 0x0007,
|
||||
FT_signed_integer = 0x0008,
|
||||
FT_unsigned_integer = 0x0009,
|
||||
FT_long = 0x000a,
|
||||
FT_signed_long = 0x000b,
|
||||
FT_unsigned_long = 0x000c,
|
||||
FT_pointer = 0x000d, /* an alias for (void *) */
|
||||
FT_float = 0x000e,
|
||||
FT_dbl_prec_float = 0x000f,
|
||||
FT_ext_prec_float = 0x0010, /* breaks "classic" svr4 SDB */
|
||||
FT_complex = 0x0011, /* breaks "classic" svr4 SDB */
|
||||
FT_dbl_prec_complex = 0x0012, /* breaks "classic" svr4 SDB */
|
||||
/* 0x0013 -- reserved */
|
||||
FT_void = 0x0014,
|
||||
FT_boolean = 0x0015, /* breaks "classic" svr4 SDB */
|
||||
FT_ext_prec_complex = 0x0016, /* breaks "classic" svr4 SDB */
|
||||
FT_label = 0x0017,
|
||||
|
||||
/* GNU extensions
|
||||
The low order byte must indicate the size (in bytes) for the type.
|
||||
All of these types will probably break "classic" svr4 SDB */
|
||||
|
||||
FT_long_long = 0x8008,
|
||||
FT_signed_long_long = 0x8108,
|
||||
FT_unsigned_long_long = 0x8208,
|
||||
|
||||
FT_int8 = 0x9001,
|
||||
FT_signed_int8 = 0x9101,
|
||||
FT_unsigned_int8 = 0x9201,
|
||||
FT_int16 = 0x9302,
|
||||
FT_signed_int16 = 0x9402,
|
||||
FT_unsigned_int16 = 0x9502,
|
||||
FT_int32 = 0x9604,
|
||||
FT_signed_int32 = 0x9704,
|
||||
FT_unsigned_int32 = 0x9804,
|
||||
FT_int64 = 0x9908,
|
||||
FT_signed_int64 = 0x9a08,
|
||||
FT_unsigned_int64 = 0x9b08,
|
||||
|
||||
FT_real32 = 0xa004,
|
||||
FT_real64 = 0xa108,
|
||||
FT_real96 = 0xa20c,
|
||||
FT_real128 = 0xa310
|
||||
};
|
||||
|
||||
#define FT_lo_user 0x8000 /* implementation-defined range start */
|
||||
#define FT_hi_user 0xffff /* implementation defined range end */
|
||||
|
||||
/* Type modifier names and codes. */
|
||||
|
||||
enum dwarf_type_modifier {
|
||||
MOD_pointer_to = 0x01,
|
||||
MOD_reference_to = 0x02,
|
||||
MOD_const = 0x03,
|
||||
MOD_volatile = 0x04
|
||||
};
|
||||
|
||||
#define MOD_lo_user 0x80 /* implementation-defined range start */
|
||||
#define MOD_hi_user 0xff /* implementation-defined range end */
|
||||
|
||||
/* Array ordering names and codes. */
|
||||
|
||||
enum dwarf_array_dim_ordering {
|
||||
ORD_row_major = 0,
|
||||
ORD_col_major = 1
|
||||
};
|
||||
|
||||
/* Array subscript format names and codes. */
|
||||
|
||||
enum dwarf_subscr_data_formats {
|
||||
FMT_FT_C_C = 0x0,
|
||||
FMT_FT_C_X = 0x1,
|
||||
FMT_FT_X_C = 0x2,
|
||||
FMT_FT_X_X = 0x3,
|
||||
FMT_UT_C_C = 0x4,
|
||||
FMT_UT_C_X = 0x5,
|
||||
FMT_UT_X_C = 0x6,
|
||||
FMT_UT_X_X = 0x7,
|
||||
FMT_ET = 0x8
|
||||
};
|
||||
|
||||
/* Derived from above for ease of use. */
|
||||
|
||||
#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
|
||||
(((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
|
||||
| ((_UB_CONST_P) ? 0 : 2) \
|
||||
| ((_LB_CONST_P) ? 0 : 1))
|
||||
|
||||
/* Source language names and codes. */
|
||||
|
||||
enum dwarf_source_language {
|
||||
LANG_C89 = 0x00000001,
|
||||
LANG_C = 0x00000002,
|
||||
LANG_ADA83 = 0x00000003,
|
||||
LANG_C_PLUS_PLUS = 0x00000004,
|
||||
LANG_COBOL74 = 0x00000005,
|
||||
LANG_COBOL85 = 0x00000006,
|
||||
LANG_FORTRAN77 = 0x00000007,
|
||||
LANG_FORTRAN90 = 0x00000008,
|
||||
LANG_PASCAL83 = 0x00000009,
|
||||
LANG_MODULA2 = 0x0000000a,
|
||||
|
||||
/* GNU extensions */
|
||||
|
||||
LANG_CHILL = 0x00009af3 /* random value for GNU Chill */
|
||||
};
|
||||
|
||||
#define LANG_lo_user 0x00008000 /* implementation-defined range start */
|
||||
#define LANG_hi_user 0x0000ffff /* implementation-defined range end */
|
||||
|
||||
/* Names and codes for GNU "macinfo" extension. */
|
||||
|
||||
enum dwarf_macinfo_record_type {
|
||||
MACINFO_start = 's',
|
||||
MACINFO_resume = 'r',
|
||||
MACINFO_define = 'd',
|
||||
MACINFO_undef = 'u'
|
||||
};
|
||||
|
||||
#endif /* _ELF_DWARF_H */
|
||||
|
|
@ -1,637 +0,0 @@
|
|||
/* Declarations and definitions of codes relating to the DWARF symbolic
|
||||
debugging information format.
|
||||
Copyright (C) 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc.
|
||||
|
||||
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
|
||||
Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
|
||||
provided support for this effort -- June 21, 1995.
|
||||
|
||||
Derived from the DWARF 1 implementation written by Ron Guilmette
|
||||
(rfg@netcom.com), November 1990.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU CC; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file is derived from the DWARF specification (a public document)
|
||||
Revision 2.0.0 (July 27, 1993) developed by the UNIX International
|
||||
Programming Languages Special Interest Group (UI/PLSIG) and distributed
|
||||
by UNIX International. Copies of this specification are available from
|
||||
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. */
|
||||
|
||||
#ifndef _ELF_DWARF2_H
|
||||
#define _ELF_DWARF2_H
|
||||
|
||||
/* Structure found in the .debug_line section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char li_length [4];
|
||||
unsigned char li_version [2];
|
||||
unsigned char li_prologue_length [4];
|
||||
unsigned char li_min_insn_length [1];
|
||||
unsigned char li_default_is_stmt [1];
|
||||
unsigned char li_line_base [1];
|
||||
unsigned char li_line_range [1];
|
||||
unsigned char li_opcode_base [1];
|
||||
}
|
||||
DWARF2_External_LineInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long li_length;
|
||||
unsigned short li_version;
|
||||
unsigned int li_prologue_length;
|
||||
unsigned char li_min_insn_length;
|
||||
unsigned char li_default_is_stmt;
|
||||
int li_line_base;
|
||||
unsigned char li_line_range;
|
||||
unsigned char li_opcode_base;
|
||||
}
|
||||
DWARF2_Internal_LineInfo;
|
||||
|
||||
/* Structure found in .debug_pubnames section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char pn_length [4];
|
||||
unsigned char pn_version [2];
|
||||
unsigned char pn_offset [4];
|
||||
unsigned char pn_size [4];
|
||||
}
|
||||
DWARF2_External_PubNames;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long pn_length;
|
||||
unsigned short pn_version;
|
||||
unsigned long pn_offset;
|
||||
unsigned long pn_size;
|
||||
}
|
||||
DWARF2_Internal_PubNames;
|
||||
|
||||
/* Strcuture found in .debug_info section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char cu_length [4];
|
||||
unsigned char cu_version [2];
|
||||
unsigned char cu_abbrev_offset [4];
|
||||
unsigned char cu_pointer_size [1];
|
||||
}
|
||||
DWARF2_External_CompUnit;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long cu_length;
|
||||
unsigned short cu_version;
|
||||
unsigned long cu_abbrev_offset;
|
||||
unsigned char cu_pointer_size;
|
||||
}
|
||||
DWARF2_Internal_CompUnit;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char ar_length [4];
|
||||
unsigned char ar_version [2];
|
||||
unsigned char ar_info_offset [4];
|
||||
unsigned char ar_pointer_size [1];
|
||||
unsigned char ar_segment_size [1];
|
||||
}
|
||||
DWARF2_External_ARange;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long ar_length;
|
||||
unsigned short ar_version;
|
||||
unsigned long ar_info_offset;
|
||||
unsigned char ar_pointer_size;
|
||||
unsigned char ar_segment_size;
|
||||
}
|
||||
DWARF2_Internal_ARange;
|
||||
|
||||
|
||||
/* Tag names and codes. */
|
||||
|
||||
enum dwarf_tag
|
||||
{
|
||||
DW_TAG_padding = 0x00,
|
||||
DW_TAG_array_type = 0x01,
|
||||
DW_TAG_class_type = 0x02,
|
||||
DW_TAG_entry_point = 0x03,
|
||||
DW_TAG_enumeration_type = 0x04,
|
||||
DW_TAG_formal_parameter = 0x05,
|
||||
DW_TAG_imported_declaration = 0x08,
|
||||
DW_TAG_label = 0x0a,
|
||||
DW_TAG_lexical_block = 0x0b,
|
||||
DW_TAG_member = 0x0d,
|
||||
DW_TAG_pointer_type = 0x0f,
|
||||
DW_TAG_reference_type = 0x10,
|
||||
DW_TAG_compile_unit = 0x11,
|
||||
DW_TAG_string_type = 0x12,
|
||||
DW_TAG_structure_type = 0x13,
|
||||
DW_TAG_subroutine_type = 0x15,
|
||||
DW_TAG_typedef = 0x16,
|
||||
DW_TAG_union_type = 0x17,
|
||||
DW_TAG_unspecified_parameters = 0x18,
|
||||
DW_TAG_variant = 0x19,
|
||||
DW_TAG_common_block = 0x1a,
|
||||
DW_TAG_common_inclusion = 0x1b,
|
||||
DW_TAG_inheritance = 0x1c,
|
||||
DW_TAG_inlined_subroutine = 0x1d,
|
||||
DW_TAG_module = 0x1e,
|
||||
DW_TAG_ptr_to_member_type = 0x1f,
|
||||
DW_TAG_set_type = 0x20,
|
||||
DW_TAG_subrange_type = 0x21,
|
||||
DW_TAG_with_stmt = 0x22,
|
||||
DW_TAG_access_declaration = 0x23,
|
||||
DW_TAG_base_type = 0x24,
|
||||
DW_TAG_catch_block = 0x25,
|
||||
DW_TAG_const_type = 0x26,
|
||||
DW_TAG_constant = 0x27,
|
||||
DW_TAG_enumerator = 0x28,
|
||||
DW_TAG_file_type = 0x29,
|
||||
DW_TAG_friend = 0x2a,
|
||||
DW_TAG_namelist = 0x2b,
|
||||
DW_TAG_namelist_item = 0x2c,
|
||||
DW_TAG_packed_type = 0x2d,
|
||||
DW_TAG_subprogram = 0x2e,
|
||||
DW_TAG_template_type_param = 0x2f,
|
||||
DW_TAG_template_value_param = 0x30,
|
||||
DW_TAG_thrown_type = 0x31,
|
||||
DW_TAG_try_block = 0x32,
|
||||
DW_TAG_variant_part = 0x33,
|
||||
DW_TAG_variable = 0x34,
|
||||
DW_TAG_volatile_type = 0x35,
|
||||
/* SGI/MIPS Extensions */
|
||||
DW_TAG_MIPS_loop = 0x4081,
|
||||
/* GNU extensions */
|
||||
DW_TAG_format_label = 0x4101, /* for FORTRAN 77 and Fortran 90 */
|
||||
DW_TAG_function_template = 0x4102, /* for C++ */
|
||||
DW_TAG_class_template = 0x4103 /* for C++ */
|
||||
};
|
||||
|
||||
#define DW_TAG_lo_user 0x4080
|
||||
#define DW_TAG_hi_user 0xffff
|
||||
|
||||
/* flag that tells whether entry has a child or not */
|
||||
#define DW_children_no 0
|
||||
#define DW_children_yes 1
|
||||
|
||||
/* Form names and codes. */
|
||||
enum dwarf_form
|
||||
{
|
||||
DW_FORM_addr = 0x01,
|
||||
DW_FORM_block2 = 0x03,
|
||||
DW_FORM_block4 = 0x04,
|
||||
DW_FORM_data2 = 0x05,
|
||||
DW_FORM_data4 = 0x06,
|
||||
DW_FORM_data8 = 0x07,
|
||||
DW_FORM_string = 0x08,
|
||||
DW_FORM_block = 0x09,
|
||||
DW_FORM_block1 = 0x0a,
|
||||
DW_FORM_data1 = 0x0b,
|
||||
DW_FORM_flag = 0x0c,
|
||||
DW_FORM_sdata = 0x0d,
|
||||
DW_FORM_strp = 0x0e,
|
||||
DW_FORM_udata = 0x0f,
|
||||
DW_FORM_ref_addr = 0x10,
|
||||
DW_FORM_ref1 = 0x11,
|
||||
DW_FORM_ref2 = 0x12,
|
||||
DW_FORM_ref4 = 0x13,
|
||||
DW_FORM_ref8 = 0x14,
|
||||
DW_FORM_ref_udata = 0x15,
|
||||
DW_FORM_indirect = 0x16
|
||||
};
|
||||
|
||||
/* Attribute names and codes. */
|
||||
|
||||
enum dwarf_attribute
|
||||
{
|
||||
DW_AT_sibling = 0x01,
|
||||
DW_AT_location = 0x02,
|
||||
DW_AT_name = 0x03,
|
||||
DW_AT_ordering = 0x09,
|
||||
DW_AT_subscr_data = 0x0a,
|
||||
DW_AT_byte_size = 0x0b,
|
||||
DW_AT_bit_offset = 0x0c,
|
||||
DW_AT_bit_size = 0x0d,
|
||||
DW_AT_element_list = 0x0f,
|
||||
DW_AT_stmt_list = 0x10,
|
||||
DW_AT_low_pc = 0x11,
|
||||
DW_AT_high_pc = 0x12,
|
||||
DW_AT_language = 0x13,
|
||||
DW_AT_member = 0x14,
|
||||
DW_AT_discr = 0x15,
|
||||
DW_AT_discr_value = 0x16,
|
||||
DW_AT_visibility = 0x17,
|
||||
DW_AT_import = 0x18,
|
||||
DW_AT_string_length = 0x19,
|
||||
DW_AT_common_reference = 0x1a,
|
||||
DW_AT_comp_dir = 0x1b,
|
||||
DW_AT_const_value = 0x1c,
|
||||
DW_AT_containing_type = 0x1d,
|
||||
DW_AT_default_value = 0x1e,
|
||||
DW_AT_inline = 0x20,
|
||||
DW_AT_is_optional = 0x21,
|
||||
DW_AT_lower_bound = 0x22,
|
||||
DW_AT_producer = 0x25,
|
||||
DW_AT_prototyped = 0x27,
|
||||
DW_AT_return_addr = 0x2a,
|
||||
DW_AT_start_scope = 0x2c,
|
||||
DW_AT_stride_size = 0x2e,
|
||||
DW_AT_upper_bound = 0x2f,
|
||||
DW_AT_abstract_origin = 0x31,
|
||||
DW_AT_accessibility = 0x32,
|
||||
DW_AT_address_class = 0x33,
|
||||
DW_AT_artificial = 0x34,
|
||||
DW_AT_base_types = 0x35,
|
||||
DW_AT_calling_convention = 0x36,
|
||||
DW_AT_count = 0x37,
|
||||
DW_AT_data_member_location = 0x38,
|
||||
DW_AT_decl_column = 0x39,
|
||||
DW_AT_decl_file = 0x3a,
|
||||
DW_AT_decl_line = 0x3b,
|
||||
DW_AT_declaration = 0x3c,
|
||||
DW_AT_discr_list = 0x3d,
|
||||
DW_AT_encoding = 0x3e,
|
||||
DW_AT_external = 0x3f,
|
||||
DW_AT_frame_base = 0x40,
|
||||
DW_AT_friend = 0x41,
|
||||
DW_AT_identifier_case = 0x42,
|
||||
DW_AT_macro_info = 0x43,
|
||||
DW_AT_namelist_items = 0x44,
|
||||
DW_AT_priority = 0x45,
|
||||
DW_AT_segment = 0x46,
|
||||
DW_AT_specification = 0x47,
|
||||
DW_AT_static_link = 0x48,
|
||||
DW_AT_type = 0x49,
|
||||
DW_AT_use_location = 0x4a,
|
||||
DW_AT_variable_parameter = 0x4b,
|
||||
DW_AT_virtuality = 0x4c,
|
||||
DW_AT_vtable_elem_location = 0x4d,
|
||||
/* SGI/MIPS Extensions */
|
||||
DW_AT_MIPS_fde = 0x2001,
|
||||
DW_AT_MIPS_loop_begin = 0x2002,
|
||||
DW_AT_MIPS_tail_loop_begin = 0x2003,
|
||||
DW_AT_MIPS_epilog_begin = 0x2004,
|
||||
DW_AT_MIPS_loop_unroll_factor = 0x2005,
|
||||
DW_AT_MIPS_software_pipeline_depth = 0x2006,
|
||||
DW_AT_MIPS_linkage_name = 0x2007,
|
||||
DW_AT_MIPS_stride = 0x2008,
|
||||
DW_AT_MIPS_abstract_name = 0x2009,
|
||||
DW_AT_MIPS_clone_origin = 0x200a,
|
||||
DW_AT_MIPS_has_inlines = 0x200b,
|
||||
/* GNU extensions. */
|
||||
DW_AT_sf_names = 0x2101,
|
||||
DW_AT_src_info = 0x2102,
|
||||
DW_AT_mac_info = 0x2103,
|
||||
DW_AT_src_coords = 0x2104,
|
||||
DW_AT_body_begin = 0x2105,
|
||||
DW_AT_body_end = 0x2106
|
||||
};
|
||||
|
||||
#define DW_AT_lo_user 0x2000 /* implementation-defined range start */
|
||||
#define DW_AT_hi_user 0x3ff0 /* implementation-defined range end */
|
||||
|
||||
/* Location atom names and codes. */
|
||||
|
||||
enum dwarf_location_atom
|
||||
{
|
||||
DW_OP_addr = 0x03,
|
||||
DW_OP_deref = 0x06,
|
||||
DW_OP_const1u = 0x08,
|
||||
DW_OP_const1s = 0x09,
|
||||
DW_OP_const2u = 0x0a,
|
||||
DW_OP_const2s = 0x0b,
|
||||
DW_OP_const4u = 0x0c,
|
||||
DW_OP_const4s = 0x0d,
|
||||
DW_OP_const8u = 0x0e,
|
||||
DW_OP_const8s = 0x0f,
|
||||
DW_OP_constu = 0x10,
|
||||
DW_OP_consts = 0x11,
|
||||
DW_OP_dup = 0x12,
|
||||
DW_OP_drop = 0x13,
|
||||
DW_OP_over = 0x14,
|
||||
DW_OP_pick = 0x15,
|
||||
DW_OP_swap = 0x16,
|
||||
DW_OP_rot = 0x17,
|
||||
DW_OP_xderef = 0x18,
|
||||
DW_OP_abs = 0x19,
|
||||
DW_OP_and = 0x1a,
|
||||
DW_OP_div = 0x1b,
|
||||
DW_OP_minus = 0x1c,
|
||||
DW_OP_mod = 0x1d,
|
||||
DW_OP_mul = 0x1e,
|
||||
DW_OP_neg = 0x1f,
|
||||
DW_OP_not = 0x20,
|
||||
DW_OP_or = 0x21,
|
||||
DW_OP_plus = 0x22,
|
||||
DW_OP_plus_uconst = 0x23,
|
||||
DW_OP_shl = 0x24,
|
||||
DW_OP_shr = 0x25,
|
||||
DW_OP_shra = 0x26,
|
||||
DW_OP_xor = 0x27,
|
||||
DW_OP_bra = 0x28,
|
||||
DW_OP_eq = 0x29,
|
||||
DW_OP_ge = 0x2a,
|
||||
DW_OP_gt = 0x2b,
|
||||
DW_OP_le = 0x2c,
|
||||
DW_OP_lt = 0x2d,
|
||||
DW_OP_ne = 0x2e,
|
||||
DW_OP_skip = 0x2f,
|
||||
DW_OP_lit0 = 0x30,
|
||||
DW_OP_lit1 = 0x31,
|
||||
DW_OP_lit2 = 0x32,
|
||||
DW_OP_lit3 = 0x33,
|
||||
DW_OP_lit4 = 0x34,
|
||||
DW_OP_lit5 = 0x35,
|
||||
DW_OP_lit6 = 0x36,
|
||||
DW_OP_lit7 = 0x37,
|
||||
DW_OP_lit8 = 0x38,
|
||||
DW_OP_lit9 = 0x39,
|
||||
DW_OP_lit10 = 0x3a,
|
||||
DW_OP_lit11 = 0x3b,
|
||||
DW_OP_lit12 = 0x3c,
|
||||
DW_OP_lit13 = 0x3d,
|
||||
DW_OP_lit14 = 0x3e,
|
||||
DW_OP_lit15 = 0x3f,
|
||||
DW_OP_lit16 = 0x40,
|
||||
DW_OP_lit17 = 0x41,
|
||||
DW_OP_lit18 = 0x42,
|
||||
DW_OP_lit19 = 0x43,
|
||||
DW_OP_lit20 = 0x44,
|
||||
DW_OP_lit21 = 0x45,
|
||||
DW_OP_lit22 = 0x46,
|
||||
DW_OP_lit23 = 0x47,
|
||||
DW_OP_lit24 = 0x48,
|
||||
DW_OP_lit25 = 0x49,
|
||||
DW_OP_lit26 = 0x4a,
|
||||
DW_OP_lit27 = 0x4b,
|
||||
DW_OP_lit28 = 0x4c,
|
||||
DW_OP_lit29 = 0x4d,
|
||||
DW_OP_lit30 = 0x4e,
|
||||
DW_OP_lit31 = 0x4f,
|
||||
DW_OP_reg0 = 0x50,
|
||||
DW_OP_reg1 = 0x51,
|
||||
DW_OP_reg2 = 0x52,
|
||||
DW_OP_reg3 = 0x53,
|
||||
DW_OP_reg4 = 0x54,
|
||||
DW_OP_reg5 = 0x55,
|
||||
DW_OP_reg6 = 0x56,
|
||||
DW_OP_reg7 = 0x57,
|
||||
DW_OP_reg8 = 0x58,
|
||||
DW_OP_reg9 = 0x59,
|
||||
DW_OP_reg10 = 0x5a,
|
||||
DW_OP_reg11 = 0x5b,
|
||||
DW_OP_reg12 = 0x5c,
|
||||
DW_OP_reg13 = 0x5d,
|
||||
DW_OP_reg14 = 0x5e,
|
||||
DW_OP_reg15 = 0x5f,
|
||||
DW_OP_reg16 = 0x60,
|
||||
DW_OP_reg17 = 0x61,
|
||||
DW_OP_reg18 = 0x62,
|
||||
DW_OP_reg19 = 0x63,
|
||||
DW_OP_reg20 = 0x64,
|
||||
DW_OP_reg21 = 0x65,
|
||||
DW_OP_reg22 = 0x66,
|
||||
DW_OP_reg23 = 0x67,
|
||||
DW_OP_reg24 = 0x68,
|
||||
DW_OP_reg25 = 0x69,
|
||||
DW_OP_reg26 = 0x6a,
|
||||
DW_OP_reg27 = 0x6b,
|
||||
DW_OP_reg28 = 0x6c,
|
||||
DW_OP_reg29 = 0x6d,
|
||||
DW_OP_reg30 = 0x6e,
|
||||
DW_OP_reg31 = 0x6f,
|
||||
DW_OP_breg0 = 0x70,
|
||||
DW_OP_breg1 = 0x71,
|
||||
DW_OP_breg2 = 0x72,
|
||||
DW_OP_breg3 = 0x73,
|
||||
DW_OP_breg4 = 0x74,
|
||||
DW_OP_breg5 = 0x75,
|
||||
DW_OP_breg6 = 0x76,
|
||||
DW_OP_breg7 = 0x77,
|
||||
DW_OP_breg8 = 0x78,
|
||||
DW_OP_breg9 = 0x79,
|
||||
DW_OP_breg10 = 0x7a,
|
||||
DW_OP_breg11 = 0x7b,
|
||||
DW_OP_breg12 = 0x7c,
|
||||
DW_OP_breg13 = 0x7d,
|
||||
DW_OP_breg14 = 0x7e,
|
||||
DW_OP_breg15 = 0x7f,
|
||||
DW_OP_breg16 = 0x80,
|
||||
DW_OP_breg17 = 0x81,
|
||||
DW_OP_breg18 = 0x82,
|
||||
DW_OP_breg19 = 0x83,
|
||||
DW_OP_breg20 = 0x84,
|
||||
DW_OP_breg21 = 0x85,
|
||||
DW_OP_breg22 = 0x86,
|
||||
DW_OP_breg23 = 0x87,
|
||||
DW_OP_breg24 = 0x88,
|
||||
DW_OP_breg25 = 0x89,
|
||||
DW_OP_breg26 = 0x8a,
|
||||
DW_OP_breg27 = 0x8b,
|
||||
DW_OP_breg28 = 0x8c,
|
||||
DW_OP_breg29 = 0x8d,
|
||||
DW_OP_breg30 = 0x8e,
|
||||
DW_OP_breg31 = 0x8f,
|
||||
DW_OP_regx = 0x90,
|
||||
DW_OP_fbreg = 0x91,
|
||||
DW_OP_bregx = 0x92,
|
||||
DW_OP_piece = 0x93,
|
||||
DW_OP_deref_size = 0x94,
|
||||
DW_OP_xderef_size = 0x95,
|
||||
DW_OP_nop = 0x96
|
||||
};
|
||||
|
||||
#define DW_OP_lo_user 0x80 /* implementation-defined range start */
|
||||
#define DW_OP_hi_user 0xff /* implementation-defined range end */
|
||||
|
||||
/* Type encodings. */
|
||||
|
||||
enum dwarf_type
|
||||
{
|
||||
DW_ATE_void = 0x0,
|
||||
DW_ATE_address = 0x1,
|
||||
DW_ATE_boolean = 0x2,
|
||||
DW_ATE_complex_float = 0x3,
|
||||
DW_ATE_float = 0x4,
|
||||
DW_ATE_signed = 0x5,
|
||||
DW_ATE_signed_char = 0x6,
|
||||
DW_ATE_unsigned = 0x7,
|
||||
DW_ATE_unsigned_char = 0x8
|
||||
};
|
||||
|
||||
#define DW_ATE_lo_user 0x80
|
||||
#define DW_ATE_hi_user 0xff
|
||||
|
||||
/* Array ordering names and codes. */
|
||||
enum dwarf_array_dim_ordering
|
||||
{
|
||||
DW_ORD_row_major = 0,
|
||||
DW_ORD_col_major = 1
|
||||
};
|
||||
|
||||
/* access attribute */
|
||||
enum dwarf_access_attribute
|
||||
{
|
||||
DW_ACCESS_public = 1,
|
||||
DW_ACCESS_protected = 2,
|
||||
DW_ACCESS_private = 3
|
||||
};
|
||||
|
||||
/* visibility */
|
||||
enum dwarf_visibility_attribute
|
||||
{
|
||||
DW_VIS_local = 1,
|
||||
DW_VIS_exported = 2,
|
||||
DW_VIS_qualified = 3
|
||||
};
|
||||
|
||||
/* virtuality */
|
||||
enum dwarf_virtuality_attribute
|
||||
{
|
||||
DW_VIRTUALITY_none = 0,
|
||||
DW_VIRTUALITY_virtual = 1,
|
||||
DW_VIRTUALITY_pure_virtual = 2
|
||||
};
|
||||
|
||||
/* case sensitivity */
|
||||
enum dwarf_id_case
|
||||
{
|
||||
DW_ID_case_sensitive = 0,
|
||||
DW_ID_up_case = 1,
|
||||
DW_ID_down_case = 2,
|
||||
DW_ID_case_insensitive = 3
|
||||
};
|
||||
|
||||
/* calling convention */
|
||||
enum dwarf_calling_convention
|
||||
{
|
||||
DW_CC_normal = 0x1,
|
||||
DW_CC_program = 0x2,
|
||||
DW_CC_nocall = 0x3
|
||||
};
|
||||
|
||||
#define DW_CC_lo_user 0x40
|
||||
#define DW_CC_hi_user 0xff
|
||||
|
||||
/* inline attribute */
|
||||
enum dwarf_inline_attribute
|
||||
{
|
||||
DW_INL_not_inlined = 0,
|
||||
DW_INL_inlined = 1,
|
||||
DW_INL_declared_not_inlined = 2,
|
||||
DW_INL_declared_inlined = 3
|
||||
};
|
||||
|
||||
/* descriminant lists */
|
||||
enum dwarf_descrim_list
|
||||
{
|
||||
DW_DSC_label = 0,
|
||||
DW_DSC_range = 1
|
||||
};
|
||||
|
||||
/* line number opcodes */
|
||||
enum dwarf_line_number_ops
|
||||
{
|
||||
DW_LNS_extended_op = 0,
|
||||
DW_LNS_copy = 1,
|
||||
DW_LNS_advance_pc = 2,
|
||||
DW_LNS_advance_line = 3,
|
||||
DW_LNS_set_file = 4,
|
||||
DW_LNS_set_column = 5,
|
||||
DW_LNS_negate_stmt = 6,
|
||||
DW_LNS_set_basic_block = 7,
|
||||
DW_LNS_const_add_pc = 8,
|
||||
DW_LNS_fixed_advance_pc = 9
|
||||
};
|
||||
|
||||
/* line number extended opcodes */
|
||||
enum dwarf_line_number_x_ops
|
||||
{
|
||||
DW_LNE_end_sequence = 1,
|
||||
DW_LNE_set_address = 2,
|
||||
DW_LNE_define_file = 3
|
||||
};
|
||||
|
||||
/* call frame information */
|
||||
enum dwarf_call_frame_info
|
||||
{
|
||||
DW_CFA_advance_loc = 0x40,
|
||||
DW_CFA_offset = 0x80,
|
||||
DW_CFA_restore = 0xc0,
|
||||
DW_CFA_nop = 0x00,
|
||||
DW_CFA_set_loc = 0x01,
|
||||
DW_CFA_advance_loc1 = 0x02,
|
||||
DW_CFA_advance_loc2 = 0x03,
|
||||
DW_CFA_advance_loc4 = 0x04,
|
||||
DW_CFA_offset_extended = 0x05,
|
||||
DW_CFA_restore_extended = 0x06,
|
||||
DW_CFA_undefined = 0x07,
|
||||
DW_CFA_same_value = 0x08,
|
||||
DW_CFA_register = 0x09,
|
||||
DW_CFA_remember_state = 0x0a,
|
||||
DW_CFA_restore_state = 0x0b,
|
||||
DW_CFA_def_cfa = 0x0c,
|
||||
DW_CFA_def_cfa_register = 0x0d,
|
||||
DW_CFA_def_cfa_offset = 0x0e,
|
||||
/* SGI/MIPS specific */
|
||||
DW_CFA_MIPS_advance_loc8 = 0x1d
|
||||
};
|
||||
|
||||
#define DW_CIE_ID 0xffffffff
|
||||
#define DW_CIE_VERSION 1
|
||||
|
||||
#define DW_CFA_extended 0
|
||||
#define DW_CFA_low_user 0x1c
|
||||
#define DW_CFA_high_user 0x3f
|
||||
|
||||
#define DW_CHILDREN_no 0x00
|
||||
#define DW_CHILDREN_yes 0x01
|
||||
|
||||
#define DW_ADDR_none 0
|
||||
|
||||
/* Source language names and codes. */
|
||||
|
||||
enum dwarf_source_language
|
||||
{
|
||||
DW_LANG_C89 = 0x0001,
|
||||
DW_LANG_C = 0x0002,
|
||||
DW_LANG_Ada83 = 0x0003,
|
||||
DW_LANG_C_plus_plus = 0x0004,
|
||||
DW_LANG_Cobol74 = 0x0005,
|
||||
DW_LANG_Cobol85 = 0x0006,
|
||||
DW_LANG_Fortran77 = 0x0007,
|
||||
DW_LANG_Fortran90 = 0x0008,
|
||||
DW_LANG_Pascal83 = 0x0009,
|
||||
DW_LANG_Modula2 = 0x000a,
|
||||
DW_LANG_Mips_Assembler = 0x8001
|
||||
};
|
||||
|
||||
|
||||
#define DW_LANG_lo_user 0x8000 /* implementation-defined range start */
|
||||
#define DW_LANG_hi_user 0xffff /* implementation-defined range start */
|
||||
|
||||
/* Names and codes for macro information. */
|
||||
|
||||
enum dwarf_macinfo_record_type
|
||||
{
|
||||
DW_MACINFO_define = 1,
|
||||
DW_MACINFO_undef = 2,
|
||||
DW_MACINFO_start_file = 3,
|
||||
DW_MACINFO_end_file = 4,
|
||||
DW_MACINFO_vendor_ext = 255
|
||||
};
|
||||
|
||||
#endif /* _ELF_DWARF2_H */
|
||||
|
|
@ -1,252 +0,0 @@
|
|||
/* ELF support for BFD.
|
||||
Copyright (C) 1991, 92, 93, 95, 97, 1998 Free Software Foundation, Inc.
|
||||
|
||||
Written by Fred Fish @ Cygnus Support, from information published
|
||||
in "UNIX System V Release 4, Programmers Guide: ANSI C and
|
||||
Programming Support Tools".
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* This file is part of ELF support for BFD, and contains the portions
|
||||
that describe how ELF is represented externally by the BFD library.
|
||||
I.E. it describes the in-file representation of ELF. It requires
|
||||
the elf-common.h file which contains the portions that are common to
|
||||
both the internal and external representations. */
|
||||
|
||||
/* The 64-bit stuff is kind of random. Perhaps someone will publish a
|
||||
spec someday. */
|
||||
|
||||
#ifndef _ELF_EXTERNAL_H
|
||||
#define _ELF_EXTERNAL_H
|
||||
|
||||
/* ELF Header (32-bit implementations) */
|
||||
|
||||
typedef struct {
|
||||
unsigned char e_ident[16]; /* ELF "magic number" */
|
||||
unsigned char e_type[2]; /* Identifies object file type */
|
||||
unsigned char e_machine[2]; /* Specifies required architecture */
|
||||
unsigned char e_version[4]; /* Identifies object file version */
|
||||
unsigned char e_entry[4]; /* Entry point virtual address */
|
||||
unsigned char e_phoff[4]; /* Program header table file offset */
|
||||
unsigned char e_shoff[4]; /* Section header table file offset */
|
||||
unsigned char e_flags[4]; /* Processor-specific flags */
|
||||
unsigned char e_ehsize[2]; /* ELF header size in bytes */
|
||||
unsigned char e_phentsize[2]; /* Program header table entry size */
|
||||
unsigned char e_phnum[2]; /* Program header table entry count */
|
||||
unsigned char e_shentsize[2]; /* Section header table entry size */
|
||||
unsigned char e_shnum[2]; /* Section header table entry count */
|
||||
unsigned char e_shstrndx[2]; /* Section header string table index */
|
||||
} Elf32_External_Ehdr;
|
||||
|
||||
typedef struct {
|
||||
unsigned char e_ident[16]; /* ELF "magic number" */
|
||||
unsigned char e_type[2]; /* Identifies object file type */
|
||||
unsigned char e_machine[2]; /* Specifies required architecture */
|
||||
unsigned char e_version[4]; /* Identifies object file version */
|
||||
unsigned char e_entry[8]; /* Entry point virtual address */
|
||||
unsigned char e_phoff[8]; /* Program header table file offset */
|
||||
unsigned char e_shoff[8]; /* Section header table file offset */
|
||||
unsigned char e_flags[4]; /* Processor-specific flags */
|
||||
unsigned char e_ehsize[2]; /* ELF header size in bytes */
|
||||
unsigned char e_phentsize[2]; /* Program header table entry size */
|
||||
unsigned char e_phnum[2]; /* Program header table entry count */
|
||||
unsigned char e_shentsize[2]; /* Section header table entry size */
|
||||
unsigned char e_shnum[2]; /* Section header table entry count */
|
||||
unsigned char e_shstrndx[2]; /* Section header string table index */
|
||||
} Elf64_External_Ehdr;
|
||||
|
||||
/* Program header */
|
||||
|
||||
typedef struct {
|
||||
unsigned char p_type[4]; /* Identifies program segment type */
|
||||
unsigned char p_offset[4]; /* Segment file offset */
|
||||
unsigned char p_vaddr[4]; /* Segment virtual address */
|
||||
unsigned char p_paddr[4]; /* Segment physical address */
|
||||
unsigned char p_filesz[4]; /* Segment size in file */
|
||||
unsigned char p_memsz[4]; /* Segment size in memory */
|
||||
unsigned char p_flags[4]; /* Segment flags */
|
||||
unsigned char p_align[4]; /* Segment alignment, file & memory */
|
||||
} Elf32_External_Phdr;
|
||||
|
||||
typedef struct {
|
||||
unsigned char p_type[4]; /* Identifies program segment type */
|
||||
unsigned char p_flags[4]; /* Segment flags */
|
||||
unsigned char p_offset[8]; /* Segment file offset */
|
||||
unsigned char p_vaddr[8]; /* Segment virtual address */
|
||||
unsigned char p_paddr[8]; /* Segment physical address */
|
||||
unsigned char p_filesz[8]; /* Segment size in file */
|
||||
unsigned char p_memsz[8]; /* Segment size in memory */
|
||||
unsigned char p_align[8]; /* Segment alignment, file & memory */
|
||||
} Elf64_External_Phdr;
|
||||
|
||||
/* Section header */
|
||||
|
||||
typedef struct {
|
||||
unsigned char sh_name[4]; /* Section name, index in string tbl */
|
||||
unsigned char sh_type[4]; /* Type of section */
|
||||
unsigned char sh_flags[4]; /* Miscellaneous section attributes */
|
||||
unsigned char sh_addr[4]; /* Section virtual addr at execution */
|
||||
unsigned char sh_offset[4]; /* Section file offset */
|
||||
unsigned char sh_size[4]; /* Size of section in bytes */
|
||||
unsigned char sh_link[4]; /* Index of another section */
|
||||
unsigned char sh_info[4]; /* Additional section information */
|
||||
unsigned char sh_addralign[4]; /* Section alignment */
|
||||
unsigned char sh_entsize[4]; /* Entry size if section holds table */
|
||||
} Elf32_External_Shdr;
|
||||
|
||||
typedef struct {
|
||||
unsigned char sh_name[4]; /* Section name, index in string tbl */
|
||||
unsigned char sh_type[4]; /* Type of section */
|
||||
unsigned char sh_flags[8]; /* Miscellaneous section attributes */
|
||||
unsigned char sh_addr[8]; /* Section virtual addr at execution */
|
||||
unsigned char sh_offset[8]; /* Section file offset */
|
||||
unsigned char sh_size[8]; /* Size of section in bytes */
|
||||
unsigned char sh_link[4]; /* Index of another section */
|
||||
unsigned char sh_info[4]; /* Additional section information */
|
||||
unsigned char sh_addralign[8]; /* Section alignment */
|
||||
unsigned char sh_entsize[8]; /* Entry size if section holds table */
|
||||
} Elf64_External_Shdr;
|
||||
|
||||
/* Symbol table entry */
|
||||
|
||||
typedef struct {
|
||||
unsigned char st_name[4]; /* Symbol name, index in string tbl */
|
||||
unsigned char st_value[4]; /* Value of the symbol */
|
||||
unsigned char st_size[4]; /* Associated symbol size */
|
||||
unsigned char st_info[1]; /* Type and binding attributes */
|
||||
unsigned char st_other[1]; /* No defined meaning, 0 */
|
||||
unsigned char st_shndx[2]; /* Associated section index */
|
||||
} Elf32_External_Sym;
|
||||
|
||||
typedef struct {
|
||||
unsigned char st_name[4]; /* Symbol name, index in string tbl */
|
||||
unsigned char st_info[1]; /* Type and binding attributes */
|
||||
unsigned char st_other[1]; /* No defined meaning, 0 */
|
||||
unsigned char st_shndx[2]; /* Associated section index */
|
||||
unsigned char st_value[8]; /* Value of the symbol */
|
||||
unsigned char st_size[8]; /* Associated symbol size */
|
||||
} Elf64_External_Sym;
|
||||
|
||||
/* Note segments */
|
||||
|
||||
typedef struct {
|
||||
unsigned char namesz[4]; /* Size of entry's owner string */
|
||||
unsigned char descsz[4]; /* Size of the note descriptor */
|
||||
unsigned char type[4]; /* Interpretation of the descriptor */
|
||||
char name[1]; /* Start of the name+desc data */
|
||||
} Elf_External_Note;
|
||||
|
||||
/* Relocation Entries */
|
||||
typedef struct {
|
||||
unsigned char r_offset[4]; /* Location at which to apply the action */
|
||||
unsigned char r_info[4]; /* index and type of relocation */
|
||||
} Elf32_External_Rel;
|
||||
|
||||
typedef struct {
|
||||
unsigned char r_offset[4]; /* Location at which to apply the action */
|
||||
unsigned char r_info[4]; /* index and type of relocation */
|
||||
unsigned char r_addend[4]; /* Constant addend used to compute value */
|
||||
} Elf32_External_Rela;
|
||||
|
||||
typedef struct {
|
||||
unsigned char r_offset[8]; /* Location at which to apply the action */
|
||||
unsigned char r_info[8]; /* index and type of relocation */
|
||||
} Elf64_External_Rel;
|
||||
|
||||
typedef struct {
|
||||
unsigned char r_offset[8]; /* Location at which to apply the action */
|
||||
unsigned char r_info[8]; /* index and type of relocation */
|
||||
unsigned char r_addend[8]; /* Constant addend used to compute value */
|
||||
} Elf64_External_Rela;
|
||||
|
||||
/* dynamic section structure */
|
||||
|
||||
typedef struct {
|
||||
unsigned char d_tag[4]; /* entry tag value */
|
||||
union {
|
||||
unsigned char d_val[4];
|
||||
unsigned char d_ptr[4];
|
||||
} d_un;
|
||||
} Elf32_External_Dyn;
|
||||
|
||||
typedef struct {
|
||||
unsigned char d_tag[8]; /* entry tag value */
|
||||
union {
|
||||
unsigned char d_val[8];
|
||||
unsigned char d_ptr[8];
|
||||
} d_un;
|
||||
} Elf64_External_Dyn;
|
||||
|
||||
/* The version structures are currently size independent. They are
|
||||
named without a 32 or 64. If that ever changes, these structures
|
||||
will need to be renamed. */
|
||||
|
||||
/* This structure appears in a SHT_GNU_verdef section. */
|
||||
|
||||
typedef struct {
|
||||
unsigned char vd_version[2];
|
||||
unsigned char vd_flags[2];
|
||||
unsigned char vd_ndx[2];
|
||||
unsigned char vd_cnt[2];
|
||||
unsigned char vd_hash[4];
|
||||
unsigned char vd_aux[4];
|
||||
unsigned char vd_next[4];
|
||||
} Elf_External_Verdef;
|
||||
|
||||
/* This structure appears in a SHT_GNU_verdef section. */
|
||||
|
||||
typedef struct {
|
||||
unsigned char vda_name[4];
|
||||
unsigned char vda_next[4];
|
||||
} Elf_External_Verdaux;
|
||||
|
||||
/* This structure appears in a SHT_GNU_verneed section. */
|
||||
|
||||
typedef struct {
|
||||
unsigned char vn_version[2];
|
||||
unsigned char vn_cnt[2];
|
||||
unsigned char vn_file[4];
|
||||
unsigned char vn_aux[4];
|
||||
unsigned char vn_next[4];
|
||||
} Elf_External_Verneed;
|
||||
|
||||
/* This structure appears in a SHT_GNU_verneed section. */
|
||||
|
||||
typedef struct {
|
||||
unsigned char vna_hash[4];
|
||||
unsigned char vna_flags[2];
|
||||
unsigned char vna_other[2];
|
||||
unsigned char vna_name[4];
|
||||
unsigned char vna_next[4];
|
||||
} Elf_External_Vernaux;
|
||||
|
||||
/* This structure appears in a SHT_GNU_versym section. This is not a
|
||||
standard ELF structure; ELF just uses Elf32_Half. */
|
||||
|
||||
typedef struct {
|
||||
unsigned char vs_vers[2];
|
||||
} Elf_External_Versym;
|
||||
|
||||
/* Structure for syminfo section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char si_boundto[2];
|
||||
unsigned char si_flags[2];
|
||||
} Elf_External_Syminfo;
|
||||
|
||||
#endif /* _ELF_EXTERNAL_H */
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
/* FR30 ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_FR30_H
|
||||
#define _ELF_FR30_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_fr30_reloc_type)
|
||||
RELOC_NUMBER (R_FR30_NONE, 0)
|
||||
RELOC_NUMBER (R_FR30_8, 1)
|
||||
RELOC_NUMBER (R_FR30_20, 2)
|
||||
RELOC_NUMBER (R_FR30_32, 3)
|
||||
RELOC_NUMBER (R_FR30_48, 4)
|
||||
RELOC_NUMBER (R_FR30_6_IN_4, 5)
|
||||
RELOC_NUMBER (R_FR30_8_IN_8, 6)
|
||||
RELOC_NUMBER (R_FR30_9_IN_8, 7)
|
||||
RELOC_NUMBER (R_FR30_10_IN_8, 8)
|
||||
RELOC_NUMBER (R_FR30_9_PCREL, 9)
|
||||
RELOC_NUMBER (R_FR30_12_PCREL, 10)
|
||||
RELOC_NUMBER (R_FR30_GNU_VTINHERIT, 11)
|
||||
RELOC_NUMBER (R_FR30_GNU_VTENTRY, 12)
|
||||
EMPTY_RELOC (R_FR30_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif /* _ELF_FR30_H */
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
/* HPPA ELF support for BFD.
|
||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the HPPA ELF ABI. Note
|
||||
that most of this is not actually implemented by BFD. */
|
||||
|
||||
#ifndef _ELF_HPPA_H
|
||||
#define _ELF_HPPA_H
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* Target processor IDs to be placed in the low 16 bits of the flags
|
||||
field. Note these names are shared with SOM, and therefore do not
|
||||
follow ELF naming conventions. */
|
||||
|
||||
/* PA 1.0 big endian. */
|
||||
#ifndef CPU_PA_RISC1_0
|
||||
#define CPU_PA_RISC1_0 0x0000020b
|
||||
#endif
|
||||
|
||||
/* PA 1.1 big endian. */
|
||||
#ifndef CPU_PA_RISC1_1
|
||||
#define CPU_PA_RISC1_1 0x00000210
|
||||
#endif
|
||||
|
||||
/* PA 1.0 little endian (unsupported) is 0x0000028b. */
|
||||
/* PA 1.1 little endian (unsupported) is 0x00000290. */
|
||||
|
||||
/* Trap null address dereferences. */
|
||||
#define ELF_PARISC_TRAPNIL 0x00010000
|
||||
|
||||
/* .PARISC.archext section is present. */
|
||||
#define EF_PARISC_EXT 0x00020000
|
||||
|
||||
/* Processor specific section types. */
|
||||
|
||||
/* Holds the global offset table, a table of pointers to external
|
||||
data. */
|
||||
#define SHT_PARISC_GOT SHT_LOPROC+0
|
||||
|
||||
/* Nonloadable section containing information in architecture
|
||||
extensions used by the code. */
|
||||
#define SHT_PARISC_ARCH SHT_LOPROC+1
|
||||
|
||||
/* Section in which $global$ is defined. */
|
||||
#define SHT_PARISC_GLOBAL SHT_LOPROC+2
|
||||
|
||||
/* Section holding millicode routines (mul, div, rem, dyncall, etc. */
|
||||
#define SHT_PARISC_MILLI SHT_LOPROC+3
|
||||
|
||||
/* Section holding unwind information for use by debuggers. */
|
||||
#define SHT_PARISC_UNWIND SHT_LOPROC+4
|
||||
|
||||
/* Section holding the procedure linkage table. */
|
||||
#define SHT_PARISC_PLT SHT_LOPROC+5
|
||||
|
||||
/* Short initialized and uninitialized data. */
|
||||
#define SHT_PARISC_SDATA SHT_LOPROC+6
|
||||
#define SHT_PARISC_SBSS SHT_LOPROC+7
|
||||
|
||||
/* Optional section holding argument location/relocation info. */
|
||||
#define SHT_PARISC_SYMEXTN SHT_LOPROC+8
|
||||
|
||||
/* Option section for linker stubs. */
|
||||
#define SHT_PARISC_STUBS SHT_LOPROC+9
|
||||
|
||||
/* Processor specific section flags. */
|
||||
|
||||
/* This section is near the global data pointer and thus allows short
|
||||
addressing modes to be used. */
|
||||
#define SHF_PARISC_SHORT 0x20000000
|
||||
|
||||
/* Processor specific symbol types. */
|
||||
|
||||
/* Millicode function entry point. */
|
||||
#define STT_PARISC_MILLICODE STT_LOPROC+0
|
||||
|
||||
|
||||
/* ELF/HPPA relocation types */
|
||||
|
||||
#include "reloc-macros.h"
|
||||
|
||||
START_RELOC_NUMBERS (elf32_hppa_reloc_type)
|
||||
RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */
|
||||
|
||||
/* These relocation types do simple base + offset relocations. */
|
||||
|
||||
RELOC_NUMBER (R_PARISC_DIR32, 0x01)
|
||||
RELOC_NUMBER (R_PARISC_DIR21L, 0x02)
|
||||
RELOC_NUMBER (R_PARISC_DIR17R, 0x03)
|
||||
RELOC_NUMBER (R_PARISC_DIR17F, 0x04)
|
||||
RELOC_NUMBER (R_PARISC_DIR14R, 0x06)
|
||||
|
||||
/* PC-relative relocation types
|
||||
Typically used for calls.
|
||||
Note PCREL17C and PCREL17F differ only in overflow handling.
|
||||
PCREL17C never reports a relocation error.
|
||||
|
||||
When supporting argument relocations, function calls must be
|
||||
accompanied by parameter relocation information. This information is
|
||||
carried in the ten high-order bits of the addend field. The remaining
|
||||
22 bits of of the addend field are sign-extended to form the Addend.
|
||||
|
||||
Note the code to build argument relocations depends on the
|
||||
addend being zero. A consequence of this limitation is GAS
|
||||
can not perform relocation reductions for function symbols. */
|
||||
|
||||
RELOC_NUMBER (R_PARISC_PCREL21L, 0x0a)
|
||||
RELOC_NUMBER (R_PARISC_PCREL17R, 0x0b)
|
||||
RELOC_NUMBER (R_PARISC_PCREL17F, 0x0c)
|
||||
RELOC_NUMBER (R_PARISC_PCREL17C, 0x0d)
|
||||
RELOC_NUMBER (R_PARISC_PCREL14R, 0x0e)
|
||||
RELOC_NUMBER (R_PARISC_PCREL14F, 0x0f)
|
||||
|
||||
/* DP-relative relocation types. */
|
||||
RELOC_NUMBER (R_PARISC_DPREL21L, 0x12)
|
||||
RELOC_NUMBER (R_PARISC_DPREL14R, 0x16)
|
||||
RELOC_NUMBER (R_PARISC_DPREL14F, 0x17)
|
||||
|
||||
/* Data linkage table (DLT) relocation types
|
||||
|
||||
SOM DLT_REL fixup requests are used to for static data references
|
||||
from position-independent code within shared libraries. They are
|
||||
similar to the GOT relocation types in some SVR4 implementations. */
|
||||
|
||||
RELOC_NUMBER (R_PARISC_DLTREL21L, 0x1a)
|
||||
RELOC_NUMBER (R_PARISC_DLTREL14R, 0x1e)
|
||||
RELOC_NUMBER (R_PARISC_DLTREL14F, 0x1f)
|
||||
|
||||
/* DLT indirect relocation types */
|
||||
RELOC_NUMBER (R_PARISC_DLTIND21L, 0x22)
|
||||
RELOC_NUMBER (R_PARISC_DLTIND14R, 0x26)
|
||||
RELOC_NUMBER (R_PARISC_DLTIND14F, 0x27)
|
||||
|
||||
/* Base relative relocation types. Ugh. These imply lots of state */
|
||||
RELOC_NUMBER (R_PARISC_SETBASE, 0x28)
|
||||
RELOC_NUMBER (R_PARISC_BASEREL32, 0x29)
|
||||
RELOC_NUMBER (R_PARISC_BASEREL21L, 0x2a)
|
||||
RELOC_NUMBER (R_PARISC_BASEREL17R, 0x2b)
|
||||
RELOC_NUMBER (R_PARISC_BASEREL17F, 0x2c)
|
||||
RELOC_NUMBER (R_PARISC_BASEREL14R, 0x2e)
|
||||
RELOC_NUMBER (R_PARISC_BASEREL14F, 0x2f)
|
||||
|
||||
/* Segment relative relocation types. */
|
||||
RELOC_NUMBER (R_PARISC_TEXTREL32, 0x31)
|
||||
RELOC_NUMBER (R_PARISC_DATAREL32, 0x39)
|
||||
|
||||
/* Plabel relocation types. */
|
||||
RELOC_NUMBER (R_PARISC_PLABEL32, 0x41)
|
||||
RELOC_NUMBER (R_PARISC_PLABEL21L, 0x42)
|
||||
RELOC_NUMBER (R_PARISC_PLABEL14R, 0x46)
|
||||
|
||||
/* PLT relocations. */
|
||||
RELOC_NUMBER (R_PARISC_PLTIND21L, 0x82)
|
||||
RELOC_NUMBER (R_PARISC_PLTIND14R, 0x86)
|
||||
RELOC_NUMBER (R_PARISC_PLTIND14F, 0x87)
|
||||
|
||||
/* Misc relocation types. */
|
||||
RELOC_NUMBER (R_PARISC_COPY, 0x88)
|
||||
RELOC_NUMBER (R_PARISC_GLOB_DAT, 0x89)
|
||||
RELOC_NUMBER (R_PARISC_JMP_SLOT, 0x8a)
|
||||
RELOC_NUMBER (R_PARISC_RELATIVE, 0x8b)
|
||||
|
||||
EMPTY_RELOC (R_PARISC_UNIMPLEMENTED)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#ifndef RELOC_MACROS_GEN_FUNC
|
||||
typedef enum elf32_hppa_reloc_type elf32_hppa_reloc_type;
|
||||
#endif
|
||||
|
||||
#endif /* _ELF_HPPA_H */
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/* ix86 ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_I386_H
|
||||
#define _ELF_I386_H
|
||||
|
||||
#include "reloc-macros.h"
|
||||
|
||||
START_RELOC_NUMBERS (elf_i386_reloc_type)
|
||||
RELOC_NUMBER (R_386_NONE, 0) /* No reloc */
|
||||
RELOC_NUMBER (R_386_32, 1) /* Direct 32 bit */
|
||||
RELOC_NUMBER (R_386_PC32, 2) /* PC relative 32 bit */
|
||||
RELOC_NUMBER (R_386_GOT32, 3) /* 32 bit GOT entry */
|
||||
RELOC_NUMBER (R_386_PLT32, 4) /* 32 bit PLT address */
|
||||
RELOC_NUMBER (R_386_COPY, 5) /* Copy symbol at runtime */
|
||||
RELOC_NUMBER (R_386_GLOB_DAT, 6) /* Create GOT entry */
|
||||
RELOC_NUMBER (R_386_JUMP_SLOT, 7) /* Create PLT entry */
|
||||
RELOC_NUMBER (R_386_RELATIVE, 8) /* Adjust by program base */
|
||||
RELOC_NUMBER (R_386_GOTOFF, 9) /* 32 bit offset to GOT */
|
||||
RELOC_NUMBER (R_386_GOTPC, 10) /* 32 bit PC relative offset to GOT */
|
||||
FAKE_RELOC (FIRST_INVALID_RELOC, 11)
|
||||
FAKE_RELOC (LAST_INVALID_RELOC, 19)
|
||||
RELOC_NUMBER (R_386_16, 20)
|
||||
RELOC_NUMBER (R_386_PC16, 21)
|
||||
RELOC_NUMBER (R_386_8, 22)
|
||||
RELOC_NUMBER (R_386_PC8, 23)
|
||||
RELOC_NUMBER (R_386_max, 24)
|
||||
/* These are GNU extensions to enable C++ vtable garbage collection. */
|
||||
RELOC_NUMBER (R_386_GNU_VTINHERIT, 250)
|
||||
RELOC_NUMBER (R_386_GNU_VTENTRY, 251)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,312 +0,0 @@
|
|||
/* ELF support for BFD.
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
|
||||
|
||||
Written by Fred Fish @ Cygnus Support, from information published
|
||||
in "UNIX System V Release 4, Programmers Guide: ANSI C and
|
||||
Programming Support Tools".
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* This file is part of ELF support for BFD, and contains the portions
|
||||
that describe how ELF is represented internally in the BFD library.
|
||||
I.E. it describes the in-memory representation of ELF. It requires
|
||||
the elf-common.h file which contains the portions that are common to
|
||||
both the internal and external representations. */
|
||||
|
||||
|
||||
/* NOTE that these structures are not kept in the same order as they appear
|
||||
in the object file. In some cases they've been reordered for more optimal
|
||||
packing under various circumstances. */
|
||||
|
||||
#ifndef _ELF_INTERNAL_H
|
||||
#define _ELF_INTERNAL_H
|
||||
|
||||
/* ELF Header */
|
||||
|
||||
#define EI_NIDENT 16 /* Size of e_ident[] */
|
||||
|
||||
typedef struct elf_internal_ehdr {
|
||||
unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
|
||||
bfd_vma e_entry; /* Entry point virtual address */
|
||||
bfd_size_type e_phoff; /* Program header table file offset */
|
||||
bfd_size_type e_shoff; /* Section header table file offset */
|
||||
unsigned long e_version; /* Identifies object file version */
|
||||
unsigned long e_flags; /* Processor-specific flags */
|
||||
unsigned short e_type; /* Identifies object file type */
|
||||
unsigned short e_machine; /* Specifies required architecture */
|
||||
unsigned short e_ehsize; /* ELF header size in bytes */
|
||||
unsigned short e_phentsize; /* Program header table entry size */
|
||||
unsigned short e_phnum; /* Program header table entry count */
|
||||
unsigned short e_shentsize; /* Section header table entry size */
|
||||
unsigned short e_shnum; /* Section header table entry count */
|
||||
unsigned short e_shstrndx; /* Section header string table index */
|
||||
} Elf_Internal_Ehdr;
|
||||
|
||||
#define elf32_internal_ehdr elf_internal_ehdr
|
||||
#define Elf32_Internal_Ehdr Elf_Internal_Ehdr
|
||||
#define elf64_internal_ehdr elf_internal_ehdr
|
||||
#define Elf64_Internal_Ehdr Elf_Internal_Ehdr
|
||||
|
||||
/* Program header */
|
||||
|
||||
struct elf_internal_phdr {
|
||||
unsigned long p_type; /* Identifies program segment type */
|
||||
unsigned long p_flags; /* Segment flags */
|
||||
bfd_vma p_offset; /* Segment file offset */
|
||||
bfd_vma p_vaddr; /* Segment virtual address */
|
||||
bfd_vma p_paddr; /* Segment physical address */
|
||||
bfd_vma p_filesz; /* Segment size in file */
|
||||
bfd_vma p_memsz; /* Segment size in memory */
|
||||
bfd_vma p_align; /* Segment alignment, file & memory */
|
||||
};
|
||||
|
||||
typedef struct elf_internal_phdr Elf_Internal_Phdr;
|
||||
#define elf32_internal_phdr elf_internal_phdr
|
||||
#define Elf32_Internal_Phdr Elf_Internal_Phdr
|
||||
#define elf64_internal_phdr elf_internal_phdr
|
||||
#define Elf64_Internal_Phdr Elf_Internal_Phdr
|
||||
|
||||
/* Section header */
|
||||
|
||||
typedef struct elf_internal_shdr {
|
||||
unsigned int sh_name; /* Section name, index in string tbl */
|
||||
unsigned int sh_type; /* Type of section */
|
||||
bfd_vma sh_flags; /* Miscellaneous section attributes */
|
||||
bfd_vma sh_addr; /* Section virtual addr at execution */
|
||||
bfd_size_type sh_size; /* Size of section in bytes */
|
||||
bfd_size_type sh_entsize; /* Entry size if section holds table */
|
||||
unsigned long sh_link; /* Index of another section */
|
||||
unsigned long sh_info; /* Additional section information */
|
||||
file_ptr sh_offset; /* Section file offset */
|
||||
unsigned int sh_addralign; /* Section alignment */
|
||||
|
||||
/* The internal rep also has some cached info associated with it. */
|
||||
asection * bfd_section; /* Associated BFD section. */
|
||||
PTR contents; /* Section contents. */
|
||||
} Elf_Internal_Shdr;
|
||||
|
||||
#define elf32_internal_shdr elf_internal_shdr
|
||||
#define Elf32_Internal_Shdr Elf_Internal_Shdr
|
||||
#define elf64_internal_shdr elf_internal_shdr
|
||||
#define Elf64_Internal_Shdr Elf_Internal_Shdr
|
||||
|
||||
/* Symbol table entry */
|
||||
|
||||
struct elf_internal_sym {
|
||||
bfd_vma st_value; /* Value of the symbol */
|
||||
bfd_vma st_size; /* Associated symbol size */
|
||||
unsigned long st_name; /* Symbol name, index in string tbl */
|
||||
unsigned char st_info; /* Type and binding attributes */
|
||||
unsigned char st_other; /* No defined meaning, 0 */
|
||||
unsigned short st_shndx; /* Associated section index */
|
||||
};
|
||||
|
||||
typedef struct elf_internal_sym Elf_Internal_Sym;
|
||||
|
||||
#define elf32_internal_sym elf_internal_sym
|
||||
#define elf64_internal_sym elf_internal_sym
|
||||
#define Elf32_Internal_Sym Elf_Internal_Sym
|
||||
#define Elf64_Internal_Sym Elf_Internal_Sym
|
||||
|
||||
/* Note segments */
|
||||
|
||||
typedef struct elf_internal_note {
|
||||
unsigned long namesz; /* Size of entry's owner string */
|
||||
unsigned long descsz; /* Size of the note descriptor */
|
||||
unsigned long type; /* Interpretation of the descriptor */
|
||||
char * namedata; /* Start of the name+desc data */
|
||||
char * descdata; /* Start of the desc data */
|
||||
bfd_vma descpos; /* File offset of the descdata */
|
||||
} Elf_Internal_Note;
|
||||
#define Elf32_Internal_Note Elf_Internal_Note
|
||||
#define elf32_internal_note elf_internal_note
|
||||
|
||||
/* Relocation Entries */
|
||||
|
||||
typedef struct elf_internal_rel {
|
||||
bfd_vma r_offset; /* Location at which to apply the action */
|
||||
/* This needs to support 64-bit values in elf64. */
|
||||
bfd_vma r_info; /* index and type of relocation */
|
||||
} Elf_Internal_Rel;
|
||||
|
||||
#define elf32_internal_rel elf_internal_rel
|
||||
#define Elf32_Internal_Rel Elf_Internal_Rel
|
||||
#define elf64_internal_rel elf_internal_rel
|
||||
#define Elf64_Internal_Rel Elf_Internal_Rel
|
||||
|
||||
typedef struct elf_internal_rela {
|
||||
bfd_vma r_offset; /* Location at which to apply the action */
|
||||
bfd_vma r_info; /* Index and Type of relocation */
|
||||
bfd_signed_vma r_addend; /* Constant addend used to compute value */
|
||||
} Elf_Internal_Rela;
|
||||
|
||||
#define elf32_internal_rela elf_internal_rela
|
||||
#define elf64_internal_rela elf_internal_rela
|
||||
#define Elf32_Internal_Rela Elf_Internal_Rela
|
||||
#define Elf64_Internal_Rela Elf_Internal_Rela
|
||||
|
||||
/* dynamic section structure */
|
||||
|
||||
typedef struct elf_internal_dyn {
|
||||
/* This needs to support 64-bit values in elf64. */
|
||||
bfd_vma d_tag; /* entry tag value */
|
||||
union {
|
||||
/* This needs to support 64-bit values in elf64. */
|
||||
bfd_vma d_val;
|
||||
bfd_vma d_ptr;
|
||||
} d_un;
|
||||
} Elf_Internal_Dyn;
|
||||
|
||||
#define elf32_internal_dyn elf_internal_dyn
|
||||
#define elf64_internal_dyn elf_internal_dyn
|
||||
#define Elf32_Internal_Dyn Elf_Internal_Dyn
|
||||
#define Elf64_Internal_Dyn Elf_Internal_Dyn
|
||||
|
||||
/* This structure appears in a SHT_GNU_verdef section. */
|
||||
|
||||
typedef struct elf_internal_verdef {
|
||||
unsigned short vd_version; /* Version number of structure. */
|
||||
unsigned short vd_flags; /* Flags (VER_FLG_*). */
|
||||
unsigned short vd_ndx; /* Version index. */
|
||||
unsigned short vd_cnt; /* Number of verdaux entries. */
|
||||
unsigned long vd_hash; /* Hash of name. */
|
||||
unsigned long vd_aux; /* Offset to verdaux entries. */
|
||||
unsigned long vd_next; /* Offset to next verdef. */
|
||||
|
||||
/* These fields are set up when BFD reads in the structure. FIXME:
|
||||
It would be cleaner to store these in a different structure. */
|
||||
bfd *vd_bfd; /* BFD. */
|
||||
const char *vd_nodename; /* Version name. */
|
||||
struct elf_internal_verdef *vd_nextdef; /* vd_next as pointer. */
|
||||
struct elf_internal_verdaux *vd_auxptr; /* vd_aux as pointer. */
|
||||
unsigned int vd_exp_refno; /* Used by the linker. */
|
||||
} Elf_Internal_Verdef;
|
||||
|
||||
/* This structure appears in a SHT_GNU_verdef section. */
|
||||
|
||||
typedef struct elf_internal_verdaux {
|
||||
unsigned long vda_name; /* String table offset of name. */
|
||||
unsigned long vda_next; /* Offset to next verdaux. */
|
||||
|
||||
/* These fields are set up when BFD reads in the structure. FIXME:
|
||||
It would be cleaner to store these in a different structure. */
|
||||
const char *vda_nodename; /* vda_name as pointer. */
|
||||
struct elf_internal_verdaux *vda_nextptr; /* vda_next as pointer. */
|
||||
} Elf_Internal_Verdaux;
|
||||
|
||||
/* This structure appears in a SHT_GNU_verneed section. */
|
||||
|
||||
typedef struct elf_internal_verneed {
|
||||
unsigned short vn_version; /* Version number of structure. */
|
||||
unsigned short vn_cnt; /* Number of vernaux entries. */
|
||||
unsigned long vn_file; /* String table offset of library name. */
|
||||
unsigned long vn_aux; /* Offset to vernaux entries. */
|
||||
unsigned long vn_next; /* Offset to next verneed. */
|
||||
|
||||
/* These fields are set up when BFD reads in the structure. FIXME:
|
||||
It would be cleaner to store these in a different structure. */
|
||||
bfd *vn_bfd; /* BFD. */
|
||||
const char *vn_filename; /* vn_file as pointer. */
|
||||
struct elf_internal_vernaux *vn_auxptr; /* vn_aux as pointer. */
|
||||
struct elf_internal_verneed *vn_nextref; /* vn_nextref as pointer. */
|
||||
} Elf_Internal_Verneed;
|
||||
|
||||
/* This structure appears in a SHT_GNU_verneed section. */
|
||||
|
||||
typedef struct elf_internal_vernaux {
|
||||
unsigned long vna_hash; /* Hash of dependency name. */
|
||||
unsigned short vna_flags; /* Flags (VER_FLG_*). */
|
||||
unsigned short vna_other; /* Unused. */
|
||||
unsigned long vna_name; /* String table offset to version name. */
|
||||
unsigned long vna_next; /* Offset to next vernaux. */
|
||||
|
||||
/* These fields are set up when BFD reads in the structure. FIXME:
|
||||
It would be cleaner to store these in a different structure. */
|
||||
const char *vna_nodename; /* vna_name as pointer. */
|
||||
struct elf_internal_vernaux *vna_nextptr; /* vna_next as pointer. */
|
||||
} Elf_Internal_Vernaux;
|
||||
|
||||
/* This structure appears in a SHT_GNU_versym section. This is not a
|
||||
standard ELF structure; ELF just uses Elf32_Half. */
|
||||
|
||||
typedef struct elf_internal_versym {
|
||||
unsigned short vs_vers;
|
||||
} Elf_Internal_Versym;
|
||||
|
||||
/* Structure for syminfo section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned short int si_boundto;
|
||||
unsigned short int si_flags;
|
||||
} Elf_Internal_Syminfo;
|
||||
|
||||
|
||||
#define elf32_internal_verdef elf_internal_verdef
|
||||
#define elf64_internal_verdef elf_internal_verdef
|
||||
#define elf32_internal_verdaux elf_internal_verdaux
|
||||
#define elf64_internal_verdaux elf_internal_verdaux
|
||||
#define elf32_internal_verneed elf_internal_verneed
|
||||
#define elf64_internal_verneed elf_internal_verneed
|
||||
#define elf32_internal_vernaux elf_internal_vernaux
|
||||
#define elf64_internal_vernaux elf_internal_vernaux
|
||||
#define elf32_internal_versym elf_internal_versym
|
||||
#define elf64_internal_versym elf_internal_versym
|
||||
|
||||
#define Elf32_Internal_Verdef Elf_Internal_Verdef
|
||||
#define Elf64_Internal_Verdef Elf_Internal_Verdef
|
||||
#define Elf32_Internal_Verdaux Elf_Internal_Verdaux
|
||||
#define Elf64_Internal_Verdaux Elf_Internal_Verdaux
|
||||
#define Elf32_Internal_Verneed Elf_Internal_Verneed
|
||||
#define Elf64_Internal_Verneed Elf_Internal_Verneed
|
||||
#define Elf32_Internal_Vernaux Elf_Internal_Vernaux
|
||||
#define Elf64_Internal_Vernaux Elf_Internal_Vernaux
|
||||
#define Elf32_Internal_Versym Elf_Internal_Versym
|
||||
#define Elf64_Internal_Versym Elf_Internal_Versym
|
||||
#define Elf32_Internal_Syminfo Elf_Internal_Syminfo
|
||||
#define Elf64_Internal_Syminfo Elf_Internal_Syminfo
|
||||
|
||||
/* This structure is used to describe how sections should be assigned
|
||||
to program segments. */
|
||||
|
||||
struct elf_segment_map
|
||||
{
|
||||
/* Next program segment. */
|
||||
struct elf_segment_map *next;
|
||||
/* Program segment type. */
|
||||
unsigned long p_type;
|
||||
/* Program segment flags. */
|
||||
unsigned long p_flags;
|
||||
/* Program segment physical address. */
|
||||
bfd_vma p_paddr;
|
||||
/* Whether the p_flags field is valid; if not, the flags are based
|
||||
on the section flags. */
|
||||
unsigned int p_flags_valid : 1;
|
||||
/* Whether the p_paddr field is valid; if not, the physical address
|
||||
is based on the section lma values. */
|
||||
unsigned int p_paddr_valid : 1;
|
||||
/* Whether this segment includes the file header. */
|
||||
unsigned int includes_filehdr : 1;
|
||||
/* Whether this segment includes the program headers. */
|
||||
unsigned int includes_phdrs : 1;
|
||||
/* Number of sections (may be 0). */
|
||||
unsigned int count;
|
||||
/* Sections. Actual number of elements is in count field. */
|
||||
asection *sections[1];
|
||||
};
|
||||
|
||||
#endif /* _ELF_INTERNAL_H */
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
/* M32R ELF support for BFD.
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_M32R_H
|
||||
#define _ELF_M32R_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_m32r_reloc_type)
|
||||
RELOC_NUMBER (R_M32R_NONE, 0)
|
||||
RELOC_NUMBER (R_M32R_16, 1)
|
||||
RELOC_NUMBER (R_M32R_32, 2)
|
||||
RELOC_NUMBER (R_M32R_24, 3)
|
||||
RELOC_NUMBER (R_M32R_10_PCREL, 4)
|
||||
RELOC_NUMBER (R_M32R_18_PCREL, 5)
|
||||
RELOC_NUMBER (R_M32R_26_PCREL, 6)
|
||||
RELOC_NUMBER (R_M32R_HI16_ULO, 7)
|
||||
RELOC_NUMBER (R_M32R_HI16_SLO, 8)
|
||||
RELOC_NUMBER (R_M32R_LO16, 9)
|
||||
RELOC_NUMBER (R_M32R_SDA16, 10)
|
||||
RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11)
|
||||
RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12)
|
||||
EMPTY_RELOC (R_M32R_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
/* Processor specific section indices. These sections do not actually
|
||||
exist. Symbols with a st_shndx field corresponding to one of these
|
||||
values have a special meaning. */
|
||||
|
||||
/* Small common symbol. */
|
||||
#define SHN_M32R_SCOMMON 0xff00
|
||||
|
||||
/* Processor specific section flags. */
|
||||
|
||||
/* This section contains sufficient relocs to be relaxed.
|
||||
When relaxing, even relocs of branch instructions the assembler could
|
||||
complete must be present because relaxing may cause the branch target to
|
||||
move. */
|
||||
#define SHF_M32R_CAN_RELAX 0x10000000
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* Two bit m32r architecture field. */
|
||||
#define EF_M32R_ARCH 0x30000000
|
||||
|
||||
/* m32r code. */
|
||||
#define E_M32R_ARCH 0x00000000
|
||||
/* m32rx code. */
|
||||
#define E_M32RX_ARCH 0x10000000
|
||||
|
||||
#endif
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* MC68k ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_M68K_H
|
||||
#define _ELF_M68K_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocation types. */
|
||||
START_RELOC_NUMBERS (elf_m68k_reloc_type)
|
||||
RELOC_NUMBER (R_68K_NONE, 0) /* No reloc */
|
||||
RELOC_NUMBER (R_68K_32, 1) /* Direct 32 bit */
|
||||
RELOC_NUMBER (R_68K_16, 2) /* Direct 16 bit */
|
||||
RELOC_NUMBER (R_68K_8, 3) /* Direct 8 bit */
|
||||
RELOC_NUMBER (R_68K_PC32, 4) /* PC relative 32 bit */
|
||||
RELOC_NUMBER (R_68K_PC16, 5) /* PC relative 16 bit */
|
||||
RELOC_NUMBER (R_68K_PC8, 6) /* PC relative 8 bit */
|
||||
RELOC_NUMBER (R_68K_GOT32, 7) /* 32 bit PC relative GOT entry */
|
||||
RELOC_NUMBER (R_68K_GOT16, 8) /* 16 bit PC relative GOT entry */
|
||||
RELOC_NUMBER (R_68K_GOT8, 9) /* 8 bit PC relative GOT entry */
|
||||
RELOC_NUMBER (R_68K_GOT32O, 10) /* 32 bit GOT offset */
|
||||
RELOC_NUMBER (R_68K_GOT16O, 11) /* 16 bit GOT offset */
|
||||
RELOC_NUMBER (R_68K_GOT8O, 12) /* 8 bit GOT offset */
|
||||
RELOC_NUMBER (R_68K_PLT32, 13) /* 32 bit PC relative PLT address */
|
||||
RELOC_NUMBER (R_68K_PLT16, 14) /* 16 bit PC relative PLT address */
|
||||
RELOC_NUMBER (R_68K_PLT8, 15) /* 8 bit PC relative PLT address */
|
||||
RELOC_NUMBER (R_68K_PLT32O, 16) /* 32 bit PLT offset */
|
||||
RELOC_NUMBER (R_68K_PLT16O, 17) /* 16 bit PLT offset */
|
||||
RELOC_NUMBER (R_68K_PLT8O, 18) /* 8 bit PLT offset */
|
||||
RELOC_NUMBER (R_68K_COPY, 19) /* Copy symbol at runtime */
|
||||
RELOC_NUMBER (R_68K_GLOB_DAT, 20) /* Create GOT entry */
|
||||
RELOC_NUMBER (R_68K_JMP_SLOT, 21) /* Create PLT entry */
|
||||
RELOC_NUMBER (R_68K_RELATIVE, 22) /* Adjust by program base */
|
||||
/* These are GNU extensions to enable C++ vtable garbage collection. */
|
||||
RELOC_NUMBER (R_68K_GNU_VTINHERIT, 23)
|
||||
RELOC_NUMBER (R_68K_GNU_VTENTRY, 24)
|
||||
EMPTY_RELOC (R_68K_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,856 +0,0 @@
|
|||
/* MIPS ELF support for BFD.
|
||||
Copyright (C) 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
|
||||
|
||||
By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
|
||||
information in the System V Application Binary Interface, MIPS
|
||||
Processor Supplement.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the MIPS ELF ABI. Note
|
||||
that most of this is not actually implemented by BFD. */
|
||||
|
||||
#ifndef _ELF_MIPS_H
|
||||
#define _ELF_MIPS_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocation types. */
|
||||
START_RELOC_NUMBERS (elf_mips_reloc_type)
|
||||
RELOC_NUMBER (R_MIPS_NONE, 0)
|
||||
RELOC_NUMBER (R_MIPS_16, 1)
|
||||
RELOC_NUMBER (R_MIPS_32, 2)
|
||||
RELOC_NUMBER (R_MIPS_REL32, 3)
|
||||
RELOC_NUMBER (R_MIPS_26, 4)
|
||||
RELOC_NUMBER (R_MIPS_HI16, 5)
|
||||
RELOC_NUMBER (R_MIPS_LO16, 6)
|
||||
RELOC_NUMBER (R_MIPS_GPREL16, 7)
|
||||
RELOC_NUMBER (R_MIPS_LITERAL, 8)
|
||||
RELOC_NUMBER (R_MIPS_GOT16, 9)
|
||||
RELOC_NUMBER (R_MIPS_PC16, 10)
|
||||
RELOC_NUMBER (R_MIPS_CALL16, 11)
|
||||
RELOC_NUMBER (R_MIPS_GPREL32, 12)
|
||||
/* The remaining relocs are defined on Irix, although they are not
|
||||
in the MIPS ELF ABI. */
|
||||
RELOC_NUMBER (R_MIPS_UNUSED1, 13)
|
||||
RELOC_NUMBER (R_MIPS_UNUSED2, 14)
|
||||
RELOC_NUMBER (R_MIPS_UNUSED3, 15)
|
||||
RELOC_NUMBER (R_MIPS_SHIFT5, 16)
|
||||
RELOC_NUMBER (R_MIPS_SHIFT6, 17)
|
||||
RELOC_NUMBER (R_MIPS_64, 18)
|
||||
RELOC_NUMBER (R_MIPS_GOT_DISP, 19)
|
||||
RELOC_NUMBER (R_MIPS_GOT_PAGE, 20)
|
||||
RELOC_NUMBER (R_MIPS_GOT_OFST, 21)
|
||||
RELOC_NUMBER (R_MIPS_GOT_HI16, 22)
|
||||
RELOC_NUMBER (R_MIPS_GOT_LO16, 23)
|
||||
RELOC_NUMBER (R_MIPS_SUB, 24)
|
||||
RELOC_NUMBER (R_MIPS_INSERT_A, 25)
|
||||
RELOC_NUMBER (R_MIPS_INSERT_B, 26)
|
||||
RELOC_NUMBER (R_MIPS_DELETE, 27)
|
||||
RELOC_NUMBER (R_MIPS_HIGHER, 28)
|
||||
RELOC_NUMBER (R_MIPS_HIGHEST, 29)
|
||||
RELOC_NUMBER (R_MIPS_CALL_HI16, 30)
|
||||
RELOC_NUMBER (R_MIPS_CALL_LO16, 31)
|
||||
RELOC_NUMBER (R_MIPS_SCN_DISP, 32)
|
||||
RELOC_NUMBER (R_MIPS_REL16, 33)
|
||||
RELOC_NUMBER (R_MIPS_ADD_IMMEDIATE, 34)
|
||||
RELOC_NUMBER (R_MIPS_PJUMP, 35)
|
||||
RELOC_NUMBER (R_MIPS_RELGOT, 36)
|
||||
RELOC_NUMBER (R_MIPS_JALR, 37)
|
||||
RELOC_NUMBER (R_MIPS_max, 38)
|
||||
/* These relocs are used for the mips16. */
|
||||
RELOC_NUMBER (R_MIPS16_26, 100)
|
||||
RELOC_NUMBER (R_MIPS16_GPREL, 101)
|
||||
/* These are GNU extensions to enable C++ vtable garbage collection. */
|
||||
RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
|
||||
RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* At least one .noreorder directive appears in the source. */
|
||||
#define EF_MIPS_NOREORDER 0x00000001
|
||||
|
||||
/* File contains position independent code. */
|
||||
#define EF_MIPS_PIC 0x00000002
|
||||
|
||||
/* Code in file uses the standard calling sequence for calling
|
||||
position independent code. */
|
||||
#define EF_MIPS_CPIC 0x00000004
|
||||
|
||||
/* Code in file uses new ABI (-n32 on Irix 6). */
|
||||
#define EF_MIPS_ABI2 0x00000020
|
||||
|
||||
/* Four bit MIPS architecture field. */
|
||||
#define EF_MIPS_ARCH 0xf0000000
|
||||
|
||||
/* -mips1 code. */
|
||||
#define E_MIPS_ARCH_1 0x00000000
|
||||
|
||||
/* -mips2 code. */
|
||||
#define E_MIPS_ARCH_2 0x10000000
|
||||
|
||||
/* -mips3 code. */
|
||||
#define E_MIPS_ARCH_3 0x20000000
|
||||
|
||||
/* -mips4 code. */
|
||||
#define E_MIPS_ARCH_4 0x30000000
|
||||
|
||||
/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
|
||||
#define EF_MIPS_ABI 0x0000F000
|
||||
|
||||
/* The original o32 abi. */
|
||||
#define E_MIPS_ABI_O32 0x00001000
|
||||
|
||||
/* O32 extended to work on 64 bit architectures */
|
||||
#define E_MIPS_ABI_O64 0x00002000
|
||||
|
||||
/* EABI in 32 bit mode */
|
||||
#define E_MIPS_ABI_EABI32 0x00003000
|
||||
|
||||
/* EABI in 64 bit mode */
|
||||
#define E_MIPS_ABI_EABI64 0x00004000
|
||||
|
||||
|
||||
/* Machine variant if we know it. This field was invented at Cygnus,
|
||||
but it is hoped that other vendors will adopt it. If some standard
|
||||
is developed, this code should be changed to follow it. */
|
||||
|
||||
#define EF_MIPS_MACH 0x00FF0000
|
||||
|
||||
/* Cygnus is choosing values between 80 and 9F;
|
||||
00 - 7F should be left for a future standard;
|
||||
the rest are open. */
|
||||
|
||||
#define E_MIPS_MACH_3900 0x00810000
|
||||
|
||||
#define E_MIPS_MACH_4010 0x00820000
|
||||
#define E_MIPS_MACH_4100 0x00830000
|
||||
#define E_MIPS_MACH_4650 0x00850000
|
||||
|
||||
#define E_MIPS_MACH_5400 0x00910000
|
||||
|
||||
/* Processor specific section indices. These sections do not actually
|
||||
exist. Symbols with a st_shndx field corresponding to one of these
|
||||
values have a special meaning. */
|
||||
|
||||
/* Defined and allocated common symbol. Value is virtual address. If
|
||||
relocated, alignment must be preserved. */
|
||||
#define SHN_MIPS_ACOMMON 0xff00
|
||||
|
||||
/* Defined and allocated text symbol. Value is virtual address.
|
||||
Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */
|
||||
#define SHN_MIPS_TEXT 0xff01
|
||||
|
||||
/* Defined and allocated data symbol. Value is virtual address.
|
||||
Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */
|
||||
#define SHN_MIPS_DATA 0xff02
|
||||
|
||||
/* Small common symbol. */
|
||||
#define SHN_MIPS_SCOMMON 0xff03
|
||||
|
||||
/* Small undefined symbol. */
|
||||
#define SHN_MIPS_SUNDEFINED 0xff04
|
||||
|
||||
/* Processor specific section types. */
|
||||
|
||||
/* Section contains the set of dynamic shared objects used when
|
||||
statically linking. */
|
||||
#define SHT_MIPS_LIBLIST 0x70000000
|
||||
|
||||
/* I'm not sure what this is, but it's used on Irix 5. */
|
||||
#define SHT_MIPS_MSYM 0x70000001
|
||||
|
||||
/* Section contains list of symbols whose definitions conflict with
|
||||
symbols defined in shared objects. */
|
||||
#define SHT_MIPS_CONFLICT 0x70000002
|
||||
|
||||
/* Section contains the global pointer table. */
|
||||
#define SHT_MIPS_GPTAB 0x70000003
|
||||
|
||||
/* Section contains microcode information. The exact format is
|
||||
unspecified. */
|
||||
#define SHT_MIPS_UCODE 0x70000004
|
||||
|
||||
/* Section contains some sort of debugging information. The exact
|
||||
format is unspecified. It's probably ECOFF symbols. */
|
||||
#define SHT_MIPS_DEBUG 0x70000005
|
||||
|
||||
/* Section contains register usage information. */
|
||||
#define SHT_MIPS_REGINFO 0x70000006
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_PACKAGE 0x70000007
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_PACKSYM 0x70000008
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_RELD 0x70000009
|
||||
|
||||
/* Section contains interface information. */
|
||||
#define SHT_MIPS_IFACE 0x7000000b
|
||||
|
||||
/* Section contains description of contents of another section. */
|
||||
#define SHT_MIPS_CONTENT 0x7000000c
|
||||
|
||||
/* Section contains miscellaneous options. */
|
||||
#define SHT_MIPS_OPTIONS 0x7000000d
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_SHDR 0x70000010
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_FDESC 0x70000011
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_EXTSYM 0x70000012
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_DENSE 0x70000013
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_PDESC 0x70000014
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_LOCSYM 0x70000015
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_AUXSYM 0x70000016
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_OPTSYM 0x70000017
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_LOCSTR 0x70000018
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_LINE 0x70000019
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_RFDESC 0x7000001a
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_DELTASYM 0x7000001b
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_DELTAINST 0x7000001c
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_DELTACLASS 0x7000001d
|
||||
|
||||
/* DWARF debugging section. */
|
||||
#define SHT_MIPS_DWARF 0x7000001e
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_DELTADECL 0x7000001f
|
||||
|
||||
/* List of libraries the binary depends on. Includes a time stamp, version
|
||||
number. */
|
||||
#define SHT_MIPS_SYMBOL_LIB 0x70000020
|
||||
|
||||
/* Events section. */
|
||||
#define SHT_MIPS_EVENTS 0x70000021
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_TRANSLATE 0x70000022
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_PIXIE 0x70000023
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_XLATE 0x70000024
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_XLATE_DEBUG 0x70000025
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_WHIRL 0x70000026
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_EH_REGION 0x70000027
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_XLATE_OLD 0x70000028
|
||||
|
||||
/* ??? */
|
||||
#define SHT_MIPS_PDR_EXCEPTION 0x70000029
|
||||
|
||||
|
||||
/* A section of type SHT_MIPS_LIBLIST contains an array of the
|
||||
following structure. The sh_link field is the section index of the
|
||||
string table. The sh_info field is the number of entries in the
|
||||
section. */
|
||||
typedef struct
|
||||
{
|
||||
/* String table index for name of shared object. */
|
||||
unsigned long l_name;
|
||||
/* Time stamp. */
|
||||
unsigned long l_time_stamp;
|
||||
/* Checksum of symbol names and common sizes. */
|
||||
unsigned long l_checksum;
|
||||
/* String table index for version. */
|
||||
unsigned long l_version;
|
||||
/* Flags. */
|
||||
unsigned long l_flags;
|
||||
} Elf32_Lib;
|
||||
|
||||
/* The external version of Elf32_Lib. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char l_name[4];
|
||||
unsigned char l_time_stamp[4];
|
||||
unsigned char l_checksum[4];
|
||||
unsigned char l_version[4];
|
||||
unsigned char l_flags[4];
|
||||
} Elf32_External_Lib;
|
||||
|
||||
/* The l_flags field of an Elf32_Lib structure may contain the
|
||||
following flags. */
|
||||
|
||||
/* Require an exact match at runtime. */
|
||||
#define LL_EXACT_MATCH 0x00000001
|
||||
|
||||
/* Ignore version incompatibilities at runtime. */
|
||||
#define LL_IGNORE_INT_VER 0x00000002
|
||||
|
||||
/* Require matching minor version number. */
|
||||
#define LL_REQUIRE_MINOR 0x00000004
|
||||
|
||||
/* ??? */
|
||||
#define LL_EXPORTS 0x00000008
|
||||
|
||||
/* Delay loading of this library until really needed. */
|
||||
#define LL_DELAY_LOAD 0x00000010
|
||||
|
||||
/* ??? Delta C++ stuff ??? */
|
||||
#define LL_DELTA 0x00000020
|
||||
|
||||
|
||||
/* A section of type SHT_MIPS_CONFLICT is an array of indices into the
|
||||
.dynsym section. Each element has the following type. */
|
||||
typedef unsigned long Elf32_Conflict;
|
||||
typedef unsigned char Elf32_External_Conflict[4];
|
||||
|
||||
typedef unsigned long Elf64_Conflict;
|
||||
typedef unsigned char Elf64_External_Conflict[8];
|
||||
|
||||
/* A section of type SHT_MIPS_GPTAB contains information about how
|
||||
much GP space would be required for different -G arguments. This
|
||||
information is only used so that the linker can provide informative
|
||||
suggestions as to the best -G value to use. The sh_info field is
|
||||
the index of the section for which this information applies. The
|
||||
contents of the section are an array of the following union. The
|
||||
first element uses the gt_header field. The remaining elements use
|
||||
the gt_entry field. */
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
/* -G value actually used for this object file. */
|
||||
unsigned long gt_current_g_value;
|
||||
/* Unused. */
|
||||
unsigned long gt_unused;
|
||||
} gt_header;
|
||||
struct
|
||||
{
|
||||
/* If this -G argument has been used... */
|
||||
unsigned long gt_g_value;
|
||||
/* ...this many GP section bytes would be required. */
|
||||
unsigned long gt_bytes;
|
||||
} gt_entry;
|
||||
} Elf32_gptab;
|
||||
|
||||
/* The external version of Elf32_gptab. */
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned char gt_current_g_value[4];
|
||||
unsigned char gt_unused[4];
|
||||
} gt_header;
|
||||
struct
|
||||
{
|
||||
unsigned char gt_g_value[4];
|
||||
unsigned char gt_bytes[4];
|
||||
} gt_entry;
|
||||
} Elf32_External_gptab;
|
||||
|
||||
/* A section of type SHT_MIPS_REGINFO contains the following
|
||||
structure. */
|
||||
typedef struct
|
||||
{
|
||||
/* Mask of general purpose registers used. */
|
||||
unsigned long ri_gprmask;
|
||||
/* Mask of co-processor registers used. */
|
||||
unsigned long ri_cprmask[4];
|
||||
/* GP register value for this object file. */
|
||||
long ri_gp_value;
|
||||
} Elf32_RegInfo;
|
||||
|
||||
/* The external version of the Elf_RegInfo structure. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char ri_gprmask[4];
|
||||
unsigned char ri_cprmask[4][4];
|
||||
unsigned char ri_gp_value[4];
|
||||
} Elf32_External_RegInfo;
|
||||
|
||||
/* MIPS ELF .reginfo swapping routines. */
|
||||
extern void bfd_mips_elf32_swap_reginfo_in
|
||||
PARAMS ((bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *));
|
||||
extern void bfd_mips_elf32_swap_reginfo_out
|
||||
PARAMS ((bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *));
|
||||
|
||||
/* Processor specific section flags. */
|
||||
|
||||
/* This section must be in the global data area. */
|
||||
#define SHF_MIPS_GPREL 0x10000000
|
||||
|
||||
/* This section should be merged. */
|
||||
#define SHF_MIPS_MERGE 0x20000000
|
||||
|
||||
/* This section contains 32 bit addresses. */
|
||||
#define SHF_MIPS_ADDR32 0x40000000
|
||||
|
||||
/* This section contains 64 bit addresses. */
|
||||
#define SHF_MIPS_ADDR64 0x80000000
|
||||
|
||||
/* This section may not be stripped. */
|
||||
#define SHF_MIPS_NOSTRIP 0x08000000
|
||||
|
||||
/* This section is local to threads. */
|
||||
#define SHF_MIPS_LOCAL 0x04000000
|
||||
|
||||
/* Linker should generate implicit weak names for this section. */
|
||||
#define SHF_MIPS_NAMES 0x02000000
|
||||
|
||||
/* Processor specific program header types. */
|
||||
|
||||
/* Register usage information. Identifies one .reginfo section. */
|
||||
#define PT_MIPS_REGINFO 0x70000000
|
||||
|
||||
/* Runtime procedure table. */
|
||||
#define PT_MIPS_RTPROC 0x70000001
|
||||
|
||||
/* Options (for what ???). */
|
||||
#define PT_MIPS_OPTIONS 0x70000002
|
||||
|
||||
/* Processor specific dynamic array tags. */
|
||||
|
||||
/* 32 bit version number for runtime linker interface. */
|
||||
#define DT_MIPS_RLD_VERSION 0x70000001
|
||||
|
||||
/* Time stamp. */
|
||||
#define DT_MIPS_TIME_STAMP 0x70000002
|
||||
|
||||
/* Checksum of external strings and common sizes. */
|
||||
#define DT_MIPS_ICHECKSUM 0x70000003
|
||||
|
||||
/* Index of version string in string table. */
|
||||
#define DT_MIPS_IVERSION 0x70000004
|
||||
|
||||
/* 32 bits of flags. */
|
||||
#define DT_MIPS_FLAGS 0x70000005
|
||||
|
||||
/* Base address of the segment. */
|
||||
#define DT_MIPS_BASE_ADDRESS 0x70000006
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_MSYM 0x70000007
|
||||
|
||||
/* Address of .conflict section. */
|
||||
#define DT_MIPS_CONFLICT 0x70000008
|
||||
|
||||
/* Address of .liblist section. */
|
||||
#define DT_MIPS_LIBLIST 0x70000009
|
||||
|
||||
/* Number of local global offset table entries. */
|
||||
#define DT_MIPS_LOCAL_GOTNO 0x7000000a
|
||||
|
||||
/* Number of entries in the .conflict section. */
|
||||
#define DT_MIPS_CONFLICTNO 0x7000000b
|
||||
|
||||
/* Number of entries in the .liblist section. */
|
||||
#define DT_MIPS_LIBLISTNO 0x70000010
|
||||
|
||||
/* Number of entries in the .dynsym section. */
|
||||
#define DT_MIPS_SYMTABNO 0x70000011
|
||||
|
||||
/* Index of first external dynamic symbol not referenced locally. */
|
||||
#define DT_MIPS_UNREFEXTNO 0x70000012
|
||||
|
||||
/* Index of first dynamic symbol in global offset table. */
|
||||
#define DT_MIPS_GOTSYM 0x70000013
|
||||
|
||||
/* Number of page table entries in global offset table. */
|
||||
#define DT_MIPS_HIPAGENO 0x70000014
|
||||
|
||||
/* Address of run time loader map, used for debugging. */
|
||||
#define DT_MIPS_RLD_MAP 0x70000016
|
||||
|
||||
/* Delta C++ class definition. */
|
||||
#define DT_MIPS_DELTA_CLASS 0x70000017
|
||||
|
||||
/* Number of entries in DT_MIPS_DELTA_CLASS. */
|
||||
#define DT_MIPS_DELTA_CLASS_NO 0x70000018
|
||||
|
||||
/* Delta C++ class instances. */
|
||||
#define DT_MIPS_DELTA_INSTANCE 0x70000019
|
||||
|
||||
/* Number of entries in DT_MIPS_DELTA_INSTANCE. */
|
||||
#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
|
||||
|
||||
/* Delta relocations. */
|
||||
#define DT_MIPS_DELTA_RELOC 0x7000001b
|
||||
|
||||
/* Number of entries in DT_MIPS_DELTA_RELOC. */
|
||||
#define DT_MIPS_DELTA_RELOC_NO 0x7000001c
|
||||
|
||||
/* Delta symbols that Delta relocations refer to. */
|
||||
#define DT_MIPS_DELTA_SYM 0x7000001d
|
||||
|
||||
/* Number of entries in DT_MIPS_DELTA_SYM. */
|
||||
#define DT_MIPS_DELTA_SYM_NO 0x7000001e
|
||||
|
||||
/* Delta symbols that hold class declarations. */
|
||||
#define DT_MIPS_DELTA_CLASSSYM 0x70000020
|
||||
|
||||
/* Number of entries in DT_MIPS_DELTA_CLASSSYM. */
|
||||
#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
|
||||
|
||||
/* Flags indicating information about C++ flavor. */
|
||||
#define DT_MIPS_CXX_FLAGS 0x70000022
|
||||
|
||||
/* Pixie information (???). */
|
||||
#define DT_MIPS_PIXIE_INIT 0x70000023
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_SYMBOL_LIB 0x70000024
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_LOCAL_GOTIDX 0x70000026
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_HIDDEN_GOTIDX 0x70000027
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_PROTECTED_GOTIDX 0x70000028
|
||||
|
||||
/* Address of `.MIPS.options'. */
|
||||
#define DT_MIPS_OPTIONS 0x70000029
|
||||
|
||||
/* Address of `.interface'. */
|
||||
#define DT_MIPS_INTERFACE 0x7000002a
|
||||
|
||||
/* ??? */
|
||||
#define DT_MIPS_DYNSTR_ALIGN 0x7000002b
|
||||
|
||||
/* Size of the .interface section. */
|
||||
#define DT_MIPS_INTERFACE_SIZE 0x7000002c
|
||||
|
||||
/* Size of rld_text_resolve function stored in the GOT. */
|
||||
#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
|
||||
|
||||
/* Default suffix of DSO to be added by rld on dlopen() calls. */
|
||||
#define DT_MIPS_PERF_SUFFIX 0x7000002e
|
||||
|
||||
/* Size of compact relocation section (O32). */
|
||||
#define DT_MIPS_COMPACT_SIZE 0x7000002f
|
||||
|
||||
/* GP value for auxiliary GOTs. */
|
||||
#define DT_MIPS_GP_VALUE 0x70000030
|
||||
|
||||
/* Address of auxiliary .dynamic. */
|
||||
#define DT_MIPS_AUX_DYNAMIC 0x70000031
|
||||
|
||||
/* Flags which may appear in a DT_MIPS_FLAGS entry. */
|
||||
|
||||
/* No flags. */
|
||||
#define RHF_NONE 0x00000000
|
||||
|
||||
/* Uses shortcut pointers. */
|
||||
#define RHF_QUICKSTART 0x00000001
|
||||
|
||||
/* Hash size is not a power of two. */
|
||||
#define RHF_NOTPOT 0x00000002
|
||||
|
||||
/* Ignore LD_LIBRARY_PATH. */
|
||||
#define RHS_NO_LIBRARY_REPLACEMENT \
|
||||
0x00000004
|
||||
|
||||
#define RHF_NO_MOVE 0x00000008
|
||||
#define RHF_SGI_ONLY 0x00000010
|
||||
#define RHF_GUARANTEE_INIT 0x00000020
|
||||
#define RHF_DELTA_C_PLUS_PLUS 0x00000040
|
||||
#define RHF_GUARANTEE_START_INIT 0x00000080
|
||||
#define RHF_PIXIE 0x00000100
|
||||
#define RHF_DEFAULT_DELAY_LOAD 0x00000200
|
||||
#define RHF_REQUICKSTART 0x00000400
|
||||
#define RHF_REQUICKSTARTED 0x00000800
|
||||
#define RHF_CORD 0x00001000
|
||||
#define RHF_NO_UNRES_UNDEF 0x00002000
|
||||
#define RHF_RLD_ORDER_SAFE 0x00004000
|
||||
|
||||
/* Special values for the st_other field in the symbol table. These
|
||||
are used in an Irix 5 dynamic symbol table. */
|
||||
|
||||
#define STO_DEFAULT 0x00
|
||||
#define STO_INTERNAL 0x01
|
||||
#define STO_HIDDEN 0x02
|
||||
#define STO_PROTECTED 0x03
|
||||
|
||||
/* This value is used for a mips16 .text symbol. */
|
||||
#define STO_MIPS16 0xf0
|
||||
|
||||
/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each
|
||||
relocation entry specifies up to three actual relocations, all at
|
||||
the same address. The first relocation which required a symbol
|
||||
uses the symbol in the r_sym field. The second relocation which
|
||||
requires a symbol uses the symbol in the r_ssym field. If all
|
||||
three relocations require a symbol, the third one uses a zero
|
||||
value. */
|
||||
|
||||
/* An entry in a 64 bit SHT_REL section. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Address of relocation. */
|
||||
unsigned char r_offset[8];
|
||||
/* Symbol index. */
|
||||
unsigned char r_sym[4];
|
||||
/* Special symbol. */
|
||||
unsigned char r_ssym[1];
|
||||
/* Third relocation. */
|
||||
unsigned char r_type3[1];
|
||||
/* Second relocation. */
|
||||
unsigned char r_type2[1];
|
||||
/* First relocation. */
|
||||
unsigned char r_type[1];
|
||||
} Elf64_Mips_External_Rel;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Address of relocation. */
|
||||
bfd_vma r_offset;
|
||||
/* Symbol index. */
|
||||
unsigned long r_sym;
|
||||
/* Special symbol. */
|
||||
unsigned char r_ssym;
|
||||
/* Third relocation. */
|
||||
unsigned char r_type3;
|
||||
/* Second relocation. */
|
||||
unsigned char r_type2;
|
||||
/* First relocation. */
|
||||
unsigned char r_type;
|
||||
} Elf64_Mips_Internal_Rel;
|
||||
|
||||
/* An entry in a 64 bit SHT_RELA section. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Address of relocation. */
|
||||
unsigned char r_offset[8];
|
||||
/* Symbol index. */
|
||||
unsigned char r_sym[4];
|
||||
/* Special symbol. */
|
||||
unsigned char r_ssym[1];
|
||||
/* Third relocation. */
|
||||
unsigned char r_type3[1];
|
||||
/* Second relocation. */
|
||||
unsigned char r_type2[1];
|
||||
/* First relocation. */
|
||||
unsigned char r_type[1];
|
||||
/* Addend. */
|
||||
unsigned char r_addend[8];
|
||||
} Elf64_Mips_External_Rela;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Address of relocation. */
|
||||
bfd_vma r_offset;
|
||||
/* Symbol index. */
|
||||
unsigned long r_sym;
|
||||
/* Special symbol. */
|
||||
unsigned char r_ssym;
|
||||
/* Third relocation. */
|
||||
unsigned char r_type3;
|
||||
/* Second relocation. */
|
||||
unsigned char r_type2;
|
||||
/* First relocation. */
|
||||
unsigned char r_type;
|
||||
/* Addend. */
|
||||
bfd_signed_vma r_addend;
|
||||
} Elf64_Mips_Internal_Rela;
|
||||
|
||||
/* Values found in the r_ssym field of a relocation entry. */
|
||||
|
||||
/* No relocation. */
|
||||
#define RSS_UNDEF 0
|
||||
|
||||
/* Value of GP. */
|
||||
#define RSS_GP 1
|
||||
|
||||
/* Value of GP in object being relocated. */
|
||||
#define RSS_GP0 2
|
||||
|
||||
/* Address of location being relocated. */
|
||||
#define RSS_LOC 3
|
||||
|
||||
/* A SHT_MIPS_OPTIONS section contains a series of options, each of
|
||||
which starts with this header. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Type of option. */
|
||||
unsigned char kind[1];
|
||||
/* Size of option descriptor, including header. */
|
||||
unsigned char size[1];
|
||||
/* Section index of affected section, or 0 for global option. */
|
||||
unsigned char section[2];
|
||||
/* Information specific to this kind of option. */
|
||||
unsigned char info[4];
|
||||
} Elf_External_Options;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Type of option. */
|
||||
unsigned char kind;
|
||||
/* Size of option descriptor, including header. */
|
||||
unsigned char size;
|
||||
/* Section index of affected section, or 0 for global option. */
|
||||
unsigned short section;
|
||||
/* Information specific to this kind of option. */
|
||||
unsigned long info;
|
||||
} Elf_Internal_Options;
|
||||
|
||||
/* MIPS ELF option header swapping routines. */
|
||||
extern void bfd_mips_elf_swap_options_in
|
||||
PARAMS ((bfd *, const Elf_External_Options *, Elf_Internal_Options *));
|
||||
extern void bfd_mips_elf_swap_options_out
|
||||
PARAMS ((bfd *, const Elf_Internal_Options *, Elf_External_Options *));
|
||||
|
||||
/* Values which may appear in the kind field of an Elf_Options
|
||||
structure. */
|
||||
|
||||
/* Undefined. */
|
||||
#define ODK_NULL 0
|
||||
|
||||
/* Register usage and GP value. */
|
||||
#define ODK_REGINFO 1
|
||||
|
||||
/* Exception processing information. */
|
||||
#define ODK_EXCEPTIONS 2
|
||||
|
||||
/* Section padding information. */
|
||||
#define ODK_PAD 3
|
||||
|
||||
/* Hardware workarounds performed. */
|
||||
#define ODK_HWPATCH 4
|
||||
|
||||
/* Fill value used by the linker. */
|
||||
#define ODK_FILL 5
|
||||
|
||||
/* Reserved space for desktop tools. */
|
||||
#define ODK_TAGS 6
|
||||
|
||||
/* Hardware workarounds, AND bits when merging. */
|
||||
#define ODK_HWAND 7
|
||||
|
||||
/* Hardware workarounds, OR bits when merging. */
|
||||
#define ODK_HWOR 8
|
||||
|
||||
/* GP group to use for text/data sections. */
|
||||
#define ODK_GP_GROUP 9
|
||||
|
||||
/* ID information. */
|
||||
#define ODK_IDENT 10
|
||||
|
||||
/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_RegInfo
|
||||
structure. In the 64 bit ABI, it is the following structure. The
|
||||
info field of the options header is not used. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Mask of general purpose registers used. */
|
||||
unsigned char ri_gprmask[4];
|
||||
/* Padding. */
|
||||
unsigned char ri_pad[4];
|
||||
/* Mask of co-processor registers used. */
|
||||
unsigned char ri_cprmask[4][4];
|
||||
/* GP register value for this object file. */
|
||||
unsigned char ri_gp_value[8];
|
||||
} Elf64_External_RegInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Mask of general purpose registers used. */
|
||||
unsigned long ri_gprmask;
|
||||
/* Padding. */
|
||||
unsigned long ri_pad;
|
||||
/* Mask of co-processor registers used. */
|
||||
unsigned long ri_cprmask[4];
|
||||
/* GP register value for this object file. */
|
||||
bfd_vma ri_gp_value;
|
||||
} Elf64_Internal_RegInfo;
|
||||
|
||||
/* MIPS ELF reginfo swapping routines. */
|
||||
extern void bfd_mips_elf64_swap_reginfo_in
|
||||
PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *));
|
||||
extern void bfd_mips_elf64_swap_reginfo_out
|
||||
PARAMS ((bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *));
|
||||
|
||||
/* Masks for the info work of an ODK_EXCEPTIONS descriptor. */
|
||||
#define OEX_FPU_MIN 0x1f /* FPEs which must be enabled. */
|
||||
#define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */
|
||||
#define OEX_PAGE0 0x10000 /* Page zero must be mapped. */
|
||||
#define OEX_SMM 0x20000 /* Force sequential memory mode. */
|
||||
#define OEX_FPDBUG 0x40000 /* Force floating-point debug mode. */
|
||||
#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. */
|
||||
|
||||
/* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */
|
||||
#define OEX_FPU_INVAL 0x10 /* Invalid operation exception. */
|
||||
#define OEX_FPU_DIV0 0x08 /* Division by zero exception. */
|
||||
#define OEX_FPU_OFLO 0x04 /* Overflow exception. */
|
||||
#define OEX_FPU_UFLO 0x02 /* Underflow exception. */
|
||||
#define OEX_FPU_INEX 0x01 /* Inexact exception. */
|
||||
|
||||
/* Masks for the info word of an ODK_PAD descriptor. */
|
||||
#define OPAD_PREFIX 0x01
|
||||
#define OPAD_POSTFIX 0x02
|
||||
#define OPAD_SYMBOL 0x04
|
||||
|
||||
/* Masks for the info word of an ODK_HWPATCH descriptor. */
|
||||
#define OHW_R4KEOP 0x01 /* R4000 end-of-page patch. */
|
||||
#define OHW_R8KPFETCH 0x02 /* May need R8000 prefetch patch. */
|
||||
#define OHW_R5KEOP 0x04 /* R5000 end-of-page patch. */
|
||||
#define OHW_R5KCVTL 0x08 /* R5000 cvt.[ds].l bug (clean == 1). */
|
||||
|
||||
/* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */
|
||||
#define OGP_GROUP 0x0000ffff /* GP group number. */
|
||||
#define OGP_SELF 0xffff0000 /* Self-contained GP groups. */
|
||||
|
||||
/* Masks for the info word of an ODK_HWAND/ODK_HWOR descriptor. */
|
||||
#define OHWA0_R4KEOP_CHECKED 0x00000001
|
||||
#define OHWA0_R4KEOP_CLEAN 0x00000002
|
||||
|
||||
|
||||
#endif /* _ELF_MIPS_H */
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/* MN10200 ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the MN10200 ELF ABI. */
|
||||
|
||||
#ifndef _ELF_MN10200_H
|
||||
#define _ELF_MN10200_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_mn10200_reloc_type)
|
||||
RELOC_NUMBER (R_MN10200_NONE, 0)
|
||||
RELOC_NUMBER (R_MN10200_32, 1)
|
||||
RELOC_NUMBER (R_MN10200_16, 2)
|
||||
RELOC_NUMBER (R_MN10200_8, 3)
|
||||
RELOC_NUMBER (R_MN10200_24, 4)
|
||||
RELOC_NUMBER (R_MN10200_PCREL8, 5)
|
||||
RELOC_NUMBER (R_MN10200_PCREL16, 6)
|
||||
RELOC_NUMBER (R_MN10200_PCREL24, 7)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif /* _ELF_MN10200_H */
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/* MN10300 ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the MN10300 ELF ABI. */
|
||||
|
||||
#ifndef _ELF_MN10300_H
|
||||
#define _ELF_MN10300_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_mn10300_reloc_type)
|
||||
RELOC_NUMBER (R_MN10300_NONE, 0)
|
||||
RELOC_NUMBER (R_MN10300_32, 1)
|
||||
RELOC_NUMBER (R_MN10300_16, 2)
|
||||
RELOC_NUMBER (R_MN10300_8, 3)
|
||||
RELOC_NUMBER (R_MN10300_PCREL32, 4)
|
||||
RELOC_NUMBER (R_MN10300_PCREL16, 5)
|
||||
RELOC_NUMBER (R_MN10300_PCREL8, 6)
|
||||
RELOC_NUMBER (R_MN10300_GNU_VTINHERIT, 7)
|
||||
RELOC_NUMBER (R_MN10300_GNU_VTENTRY, 8)
|
||||
RELOC_NUMBER (R_MN10300_24, 9)
|
||||
EMPTY_RELOC (R_MN10300_MAX)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
/* Machine variant if we know it. This field was invented at Cygnus,
|
||||
but it is hoped that other vendors will adopt it. If some standard
|
||||
is developed, this code should be changed to follow it. */
|
||||
|
||||
#define EF_MN10300_MACH 0x00FF0000
|
||||
|
||||
/* Cygnus is choosing values between 80 and 9F;
|
||||
00 - 7F should be left for a future standard;
|
||||
the rest are open. */
|
||||
|
||||
#define E_MN10300_MACH_MN10300 0x00810000
|
||||
#define E_MN10300_MACH_AM33 0x00820000
|
||||
#endif /* _ELF_MN10300_H */
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
/* PPC ELF support for BFD.
|
||||
Copyright (C) 1995, 1998 Free Software Foundation, Inc.
|
||||
|
||||
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
|
||||
in the System V Application Binary Interface, PowerPC Processor Supplement
|
||||
and the PowerPC Embedded Application Binary Interface (eabi).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the PPC ELF ABI. Note
|
||||
that most of this is not actually implemented by BFD. */
|
||||
|
||||
#ifndef _ELF_PPC_H
|
||||
#define _ELF_PPC_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_ppc_reloc_type)
|
||||
RELOC_NUMBER (R_PPC_NONE, 0)
|
||||
RELOC_NUMBER (R_PPC_ADDR32, 1)
|
||||
RELOC_NUMBER (R_PPC_ADDR24, 2)
|
||||
RELOC_NUMBER (R_PPC_ADDR16, 3)
|
||||
RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
|
||||
RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
|
||||
RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
|
||||
RELOC_NUMBER (R_PPC_ADDR14, 7)
|
||||
RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
|
||||
RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
|
||||
RELOC_NUMBER (R_PPC_REL24, 10)
|
||||
RELOC_NUMBER (R_PPC_REL14, 11)
|
||||
RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
|
||||
RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
|
||||
RELOC_NUMBER (R_PPC_GOT16, 14)
|
||||
RELOC_NUMBER (R_PPC_GOT16_LO, 15)
|
||||
RELOC_NUMBER (R_PPC_GOT16_HI, 16)
|
||||
RELOC_NUMBER (R_PPC_GOT16_HA, 17)
|
||||
RELOC_NUMBER (R_PPC_PLTREL24, 18)
|
||||
RELOC_NUMBER (R_PPC_COPY, 19)
|
||||
RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
|
||||
RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
|
||||
RELOC_NUMBER (R_PPC_RELATIVE, 22)
|
||||
RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
|
||||
RELOC_NUMBER (R_PPC_UADDR32, 24)
|
||||
RELOC_NUMBER (R_PPC_UADDR16, 25)
|
||||
RELOC_NUMBER (R_PPC_REL32, 26)
|
||||
RELOC_NUMBER (R_PPC_PLT32, 27)
|
||||
RELOC_NUMBER (R_PPC_PLTREL32, 28)
|
||||
RELOC_NUMBER (R_PPC_PLT16_LO, 29)
|
||||
RELOC_NUMBER (R_PPC_PLT16_HI, 30)
|
||||
RELOC_NUMBER (R_PPC_PLT16_HA, 31)
|
||||
RELOC_NUMBER (R_PPC_SDAREL16, 32)
|
||||
RELOC_NUMBER (R_PPC_SECTOFF, 33)
|
||||
RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
|
||||
RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
|
||||
RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
|
||||
|
||||
/* The remaining relocs are from the Embedded ELF ABI, and are not
|
||||
in the SVR4 ELF ABI. */
|
||||
RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
|
||||
RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
|
||||
RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
|
||||
RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
|
||||
RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
|
||||
RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
|
||||
RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
|
||||
RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
|
||||
RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
|
||||
RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
|
||||
RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
|
||||
RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
|
||||
RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
|
||||
RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
|
||||
RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
|
||||
RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
|
||||
|
||||
/* These are GNU extensions to enable C++ vtable garbage collection. */
|
||||
RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
|
||||
RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
|
||||
|
||||
/* This is a phony reloc to handle any old fashioned TOC16 references
|
||||
that may still be in object files. */
|
||||
RELOC_NUMBER (R_PPC_TOC16, 255)
|
||||
|
||||
EMPTY_RELOC (R_PPC_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
|
||||
|
||||
/* CYGNUS local bits below */
|
||||
#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */
|
||||
#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */
|
||||
|
||||
/* Processor specific section headers, sh_type field */
|
||||
|
||||
#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
|
||||
entries in this section \
|
||||
based on the address \
|
||||
specified in the associated \
|
||||
symbol table entry. */
|
||||
|
||||
/* Processor specific section flags, sh_flags field */
|
||||
|
||||
#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
|
||||
this section from executable \
|
||||
and shared objects that it \
|
||||
builds when those objects \
|
||||
are not to be furhter \
|
||||
relocated. */
|
||||
#endif /* _ELF_PPC_H */
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
/* Generic relocation support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* These macros are used by the various *.h target specific header
|
||||
files to either generate an enum containing all the known relocations
|
||||
for that target, or if RELOC_MACROS_GEN_FUNC is defined, a recognition
|
||||
function is generated instead. (This is used by binutils/readelf.c)
|
||||
|
||||
Given a header file like this:
|
||||
|
||||
START_RELOC_NUMBERS (foo)
|
||||
RELOC_NUMBER (R_foo_NONE, 0)
|
||||
RELOC_NUMBER (R_foo_32, 1)
|
||||
FAKE_RELOC (R_foo_illegal, 2)
|
||||
EMPTY_RELOC (R_foo_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
Then the following will be produced by default (ie if
|
||||
RELOC_MACROS_GEN_FUNC is *not* defined).
|
||||
|
||||
enum foo {
|
||||
R_foo_NONE = 0,
|
||||
R_foo_32 = 1,
|
||||
R_foo_illegal = 2,
|
||||
R_foo_max
|
||||
};
|
||||
|
||||
If RELOC_MACROS_GEN_FUNC *is* defined, then instead the
|
||||
following function will be generated:
|
||||
|
||||
static char * foo PARAMS ((unsigned long rtype));
|
||||
static char *
|
||||
foo (rtype)
|
||||
unsigned long rtype;
|
||||
{
|
||||
switch (rtype)
|
||||
{
|
||||
case 0: return "R_foo_NONE";
|
||||
case 1: return "R_foo_32";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#ifndef _RELOC_MACROS_H
|
||||
#define _RELOC_MACROS_H
|
||||
|
||||
#ifdef RELOC_MACROS_GEN_FUNC
|
||||
|
||||
/* This function takes the relocation number and returns the
|
||||
string version name of the name of that relocation. If
|
||||
the relocation is not recognised, NULL is returned. */
|
||||
|
||||
#define START_RELOC_NUMBERS(name) \
|
||||
static const char * name PARAMS ((unsigned long rtype)); \
|
||||
static const char * \
|
||||
name (rtype) \
|
||||
unsigned long rtype; \
|
||||
{ \
|
||||
switch (rtype) \
|
||||
{
|
||||
|
||||
#ifdef __STDC__
|
||||
#define RELOC_NUMBER(name, number) case number : return #name ;
|
||||
#else
|
||||
#define RELOC_NUMBER(name, number) case number : return "name" ;
|
||||
#endif
|
||||
|
||||
#define FAKE_RELOC(name, number)
|
||||
#define EMPTY_RELOC(name)
|
||||
|
||||
#define END_RELOC_NUMBERS default: return NULL; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#else /* default to generating enum */
|
||||
|
||||
#define START_RELOC_NUMBERS(name) enum name {
|
||||
#define RELOC_NUMBER(name, number) name = number ,
|
||||
#define FAKE_RELOC(name, number) name = number ,
|
||||
#define EMPTY_RELOC(name) name ,
|
||||
#define END_RELOC_NUMBERS };
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* RELOC_MACROS_H */
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/* SH ELF support for BFD.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_SH_H
|
||||
#define _ELF_SH_H
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocations. */
|
||||
/* Relocations 25ff are GNU extensions.
|
||||
25..33 are used for relaxation and use the same constants as COFF uses. */
|
||||
START_RELOC_NUMBERS (elf_sh_reloc_type)
|
||||
RELOC_NUMBER (R_SH_NONE, 0)
|
||||
RELOC_NUMBER (R_SH_DIR32, 1)
|
||||
RELOC_NUMBER (R_SH_REL32, 2)
|
||||
RELOC_NUMBER (R_SH_DIR8WPN, 3)
|
||||
RELOC_NUMBER (R_SH_IND12W, 4)
|
||||
RELOC_NUMBER (R_SH_DIR8WPL, 5)
|
||||
RELOC_NUMBER (R_SH_DIR8WPZ, 6)
|
||||
RELOC_NUMBER (R_SH_DIR8BP, 7)
|
||||
RELOC_NUMBER (R_SH_DIR8W, 8)
|
||||
RELOC_NUMBER (R_SH_DIR8L, 9)
|
||||
FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 10)
|
||||
FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 24)
|
||||
RELOC_NUMBER (R_SH_SWITCH16, 25)
|
||||
RELOC_NUMBER (R_SH_SWITCH32, 26)
|
||||
RELOC_NUMBER (R_SH_USES, 27)
|
||||
RELOC_NUMBER (R_SH_COUNT, 28)
|
||||
RELOC_NUMBER (R_SH_ALIGN, 29)
|
||||
RELOC_NUMBER (R_SH_CODE, 30)
|
||||
RELOC_NUMBER (R_SH_DATA, 31)
|
||||
RELOC_NUMBER (R_SH_LABEL, 32)
|
||||
RELOC_NUMBER (R_SH_SWITCH8, 33)
|
||||
RELOC_NUMBER (R_SH_GNU_VTINHERIT, 34)
|
||||
RELOC_NUMBER (R_SH_GNU_VTENTRY, 35)
|
||||
EMPTY_RELOC (R_SH_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
#endif
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
/* SPARC ELF support for BFD.
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _ELF_SPARC_H
|
||||
#define _ELF_SPARC_H
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* These are defined by Sun. */
|
||||
|
||||
#define EF_SPARC_32PLUS_MASK 0xffff00 /* bits indicating V8+ type */
|
||||
#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */
|
||||
#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */
|
||||
#define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */
|
||||
|
||||
#define EF_SPARC_LEDATA 0x800000 /* little endian data */
|
||||
|
||||
/* This name is used in the V9 ABI. */
|
||||
#define EF_SPARC_EXT_MASK 0xffff00 /* reserved for vendor extensions */
|
||||
|
||||
/* V9 memory models */
|
||||
#define EF_SPARCV9_MM 0x3 /* memory model mask */
|
||||
#define EF_SPARCV9_TSO 0x0 /* total store ordering */
|
||||
#define EF_SPARCV9_PSO 0x1 /* partial store ordering */
|
||||
#define EF_SPARCV9_RMO 0x2 /* relaxed store ordering */
|
||||
|
||||
/* Section indices. */
|
||||
|
||||
#define SHN_BEFORE 0xff00 /* used with SHF_ORDERED */
|
||||
#define SHN_AFTER 0xff01 /* used with SHF_ORDERED */
|
||||
|
||||
/* Section flags. */
|
||||
|
||||
#define SHF_EXCLUDE 0x80000000 /* exclude from linking */
|
||||
#define SHF_ORDERED 0x40000000 /* treat sh_link,sh_info specially */
|
||||
|
||||
/* Symbol types. */
|
||||
|
||||
#define STT_REGISTER 13 /* global reg reserved to app. */
|
||||
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
/* Relocation types. */
|
||||
START_RELOC_NUMBERS (elf_sparc_reloc_type)
|
||||
RELOC_NUMBER (R_SPARC_NONE, 0)
|
||||
RELOC_NUMBER (R_SPARC_8, 1)
|
||||
RELOC_NUMBER (R_SPARC_16, 2)
|
||||
RELOC_NUMBER (R_SPARC_32, 3)
|
||||
RELOC_NUMBER (R_SPARC_DISP8, 4)
|
||||
RELOC_NUMBER (R_SPARC_DISP16, 5)
|
||||
RELOC_NUMBER (R_SPARC_DISP32, 6)
|
||||
RELOC_NUMBER (R_SPARC_WDISP30, 7)
|
||||
RELOC_NUMBER (R_SPARC_WDISP22, 8)
|
||||
RELOC_NUMBER (R_SPARC_HI22, 9)
|
||||
RELOC_NUMBER (R_SPARC_22, 10)
|
||||
RELOC_NUMBER (R_SPARC_13, 11)
|
||||
RELOC_NUMBER (R_SPARC_LO10, 12)
|
||||
RELOC_NUMBER (R_SPARC_GOT10, 13)
|
||||
RELOC_NUMBER (R_SPARC_GOT13, 14)
|
||||
RELOC_NUMBER (R_SPARC_GOT22, 15)
|
||||
RELOC_NUMBER (R_SPARC_PC10, 16)
|
||||
RELOC_NUMBER (R_SPARC_PC22, 17)
|
||||
RELOC_NUMBER (R_SPARC_WPLT30, 18)
|
||||
RELOC_NUMBER (R_SPARC_COPY, 19)
|
||||
RELOC_NUMBER (R_SPARC_GLOB_DAT, 20)
|
||||
RELOC_NUMBER (R_SPARC_JMP_SLOT, 21)
|
||||
RELOC_NUMBER (R_SPARC_RELATIVE, 22)
|
||||
RELOC_NUMBER (R_SPARC_UA32, 23)
|
||||
|
||||
/* ??? These 6 relocs are new but not currently used. For binary
|
||||
compatility in the sparc64-elf toolchain, we leave them out.
|
||||
A non-binary upward compatible change is expected for sparc64-elf. */
|
||||
#ifndef SPARC64_OLD_RELOCS
|
||||
/* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */
|
||||
RELOC_NUMBER (R_SPARC_PLT32, 24)
|
||||
RELOC_NUMBER (R_SPARC_HIPLT22, 25)
|
||||
RELOC_NUMBER (R_SPARC_LOPLT10, 26)
|
||||
RELOC_NUMBER (R_SPARC_PCPLT32, 27)
|
||||
RELOC_NUMBER (R_SPARC_PCPLT22, 28)
|
||||
RELOC_NUMBER (R_SPARC_PCPLT10, 29)
|
||||
#endif
|
||||
|
||||
/* v9 relocs */
|
||||
RELOC_NUMBER (R_SPARC_10, 30)
|
||||
RELOC_NUMBER (R_SPARC_11, 31)
|
||||
RELOC_NUMBER (R_SPARC_64, 32)
|
||||
RELOC_NUMBER (R_SPARC_OLO10, 33)
|
||||
RELOC_NUMBER (R_SPARC_HH22, 34)
|
||||
RELOC_NUMBER (R_SPARC_HM10, 35)
|
||||
RELOC_NUMBER (R_SPARC_LM22, 36)
|
||||
RELOC_NUMBER (R_SPARC_PC_HH22, 37)
|
||||
RELOC_NUMBER (R_SPARC_PC_HM10, 38)
|
||||
RELOC_NUMBER (R_SPARC_PC_LM22, 39)
|
||||
RELOC_NUMBER (R_SPARC_WDISP16, 40)
|
||||
RELOC_NUMBER (R_SPARC_WDISP19, 41)
|
||||
RELOC_NUMBER (R_SPARC_UNUSED_42, 42)
|
||||
RELOC_NUMBER (R_SPARC_7, 43)
|
||||
RELOC_NUMBER (R_SPARC_5, 44)
|
||||
RELOC_NUMBER (R_SPARC_6, 45)
|
||||
RELOC_NUMBER (R_SPARC_DISP64, 46)
|
||||
RELOC_NUMBER (R_SPARC_PLT64, 47)
|
||||
RELOC_NUMBER (R_SPARC_HIX22, 48)
|
||||
RELOC_NUMBER (R_SPARC_LOX10, 49)
|
||||
RELOC_NUMBER (R_SPARC_H44, 50)
|
||||
RELOC_NUMBER (R_SPARC_M44, 51)
|
||||
RELOC_NUMBER (R_SPARC_L44, 52)
|
||||
RELOC_NUMBER (R_SPARC_REGISTER, 53)
|
||||
RELOC_NUMBER (R_SPARC_UA64, 54)
|
||||
RELOC_NUMBER (R_SPARC_UA16, 55)
|
||||
|
||||
/* little endian data relocs */
|
||||
RELOC_NUMBER (R_SPARC_REV32, 56)
|
||||
|
||||
RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
|
||||
RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
|
||||
|
||||
EMPTY_RELOC (R_SPARC_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
/* Relocation macros. */
|
||||
|
||||
#define ELF64_R_TYPE_DATA(info) (((bfd_vma) (info) << 32) >> 40)
|
||||
#define ELF64_R_TYPE_ID(info) (((bfd_vma) (info) << 56) >> 56)
|
||||
#define ELF64_R_TYPE_INFO(data, type) (((bfd_vma) (data) << 8) \
|
||||
+ (bfd_vma) (type))
|
||||
|
||||
#define DT_SPARC_REGISTER 0x70000001
|
||||
|
||||
/*
|
||||
* FIXME: NOT ABI -- GET RID OF THIS
|
||||
* Defines the format used by the .plt. Currently defined values are
|
||||
* 0 -- reserved to SI
|
||||
* 1 -- absolute address in .got.plt
|
||||
* 2 -- got-relative address in .got.plt
|
||||
*/
|
||||
|
||||
#define DT_SPARC_PLTFMT 0x70000001
|
||||
|
||||
#endif /* _ELF_SPARC_H */
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
/* V850 ELF support for BFD.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file holds definitions specific to the MIPS ELF ABI. Note
|
||||
that most of this is not actually implemented by BFD. */
|
||||
|
||||
#ifndef _ELF_V850_H
|
||||
#define _ELF_V850_H
|
||||
|
||||
/* Processor specific flags for the ELF header e_flags field. */
|
||||
|
||||
/* Four bit V850 architecture field. */
|
||||
#define EF_V850_ARCH 0xf0000000
|
||||
|
||||
/* v850 code. */
|
||||
#define E_V850_ARCH 0x00000000
|
||||
|
||||
/* v850e code. */
|
||||
#define E_V850E_ARCH 0x10000000
|
||||
|
||||
/* v850ea code. */
|
||||
#define E_V850EA_ARCH 0x20000000
|
||||
|
||||
|
||||
/* Flags for the st_other field */
|
||||
#define V850_OTHER_SDA 0x01 /* symbol had SDA relocations */
|
||||
#define V850_OTHER_ZDA 0x02 /* symbol had ZDA relocations */
|
||||
#define V850_OTHER_TDA 0x04 /* symbol had TDA relocations */
|
||||
#define V850_OTHER_TDA_BYTE 0x08 /* symbol had TDA byte relocations */
|
||||
#define V850_OTHER_ERROR 0x80 /* symbol had an error reported */
|
||||
|
||||
/* V850 relocations */
|
||||
#include "elf/reloc-macros.h"
|
||||
|
||||
START_RELOC_NUMBERS (v850_reloc_type)
|
||||
RELOC_NUMBER (R_V850_NONE, 0)
|
||||
RELOC_NUMBER (R_V850_9_PCREL, 1)
|
||||
RELOC_NUMBER (R_V850_22_PCREL, 2)
|
||||
RELOC_NUMBER (R_V850_HI16_S, 3)
|
||||
RELOC_NUMBER (R_V850_HI16, 4)
|
||||
RELOC_NUMBER (R_V850_LO16, 5)
|
||||
RELOC_NUMBER (R_V850_32, 6)
|
||||
RELOC_NUMBER (R_V850_16, 7)
|
||||
RELOC_NUMBER (R_V850_8, 8)
|
||||
RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
|
||||
RELOC_NUMBER( R_V850_SDA_15_16_OFFSET, 10) /* For ld.w, ld.h, ld.hu, st.w, st.h */
|
||||
RELOC_NUMBER( R_V850_ZDA_16_16_OFFSET, 11) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
|
||||
RELOC_NUMBER( R_V850_ZDA_15_16_OFFSET, 12) /* For ld.w, ld.h, ld.hu, st.w, st.h */
|
||||
RELOC_NUMBER( R_V850_TDA_6_8_OFFSET, 13) /* For sst.w, sld.w */
|
||||
RELOC_NUMBER( R_V850_TDA_7_8_OFFSET, 14) /* For sst.h, sld.h */
|
||||
RELOC_NUMBER( R_V850_TDA_7_7_OFFSET, 15) /* For sst.b, sld.b */
|
||||
RELOC_NUMBER( R_V850_TDA_16_16_OFFSET, 16) /* For set1, clr1, not1, tst1, movea, movhi */
|
||||
/* CYGNUS LOCAL v850e */
|
||||
RELOC_NUMBER( R_V850_TDA_4_5_OFFSET, 17) /* For sld.hu */
|
||||
RELOC_NUMBER( R_V850_TDA_4_4_OFFSET, 18) /* For sld.bu */
|
||||
RELOC_NUMBER( R_V850_SDA_16_16_SPLIT_OFFSET, 19) /* For ld.bu */
|
||||
RELOC_NUMBER( R_V850_ZDA_16_16_SPLIT_OFFSET, 20) /* For ld.bu */
|
||||
RELOC_NUMBER( R_V850_CALLT_6_7_OFFSET, 21) /* For callt */
|
||||
RELOC_NUMBER( R_V850_CALLT_16_16_OFFSET, 22) /* For callt */
|
||||
/* END CYGNUS LOCAL */
|
||||
RELOC_NUMBER (R_V850_GNU_VTINHERIT, 23)
|
||||
RELOC_NUMBER (R_V850_GNU_VTENTRY, 24)
|
||||
|
||||
EMPTY_RELOC (R_V850_max)
|
||||
END_RELOC_NUMBERS
|
||||
|
||||
|
||||
/* Processor specific section indices. These sections do not actually
|
||||
exist. Symbols with a st_shndx field corresponding to one of these
|
||||
values have a special meaning. */
|
||||
|
||||
/* Small data area common symbol. */
|
||||
#define SHN_V850_SCOMMON 0xff00
|
||||
|
||||
/* Tiny data area common symbol. */
|
||||
#define SHN_V850_TCOMMON 0xff01
|
||||
|
||||
/* Zero data area common symbol. */
|
||||
#define SHN_V850_ZCOMMON 0xff02
|
||||
|
||||
|
||||
/* Processor specific section types. */
|
||||
|
||||
/* Section contains the .scommon data. */
|
||||
#define SHT_V850_SCOMMON 0x70000000
|
||||
|
||||
/* Section contains the .scommon data. */
|
||||
#define SHT_V850_TCOMMON 0x70000001
|
||||
|
||||
/* Section contains the .scommon data. */
|
||||
#define SHT_V850_ZCOMMON 0x70000002
|
||||
|
||||
|
||||
#endif /* _ELF_V850_H */
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if !defined (FLOATFORMAT_H)
|
||||
#define FLOATFORMAT_H 1
|
||||
|
||||
#include "ansidecl.h"
|
||||
|
||||
/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the
|
||||
bytes are concatenated according to the byteorder flag, then each of those
|
||||
fields is contiguous. We number the bits with 0 being the most significant
|
||||
(i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field
|
||||
contains with the *_start and *_len fields. */
|
||||
|
||||
/* What is the order of the bytes. */
|
||||
|
||||
enum floatformat_byteorders {
|
||||
|
||||
/* Standard little endian byte order.
|
||||
EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */
|
||||
|
||||
floatformat_little,
|
||||
|
||||
/* Standard big endian byte order.
|
||||
EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */
|
||||
|
||||
floatformat_big,
|
||||
|
||||
/* Little endian byte order but big endian word order.
|
||||
EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */
|
||||
|
||||
floatformat_littlebyte_bigword
|
||||
|
||||
};
|
||||
|
||||
enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no };
|
||||
|
||||
struct floatformat
|
||||
{
|
||||
enum floatformat_byteorders byteorder;
|
||||
unsigned int totalsize; /* Total size of number in bits */
|
||||
|
||||
/* Sign bit is always one bit long. 1 means negative, 0 means positive. */
|
||||
unsigned int sign_start;
|
||||
|
||||
unsigned int exp_start;
|
||||
unsigned int exp_len;
|
||||
/* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */
|
||||
unsigned int exp_bias;
|
||||
/* Exponent value which indicates NaN. This is the actual value stored in
|
||||
the float, not adjusted by the exp_bias. This usually consists of all
|
||||
one bits. */
|
||||
unsigned int exp_nan;
|
||||
|
||||
unsigned int man_start;
|
||||
unsigned int man_len;
|
||||
|
||||
/* Is the integer bit explicit or implicit? */
|
||||
enum floatformat_intbit intbit;
|
||||
};
|
||||
|
||||
/* floatformats for IEEE single and double, big and little endian. */
|
||||
|
||||
extern const struct floatformat floatformat_ieee_single_big;
|
||||
extern const struct floatformat floatformat_ieee_single_little;
|
||||
extern const struct floatformat floatformat_ieee_double_big;
|
||||
extern const struct floatformat floatformat_ieee_double_little;
|
||||
|
||||
/* floatformat for ARM IEEE double, little endian bytes and big endian words */
|
||||
|
||||
extern const struct floatformat floatformat_ieee_double_littlebyte_bigword;
|
||||
|
||||
/* floatformats for various extendeds. */
|
||||
|
||||
extern const struct floatformat floatformat_i387_ext;
|
||||
extern const struct floatformat floatformat_m68881_ext;
|
||||
extern const struct floatformat floatformat_i960_ext;
|
||||
extern const struct floatformat floatformat_m88110_ext;
|
||||
extern const struct floatformat floatformat_arm_ext;
|
||||
|
||||
/* Convert from FMT to a double.
|
||||
FROM is the address of the extended float.
|
||||
Store the double in *TO. */
|
||||
|
||||
extern void
|
||||
floatformat_to_double PARAMS ((const struct floatformat *, char *, double *));
|
||||
|
||||
/* The converse: convert the double *FROM to FMT
|
||||
and store where TO points. */
|
||||
|
||||
extern void
|
||||
floatformat_from_double PARAMS ((const struct floatformat *,
|
||||
double *, char *));
|
||||
|
||||
#endif /* defined (FLOATFORMAT_H) */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
|
||||
#define _FNMATCH_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||
#undef __P
|
||||
#define __P(args) args
|
||||
#else /* Not C++ or ANSI C. */
|
||||
#undef __P
|
||||
#define __P(args) ()
|
||||
/* We can get away without defining `const' here only because in this file
|
||||
it is used only inside the prototype for `fnmatch', which is elided in
|
||||
non-ANSI C where `const' is problematical. */
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
|
||||
/* We #undef these before defining them because some losing systems
|
||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||
#undef FNM_PATHNAME
|
||||
#undef FNM_NOESCAPE
|
||||
#undef FNM_PERIOD
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||
|
||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
|
||||
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||
#endif
|
||||
|
||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||
#define FNM_NOMATCH 1
|
||||
|
||||
/* Match STRING against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
||||
int __flags));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* fnmatch.h */
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/* Macros for the 'type' part of an fopen, freopen or fdopen.
|
||||
|
||||
<Read|Write>[Update]<Binary file|text file>
|
||||
|
||||
This version is for "binary" systems, where text and binary files are
|
||||
different. An example is Mess-Dose. Many Unix systems could also
|
||||
cope with a "b" in the string, indicating binary files, but some reject this
|
||||
(and thereby don't conform to ANSI C, but what else is new?).
|
||||
|
||||
This file is designed for inclusion by host-dependent .h files. No
|
||||
user application should include it directly, since that would make
|
||||
the application unable to be configured for both "same" and "binary"
|
||||
variant systems. */
|
||||
|
||||
#define FOPEN_RB "rb"
|
||||
#define FOPEN_WB "wb"
|
||||
#define FOPEN_AB "ab"
|
||||
#define FOPEN_RUB "r+b"
|
||||
#define FOPEN_WUB "w+b"
|
||||
#define FOPEN_AUB "a+b"
|
||||
|
||||
#define FOPEN_RT "r"
|
||||
#define FOPEN_WT "w"
|
||||
#define FOPEN_AT "a"
|
||||
#define FOPEN_RUT "r+"
|
||||
#define FOPEN_WUT "w+"
|
||||
#define FOPEN_AUT "a+"
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/* Macros for the 'type' part of an fopen, freopen or fdopen.
|
||||
|
||||
<Read|Write>[Update]<Binary file|text file>
|
||||
|
||||
This version is for "same" systems, where text and binary files are
|
||||
the same. An example is Unix. Many Unix systems could also add a
|
||||
"b" to the string, indicating binary files, but some reject this
|
||||
(and thereby don't conform to ANSI C, but what else is new?).
|
||||
|
||||
This file is designed for inclusion by host-dependent .h files. No
|
||||
user application should include it directly, since that would make
|
||||
the application unable to be configured for both "same" and "binary"
|
||||
variant systems. */
|
||||
|
||||
#define FOPEN_RB "r"
|
||||
#define FOPEN_WB "w"
|
||||
#define FOPEN_AB "a"
|
||||
#define FOPEN_RUB "r+"
|
||||
#define FOPEN_WUB "w+"
|
||||
#define FOPEN_AUB "a+"
|
||||
|
||||
#define FOPEN_RT "r"
|
||||
#define FOPEN_WT "w"
|
||||
#define FOPEN_AT "a"
|
||||
#define FOPEN_RUT "r+"
|
||||
#define FOPEN_WUT "w+"
|
||||
#define FOPEN_AUT "a+"
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
/* Macros for the 'type' part of an fopen, freopen or fdopen.
|
||||
|
||||
<Read|Write>[Update]<Binary file|text file>
|
||||
|
||||
This version is for VMS systems, where text and binary files are
|
||||
different.
|
||||
This file is designed for inclusion by host-dependent .h files. No
|
||||
user application should include it directly, since that would make
|
||||
the application unable to be configured for both "same" and "binary"
|
||||
variant systems. */
|
||||
|
||||
#define FOPEN_RB "rb","rfm=var"
|
||||
#define FOPEN_WB "wb","rfm=var"
|
||||
#define FOPEN_AB "ab","rfm=var"
|
||||
#define FOPEN_RUB "r+b","rfm=var"
|
||||
#define FOPEN_WUB "w+b","rfm=var"
|
||||
#define FOPEN_AUB "a+b","rfm=var"
|
||||
|
||||
#define FOPEN_RT "r"
|
||||
#define FOPEN_WT "w"
|
||||
#define FOPEN_AT "a"
|
||||
#define FOPEN_RUT "r+"
|
||||
#define FOPEN_WUT "w+"
|
||||
#define FOPEN_AUT "a+"
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
/* GNU DBM - DataBase Manager include file
|
||||
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||
Written by Philip A. Nelson.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* You may contact the author by:
|
||||
e-mail: phil@wwu.edu
|
||||
us-mail: Philip A. Nelson
|
||||
Computer Science Department
|
||||
Western Washington University
|
||||
Bellingham, WA 98226
|
||||
phone: (206) 676-3035
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
/* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
|
||||
can create the database. */
|
||||
#define GDBM_READER 0
|
||||
#define GDBM_WRITER 1
|
||||
#define GDBM_WRCREAT 2
|
||||
#define GDBM_NEWDB 3
|
||||
|
||||
/* Parameters to gdbm_store for simple insertion or replacement. */
|
||||
#define GDBM_INSERT 0
|
||||
#define GDBM_REPLACE 1
|
||||
|
||||
|
||||
/* The data and key structure. This structure is defined for compatibility. */
|
||||
typedef struct {
|
||||
char *dptr;
|
||||
int dsize;
|
||||
} datum;
|
||||
|
||||
|
||||
/* The file information header. This is good enough for most applications. */
|
||||
typedef struct {int dummy[10];} *GDBM_FILE;
|
||||
|
||||
|
||||
/* These are the routines! */
|
||||
|
||||
extern GDBM_FILE gdbm_open ();
|
||||
|
||||
extern void gdbm_close ();
|
||||
|
||||
extern datum gdbm_fetch ();
|
||||
|
||||
extern int gdbm_store ();
|
||||
|
||||
extern int gdbm_delete ();
|
||||
|
||||
extern datum gdbm_firstkey ();
|
||||
|
||||
extern datum gdbm_nextkey ();
|
||||
|
||||
extern int gdbm_reorganize ();
|
||||
|
||||
|
||||
/* gdbm sends back the following error codes in the variable gdbm_errno. */
|
||||
typedef enum { NO_ERROR,
|
||||
MALLOC_ERROR,
|
||||
BLOCK_SIZE_ERROR,
|
||||
FILE_OPEN_ERROR,
|
||||
FILE_WRITE_ERROR,
|
||||
FILE_SEEK_ERROR,
|
||||
FILE_READ_ERROR,
|
||||
BAD_MAGIC_NUMBER,
|
||||
EMPTY_DATABASE,
|
||||
CANT_BE_READER,
|
||||
CANT_BE_WRITER,
|
||||
READER_CANT_RECOVER,
|
||||
READER_CANT_DELETE,
|
||||
READER_CANT_STORE,
|
||||
READER_CANT_REORGANIZE,
|
||||
UNKNOWN_UPDATE,
|
||||
ITEM_NOT_FOUND,
|
||||
REORGANIZE_FAILED,
|
||||
CANNOT_REPLACE}
|
||||
gdbm_error;
|
||||
133
include/getopt.h
133
include/getopt.h
|
|
@ -1,133 +0,0 @@
|
|||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
extern char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns -1, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
extern int optind;
|
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */
|
||||
|
||||
extern int opterr;
|
||||
|
||||
/* Set to an option character which was unrecognized. */
|
||||
|
||||
extern int optopt;
|
||||
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||
of `struct option' terminated by an element containing a name which is
|
||||
zero.
|
||||
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
left unchanged if the option is not found.
|
||||
|
||||
To have a long-named option do something other than set an `int' to
|
||||
a compiled-in constant, such as set a value from `optarg', set the
|
||||
option's `flag' field to zero and its `val' field to a nonzero
|
||||
value (the equivalent single-letter option character, if there is
|
||||
one). For long options that have a zero `flag' field, `getopt'
|
||||
returns the contents of the `val' field. */
|
||||
|
||||
struct option
|
||||
{
|
||||
#if defined (__STDC__) && __STDC__
|
||||
const char *name;
|
||||
#else
|
||||
char *name;
|
||||
#endif
|
||||
/* has_arg can't be an enum because some compilers complain about
|
||||
type mismatches in all the code that assumes it is an int. */
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||
#else /* not __GNU_LIBRARY__ */
|
||||
extern int getopt ();
|
||||
#endif /* __GNU_LIBRARY__ */
|
||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
extern int getopt_long_only (int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
|
||||
/* Internal only. Users should not call this directly. */
|
||||
extern int _getopt_internal (int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind,
|
||||
int long_only);
|
||||
#else /* not __STDC__ */
|
||||
extern int getopt ();
|
||||
extern int getopt_long ();
|
||||
extern int getopt_long_only ();
|
||||
|
||||
extern int _getopt_internal ();
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* getopt.h */
|
||||
1871
include/hp-symtab.h
1871
include/hp-symtab.h
File diff suppressed because it is too large
Load Diff
139
include/ieee.h
139
include/ieee.h
|
|
@ -1,139 +0,0 @@
|
|||
/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
|
||||
Contributed by Cygnus Support. */
|
||||
|
||||
#define N_W_VARIABLES 8
|
||||
#define Module_Beginning 0xe0
|
||||
|
||||
typedef struct ieee_module {
|
||||
char *processor;
|
||||
char *module_name;
|
||||
} ieee_module_begin_type;
|
||||
|
||||
#define Address_Descriptor 0xec
|
||||
typedef struct ieee_address {
|
||||
bfd_vma number_of_bits_mau;
|
||||
bfd_vma number_of_maus_in_address;
|
||||
|
||||
unsigned char byte_order;
|
||||
#define IEEE_LITTLE 0xcc
|
||||
#define IEEE_BIG 0xcd
|
||||
} ieee_address_descriptor_type;
|
||||
|
||||
typedef union ieee_w_variable {
|
||||
file_ptr offset[N_W_VARIABLES];
|
||||
struct {
|
||||
file_ptr extension_record;
|
||||
file_ptr environmental_record;
|
||||
file_ptr section_part;
|
||||
file_ptr external_part;
|
||||
file_ptr debug_information_part;
|
||||
file_ptr data_part;
|
||||
file_ptr trailer_part;
|
||||
file_ptr me_record;
|
||||
} r;
|
||||
} ieee_w_variable_type;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum ieee_record
|
||||
{
|
||||
ieee_number_start_enum = 0x00,
|
||||
ieee_number_end_enum=0x7f,
|
||||
ieee_number_repeat_start_enum = 0x80,
|
||||
ieee_number_repeat_end_enum = 0x88,
|
||||
ieee_number_repeat_4_enum = 0x84,
|
||||
ieee_number_repeat_3_enum = 0x83,
|
||||
ieee_number_repeat_2_enum = 0x82,
|
||||
ieee_number_repeat_1_enum = 0x81,
|
||||
ieee_module_beginning_enum = 0xe0,
|
||||
ieee_module_end_enum = 0xe1,
|
||||
ieee_extension_length_1_enum = 0xde,
|
||||
ieee_extension_length_2_enum = 0xdf,
|
||||
ieee_section_type_enum = 0xe6,
|
||||
ieee_section_alignment_enum = 0xe7,
|
||||
ieee_external_symbol_enum = 0xe8,
|
||||
ieee_comma = 0x90,
|
||||
ieee_external_reference_enum = 0xe9,
|
||||
ieee_set_current_section_enum = 0xe5,
|
||||
ieee_address_descriptor_enum = 0xec,
|
||||
ieee_load_constant_bytes_enum = 0xed,
|
||||
ieee_load_with_relocation_enum = 0xe4,
|
||||
|
||||
ieee_variable_A_enum = 0xc1,
|
||||
ieee_variable_B_enum = 0xc2,
|
||||
ieee_variable_C_enum = 0xc3,
|
||||
ieee_variable_D_enum = 0xc4,
|
||||
ieee_variable_E_enum = 0xc5,
|
||||
ieee_variable_F_enum = 0xc6,
|
||||
ieee_variable_G_enum = 0xc7,
|
||||
ieee_variable_H_enum = 0xc8,
|
||||
ieee_variable_I_enum = 0xc9,
|
||||
ieee_variable_J_enum = 0xca,
|
||||
ieee_variable_K_enum = 0xcb,
|
||||
ieee_variable_L_enum = 0xcc,
|
||||
ieee_variable_M_enum = 0xcd,
|
||||
ieee_variable_N_enum = 0xce,
|
||||
ieee_variable_O_enum = 0xcf,
|
||||
ieee_variable_P_enum = 0xd0,
|
||||
ieee_variable_Q_enum = 0xd1,
|
||||
ieee_variable_R_enum = 0xd2,
|
||||
ieee_variable_S_enum = 0xd3,
|
||||
ieee_variable_T_enum = 0xd4,
|
||||
ieee_variable_U_enum = 0xd5,
|
||||
ieee_variable_V_enum = 0xd6,
|
||||
ieee_variable_W_enum = 0xd7,
|
||||
ieee_variable_X_enum = 0xd8,
|
||||
ieee_variable_Y_enum = 0xd9,
|
||||
ieee_variable_Z_enum = 0xda,
|
||||
ieee_function_plus_enum = 0xa5,
|
||||
ieee_function_minus_enum = 0xa6,
|
||||
ieee_function_signed_open_b_enum = 0xba,
|
||||
ieee_function_signed_close_b_enum = 0xbb,
|
||||
|
||||
ieee_function_unsigned_open_b_enum = 0xbc,
|
||||
ieee_function_unsigned_close_b_enum = 0xbd,
|
||||
|
||||
ieee_function_either_open_b_enum = 0xbe,
|
||||
ieee_function_either_close_b_enum = 0xbf,
|
||||
ieee_record_seperator_enum = 0xdb,
|
||||
|
||||
ieee_e2_first_byte_enum = 0xe2,
|
||||
ieee_section_size_enum = 0xe2d3,
|
||||
ieee_physical_region_size_enum = 0xe2c1,
|
||||
ieee_region_base_address_enum = 0xe2c2,
|
||||
ieee_mau_size_enum = 0xe2c6,
|
||||
ieee_m_value_enum = 0xe2cd,
|
||||
ieee_section_base_address_enum = 0xe2cc,
|
||||
ieee_asn_record_enum = 0xe2ce,
|
||||
ieee_section_offset_enum = 0xe2d2,
|
||||
ieee_value_starting_address_enum = 0xe2c7,
|
||||
ieee_assign_value_to_variable_enum = 0xe2d7,
|
||||
ieee_set_current_pc_enum = 0xe2d0,
|
||||
ieee_value_record_enum = 0xe2c9,
|
||||
ieee_nn_record = 0xf0,
|
||||
ieee_at_record_enum = 0xf1,
|
||||
ieee_ty_record_enum = 0xf2,
|
||||
ieee_attribute_record_enum = 0xf1c9,
|
||||
ieee_atn_record_enum = 0xf1ce,
|
||||
ieee_external_reference_info_record_enum = 0xf1d8,
|
||||
ieee_weak_external_reference_enum= 0xf4,
|
||||
ieee_repeat_data_enum = 0xf7,
|
||||
ieee_bb_record_enum = 0xf8,
|
||||
ieee_be_record_enum = 0xf9
|
||||
} ieee_record_enum_type;
|
||||
|
||||
|
||||
typedef struct ieee_section {
|
||||
unsigned int section_index;
|
||||
unsigned int section_type;
|
||||
char *section_name;
|
||||
unsigned int parent_section_index;
|
||||
unsigned int sibling_section_index;
|
||||
unsigned int context_index;
|
||||
} ieee_section_type;
|
||||
#define IEEE_REFERENCE_BASE 11
|
||||
#define IEEE_PUBLIC_BASE 32
|
||||
#define IEEE_SECTION_NUMBER_BASE 1
|
||||
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
/* Function declarations for libiberty.
|
||||
Written by Cygnus Support, 1994.
|
||||
|
||||
The libiberty library provides a number of functions which are
|
||||
missing on some operating systems. We do not declare those here,
|
||||
to avoid conflicts with the system header files on operating
|
||||
systems that do support those functions. In this file we only
|
||||
declare those functions which are specific to libiberty. */
|
||||
|
||||
#ifndef LIBIBERTY_H
|
||||
#define LIBIBERTY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ansidecl.h"
|
||||
|
||||
/* Build an argument vector from a string. Allocates memory using
|
||||
malloc. Use freeargv to free the vector. */
|
||||
|
||||
extern char **buildargv PARAMS ((char *));
|
||||
|
||||
/* Free a vector returned by buildargv. */
|
||||
|
||||
extern void freeargv PARAMS ((char **));
|
||||
|
||||
/* Duplicate an argument vector. Allocates memory using malloc. Use
|
||||
freeargv to free the vector. */
|
||||
|
||||
extern char **dupargv PARAMS ((char **));
|
||||
|
||||
|
||||
/* Return the last component of a path name. Note that we can't use a
|
||||
prototype here because the parameter is declared inconsistently
|
||||
across different systems, sometimes as "char *" and sometimes as
|
||||
"const char *" */
|
||||
|
||||
#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__)
|
||||
extern char *basename PARAMS ((const char *));
|
||||
#else
|
||||
extern char *basename ();
|
||||
#endif
|
||||
|
||||
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
|
||||
Allocates memory using xmalloc. */
|
||||
|
||||
extern char *concat PARAMS ((const char *, ...));
|
||||
|
||||
/* Check whether two file descriptors refer to the same file. */
|
||||
|
||||
extern int fdmatch PARAMS ((int fd1, int fd2));
|
||||
|
||||
/* Get the amount of time the process has run, in microseconds. */
|
||||
|
||||
extern long get_run_time PARAMS ((void));
|
||||
|
||||
/* Choose a temporary directory to use for scratch files. */
|
||||
|
||||
extern char *choose_temp_base PARAMS ((void));
|
||||
|
||||
/* Allocate memory filled with spaces. Allocates using malloc. */
|
||||
|
||||
extern const char *spaces PARAMS ((int count));
|
||||
|
||||
/* Return the maximum error number for which strerror will return a
|
||||
string. */
|
||||
|
||||
extern int errno_max PARAMS ((void));
|
||||
|
||||
/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
|
||||
"EINVAL"). */
|
||||
|
||||
extern const char *strerrno PARAMS ((int));
|
||||
|
||||
/* Given the name of an errno value, return the value. */
|
||||
|
||||
extern int strtoerrno PARAMS ((const char *));
|
||||
|
||||
/* ANSI's strerror(), but more robust. */
|
||||
|
||||
extern char *xstrerror PARAMS ((int));
|
||||
|
||||
/* Return the maximum signal number for which strsignal will return a
|
||||
string. */
|
||||
|
||||
extern int signo_max PARAMS ((void));
|
||||
|
||||
/* Return a signal message string for a signal number
|
||||
(e.g., strsignal (SIGHUP) returns something like "Hangup"). */
|
||||
/* This is commented out as it can conflict with one in system headers.
|
||||
We still document its existence though. */
|
||||
|
||||
/*extern const char *strsignal PARAMS ((int));*/
|
||||
|
||||
/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
|
||||
"SIGHUP"). */
|
||||
|
||||
extern const char *strsigno PARAMS ((int));
|
||||
|
||||
/* Given the name of a signal, return its number. */
|
||||
|
||||
extern int strtosigno PARAMS ((const char *));
|
||||
|
||||
/* Register a function to be run by xexit. Returns 0 on success. */
|
||||
|
||||
extern int xatexit PARAMS ((void (*fn) (void)));
|
||||
|
||||
/* Exit, calling all the functions registered with xatexit. */
|
||||
|
||||
#ifndef __GNUC__
|
||||
extern void xexit PARAMS ((int status));
|
||||
#else
|
||||
void xexit PARAMS ((int status)) __attribute__ ((noreturn));
|
||||
#endif
|
||||
|
||||
/* Set the program name used by xmalloc. */
|
||||
|
||||
extern void xmalloc_set_program_name PARAMS ((const char *));
|
||||
|
||||
/* Allocate memory without fail. If malloc fails, this will print a
|
||||
message to stderr (using the name set by xmalloc_set_program_name,
|
||||
if any) and then call xexit. */
|
||||
|
||||
#ifdef ANSI_PROTOTYPES
|
||||
/* Get a definition for size_t. */
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
extern PTR xmalloc PARAMS ((size_t));
|
||||
|
||||
/* Reallocate memory without fail. This works like xmalloc.
|
||||
|
||||
FIXME: We do not declare the parameter types for the same reason as
|
||||
xmalloc. */
|
||||
|
||||
extern PTR xrealloc PARAMS ((PTR, size_t));
|
||||
|
||||
/* Allocate memory without fail and set it to zero. This works like
|
||||
xmalloc. */
|
||||
|
||||
extern PTR xcalloc PARAMS ((size_t, size_t));
|
||||
|
||||
/* Copy a string into a memory buffer without fail. */
|
||||
|
||||
extern char *xstrdup PARAMS ((const char *));
|
||||
|
||||
/* hex character manipulation routines */
|
||||
|
||||
#define _hex_array_size 256
|
||||
#define _hex_bad 99
|
||||
extern char _hex_value[_hex_array_size];
|
||||
extern void hex_init PARAMS ((void));
|
||||
#define hex_p(c) (hex_value (c) != _hex_bad)
|
||||
/* If you change this, note well: Some code relies on side effects in
|
||||
the argument being performed exactly once. */
|
||||
#define hex_value(c) (_hex_value[(unsigned char) (c)])
|
||||
|
||||
/* Definitions used by the pexecute routine. */
|
||||
|
||||
#define PEXECUTE_FIRST 1
|
||||
#define PEXECUTE_LAST 2
|
||||
#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST)
|
||||
#define PEXECUTE_SEARCH 4
|
||||
#define PEXECUTE_VERBOSE 8
|
||||
|
||||
/* Execute a program. */
|
||||
|
||||
extern int pexecute PARAMS ((const char *, char * const *, const char *,
|
||||
const char *, char **, char **, int));
|
||||
|
||||
/* Wait for pexecute to finish. */
|
||||
|
||||
extern int pwait PARAMS ((int, int *, int));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* ! defined (LIBIBERTY_H) */
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
Tue Feb 27 12:23:04 1996 Raymond Jou <rjou@mexican.cygnus.com>
|
||||
|
||||
* mpw.h (HAVE_VPRINTF): Add and define to have the value 1.
|
||||
|
||||
Fri Dec 29 14:40:46 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* mpw.h (HAVE_STDLIB_H, etc): Define to have the value 1.
|
||||
(HAVE_FCNTL_H): Define.
|
||||
|
||||
Mon Dec 11 15:39:06 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* mpw.h (open, access): Define as mpw_open and mpw_access.
|
||||
|
||||
Thu Nov 9 15:38:37 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* mpw.h: Include unix.h if USE_MW_HEADERS, otherwise include
|
||||
various original MPW include files (ioctl.h, etc).
|
||||
(EIO): Define if not defined.
|
||||
* sys/ioctl.h: Remove, not needed.
|
||||
|
||||
Wed Oct 25 12:30:44 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* mpw.h: Don't include errno.h or ioctl.h.
|
||||
(ENOENT, EACCES, ENOSYS): Define if not defined.
|
||||
(fdopen): Declare if __STDC__.
|
||||
(R_OK, W_OK, X_OK): Define if not defined.
|
||||
|
||||
Tue Sep 26 14:57:21 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* mpw.h: New file, universally useful MPW host definitions.
|
||||
Many of these used to live in bfd/hosts/mpw.h.
|
||||
* grp.h: Remove RCS comment.
|
||||
* sys/ioctl.h: Add a comment line.
|
||||
|
||||
Wed Dec 14 13:12:14 1994 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* spin.h: New file, cursor spinning for progress.
|
||||
|
||||
Thu Jun 30 15:32:07 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* fcntl.h (open): Allow optional third arg.
|
||||
|
||||
Thu Apr 14 12:54:51 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* dir.h, dirent.h, fcntl.h, grp.h, pwd.h, stat.h: New files.
|
||||
* sys/ioctl.h: New file.
|
||||
|
||||
Mon Feb 21 09:44:45 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* sys/stat.h (struct stat): New field st_rsize.
|
||||
(S_IFMT, etc): Use different bit positions.
|
||||
(fstat): Add parameter names to prototype.
|
||||
|
||||
Mon Jan 31 19:30:16 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* README: New file.
|
||||
* utime.h, varargs.h: New files, simulated Posix.
|
||||
* sys/{file,param,resource,stat,time,types}.h: New files, more
|
||||
simulated Posix.
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
This is a collection of include files that help imitate Posix in MPW.
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
/* The <dir.h> header gives the layout of a directory. */
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _DIR_H
|
||||
#define _DIR_H
|
||||
|
||||
#ifndef _TYPES_H /* not quite right */
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#define DIRBLKSIZ 512 /* size of directory block */
|
||||
|
||||
#ifndef DIRSIZ
|
||||
#define DIRSIZ 14
|
||||
#endif
|
||||
|
||||
struct direct {
|
||||
ino_t d_ino;
|
||||
char d_name[DIRSIZ];
|
||||
};
|
||||
|
||||
#endif /* _DIR_H */
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#ifndef __dirent_h
|
||||
#define __dirent_h
|
||||
|
||||
#include "sys/dir.h"
|
||||
|
||||
struct dirent {
|
||||
long d_ino; /* inode number of entry */
|
||||
off_t d_off; /* offset of disk directory entry */
|
||||
unsigned short d_reclen; /* length of this record */
|
||||
char d_name[1]; /* name of file */
|
||||
};
|
||||
|
||||
/*
|
||||
#define DIRENTBASESIZE \
|
||||
(((struct dirent *) 0)->d_name - (char *) 0)
|
||||
#define DIRENTSIZE(namelen) \
|
||||
((DIRENTBASESIZE + (namelen) + NBPW) & ~(NBPW - 1))
|
||||
*/
|
||||
|
||||
/* from Mips posix/dirent.h */
|
||||
|
||||
/*
|
||||
#undef rewinddir
|
||||
*/
|
||||
|
||||
extern DIR *opendir();
|
||||
extern struct dirent *readdir();
|
||||
extern void rewinddir();
|
||||
extern int closedir();
|
||||
|
||||
#endif /* ! __dirent_h */
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
/*
|
||||
* FCntl.h -- faccess(), fcntl(), and open() mode flags
|
||||
*
|
||||
* Portions copyright American Telephone & Telegraph
|
||||
* Used with permission, Apple Computer Inc. (1985,1988,1990,1992)
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __FCNTL__
|
||||
#define __FCNTL__
|
||||
|
||||
#ifndef __TYPES__
|
||||
#include <Types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For use by lseek():
|
||||
*/
|
||||
|
||||
#ifndef __STDIO__ /* these defns exactly paralled in StdIO.h for fseek() */
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
#define SEEK_SET 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* faccess() commands; for general use
|
||||
*/
|
||||
/* 'd' => "directory" ops */
|
||||
#define F_DELETE (('d'<<8)|0x01)
|
||||
#define F_RENAME (('d'<<8)|0x02)
|
||||
|
||||
/*
|
||||
* more faccess() commands; for use only by MPW tools
|
||||
*/
|
||||
|
||||
#define F_OPEN (('d'<<8)|0x00) /* reserved for operating system use */
|
||||
/* 'e' => "editor" ops */
|
||||
#define F_GTABINFO (('e'<<8)|0x00) /* get tab offset for file */
|
||||
#define F_STABINFO (('e'<<8)|0x01) /* set " " " " */
|
||||
#define F_GFONTINFO (('e'<<8)|0x02) /* get font number and size for file */
|
||||
#define F_SFONTINFO (('e'<<8)|0x03) /* set " " " " " " */
|
||||
#define F_GPRINTREC (('e'<<8)|0x04) /* get print record for file */
|
||||
#define F_SPRINTREC (('e'<<8)|0x05) /* set " " " " */
|
||||
#define F_GSELINFO (('e'<<8)|0x06) /* get selection information for file */
|
||||
#define F_SSELINFO (('e'<<8)|0x07) /* set " " " " */
|
||||
#define F_GWININFO (('e'<<8)|0x08) /* get current window position */
|
||||
#define F_SWININFO (('e'<<8)|0x09) /* set " " " */
|
||||
#define F_GSCROLLINFO (('e'<<8)|0x0A) /* get scroll information */
|
||||
#define F_SSCROLLINFO (('e'<<8)|0x0B) /* set " " */
|
||||
#define F_GMARKER (('e'<<8)|0x0D) /* Get Marker */
|
||||
#define F_SMARKER (('e'<<8)|0x0C) /* Set " */
|
||||
#define F_GSAVEONCLOSE (('e'<<8)|0x0F) /* Get Save on close */
|
||||
#define F_SSAVEONCLOSE (('e'<<8)|0x0E) /* Set " " " */
|
||||
|
||||
/*
|
||||
* argument structures used by various faccess() commands
|
||||
*/
|
||||
|
||||
struct MarkElement {
|
||||
int start; /* start position of mark */
|
||||
int end; /* end position */
|
||||
unsigned char charCount; /* number of chars in mark name */
|
||||
char name[64]; /* mark name */
|
||||
} ; /* note: marker names may be up to 64 characters long */
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef struct MarkElement MarkElement;
|
||||
#endif
|
||||
|
||||
struct SelectionRecord {
|
||||
long startingPos;
|
||||
long endingPos;
|
||||
long displayTop;
|
||||
};
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef struct SelectionRecord SelectionRecord;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Mode values accessible to open()
|
||||
*/
|
||||
#define O_RDONLY 0 /* Bits 0 and 1 are used internally */
|
||||
#define O_WRONLY 1 /* Values 0..2 are historical */
|
||||
#define O_RDWR 2 /* NOTE: it goes 0, 1, 2, *!* 8, 16, 32, ... */
|
||||
#define O_APPEND (1<< 3) /* append (writes guaranteed at the end) */
|
||||
#define O_RSRC (1<< 4) /* Open the resource fork */
|
||||
#define O_ALIAS (1<< 5) /* Open alias file */
|
||||
#define O_CREAT (1<< 8) /* Open with file create */
|
||||
#define O_TRUNC (1<< 9) /* Open with truncation */
|
||||
#define O_EXCL (1<<10) /* w/ O_CREAT: Exclusive "create-only" */
|
||||
#define O_BINARY (1<<11) /* Open as a binary stream */
|
||||
#define O_NRESOLVE (1<<14) /* Don't resolve any aliases */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* function prototypes
|
||||
*/
|
||||
int close(int);
|
||||
int creat(const char*);
|
||||
int dup(int filedes); /* OBSOLETE: fcntl(filedes, F_DUPFD, 0) is preferred */
|
||||
int faccess(char*, unsigned int, long*);
|
||||
int fcntl(int, unsigned int, int);
|
||||
long lseek(int, long, int);
|
||||
int open(const char*, int, ...);
|
||||
int read(int, char*, unsigned);
|
||||
int unlink(char*);
|
||||
int write(int, const char*, unsigned);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* fcntl() commands
|
||||
*/
|
||||
#define F_DUPFD 0 /* Duplicate files (file descriptor) */
|
||||
|
||||
#endif __FCNTL__
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "sys/types.h"
|
||||
|
||||
struct group {
|
||||
char *gr_name;
|
||||
gid_t gr_gid;
|
||||
char *gr_passwd;
|
||||
char **gr_mem;
|
||||
};
|
||||
|
|
@ -1,130 +0,0 @@
|
|||
/* Mac MPW host-specific definitions. */
|
||||
|
||||
#ifndef __INCLUDE_MPW_H
|
||||
#define __INCLUDE_MPW_H
|
||||
|
||||
#ifndef MPW
|
||||
#define MPW
|
||||
#endif
|
||||
|
||||
/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
|
||||
nor does it allow __STDC__ to be #defined. */
|
||||
|
||||
#ifndef ALMOST_STDC
|
||||
#define ALMOST_STDC
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define HAVE_TIME_T_IN_TIME_H 1
|
||||
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
#ifdef USE_MW_HEADERS
|
||||
|
||||
#include <unix.h>
|
||||
|
||||
#else
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
#ifndef O_ACCMODE
|
||||
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
||||
#endif
|
||||
|
||||
#ifndef fileno
|
||||
#define fileno(fp) ((fp)->_file)
|
||||
#endif
|
||||
|
||||
/* stdio.h does not define this if __STDC__, so define here. */
|
||||
|
||||
#ifdef __STDC__
|
||||
FILE *fdopen(int fildes, const char *mode);
|
||||
#endif
|
||||
|
||||
#endif /* USE_MW_HEADERS */
|
||||
|
||||
/* Add ersatz definitions, for systems that lack them. */
|
||||
|
||||
#ifndef EIO
|
||||
#define EIO 96
|
||||
#endif
|
||||
#ifndef ENOENT
|
||||
#define ENOENT 97
|
||||
#endif
|
||||
#ifndef EACCES
|
||||
#define EACCES 98
|
||||
#endif
|
||||
#ifndef ENOSYS
|
||||
#define ENOSYS 99
|
||||
#endif
|
||||
|
||||
#ifndef R_OK
|
||||
#define R_OK 4
|
||||
#define W_OK 2
|
||||
#define X_OK 1
|
||||
#endif
|
||||
|
||||
/* Binary files have different characteristics; for instance, no cr/nl
|
||||
translation. */
|
||||
|
||||
#define USE_BINARY_FOPEN
|
||||
|
||||
#include <spin.h>
|
||||
|
||||
#ifdef MPW_C
|
||||
#undef __PTR_TO_INT
|
||||
#define __PTR_TO_INT(P) ((int)(P))
|
||||
#undef __INT_TO_PTR
|
||||
#define __INT_TO_PTR(P) ((char *)(P))
|
||||
#endif /* MPW_C */
|
||||
|
||||
#define NO_FCNTL
|
||||
|
||||
int fstat ();
|
||||
|
||||
FILE *mpw_fopen ();
|
||||
int mpw_fseek ();
|
||||
int mpw_fread ();
|
||||
int mpw_fwrite ();
|
||||
int mpw_access ();
|
||||
int mpw_open ();
|
||||
int mpw_creat ();
|
||||
void mpw_abort (void);
|
||||
|
||||
/* Map these standard functions to improved versions in libiberty. */
|
||||
|
||||
#define fopen mpw_fopen
|
||||
#define fseek mpw_fseek
|
||||
#define fread mpw_fread
|
||||
#define fwrite mpw_fwrite
|
||||
#define open mpw_open
|
||||
#define access mpw_access
|
||||
#define creat mpw_creat
|
||||
#define abort mpw_abort
|
||||
|
||||
#define POSIX_UTIME
|
||||
|
||||
#define LOSING_TOTALLY
|
||||
|
||||
/* Define this so that files will be closed before being unlinked. */
|
||||
|
||||
#define CLOSE_BEFORE_UNLINK
|
||||
|
||||
#endif /* __INCLUDE_MPW_H */
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#ifndef __pwd_h
|
||||
#define __pwd_h
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct passwd {
|
||||
char *pw_name;
|
||||
uid_t pw_uid;
|
||||
gid_t pw_gid;
|
||||
char *pw_dir;
|
||||
char *pw_shell;
|
||||
char *pw_passwd;
|
||||
};
|
||||
|
||||
#endif /* ! __pwd_h */
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
/* Progress macros that use SpinCursor in MPW.
|
||||
Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _SPIN_H
|
||||
#define _SPIN_H
|
||||
|
||||
/* For MPW, progress macros just need to "spin the cursor" frequently,
|
||||
preferably several times per second on a 68K Mac. */
|
||||
|
||||
/* In order to determine if we're meeting the goal, define this macro
|
||||
and information about frequency of spinning will be collected and
|
||||
displayed. */
|
||||
|
||||
#define SPIN_MEASUREMENT
|
||||
|
||||
#include <CursorCtl.h>
|
||||
|
||||
/* Programs use this macro to indicate the start of a lengthy
|
||||
activity. STR identifies the particular activity, while N
|
||||
indicates the expected duration, in unspecified units. If N is
|
||||
zero, then the expected time to completion is unknown. */
|
||||
|
||||
#undef START_PROGRESS
|
||||
#define START_PROGRESS(STR,N) mpw_start_progress (STR, N, __FILE__, __LINE__);
|
||||
|
||||
/* Programs use this macro to indicate that progress has been made on a
|
||||
lengthy activity. */
|
||||
|
||||
#undef PROGRESS
|
||||
#ifdef SPIN_MEASUREMENT
|
||||
#define PROGRESS(X) mpw_progress_measured (X, __FILE__, __LINE__);
|
||||
#else
|
||||
#define PROGRESS(X) mpw_progress (X);
|
||||
#endif
|
||||
|
||||
/* Programs use this macro to indicate the end of a lengthy activity.
|
||||
STR must match a STR passed to START_PROGRESS previously. */
|
||||
|
||||
#undef END_PROGRESS
|
||||
#define END_PROGRESS(STR) mpw_end_progress (STR, __FILE__, __LINE__);
|
||||
|
||||
extern void mpw_start_progress (char *, int, char *, int);
|
||||
|
||||
extern void mpw_progress (int);
|
||||
|
||||
extern void mpw_progress_measured (int, char *, int);
|
||||
|
||||
extern void mpw_end_progress (char *, char *, int);
|
||||
|
||||
#endif /* _SPIN_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user