Resolve conflicts.

This commit is contained in:
skrll 2006-02-02 22:03:53 +00:00
parent d3ef798d46
commit ce836c59d8
71 changed files with 72168 additions and 57285 deletions

View File

@ -1,32 +0,0 @@
*-all
*-co
*-dirs
*-done
*-install-info
*-src
*-stamp-*
*-tagged
blockit
cfg-paper.info
config.status
configure.aux
configure.cp
configure.cps
configure.dvi
configure.fn
configure.fns
configure.ky
configure.kys
configure.log
configure.pg
configure.pgs
configure.toc
configure.tp
configure.tps
configure.vr
configure.vrs
dir.info
Makefile
lost+found
update.out
update.sourceware

View File

@ -1,297 +0,0 @@
The libgloss 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
[1a]
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,
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.
[1b]
Copyright (c) 1991, 2000 The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
[1c]
Copyright (c) 1991, 1998, 2001 The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. [rescinded 22 July 1999]
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-------------------------------------------------------------
Please note that in some of the above alternate licenses, there is a
statement regarding that acknowledgement must be made in any
advertising materials for products using the code. This restriction
no longer applies due to the following license change:
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
In some cases the defunct clause has been removed in modified newlib code and
in some cases, the clause has been left as-is.
-------------------------------------------------------------
(2) DJ Delorie
Copyright (C) 1993 DJ Delorie
All rights reserved.
Redistribution and use in source and binary forms is permitted
provided that the above copyright notice and following paragraph are
duplicated in all such forms.
This file is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(3) GPL (fr30 directory only)
Copyright (C) 1998 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
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.
(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) Array Technology Corporation and MIPS (mips/lsi33k-stub.h)
COPYRIGHT (C) 1991, 1992 ARRAY TECHNOLOGY CORPORATION
All Rights Reserved
This software is confidential information which is proprietary to and
a trade secret of ARRAY Technology Corporation. Use, duplication, or
disclosure is subject to the terms of a separate license agreement.
Copyright 1985 by MIPS Computer Systems, Inc.
(6) University of Utah and the Computer Systems Laboratory (CSL)
[applies only to hppa*-*-pro* targets]
Copyright (c) 1990,1994 The University of Utah and
the Computer Systems Laboratory (CSL). All rights reserved.
Permission to use, copy, modify and distribute this software is hereby
granted provided that (1) source code retains these copyright, permission,
and disclaimer notices, and (2) redistributions including binaries
reproduce the notices in supporting documentation, and (3) all advertising
materials mentioning features or use of this software display the following
acknowledgement: ``This product includes software developed by the
Computer Systems Laboratory at the University of Utah.''
THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
CSL requests users of this software to return to csl-dist@cs.utah.edu any
improvements that they make and grant CSL redistribution rights.
(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) Hans-Peter Nilsson
Copyright (C) 2001 Hans-Peter Nilsson
Permission to use, copy, modify, and distribute this software is
freely granted, provided that the above copyright notice, this notice
and the following disclaimer are preserved with no changes.
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.
(10) No Copyright
THIS SOFTWARE IS NOT COPYRIGHTED
(11) Cygnus Support / Cygnus Solutions
Copyright (c) 1995, 1996, 1997, 1998, 1999 Cygnus Support
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
---------------------------------------------------------------
Please note that the copyright above may be used with the name
Cygnus Solutions instead of Cygnus Support. Both names should
be considered interchangeable. These copyrights are now owned
by Red Hat Incorporated.
---------------------------------------------------------------
(12) Red Hat Incorporated
Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
(13) Default copyright
Unless otherwise stated in each remaining libgloss file, the remaining
files in the libgloss subdirectory are governed by the following copyright.
Copyright (c) 1994, 1997, 2001, 2002 Red Hat Incorporated.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
The name of Red Hat Incorporated may not be used to endorse
or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,760 +0,0 @@
The newlib subdirectory is a collection of software from several sources.
Each file may have its own copyright/license that is embedded in the source
file.
This list documents those licenses which are more restrictive than
a BSD-like license or require the copyright notice
to be duplicated in documentation and/or other materials associated with
the distribution. Certain licenses documented here only apply to
specific targets. Certain clauses only apply if you are building the
code as part of your binary.
Note that this list may omit certain licenses that
only pertain to the copying/modifying of the individual source code.
If you are distributing the source code, then you do not need to
worry about these omitted licenses, so long as you do not modify the
copyright information already in place.
(1) University of California, Berkeley
[1a]
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,
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.
[1b]
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.
[1c]
Copyright (c) 1981, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
[1d]
Copyright (c) 1988, 1990, 1993 Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
[1e]
Copyright (c) 1982, 1986, 1989, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
(c) UNIX System Laboratories, Inc.
All or some portions of this file are derived from material licensed
to the University of California by American Telephone and Telegraph
Co. or Unix System Laboratories, Inc. and are reproduced herein with
the permission of UNIX System Laboratories, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
[1f]
Copyright (c) 1987, 1988, 2000 Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that: (1) source distributions retain this entire copyright
notice and comment, and (2) distributions including binaries display
the following acknowledgement: ``This product includes software
developed by the University of California, Berkeley and its contributors''
in the documentation or other materials provided with the distribution
and in all advertising materials mentioning features or use of this
software. Neither the name of the University nor the names of its
contributors may 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.
-------------------------------------------------------------
Please note that in some of the above alternate licenses, there is a
statement regarding that acknowledgement must be made in any
advertising materials for products using the code. This restriction
no longer applies due to the following license change:
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
In some cases the defunct clause has been removed in modified newlib code and
in some cases, the clause has been left as-is.
-------------------------------------------------------------
(2) Cygwin (cygwin targets only)
Copyright 2001 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details.
(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) Hans-Peter Nilsson
Copyright (C) 2001 Hans-Peter Nilsson
Permission to use, copy, modify, and distribute this software is
freely granted, provided that the above copyright notice, this notice
and the following disclaimer are preserved with no changes.
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.
(10) Stephane Carrez (m68hc11-elf/m68hc12-elf targets only)
Copyright (C) 1999, 2000, 2001, 2002 Stephane Carrez (stcarrez@nerim.fr)
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
(11) Christopher G. Demetriou
Copyright (c) 2001 Christopher G. Demetriou
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(12) SuperH, Inc.
Copyright 2002 SuperH, Inc. All rights reserved
This software is the property of SuperH, Inc (SuperH) 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 SuperH.
SUPERH MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO
THIS SOFTWARE. IN NO EVENT SHALL SUPERH BE LIABLE FOR INDIRECT, SPECIAL,
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 SuperH Support Center via
e-mail at softwaresupport@superh.com .
SuperH, Inc.
405 River Oaks Parkway
San Jose
CA 95134
USA
(13) Royal Institute of Technology
Copyright (c) 1999 Kungliga Tekniska Högskolan
(Royal Institute of Technology, Stockholm, Sweden).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of KTH nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(14) Alexey Zelkin
Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
(15) Andrey A. Chernov
Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
(16) FreeBSD
Copyright (c) 1997-2002 FreeBSD Project.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
(17) S. L. Moshier
Author: S. L. Moshier.
Copyright (c) 1984,2000 S.L. Moshier
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, THE AUTHOR MAKES NO REPRESENTATION
OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
(18) Citrus Project
Copyright (c)1999 Citrus Project,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
(19) Todd C. Miller
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author 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 ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(20) DJ Delorie (i386)
Copyright (C) 1991 DJ Delorie
All rights reserved.
Redistribution and use in source and binary forms is permitted
provided that the above copyright notice and following paragraph are
duplicated in all such forms.
This file is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(21) Free Software Foundation LGPL License (*-linux* targets only)
Copyright (C) 1990-1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
(22) Xavier Leroy LGPL License (i[3456]86-*-linux* targets only)
Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr)
This program 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 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 Library General Public License for more details.
(23) Intel (i960)
Copyright (c) 1993 Intel Corporation
Intel hereby grants you permission to copy, modify, and distribute this
software and its documentation. Intel grants this permission provided
that the above copyright notice appears in all copies and that both the
copyright notice and this permission notice appear in supporting
documentation. In addition, Intel grants this permission provided that
you prominently mark as "not part of the original" any modifications
made to this software or documentation, and that the name of Intel
Corporation not be used in advertising or publicity pertaining to
distribution of the software or the documentation without specific,
written prior permission.
Intel Corporation provides this AS IS, WITHOUT ANY WARRANTY, EXPRESS OR
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE. Intel makes no guarantee or
representations regarding the use of, or the results of the use of,
the software and documentation in terms of correctness, accuracy,
reliability, currentness, or otherwise; and you rely on the software,
documentation and results solely at your own risk.
IN NO EVENT SHALL INTEL BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS,
LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES
OF ANY KIND. IN NO EVENT SHALL INTEL'S TOTAL LIABILITY EXCEED THE SUM
PAID TO INTEL FOR THE PRODUCT LICENSED HEREUNDER.
(24) Hewlett-Packard (hppa targets only)
(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.
(25) Henry Spencer (only *-linux targets)
Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
This software is not subject to any license of the American Telephone
and Telegraph Company or of the Regents of the University of California.
Permission is granted to anyone to use this software for any purpose on
any computer system, and to alter it and redistribute it, subject
to the following restrictions:
1. The author is not responsible for the consequences of use of this
software, no matter how awful, even if they arise from flaws in it.
2. The origin of this software must not be misrepresented, either by
explicit claim or by omission. Since few users ever read sources,
credits must appear in the documentation.
3. Altered versions must be plainly marked as such, and must not be
misrepresented as being the original software. Since few users
ever read sources, credits must appear in the documentation.
4. This notice may not be removed or altered.
(26) Mike Barcroft
Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
(27) Konstantin Chuguev (--enable-newlib-iconv)
Copyright (c) 1999, 2000
Konstantin Chuguev. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
iconv (Charset Conversion Library) v2.0
(27) Artem Bityuckiy (--enable-newlib-iconv)
Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
Rights transferred to Franklin Electronic Publishers.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
(28) Red Hat Incorporated
Unless otherwise stated in each remaining newlib file, the remaining
files in the newlib subdirectory default to the following copyright.
It should be noted that Red Hat Incorporated now owns copyrights
belonging to Cygnus Solutions and Cygnus Support.
Copyright (c) 1994, 1997, 2001, 2002, 2003, 2004 Red Hat Incorporated.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
The name of Red Hat Incorporated may not be used to endorse
or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File diff suppressed because it is too large Load Diff

View File

@ -1,117 +0,0 @@
Please feel free to add, edit, delete this file.
Please do not make ChangeLog entries.
COPYING, COPYING.LIB, README
http://gnu.org.
Makefile.in; configure; configure.in; src-release
Please notify the following of any committed patches.
binutils@sources.redhat.com
gdb-patches@sources.redhat.com
bfd/; binutils/; gas/; gprof/; ld/; opcodes/; cpu/; BFD's part of include/
binutils: http://sources.redhat.com/binutils/
Patches to binutils@sources.redhat.com.
Please notify the following of any interface changes:
gdb-patches@sources.redhat.com
cgen/; cgen parts of opcodes/, sim/ & include/
cgen: http://sources.redhat.com/cgen/
Patches to cgen@sources.redhat.com
May need separate opcodes/ or sim/ approval for
commits of regenerated files there.
config.guess; config.sub; dejagnu/config.guess; dejagnu/config.sub;
readline/support/config.sub; readline/support/config.guess
config: http://savannah.gnu.org/projects/config
Patches to config-patches@gnu.org.
Changes need to be done in tandem with the official CONFIG
sources or submitted to the master file maintainer and brought
in via a merge. When updating any of these files, please be
sure to update all of them.
Please notify the following of any committed patches:
binutils@sources.redhat.com
gdb-patches@sources.redhat.com
dejagnu/
dejagnu: http://www.gnu.org/software/dejagnu/
Patches to bug-dejagnu@gnu.org
Avoid making changes to the local repository; please send
patches upstream. Important and approved patches can be
checked into the src repository, otheriwse patches will be
imported from the next release.
gdb/; mmalloc/; readline/; sim/; GDB's part of include/ & dejagnu/
gdb: http://sources.redhat.com/gdb/
Patches to gdb-patches@sources.redhat.com.
See also gdb/MAINTAINERS, sim/MAINTAINERS, mmalloc/MAINTAINERS.
include/
See binutils/, gdb/, sid/, gcc/, libiberty/ etc.
libiberty/; libiberty's part of include/
gcc: http://gcc.gnu.org
Changes need to be done in tandem with the official GCC
sources or submitted to the master file maintainer and brought
in via a merge. Note: approved patches in gcc's libiberty
are automatically approved in this libiberty also; feel free
to merge them yourself if needed sooner than the next merge.
Otherwise, changes are automatically merged, usually within
a day.
ltconfig; ltmain.sh
libtool: http://gnu.org
Changes need to be done in tandem with the official LIBTOOL
sources or submitted to the master file maintainer and brought
in via a merge.
mkinstalldirs; move-if-change
autoconf: http://gnu.org
Patches to autoconf-patches@gnu.org.
Changes need to be done in tandem with the official AUTOCONF
sources or submitted to the master file maintainer and brought
in via a merge.
symlink-tree
gcc: http://gcc.gnu.org
See libiberty.
newlib/; libgloss/
http://sources.redhat.com/newlib/
Patches to newlib@sources.redhat.com.
sid/; SID's part of cgen/ & dejagnu/
sid: http://sources.redhat.com/sid/
Patches to sid@sources.redhat.com
texinfo/texinfo.tex
texinfo: http://ftp.gnu.org.
Latest version can be found on ftp://ftp.gnu.org and can be
imported at any (reasonable) time.
Please not use GCC's texinfo. Please do not import texinfo.
tcl/; tix/; itcl/; tk/; libgui/
insight: http://sources.redhat.com/insight/
Contact insight@sources.redhat.com.
winsup/
cygwin: http://sources.redhat.com/cygwin
Patches to cygwin-patches@sources.redhat.com.
General discussion cygwin@sources.redhat.com.
See also winsup/MAINTAINERS.
expect/; config-ml.in; setup.com; missing; makefile.vms; utils/;
config/; config.if; makefile.vms; missing; ylwrap; mkdep; etc/;
install-sh; intl/
Ask DJ Delorie <dj@redhat.com> after reading the libiberty entry.
modules file
Obviously changes to this file should not go through
overseers@sources.redhat.com. If you understand the file
format (or can cut-and-paste existing entries), modify it. If
it scares you, get someone who does understand it to help you.
Be prepared to fix it if you do break it.
/* Local variables: */
/* change-log-default-name: "/dev/null" */
/* End: */

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
Notes on enabling maintainer mode
Note that if you configure with --enable-maintainer-mode, you will need
special versions of automake, autoconf, libtool and gettext. You will
find the sources for these in ftp://sources.redhat.com/pub/binutils.
Note - "make distclean" does not work with maintainer mode enabled.
The Makefiles in the some of the po/ subdirectories depend upon the
Makefiles in their parent directories, and distclean will delete the
Makefiles in the parent directories before running the Makefiles in
the child directories. There is no easy way around this (short of
changing the automake macros) as these dependencies need to exist in
order to correctly build the NLS files.

File diff suppressed because it is too large Load Diff

View File

@ -1,239 +0,0 @@
/* BFD back-end for a.out files encapsulated with COFF headers.
Copyright 1990, 1991, 1994, 1995, 2000, 2001, 2002, 2003
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 MODULE IS NOT FINISHED. IT PROBABLY DOESN'T EVEN COMPILE. */
#if 0
#define TARGET_PAGE_SIZE 4096
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#define TEXT_START_ADDR 0
#endif
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
#include "aout/ar.h"
#include "libaout.h" /* BFD a.out internal data structures */
const bfd_target *encap_real_callback ();
const bfd_target *
encap_object_p (abfd)
bfd *abfd;
{
unsigned char magicbuf[4]; /* Raw bytes of magic number from file */
unsigned long magic; /* Swapped magic number */
short coff_magic;
struct external_exec exec_bytes;
struct internal_exec exec;
bfd_size_type amt = sizeof (magicbuf);
if (bfd_bread ((PTR) magicbuf, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return 0;
}
coff_magic = H_GET_16 (abfd, magicbuf);
if (coff_magic != COFF_MAGIC)
return 0; /* Not an encap coff file */
magic = H_GET_32 (abfd, magicbuf);
if (N_BADMAG (*((struct internal_exec *) &magic)))
return 0;
if (bfd_seek (abfd, (file_ptr) sizeof (struct coffheader), SEEK_SET) != 0)
return 0;
amt = EXEC_BYTES_SIZE;
if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return 0;
}
NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
return aout_32_some_aout_object_p (abfd, &exec, encap_realcallback);
}
/* Finish up the reading of an encapsulated-coff a.out file header. */
const bfd_target *
encap_real_callback (abfd)
bfd *abfd;
{
struct internal_exec *execp = exec_hdr (abfd);
MY(callback) (abfd, execp);
/* If we have a coff header, it can give us better values for
text_start and exec_data_start. This is particularly useful
for remote debugging of embedded systems. */
if (N_FLAGS(exec_aouthdr) & N_FLAGS_COFF_ENCAPSULATE)
{
struct coffheader ch;
int val;
val = lseek (execchan, -(sizeof (AOUTHDR) + sizeof (ch)), 1);
if (val == -1)
perror_with_name (filename);
val = myread (execchan, &ch, sizeof (ch));
if (val < 0)
perror_with_name (filename);
text_start = ch.text_start;
exec_data_start = ch.data_start;
}
else
{
text_start =
IS_OBJECT_FILE (exec_aouthdr) ? 0 : N_TXTADDR (exec_aouthdr);
exec_data_start = (IS_OBJECT_FILE (exec_aouthdr)
? exec_aouthdr.a_text
: N_DATADDR (exec_aouthdr));
}
/* Determine the architecture and machine type of the object file. */
bfd_default_set_arch_mach(abfd, bfd_arch_m68k, 0); /* FIXME */
return abfd->xvec;
}
/* Write an object file in Encapsulated COFF format.
Section contents have already been written. We write the
file header, symbols, and relocation. */
bfd_boolean
encap_write_object_contents (abfd)
bfd *abfd;
{
bfd_size_type data_pad = 0;
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
/* FIXME: Fragments from the old GNU LD program for dealing with
encap coff. */
struct coffheader coffheader;
int need_coff_header;
/* Determine whether to count the header as part of
the text size, and initialize the text size accordingly.
This depends on the kind of system and on the output format selected. */
N_SET_MAGIC (outheader, magic);
#ifdef INITIALIZE_HEADER
INITIALIZE_HEADER;
#endif
text_size = sizeof (struct exec);
#ifdef COFF_ENCAPSULATE
if (relocatable_output == 0 && file_table[0].just_syms_flag == 0)
{
need_coff_header = 1;
/* set this flag now, since it will change the values of N_TXTOFF, etc */
N_SET_FLAGS (outheader, aout_backend_info (abfd)->exec_hdr_flags);
text_size += sizeof (struct coffheader);
}
#endif
#ifdef COFF_ENCAPSULATE
if (need_coff_header)
{
/* We are encapsulating BSD format within COFF format. */
struct coffscn *tp, *dp, *bp;
tp = &coffheader.scns[0];
dp = &coffheader.scns[1];
bp = &coffheader.scns[2];
strcpy (tp->s_name, ".text");
tp->s_paddr = text_start;
tp->s_vaddr = text_start;
tp->s_size = text_size;
tp->s_scnptr = sizeof (struct coffheader) + sizeof (struct exec);
tp->s_relptr = 0;
tp->s_lnnoptr = 0;
tp->s_nreloc = 0;
tp->s_nlnno = 0;
tp->s_flags = 0x20;
strcpy (dp->s_name, ".data");
dp->s_paddr = data_start;
dp->s_vaddr = data_start;
dp->s_size = data_size;
dp->s_scnptr = tp->s_scnptr + tp->s_size;
dp->s_relptr = 0;
dp->s_lnnoptr = 0;
dp->s_nreloc = 0;
dp->s_nlnno = 0;
dp->s_flags = 0x40;
strcpy (bp->s_name, ".bss");
bp->s_paddr = dp->s_vaddr + dp->s_size;
bp->s_vaddr = bp->s_paddr;
bp->s_size = bss_size;
bp->s_scnptr = 0;
bp->s_relptr = 0;
bp->s_lnnoptr = 0;
bp->s_nreloc = 0;
bp->s_nlnno = 0;
bp->s_flags = 0x80;
coffheader.f_magic = COFF_MAGIC;
coffheader.f_nscns = 3;
/* store an unlikely time so programs can
* tell that there is a bsd header
*/
coffheader.f_timdat = 1;
coffheader.f_symptr = 0;
coffheader.f_nsyms = 0;
coffheader.f_opthdr = 28;
coffheader.f_flags = 0x103;
/* aouthdr */
coffheader.magic = ZMAGIC;
coffheader.vstamp = 0;
coffheader.tsize = tp->s_size;
coffheader.dsize = dp->s_size;
coffheader.bsize = bp->s_size;
coffheader.entry = outheader.a_entry;
coffheader.text_start = tp->s_vaddr;
coffheader.data_start = dp->s_vaddr;
}
#endif
#ifdef COFF_ENCAPSULATE
if (need_coff_header)
mywrite (&coffheader, sizeof coffheader, 1, outdesc);
#endif
#ifndef COFF_ENCAPSULATE
padfile (N_TXTOFF (outheader) - sizeof outheader, outdesc);
#endif
text_size -= N_TXTOFF (outheader);
WRITE_HEADERS(abfd, execp);
return TRUE;
}
#define MY_write_object_content encap_write_object_contents
#define MY_object_p encap_object_p
#define MY_exec_hdr_flags N_FLAGS_COFF_ENCAPSULATE
#include "aout-target.h"

View File

@ -1,24 +1,24 @@
/* BFD back-end for archive files (libraries).
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003
2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
This file is part of BFD, the Binary File Descriptor library.
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 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.
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 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. */
/*
@setfilename archive-info
@ -138,10 +138,6 @@ DESCRIPTION
extern int errno;
#endif
#ifdef GNU960
#define BFD_GNU960_ARMAG(abfd) (BFD_COFF_FILE_P((abfd)) ? ARMAG : ARMAGB)
#endif
/* We keep a cache of archive filepointers to archive elements to
speed up searching the archive by filepos. We only add an entry to
the cache when we actually read one. We also don't sort the cache;
@ -223,7 +219,7 @@ bfd_get_next_mapent (bfd *abfd, symindex prev, carsym **entry)
return prev;
}
/* To be called by backends only */
/* To be called by backends only. */
bfd *
_bfd_create_empty_archive_element_shell (bfd *obfd)
@ -263,7 +259,8 @@ _bfd_look_for_bfd_in_cache (bfd *arch_bfd, file_ptr filepos)
return NULL;
}
/* Kind of stupid to call cons for each one, but we don't do too many */
/* Kind of stupid to call cons for each one, but we don't do too many. */
bfd_boolean
_bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
{
@ -318,8 +315,7 @@ get_extended_arelt_filename (bfd *arch, const char *name)
Presumes the file pointer is already in the right place (ie pointing
to the ar_hdr in the file). Moves the file pointer; on success it
should be pointing to the front of the file contents; on failure it
could have been moved arbitrarily.
*/
could have been moved arbitrarily. */
void *
_bfd_generic_read_ar_hdr (bfd *abfd)
@ -469,6 +465,12 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
struct areltdata *new_areldata;
bfd *n_nfd;
if (archive->my_archive)
{
filepos += archive->origin;
archive = archive->my_archive;
}
n_nfd = _bfd_look_for_bfd_in_cache (archive, filepos);
if (n_nfd)
return n_nfd;
@ -551,10 +553,12 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
else
{
unsigned int size = arelt_size (last_file);
filestart = last_file->origin + size;
if (archive->my_archive)
filestart -= archive->origin;
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
BSD-4.4-style element with a long odd size. */
filestart = last_file->origin + size;
if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3))
size += strlen(normalize(last_file, last_file->filename));
filestart += size % 2;
@ -577,14 +581,9 @@ bfd_generic_archive_p (bfd *abfd)
return NULL;
}
#ifdef GNU960
if (strncmp (armag, BFD_GNU960_ARMAG (abfd), SARMAG) != 0)
return 0;
#else
if (strncmp (armag, ARMAG, SARMAG) != 0 &&
strncmp (armag, ARMAGB, SARMAG) != 0)
return 0;
#endif
tdata_hold = bfd_ardata (abfd);
@ -638,14 +637,6 @@ bfd_generic_archive_p (bfd *abfd)
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
#if 0
/* We ought to close `first' here, but we can't, because
we have no way to remove it from the archive cache.
It's close to impossible to figure out when we can
release bfd_ardata. FIXME. */
bfd_close (first);
bfd_release (abfd, bfd_ardata (abfd));
#endif
bfd_set_error (bfd_error_wrong_object_format);
bfd_ardata (abfd) = tdata_hold;
return NULL;
@ -674,7 +665,7 @@ bfd_generic_archive_p (bfd *abfd)
/* The size of the string count. */
#define BSD_STRING_COUNT_SIZE 4
/* Returns FALSE on error, TRUE otherwise */
/* Returns FALSE on error, TRUE otherwise. */
static bfd_boolean
do_slurp_bsd_armap (bfd *abfd)
@ -780,7 +771,6 @@ do_slurp_coff_armap (bfd *abfd)
nsymz = bfd_getb32 (int_buf);
stringsize = parsed_size - (4 * nsymz) - 4;
#if 1
/* ... except that some archive formats are broken, and it may be our
fault - the i960 little endian coff sometimes has big and sometimes
little, because our tools changed. Here's a horrible hack to clean
@ -795,7 +785,6 @@ do_slurp_coff_armap (bfd *abfd)
stringsize = parsed_size - (4 * nsymz) - 4;
swap = bfd_getl32;
}
#endif
/* The coff armap must be read sequentially. So we construct a
bsd-style one in core all at once, for simplicity. */
@ -905,8 +894,8 @@ bfd_slurp_armap (bfd *abfd)
return TRUE;
}
/* Returns FALSE on error, TRUE otherwise */
/* flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
/* Returns FALSE on error, TRUE otherwise. */
/* Flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the
header is in a slightly different order and the map name is '/'.
This flavour is used by hp300hpux. */
@ -936,7 +925,7 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd)
return FALSE;
if (!strncmp (nextname, "__.SYMDEF ", 16)
|| !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
|| !strncmp (nextname, "__.SYMDEF/ ", 16)) /* Old Linux archives. */
return do_slurp_bsd_armap (abfd);
if (strncmp (nextname, "/ ", 16))
@ -1088,9 +1077,6 @@ _bfd_slurp_extended_name_table (bfd *abfd)
/* FIXME, we can't release namedata here because it was allocated
below extended_names on the objalloc... */
#if 0
bfd_release (abfd, namedata);
#endif
}
return TRUE;
}
@ -1300,7 +1286,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
return TRUE;
}
/** A couple of functions for creating ar_hdrs */
/* A couple of functions for creating ar_hdrs. */
#ifdef HPUX_LARGE_AR_IDS
/* Function to encode large UID/GID values according to HP. */
@ -1650,11 +1636,7 @@ _bfd_write_archive_contents (bfd *arch)
if (makemap && ! hasobjects)
{ /* Don't bother if we won't make a map! */
if ((bfd_check_format (current, bfd_object))
#if 0 /* FIXME -- these are not set correctly */
&& ((bfd_get_file_flags (current) & HAS_SYMS))
#endif
)
if ((bfd_check_format (current, bfd_object)))
hasobjects = TRUE;
}
}
@ -1665,11 +1647,7 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
return FALSE;
#ifdef GNU960
wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), SARMAG, arch);
#else
wrote = bfd_bwrite (ARMAG, SARMAG, arch);
#endif
if (wrote != SARMAG)
return FALSE;
@ -1779,9 +1757,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
bfd *current;
file_ptr elt_no = 0;
struct orl *map = NULL;
unsigned int orl_max = 1024; /* fine initial default */
unsigned int orl_max = 1024; /* Fine initial default. */
unsigned int orl_count = 0;
int stridx = 0; /* string index */
int stridx = 0;
asymbol **syms = NULL;
long syms_max = 0;
bfd_boolean ret;
@ -1930,7 +1908,7 @@ bsd_write_armap (bfd *arch,
unsigned int mapsize = ranlibsize + stringsize + 8;
file_ptr firstreal;
bfd *current = arch->archive_head;
bfd *last_elt = current; /* last element arch seen */
bfd *last_elt = current; /* Last element arch seen. */
bfd_byte temp[4];
unsigned int count;
struct ar_hdr hdr;
@ -1977,7 +1955,7 @@ bsd_write_armap (bfd *arch,
current = current->next;
}
while (current != map[count].u.abfd);
} /* if new archive element */
}
last_elt = current;
H_PUT_32 (arch, map[count].namidx, buf);
@ -2075,8 +2053,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
symbol name 0
symbol name 1
symbol name n-1
*/
symbol name n-1 */
bfd_boolean
coff_write_armap (bfd *arch,
@ -2121,7 +2098,6 @@ coff_write_armap (bfd *arch,
(((char *) (&hdr))[i]) = ' ';
/* Write the ar header for this item and the number of symbols. */
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return FALSE;

View File

@ -1,6 +1,6 @@
/* Generic BFD library interface and support routines.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003
2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -45,14 +45,10 @@ CODE_FRAGMENT
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
.
. {* To avoid dragging too many header files into every file that
. includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
. and MTIME as a "long". Their correct types, to which they
. are cast when used, are "FILE *" and "time_t". The iostream
. is the result of an fopen on the filename. However, if the
. BFD_IN_MEMORY flag is set, then iostream is actually a pointer
. to a bfd_in_memory struct. *}
. {* The IOSTREAM, and corresponding IO vector that provide access
. to the file backing the BFD. *}
. void *iostream;
. const struct bfd_iovec *iovec;
.
. {* Is the file descriptor being cached? That is, can it be closed as
. needed, and re-opened when accessed later? *}
@ -137,6 +133,9 @@ CODE_FRAGMENT
. {* Pointer to structure which contains architecture information. *}
. const struct bfd_arch_info *arch_info;
.
. {* Flag set if symbols from this BFD should not be exported. *}
. bfd_boolean no_export;
.
. {* Stuff only useful for archives. *}
. void *arelt_data;
. struct bfd *my_archive; {* The containing archive BFD. *}
@ -410,23 +409,152 @@ CODE_FRAGMENT
static const char *_bfd_error_program_name;
/* This is the default routine to handle BFD error messages. */
/* This is the default routine to handle BFD error messages.
Like fprintf (stderr, ...), but also handles some extra format specifiers.
static void
_bfd_default_error_handler (const char *s, ...)
%A section name from section. For group components, print group name too.
%B file name from bfd. For archive components, prints archive too.
*/
void
_bfd_default_error_handler (const char *fmt, ...)
{
va_list p;
va_list ap;
char *bufp;
const char *new_fmt, *p;
size_t avail = 1000;
char buf[1000];
if (_bfd_error_program_name != NULL)
fprintf (stderr, "%s: ", _bfd_error_program_name);
else
fprintf (stderr, "BFD: ");
va_start (p, s);
vfprintf (stderr, s, p);
va_end (p);
va_start (ap, fmt);
new_fmt = fmt;
bufp = buf;
fprintf (stderr, "\n");
/* Reserve enough space for the existing format string. */
avail -= strlen (fmt) + 1;
if (avail > 1000)
abort ();
p = fmt;
while (1)
{
char *q;
size_t len, extra, trim;
p = strchr (p, '%');
if (p == NULL || p[1] == '\0')
{
if (new_fmt == buf)
{
len = strlen (fmt);
memcpy (bufp, fmt, len + 1);
}
break;
}
if (p[1] == 'A' || p[1] == 'B')
{
len = p - fmt;
memcpy (bufp, fmt, len);
bufp += len;
fmt = p + 2;
new_fmt = buf;
/* If we run out of space, tough, you lose your ridiculously
long file or section name. It's not safe to try to alloc
memory here; We might be printing an out of memory message. */
if (avail == 0)
{
*bufp++ = '*';
*bufp++ = '*';
*bufp = '\0';
}
else
{
if (p[1] == 'B')
{
bfd *abfd = va_arg (ap, bfd *);
if (abfd->my_archive)
snprintf (bufp, avail, "%s(%s)",
abfd->my_archive->filename, abfd->filename);
else
snprintf (bufp, avail, "%s", abfd->filename);
}
else
{
asection *sec = va_arg (ap, asection *);
bfd *abfd = sec->owner;
const char *group = NULL;
struct coff_comdat_info *ci;
if (abfd != NULL
&& bfd_get_flavour (abfd) == bfd_target_elf_flavour
&& elf_next_in_group (sec) != NULL
&& (sec->flags & SEC_GROUP) == 0)
group = elf_group_name (sec);
else if (abfd != NULL
&& bfd_get_flavour (abfd) == bfd_target_coff_flavour
&& (ci = bfd_coff_get_comdat_section (sec->owner,
sec)) != NULL)
group = ci->name;
if (group != NULL)
snprintf (bufp, avail, "%s[%s]", sec->name, group);
else
snprintf (bufp, avail, "%s", sec->name);
}
len = strlen (bufp);
avail = avail - len + 2;
/* We need to replace any '%' we printed by "%%".
First count how many. */
q = bufp;
bufp += len;
extra = 0;
while ((q = strchr (q, '%')) != NULL)
{
++q;
++extra;
}
/* If there isn't room, trim off the end of the string. */
q = bufp;
bufp += extra;
if (extra > avail)
{
trim = extra - avail;
bufp -= trim;
do
{
if (*--q == '%')
--extra;
}
while (--trim != 0);
*q = '\0';
avail = extra;
}
avail -= extra;
/* Now double all '%' chars, shuffling the string as we go. */
while (extra != 0)
{
while ((q[extra] = *q) != '%')
--q;
q[--extra] = '%';
--q;
}
}
}
p = p + 2;
}
vfprintf (stderr, new_fmt, ap);
va_end (ap);
putc ('\n', stderr);
}
/* This is a function pointer to the routine which should handle BFD
@ -495,56 +623,6 @@ bfd_get_error_handler (void)
{
return _bfd_error_handler;
}
/*
FUNCTION
bfd_archive_filename
SYNOPSIS
const char *bfd_archive_filename (bfd *);
DESCRIPTION
For a BFD that is a component of an archive, returns a string
with both the archive name and file name. For other BFDs, just
returns the file name.
*/
const char *
bfd_archive_filename (bfd *abfd)
{
if (abfd == NULL)
return _("<unknown>");
if (abfd->my_archive)
{
static size_t curr = 0;
static char *buf;
size_t needed;
needed = (strlen (bfd_get_filename (abfd->my_archive))
+ strlen (bfd_get_filename (abfd)) + 3);
if (needed > curr)
{
if (curr)
free (buf);
curr = needed + (needed >> 1);
buf = bfd_malloc (curr);
/* If we can't malloc, fail safe by returning just the file
name. This function is only used when building error
messages. */
if (!buf)
{
curr = 0;
return bfd_get_filename (abfd);
}
}
sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
bfd_get_filename (abfd));
return buf;
}
else
return bfd_get_filename (abfd);
}
/*
SECTION
@ -769,12 +847,14 @@ bfd_get_sign_extend_vma (bfd *abfd)
name = bfd_get_target (abfd);
/* Return a proper value for DJGPP COFF (an x86 COFF variant).
/* Return a proper value for DJGPP & PE COFF (x86 COFF variants).
This function is required for DWARF2 support, but there is
no place to store this information in the COFF back end.
Should enough other COFF targets add support for DWARF2,
a place will have to be found. Until then, this hack will do. */
if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0)
if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0
|| strcmp (name, "pe-i386") == 0
|| strcmp (name, "pei-i386") == 0)
return 1;
bfd_set_error (bfd_error_wrong_format);
@ -982,6 +1062,29 @@ bfd_scan_vma (const char *string, const char **end, int base)
return value;
}
/*
FUNCTION
bfd_copy_private_header_data
SYNOPSIS
bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
DESCRIPTION
Copy private BFD header information from the BFD @var{ibfd} to the
the BFD @var{obfd}. This copies information that may require
sections to exist, but does not require symbol tables. Return
<<true>> on success, <<false>> on error.
Possible error returns are:
o <<bfd_error_no_memory>> -
Not enough memory exists to create private data for @var{obfd}.
.#define bfd_copy_private_header_data(ibfd, obfd) \
. BFD_SEND (obfd, _bfd_copy_private_header_data, \
. (ibfd, obfd))
*/
/*
FUNCTION
bfd_copy_private_bfd_data
@ -1085,6 +1188,9 @@ DESCRIPTION
.#define bfd_merge_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
.
.#define bfd_is_group_section(abfd, sec) \
. BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
.
.#define bfd_discard_group(abfd, sec) \
. BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
.
@ -1097,7 +1203,7 @@ DESCRIPTION
.#define bfd_link_add_symbols(abfd, info) \
. BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
.
.#define bfd_link_just_syms(sec, info) \
.#define bfd_link_just_syms(abfd, sec, info) \
. BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
.
.#define bfd_final_link(abfd, info) \
@ -1115,6 +1221,10 @@ DESCRIPTION
.#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
. BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
.
.#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
. BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
. dyncount, dynsyms, ret))
.
.#define bfd_get_dynamic_reloc_upper_bound(abfd) \
. BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
.

View File

@ -1,6 +1,6 @@
/* BFD back-end for ALPHA Extended-Coff files.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005 Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@ -462,8 +462,8 @@ alpha_ecoff_object_p (abfd)
bfd_size_type size;
size = sec->line_filepos * 8;
BFD_ASSERT (size == bfd_section_size (abfd, sec)
|| size + 8 == bfd_section_size (abfd, sec));
BFD_ASSERT (size == sec->size
|| size + 8 == sec->size);
if (! bfd_set_section_size (abfd, sec, size))
return NULL;
}
@ -669,7 +669,7 @@ alpha_adjust_reloc_in (abfd, intern, rptr)
/* The STORE reloc needs the size and offset fields. We store
them in the addend. */
#if 0
BFD_ASSERT (intern->r_offset <= 256 && intern->r_size <= 256);
BFD_ASSERT (intern->r_offset <= 256);
#endif
rptr->addend = (intern->r_offset << 8) + intern->r_size;
break;
@ -770,6 +770,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
long reloc_count;
bfd *output_bfd = relocatable ? abfd : (bfd *) NULL;
bfd_vma gp;
bfd_size_type sz;
bfd_boolean gp_undefined;
bfd_vma stack[RELOC_STACKSIZE];
int tos = 0;
@ -780,14 +781,10 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
if (! bfd_get_section_contents (input_bfd, input_section, data,
(file_ptr) 0, input_section->_raw_size))
sz = input_section->rawsize ? input_section->rawsize : input_section->size;
if (! bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
/* The section size is not going to change. */
input_section->_cooked_size = input_section->_raw_size;
input_section->reloc_done = TRUE;
reloc_count = bfd_canonicalize_reloc (input_bfd, input_section,
reloc_vector, symbols);
if (reloc_count < 0)
@ -1150,7 +1147,8 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
break;
case bfd_reloc_overflow:
if (! ((*link_info->callbacks->reloc_overflow)
(link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
(link_info, NULL,
bfd_asymbol_name (*rel->sym_ptr_ptr),
rel->howto->name, rel->addend, input_bfd,
input_section, rel->address)))
goto error_return;
@ -1225,23 +1223,6 @@ alpha_bfd_reloc_type_lookup (abfd, code)
case BFD_RELOC_64_PCREL:
alpha_type = ALPHA_R_SREL64;
break;
#if 0
case ???:
alpha_type = ALPHA_R_OP_PUSH;
break;
case ???:
alpha_type = ALPHA_R_OP_STORE;
break;
case ???:
alpha_type = ALPHA_R_OP_PSUB;
break;
case ???:
alpha_type = ALPHA_R_OP_PRSHIFT;
break;
case ???:
alpha_type = ALPHA_R_GPVALUE;
break;
#endif
default:
return (reloc_howto_type *) NULL;
}
@ -1457,7 +1438,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
amt = sizeof (struct ecoff_section_tdata);
lita_sec_data = ((struct ecoff_section_tdata *)
bfd_zalloc (input_bfd, amt));
ecoff_section_data (input_bfd, lita_sec) = lita_sec_data;
lita_sec->used_by_bfd = lita_sec_data;
}
if (lita_sec_data->gp != 0)
@ -1472,9 +1453,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_size_type lita_size;
lita_vma = lita_sec->output_offset + lita_sec->output_section->vma;
lita_size = lita_sec->_cooked_size;
if (lita_size == 0)
lita_size = lita_sec->_raw_size;
lita_size = lita_sec->size;
if (gp == 0
|| lita_vma < gp - 0x8000
@ -1967,7 +1946,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd,
symndx_to_section[r_symndx]);
if (! ((*info->callbacks->reloc_overflow)
(info, name, alpha_howto_table[r_type].name,
(info, NULL, name,
alpha_howto_table[r_type].name,
(bfd_vma) 0, input_bfd, input_section,
r_vaddr - input_section->vma)))
return FALSE;
@ -2361,7 +2341,10 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
#define _bfd_ecoff_section_already_linked \
_bfd_generic_section_already_linked
const bfd_target ecoffalpha_little_vec =
{

View File

@ -31,8 +31,7 @@ targ_underscore=no
# Catch obsolete configurations.
case $targ in
vax-*-vms* \
)
null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
echo "*** Specify --enable-obsolete to build it anyway." >&2
@ -42,40 +41,55 @@ case $targ in
fi;;
esac
case $targ in
m68*-*-lynxos* | \
sparc-*-lynxos* | \
vax-*-vms* | \
arm-*-oabi | \
thumb-*-oabi | \
null)
echo "*** Configuration $targ is obsolete." >&2
echo "*** Support has been REMOVED." >&2
exit 1
;;
esac
targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
case "${targ_cpu}" in
alpha*) targ_archs=bfd_alpha_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
c30*) targ_archs=bfd_tic30_arch ;;
c4x*) targ_archs=bfd_tic4x_arch ;;
c54x*) targ_archs=bfd_tic54x_arch ;;
alpha*) targ_archs=bfd_alpha_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
c30*) targ_archs=bfd_tic30_arch ;;
c4x*) targ_archs=bfd_tic4x_arch ;;
c54x*) targ_archs=bfd_tic54x_arch ;;
crisv32) targ_archs=bfd_cris_arch ;;
crx*) targ_archs=bfd_crx_arch ;;
dlx*) targ_archs=bfd_dlx_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
i[3-7]86) targ_archs=bfd_i386_arch ;;
i370) targ_archs=bfd_i370_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
i[3-7]86) targ_archs=bfd_i386_arch ;;
i370) targ_archs=bfd_i370_arch ;;
m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;;
m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
maxq*) targ_archs=bfd_maxq_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
or32*) targ_archs=bfd_or32_arch ;;
pdp11*) targ_archs=bfd_pdp11_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
s390*) targ_archs=bfd_s390_arch ;;
sh*) targ_archs=bfd_sh_arch ;;
sparc*) targ_archs=bfd_sparc_arch ;;
strongarm*) targ_archs=bfd_arm_arch ;;
thumb*) targ_archs=bfd_arm_arch ;;
v850*) targ_archs=bfd_v850_arch ;;
x86_64) targ_archs=bfd_i386_arch ;;
xscale*) targ_archs=bfd_arm_arch ;;
xtensa*) targ_archs=bfd_xtensa_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
am33_2.0) targ_archs=bfd_mn10300_arch ;;
*) targ_archs=bfd_${targ_cpu}_arch ;;
pdp11*) targ_archs=bfd_pdp11_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
s390*) targ_archs=bfd_s390_arch ;;
sh*) targ_archs=bfd_sh_arch ;;
sparc*) targ_archs=bfd_sparc_arch ;;
strongarm*) targ_archs=bfd_arm_arch ;;
thumb*) targ_archs=bfd_arm_arch ;;
v850*) targ_archs=bfd_v850_arch ;;
x86_64) targ_archs=bfd_i386_arch ;;
xscale*) targ_archs=bfd_arm_arch ;;
xtensa*) targ_archs=bfd_xtensa_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
am33_2.0) targ_archs=bfd_mn10300_arch ;;
*) targ_archs=bfd_${targ_cpu}_arch ;;
esac
@ -222,28 +236,29 @@ case "${targ}" in
targ_selvecs=bfd_elf32_bigarm_vec
;;
arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
arm*-*-eabi* )
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
arm*-*-vxworks | arm*-*-windiss)
targ_defvec=bfd_elf32_littlearm_vxworks_vec
targ_selvecs=bfd_elf32_bigarm_vxworks_vec
;;
arm*-*-symbianelf*)
targ_defvec=bfd_elf32_littlearm_symbian_vec
targ_selvecs=bfd_elf32_bigarm_symbian_vec
;;
arm9e-*-elf)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
arm-*-oabi)
targ_defvec=bfd_elf32_littlearm_oabi_vec
targ_selvecs=bfd_elf32_bigarm_oabi_vec
;;
thumb-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
;;
thumb-*-oabi)
targ_defvec=bfd_elf32_littlearm_oabi_vec
targ_selvecs=bfd_elf32_bigarm_oabi_vec
;;
thumb-*-elf)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
@ -311,12 +326,22 @@ case "${targ}" in
targ_underscore=yes
;;
cris-*-*)
cr16c-*-elf*)
targ_defvec=bfd_elf32_cr16c_vec
targ_underscore=yes
;;
cris-*-* | crisv32-*-*)
targ_defvec=cris_aout_vec
targ_selvecs="bfd_elf32_us_cris_vec bfd_elf32_cris_vec ieee_vec"
targ_underscore=yes # Note: not true for bfd_elf32_cris_vec.
;;
crx-*-elf*)
targ_defvec=bfd_elf32_crx_vec
targ_underscore=yes
;;
d10v-*-*)
targ_defvec=bfd_elf32_d10v_vec
;;
@ -398,7 +423,7 @@ case "${targ}" in
;;
#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */
i370-*-*)
i370-*-*)
targ_defvec=bfd_elf32_i370_vec
targ_selvecs="bfd_elf32_i370_vec"
;;
@ -406,12 +431,18 @@ case "${targ}" in
targ_defvec=i386coff_vec
targ_selvecs=bfd_elf32_i386_vec
;;
i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | i[3-7]86-*-solaris2* | \
i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
i[3-7]86-*-elf | i[3-7]86-*-sco3.2v5* | \
i[3-7]86-*-dgux* | i[3-7]86-*-sysv5*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
i[3-7]86-*-solaris2*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
targ64_selvecs=bfd_elf64_x86_64_vec
want64=true
;;
i[3-7]86-*-kaos*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=bfd_elf32_i386_vec
@ -485,7 +516,7 @@ case "${targ}" in
targ_selvecs="bfd_elf32_i386_vec i386bsd_vec"
targ_underscore=yes
;;
i[3-7]86-*-openbsd*)
i[3-7]86-*-openbsd*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
;;
@ -518,8 +549,8 @@ case "${targ}" in
;;
#endif
i[3-7]86-*-lynxos*)
targ_defvec=i386lynx_coff_vec
targ_selvecs=i386lynx_aout_vec
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386lynx_coff_vec i386lynx_aout_vec"
;;
i[3-7]86-*-gnu*)
targ_defvec=bfd_elf32_i386_vec
@ -557,6 +588,7 @@ case "${targ}" in
i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"
targ_underscore=yes
;;
i[3-7]86-none-*)
targ_defvec=i386coff_vec
@ -616,12 +648,12 @@ case "${targ}" in
targ_defvec=bfd_elf32_m32rlelin_vec
targ_selvecs="bfd_elf32_m32rlin_vec bfd_elf32_m32rlelin_vec"
;;
m32r*-*-linux*)
targ_defvec=bfd_elf32_m32rlin_vec
targ_selvecs="bfd_elf32_m32rlin_vec bfd_elf32_m32rlelin_vec"
;;
m32r*le-*-*)
targ_defvec=bfd_elf32_m32rle_vec
targ_selvecs="bfd_elf32_m32r_vec bfd_elf32_m32rle_vec"
@ -705,7 +737,7 @@ case "${targ}" in
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec bfd_elf32_m68k_vec"
targ_underscore=yes
;;
m68*-*-netbsdelf*)
m68*-*-netbsdelf*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68knetbsd_vec m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
;;
@ -750,11 +782,19 @@ case "${targ}" in
targ_defvec=m88kmach3_vec
targ_cflags=-DSTAT_FOR_EXEC
;;
m88*-*-openbsd*)
targ_defvec=m88kopenbsd_vec
targ_underscore=yes
;;
m88*-*-*)
targ_defvec=m88kbcs_vec
targ_underscore=yes
;;
maxq-*-coff)
targ_defvec=maxqcoff_vec
;;
mcore-*-elf)
targ_defvec=bfd_elf32_mcore_big_vec
targ_selvecs="bfd_elf32_mcore_big_vec bfd_elf32_mcore_little_vec"
@ -822,6 +862,12 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
#ifdef BFD64
mips64*-*-openbsd*)
targ_defvec=bfd_elf64_tradbigmips_vec
targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
;;
#endif
mips*el-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
@ -937,7 +983,7 @@ case "${targ}" in
targ_defvec=rs6000coff_vec
targ64_selvecs=rs6000coff64_vec
case "${targ}" in
*-*-aix4.[3456789]* | *-*-aix[56789]*)
*-*-aix4.[3456789]* | *-*-aix[56789]*)
want64=true;;
*)
targ_cflags=-DSMALL_ARCHIVE;;
@ -975,9 +1021,14 @@ case "${targ}" in
targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
targ_archs="bfd_powerpc_arch bfd_rs6000_arch bfd_i386_arch"
;;
powerpc-*-macos* | powerpc-*-mpw*)
powerpc-*-macos*)
targ_defvec=pmac_xcoff_vec
;;
powerpc-*-lynxos*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec"
targ_cflags=-DSMALL_ARCHIVE
;;
powerpc-*-netware*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
@ -1005,12 +1056,16 @@ case "${targ}" in
s390-*-linux*)
targ_defvec=bfd_elf32_s390_vec
targ64_selvecs=bfd_elf64_s390_vec
want64=true
;;
#ifdef BFD64
s390x-*-linux*)
targ_defvec=bfd_elf64_s390_vec
targ_selvecs=bfd_elf32_s390_vec
;;
s390x-*-tpf*)
targ_defvec=bfd_elf64_s390_vec
;;
#endif
#ifdef BFD64
@ -1088,6 +1143,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
sh*-*-symbianelf*)
targ_defvec=bfd_elf32_shl_symbian_vec
targ_selvecs="shlcoff_vec shlcoff_small_vec"
targ_underscore=yes
;;
shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
targ_defvec=bfd_elf32_shl_vec
targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
dnl
AC_PREREQ(2.13)
AC_INIT(libbfd.c)
AC_PREREQ(2.59)
AC_INIT
AC_CONFIG_SRCDIR([libbfd.c])
AC_CANONICAL_SYSTEM
AC_CANONICAL_TARGET
AC_ISC_POSIX
AM_INIT_AUTOMAKE(bfd, 2.15)
# Uncomment the next line to remove the date from the reported bfd version
is_release=y
changequote(,)dnl
bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
changequote([,])dnl
bfd_version_string="\"${VERSION}\""
if test x${is_release} = x; then
bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
bfd_version_string="\"${VERSION} ${bfd_version_date}\""
fi
AC_SUBST(bfd_version)
AC_SUBST(bfd_version_string)
AM_INIT_AUTOMAKE(bfd, 2.16.1)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@ -44,7 +31,7 @@ esac],[want64=false])dnl
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
@ -120,9 +107,7 @@ BFD_HOST_U_64_BIT=
AC_MSG_CHECKING([for long long])
AC_CACHE_VAL(bfd_cv_has_long_long,
[AC_TRY_COMPILE(,
[unsigned long long ll = 18446744073709551615ULL;],
bfd_cv_has_long_long=yes, bfd_cv_has_long_long=no)])
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long ll = 18446744073709551615ULL;]])],[bfd_cv_has_long_long=yes],[bfd_cv_has_long_long=no])])
AC_MSG_RESULT($bfd_cv_has_long_long)
if test $bfd_cv_has_long_long = yes; then
BFD_HOST_LONG_LONG=1
@ -196,6 +181,10 @@ if test "${target}" = "${host}"; then
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
hppa*-*-netbsd* | hppa*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
@ -220,7 +209,7 @@ changequote([,])dnl
COREFILE=
;;
changequote(,)dnl
i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234]* | i[3-7]86-*-freebsd*aout*)
i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
@ -329,6 +318,9 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m88kmach3.h"'
;;
m88*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
ns32k-pc532-mach)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/pc532mach.h"'
@ -351,9 +343,7 @@ changequote([,])dnl
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
AC_MSG_CHECKING([for c_impl in struct core_dumpx])
AC_TRY_COMPILE([#include <core.h>],
[struct core_dumpx c; c.c_impl = 0;],
[AC_DEFINE(HAVE_ST_C_IMPL, 1,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
[Define if struct core_dumpx has member c_impl])
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
;;
@ -592,10 +582,15 @@ do
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_symbian_vec)
tb="$tb elf32-arm.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vxworks_vec)
tb="$tb elf32-arm.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
@ -618,8 +613,11 @@ do
bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_symbian_vec)
tb="$tb elf32-arm.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vxworks_vec)
tb="$tb elf32-arm.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
@ -657,6 +655,7 @@ do
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
@ -741,6 +740,8 @@ do
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;;
maxqcoff_vec) tb="$tb coff-maxq.lo" ;;
mach_o_be_vec) tb="$tb mach-o.lo" ;;
mach_o_le_vec) tb="$tb mach-o.lo" ;;
mach_o_fat_vec) tb="$tb mach-o.lo" ;;
@ -890,7 +891,7 @@ case ${host64}-${target64}-${want64} in
AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
AC_MSG_RESULT(no))
if test $bad_64bit_gcc = yes ; then
AC_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
fi
fi
;;
@ -946,6 +947,7 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
esac
rm -f doc/config.status
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in,
[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
AC_CONFIG_COMMANDS([default],[[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]],[[]])
AC_OUTPUT

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AUTOMAKE_OPTIONS = cygnus
AUTOMAKE_OPTIONS = 1.9 cygnus
DOCFILES = aoutx.texi archive.texi archures.texi \
bfdt.texi cache.texi coffcode.texi \
@ -54,159 +54,141 @@ info_TEXINFOS = bfd.texinfo
MKDOC = chew$(EXEEXT_FOR_BUILD)
$(MKDOC): chew.o
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
-I$(srcdir)/../../intl -I../../intl
$(MKDOC): $(srcdir)/chew.c
$(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
$(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
$(INCLUDES); \
$(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
chew.o: chew.c
$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
$(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
$(srcdir)/bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
# We can't replace these rules with an implicit rule, because
# makes without VPATH support couldn't find the .h files in `..'.
# We use s-XXX targets so that we can distribute the info files,
# and permit people to rebuild them, without requiring the makeinfo
# program. If somebody tries to rebuild info, but none of the .texi
# files have changed, then this Makefile will build chew, and will
# build all of the stamp files, but will not actually have to rebuild
# bfd.info.
# We do not depend on chew directly so that we can distribute the info
# files, and permit people to rebuild them, without requiring the makeinfo
# program. If somebody tries to rebuild info, but none of the .texi files
# have changed, then nothing will be rebuilt.
s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
$(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
touch s-aoutx
aoutx.texi: s-aoutx
s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
$(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
touch s-archive
archive.texi: s-archive
s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
$(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
touch s-archures
archures.texi: s-archures
# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
# bfd.texinfo on an 8.3 filesystem.
s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
$(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
touch s-bfd
bfdt.texi: s-bfd
s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
$(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
touch s-cache
cache.texi: s-cache
s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
$(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
touch s-coffcode
coffcode.texi: s-coffcode
s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
$(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
touch s-core
core.texi: s-core
s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
$(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
touch s-elf
elf.texi: s-elf
s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
$(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
touch s-elfcode
elfcode.texi: s-elfcode
s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
$(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
touch s-mmo
mmo.texi: s-mmo
s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
$(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
touch s-format
format.texi: s-format
s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
$(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
touch s-libbfd
libbfd.texi: s-libbfd
s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
$(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
touch s-bfdio
bfdio.texi: s-bfdio
s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
$(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
touch s-bfdwin
bfdwin.texi: s-bfdwin
s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
$(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
touch s-opncls
opncls.texi: s-opncls
s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
$(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
touch s-reloc
reloc.texi: s-reloc
s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
$(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
touch s-section
section.texi: s-section
s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
$(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
touch s-syms
syms.texi: s-syms
s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
$(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
touch s-targets
targets.texi: s-targets
s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
$(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
touch s-init
init.texi: s-init
s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
$(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
touch s-hash
hash.texi: s-hash
s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
$(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
touch s-linker
linker.texi: s-linker
LIBBFD_H_DEP = \
$(srcdir)/../libbfd-in.h \
@ -296,7 +278,7 @@ noinst_TEXINFOS = bfdint.texi
MOSTLYCLEANFILES = $(MKDOC) *.o
CLEANFILES = s-* *.p *.ip
CLEANFILES = *.p *.ip
DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log

View File

@ -1,6 +1,8 @@
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -10,61 +12,73 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
subdir = doc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/accross.m4 \
$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
INFO_DEPS = $(srcdir)/bfd.info
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
DVIS = bfd.dvi
PDFS = bfd.pdf
PSS = bfd.ps
HTMLS = bfd.html
TEXINFOS = bfd.texinfo
TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
echo $(top_srcdir)/../texinfo/util/texi2dvi; \
else \
echo texi2dvi; \
fi`
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
@ -73,39 +87,64 @@ BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS = @CFLAGS@
COREFILE = @COREFILE@
COREFLAG = @COREFLAG@
CXX = @CXX@
CXXCPP = @CXXCPP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TDEFINES = @TDEFINES@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
@ -114,23 +153,65 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bfd_backends = @bfd_backends@
bfd_default_target_size = @bfd_default_target_size@
bfd_file_ptr = @bfd_file_ptr@
bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_ufile_ptr = @bfd_ufile_ptr@
bfd_version = @bfd_version@
bfd_version_string = @bfd_version_string@
bfdincludedir = @bfdincludedir@
bfdlibdir = @bfdlibdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_noncanonical = @host_noncanonical@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_noncanonical = @target_noncanonical@
target_os = @target_os@
target_vendor = @target_vendor@
tdefaults = @tdefaults@
wordsize = @wordsize@
AUTOMAKE_OPTIONS = cygnus
AUTOMAKE_OPTIONS = 1.9 cygnus
DOCFILES = aoutx.texi archive.texi archures.texi \
bfdt.texi cache.texi coffcode.texi \
core.texi elf.texi elfcode.texi format.texi \
@ -139,7 +220,6 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
syms.texi targets.texi init.texi hash.texi linker.texi \
mmo.texi
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
bfdio.p bfdwin.p \
@ -147,7 +227,6 @@ PROTOS = archive.p archures.p bfd.p \
section.p syms.p targets.p \
format.p core.p init.p
IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
@ -165,7 +244,6 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
$(srcdir)/../hash.c $(srcdir)/../linker.c \
$(srcdir)/../mmo.c
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
$(srcdir)/../format.c $(srcdir)/../libbfd.c \
@ -174,19 +252,17 @@ SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../section.c $(srcdir)/../syms.c \
$(srcdir)/../targets.c $(srcdir)/../init.c
SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
$(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
$(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
$(srcdir)/../init.c
TEXIDIR = $(srcdir)/../../texinfo/fsf
info_TEXINFOS = bfd.texinfo
MKDOC = chew$(EXEEXT_FOR_BUILD)
INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
-I$(srcdir)/../../intl -I../../intl
LIBBFD_H_DEP = \
$(srcdir)/../libbfd-in.h \
@ -202,7 +278,6 @@ LIBBFD_H_DEP = \
$(srcdir)/proto.str \
$(MKDOC)
LIBCOFF_H_DEP = \
$(srcdir)/../libcoff-in.h \
$(srcdir)/../coffcode.h \
@ -210,7 +285,6 @@ LIBCOFF_H_DEP = \
$(srcdir)/proto.str \
$(MKDOC)
BFD_H_DEP = \
$(srcdir)/../bfd-in.h \
$(srcdir)/../init.c \
@ -234,200 +308,177 @@ BFD_H_DEP = \
$(srcdir)/../version.h \
$(MKDOC)
noinst_TEXINFOS = bfdint.texi
MOSTLYCLEANFILES = $(MKDOC) *.o
CLEANFILES = s-* *.p *.ip
CLEANFILES = *.p *.ip
DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
MAINTAINERCLEANFILES = $(DOCFILES)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
INFO_DEPS = bfd.info
DVIS = bfd.dvi
TEXINFOS = bfd.texinfo
DIST_COMMON = ChangeLog Makefile.am Makefile.in
all: all-am
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
.SUFFIXES: .dvi .html .info .pdf .ps .texinfo
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
bfd.info: bfd.texinfo
bfd.dvi: bfd.texinfo
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
DVIPS = dvips
.texi.info:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
.texi.dvi:
TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
distclean-libtool:
-rm -f libtool
.texinfo.info:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
.texinfo:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ $<; \
then \
rc=0; \
cd $(srcdir); \
else \
rc=$$?; \
cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
.texinfo.dvi:
TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $<
.txi.info:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
.texinfo.pdf:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2PDF) $<
.txi.dvi:
TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.txi:
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
$(MAKEINFO) -I $(srcdir) $<
.texinfo.html:
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) $<; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
else \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
$(srcdir)/bfd.info: bfd.texinfo
bfd.dvi: bfd.texinfo
bfd.pdf: bfd.texinfo
bfd.html: bfd.texinfo
.dvi.ps:
$(DVIPS) $< -o $@
$(DVIPS) -o $@ $<
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(infodir)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
uninstall-info-am:
@$(PRE_UNINSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
done; \
else : ; fi
uninstall-info:
$(PRE_UNINSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
list='$(INFO_DEPS)'; \
for file in $$list; do \
test -z "$$ii" \
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
done
else :; fi
@$(NORMAL_UNINSTALL)
list='$(INFO_DEPS)'; \
@list='$(INFO_DEPS)'; \
for file in $$list; do \
(cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
dist-info: $(INFO_DEPS)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
for file in $$d/$$base*; do \
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
test -f $(distdir)/$$relfile || \
cp -p $$file $(distdir)/$$relfile; \
done; \
done
mostlyclean-aminfo:
-rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \
bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \
bfd.op bfd.tr bfd.cv bfd.cn
clean-aminfo:
distclean-aminfo:
-rm -rf bfd.aux bfd.cp bfd.cps bfd.fn bfd.ky bfd.kys bfd.log bfd.pg bfd.pgs \
bfd.tmp bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs bfd.dvi \
bfd.pdf bfd.ps bfd.html
maintainer-clean-aminfo:
for i in $(INFO_DEPS); do \
rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \
fi; \
@list='$(INFO_DEPS)'; for i in $$list; do \
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
clean-info: mostlyclean-aminfo
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
info-am: $(INFO_DEPS)
info: info-am
dvi-am: $(DVIS)
dvi: dvi-am
check-am:
check: check-am
installcheck-am:
installcheck: installcheck-am
install-info-am:
install-info: install-info-am
install-exec-am:
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
all-redirect: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@ -435,195 +486,237 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am: $(DVIS)
html: html-am
html-am: $(HTMLS)
info: info-am
info-am: $(INFO_DEPS)
install-data-am:
install-exec-am:
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
if test -f $$ifile; then \
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
done; \
else : ; fi
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic
mostlyclean: mostlyclean-am
clean-am: clean-aminfo clean-generic mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
mostlyclean-libtool
clean: clean-am
pdf: pdf-am
distclean-am: distclean-aminfo distclean-generic clean-am
-rm -f libtool
pdf-am: $(PDFS)
distclean: distclean-am
ps: ps-am
maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
ps-am: $(PSS)
maintainer-clean: maintainer-clean-am
uninstall-am:
.PHONY: install-info-am uninstall-info mostlyclean-aminfo \
distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir \
info-am info dvi-am dvi check check-am installcheck-am installcheck \
install-info-am install-info install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.PHONY: all all-am check check-am clean clean-generic clean-info \
clean-libtool dist-info distclean distclean-generic \
distclean-libtool dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic mostlyclean mostlyclean-aminfo \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am
$(MKDOC): chew.o
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
$(MKDOC): $(srcdir)/chew.c
$(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
$(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
$(INCLUDES); \
$(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
chew.o: chew.c
$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
$(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
$(srcdir)/bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
# We can't replace these rules with an implicit rule, because
# makes without VPATH support couldn't find the .h files in `..'.
# We use s-XXX targets so that we can distribute the info files,
# and permit people to rebuild them, without requiring the makeinfo
# program. If somebody tries to rebuild info, but none of the .texi
# files have changed, then this Makefile will build chew, and will
# build all of the stamp files, but will not actually have to rebuild
# bfd.info.
# We do not depend on chew directly so that we can distribute the info
# files, and permit people to rebuild them, without requiring the makeinfo
# program. If somebody tries to rebuild info, but none of the .texi files
# have changed, then nothing will be rebuilt.
s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
aoutx.texi: chew.c $(srcdir)/../aoutx.h $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
$(SHELL) $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
touch s-aoutx
aoutx.texi: s-aoutx
s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
archive.texi: chew.c $(srcdir)/../archive.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
$(SHELL) $(srcdir)/../../move-if-change archive.tmp archive.texi
touch s-archive
archive.texi: s-archive
s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
archures.texi: chew.c $(srcdir)/../archures.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
$(SHELL) $(srcdir)/../../move-if-change archures.tmp archures.texi
touch s-archures
archures.texi: s-archures
# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
# bfd.texinfo on an 8.3 filesystem.
s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
bfdt.texi: chew.c $(srcdir)/../bfd.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
$(SHELL) $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
touch s-bfd
bfdt.texi: s-bfd
s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
cache.texi: chew.c $(srcdir)/../cache.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
$(SHELL) $(srcdir)/../../move-if-change cache.tmp cache.texi
touch s-cache
cache.texi: s-cache
s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
coffcode.texi: chew.c $(srcdir)/../coffcode.h $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
$(SHELL) $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
touch s-coffcode
coffcode.texi: s-coffcode
s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
core.texi: chew.c $(srcdir)/../corefile.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
$(SHELL) $(srcdir)/../../move-if-change core.tmp core.texi
touch s-core
core.texi: s-core
s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
elf.texi: chew.c $(srcdir)/../elf.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
$(SHELL) $(srcdir)/../../move-if-change elf.tmp elf.texi
touch s-elf
elf.texi: s-elf
s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
elfcode.texi: chew.c $(srcdir)/../elfcode.h $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
$(SHELL) $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
touch s-elfcode
elfcode.texi: s-elfcode
s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
mmo.texi: chew.c $(srcdir)/../mmo.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
$(SHELL) $(srcdir)/../../move-if-change mmo.tmp mmo.texi
touch s-mmo
mmo.texi: s-mmo
s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
format.texi: chew.c $(srcdir)/../format.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
$(SHELL) $(srcdir)/../../move-if-change format.tmp format.texi
touch s-format
format.texi: s-format
s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
libbfd.texi: chew.c $(srcdir)/../libbfd.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
$(SHELL) $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
touch s-libbfd
libbfd.texi: s-libbfd
s-bfdio: $(MKDOC) $(srcdir)/../bfdio.c $(srcdir)/doc.str
bfdio.texi: chew.c $(srcdir)/../bfdio.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdio.c >bfdio.tmp
$(SHELL) $(srcdir)/../../move-if-change bfdio.tmp bfdio.texi
touch s-bfdio
bfdio.texi: s-bfdio
s-bfdwin: $(MKDOC) $(srcdir)/../bfdwin.c $(srcdir)/doc.str
bfdwin.texi: chew.c $(srcdir)/../bfdwin.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfdwin.c >bfdwin.tmp
$(SHELL) $(srcdir)/../../move-if-change bfdwin.tmp bfdwin.texi
touch s-bfdwin
bfdwin.texi: s-bfdwin
s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
opncls.texi: chew.c $(srcdir)/../opncls.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
$(SHELL) $(srcdir)/../../move-if-change opncls.tmp opncls.texi
touch s-opncls
opncls.texi: s-opncls
s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
reloc.texi: chew.c $(srcdir)/../reloc.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
$(SHELL) $(srcdir)/../../move-if-change reloc.tmp reloc.texi
touch s-reloc
reloc.texi: s-reloc
s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
section.texi: chew.c $(srcdir)/../section.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
$(SHELL) $(srcdir)/../../move-if-change section.tmp section.texi
touch s-section
section.texi: s-section
s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
syms.texi: chew.c $(srcdir)/../syms.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
$(SHELL) $(srcdir)/../../move-if-change syms.tmp syms.texi
touch s-syms
syms.texi: s-syms
s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
targets.texi: chew.c $(srcdir)/../targets.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
$(SHELL) $(srcdir)/../../move-if-change targets.tmp targets.texi
touch s-targets
targets.texi: s-targets
s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
init.texi: chew.c $(srcdir)/../init.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
$(SHELL) $(srcdir)/../../move-if-change init.tmp init.texi
touch s-init
init.texi: s-init
s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
hash.texi: chew.c $(srcdir)/../hash.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
$(SHELL) $(srcdir)/../../move-if-change hash.tmp hash.texi
touch s-hash
hash.texi: s-hash
s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
linker.texi: chew.c $(srcdir)/../linker.c $(srcdir)/doc.str
$(MAKE) $(MKDOC)
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
$(SHELL) $(srcdir)/../../move-if-change linker.tmp linker.texi
touch s-linker
linker.texi: s-linker
libbfd.h: $(LIBBFD_H_DEP)
echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
@ -668,7 +761,6 @@ bfd.h: $(BFD_H_DEP)
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* BFD back-end for HP PA-RISC ELF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
2002, 2003, 2004 Free Software Foundation, Inc.
2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Original code by
Center for Software Science
@ -539,8 +539,8 @@ hppa_add_stub (const char *stub_name,
TRUE, FALSE);
if (stub_entry == NULL)
{
(*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
bfd_archive_filename (section->owner),
(*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
section->owner,
stub_name);
return NULL;
}
@ -570,7 +570,7 @@ hppa_type_of_stub (asection *input_sec,
&& hash->elf.dynindx != -1
&& !hash->plabel
&& (info->shared
|| !(hash->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| !hash->elf.def_regular
|| hash->elf.root.type == bfd_link_hash_defweak))
{
/* We need an import stub. Decide between hppa_stub_import
@ -672,7 +672,7 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
stub_sec = stub_entry->stub_sec;
/* Make a note of the offset within the stubs for this entry. */
stub_entry->stub_offset = stub_sec->_raw_size;
stub_entry->stub_offset = stub_sec->size;
loc = stub_sec->contents + stub_entry->stub_offset;
stub_bfd = stub_sec->owner;
@ -792,9 +792,9 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|| sym_value - 8 + (1 << (22 + 1)) >= (1 << (22 + 2))))
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
bfd_archive_filename (stub_entry->target_section->owner),
stub_sec->name,
(_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
stub_entry->target_section->owner,
stub_sec,
(long) stub_entry->stub_offset,
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
@ -816,7 +816,7 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
/* Point the function symbol at the stub. */
stub_entry->h->elf.root.u.def.section = stub_sec;
stub_entry->h->elf.root.u.def.value = stub_sec->_raw_size;
stub_entry->h->elf.root.u.def.value = stub_sec->size;
size = 24;
break;
@ -826,7 +826,7 @@ hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
}
stub_sec->_raw_size += size;
stub_sec->size += size;
return TRUE;
}
@ -879,7 +879,7 @@ hppa_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
size = 16;
}
stub_entry->stub_sec->_raw_size += size;
stub_entry->stub_sec->size += size;
return TRUE;
}
@ -937,6 +937,7 @@ static bfd_boolean
elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct elf32_hppa_link_hash_table *htab;
struct elf_link_hash_entry *h;
/* Don't try to create the .plt and .got twice. */
htab = hppa_link_hash_table (info);
@ -966,7 +967,12 @@ elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
htab->sdynbss = bfd_get_section_by_name (abfd, ".dynbss");
htab->srelbss = bfd_get_section_by_name (abfd, ".rela.bss");
return TRUE;
/* hppa-linux needs _GLOBAL_OFFSET_TABLE_ to be visible from the main
application, because __canonicalize_funcptr_for_compare needs it. */
h = elf_hash_table (info)->hgot;
h->forced_local = 0;
h->other = STV_DEFAULT;
return bfd_elf_link_record_dynamic_symbol (info, h);
}
/* Copy the extra info we tack onto an elf_link_hash_entry. */
@ -1019,15 +1025,16 @@ elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
if (ELIMINATE_COPY_RELOCS
&& ind->root.type != bfd_link_hash_indirect
&& (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
/* If called to transfer flags for a weakdef during processing
of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
We clear it ourselves for ELIMINATE_COPY_RELOCS. */
dir->elf_link_hash_flags |=
(ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
| ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_REF_REGULAR_NONWEAK
| ELF_LINK_HASH_NEEDS_PLT));
&& dir->dynamic_adjusted)
{
/* If called to transfer flags for a weakdef during processing
of elf_adjust_dynamic_symbol, don't copy non_got_ref.
We clear it ourselves for ELIMINATE_COPY_RELOCS. */
dir->ref_dynamic |= ind->ref_dynamic;
dir->ref_regular |= ind->ref_regular;
dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
dir->needs_plt |= ind->needs_plt;
}
else
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
@ -1172,8 +1179,8 @@ elf32_hppa_check_relocs (bfd *abfd,
if (info->shared)
{
(*_bfd_error_handler)
(_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
bfd_archive_filename (abfd),
(_("%B: relocation %s can not be used when making a shared object; recompile with -fPIC"),
abfd,
elf_hppa_howto_table[r_type].name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
@ -1185,20 +1192,6 @@ elf32_hppa_check_relocs (bfd *abfd,
case R_PARISC_DIR14F: /* Used for load/store from absolute locn. */
case R_PARISC_DIR14R:
case R_PARISC_DIR21L: /* As above, and for ext branches too. */
#if 0
/* Help debug shared library creation. Any of the above
relocs can be used in shared libs, but they may cause
pages to become unshared. */
if (info->shared)
{
(*_bfd_error_handler)
(_("%s: relocation %s should not be used when making a shared object; recompile with -fPIC"),
bfd_archive_filename (abfd),
elf_hppa_howto_table[r_type].name);
}
/* Fall through. */
#endif
case R_PARISC_DIR32: /* .word relocs. */
/* We may want to output a dynamic relocation later. */
need_entry = NEED_DYNREL;
@ -1278,7 +1271,7 @@ elf32_hppa_check_relocs (bfd *abfd,
{
if (h != NULL)
{
h->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
h->elf.needs_plt = 1;
h->elf.plt.refcount += 1;
/* If this .plt entry is for a plabel, mark it so
@ -1319,7 +1312,7 @@ elf32_hppa_check_relocs (bfd *abfd,
so that we generate copy relocs if it turns out to be
dynamic. */
if (h != NULL && !info->shared)
h->elf.elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
h->elf.non_got_ref = 1;
/* If we are creating a shared library then we need to copy
the reloc into the shared library. However, if we are
@ -1355,15 +1348,13 @@ elf32_hppa_check_relocs (bfd *abfd,
|| (h != NULL
&& (!info->symbolic
|| h->elf.root.type == bfd_link_hash_defweak
|| (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))))
|| !h->elf.def_regular))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->elf.root.type == bfd_link_hash_defweak
|| (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)))
|| !h->elf.def_regular)))
{
struct elf32_hppa_dyn_reloc_entry *p;
struct elf32_hppa_dyn_reloc_entry **head;
@ -1538,6 +1529,9 @@ elf32_hppa_gc_sweep_hook (bfd *abfd,
struct elf32_hppa_dyn_reloc_entry *p;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
eh = (struct elf32_hppa_link_hash_entry *) h;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
@ -1601,6 +1595,67 @@ elf32_hppa_gc_sweep_hook (bfd *abfd,
return TRUE;
}
/* Support for core dump NOTE sections. */
static bfd_boolean
elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
size_t size;
switch (note->descsz)
{
default:
return FALSE;
case 396: /* Linux/hppa */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
size = 320;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
size, note->descpos + offset);
}
static bfd_boolean
elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
{
switch (note->descsz)
{
default:
return FALSE;
case 124: /* Linux/hppa elf_prpsinfo. */
elf_tdata (abfd)->core_program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
command[n - 1] = '\0';
}
return TRUE;
}
/* Our own version of hide_symbol, so that we can keep plt entries for
plabels. */
@ -1611,7 +1666,7 @@ elf32_hppa_hide_symbol (struct bfd_link_info *info,
{
if (force_local)
{
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
h->forced_local = 1;
if (h->dynindx != -1)
{
h->dynindx = -1;
@ -1622,8 +1677,8 @@ elf32_hppa_hide_symbol (struct bfd_link_info *info,
if (! ((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->plt.offset = (bfd_vma) -1;
h->needs_plt = 0;
h->plt = elf_hash_table (info)->init_refcount;
}
}
@ -1644,10 +1699,10 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later. */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
|| h->needs_plt)
{
if (h->plt.refcount <= 0
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
|| (h->def_regular
&& h->root.type != bfd_link_hash_defweak
&& ! ((struct elf32_hppa_link_hash_entry *) h)->plabel
&& (!info->shared || info->symbolic)))
@ -1661,7 +1716,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
application or we are doing a shared symbolic link. */
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 0;
}
return TRUE;
@ -1672,17 +1727,15 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
if (h->weakdef != NULL)
if (h->u.weakdef != NULL)
{
if (h->weakdef->root.type != bfd_link_hash_defined
&& h->weakdef->root.type != bfd_link_hash_defweak)
if (h->u.weakdef->root.type != bfd_link_hash_defined
&& h->u.weakdef->root.type != bfd_link_hash_defweak)
abort ();
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
h->root.u.def.section = h->u.weakdef->root.u.def.section;
h->root.u.def.value = h->u.weakdef->root.u.def.value;
if (ELIMINATE_COPY_RELOCS)
h->elf_link_hash_flags
= ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
| (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
h->non_got_ref = h->u.weakdef->non_got_ref;
return TRUE;
}
@ -1698,7 +1751,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
if (!h->non_got_ref)
return TRUE;
if (ELIMINATE_COPY_RELOCS)
@ -1718,7 +1771,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
h->non_got_ref = 0;
return TRUE;
}
}
@ -1740,8 +1793,8 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
htab->srelbss->_raw_size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
htab->srelbss->size += sizeof (Elf32_External_Rela);
h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@ -1753,8 +1806,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Apply the required alignment. */
s = htab->sdynbss;
s->_raw_size = BFD_ALIGN (s->_raw_size,
(bfd_size_type) (1 << power_of_two));
s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
if (! bfd_set_section_alignment (htab->elf.dynobj, s, power_of_two))
@ -1763,10 +1815,10 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
h->root.u.def.value = s->_raw_size;
h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
s->_raw_size += h->size;
s->size += h->size;
return TRUE;
}
@ -1790,12 +1842,12 @@ allocate_plt_static (struct elf_link_hash_entry *h, void *inf)
info = inf;
htab = hppa_link_hash_table (info);
if (htab->elf.dynamic_sections_created
&& h->plt.refcount > 0)
&& h->plt.refcount > 0)
{
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
&& (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
&& !h->forced_local
&& h->type != STT_PARISC_MILLI)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@ -1815,20 +1867,20 @@ allocate_plt_static (struct elf_link_hash_entry *h, void *inf)
/* Make an entry in the .plt section for plabel references
that won't have a .plt entry for other reasons. */
s = htab->splt;
h->plt.offset = s->_raw_size;
s->_raw_size += PLT_ENTRY_SIZE;
h->plt.offset = s->size;
s->size += PLT_ENTRY_SIZE;
}
else
{
/* No .plt entry needed. */
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 0;
}
}
else
{
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 0;
}
return TRUE;
@ -1860,11 +1912,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
/* Make an entry in the .plt section. */
s = htab->splt;
h->plt.offset = s->_raw_size;
s->_raw_size += PLT_ENTRY_SIZE;
h->plt.offset = s->size;
s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
htab->srelplt->_raw_size += sizeof (Elf32_External_Rela);
htab->srelplt->size += sizeof (Elf32_External_Rela);
htab->need_plt_stub = 1;
}
@ -1873,7 +1925,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
&& (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
&& !h->forced_local
&& h->type != STT_PARISC_MILLI)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@ -1881,14 +1933,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
s = htab->sgot;
h->got.offset = s->_raw_size;
s->_raw_size += GOT_ENTRY_SIZE;
h->got.offset = s->size;
s->size += GOT_ENTRY_SIZE;
if (htab->elf.dynamic_sections_created
&& (info->shared
|| (h->dynindx != -1
&& h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0))
&& !h->forced_local)))
{
htab->srelgot->_raw_size += sizeof (Elf32_External_Rela);
htab->srelgot->size += sizeof (Elf32_External_Rela);
}
}
else
@ -1933,10 +1985,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* For the non-shared case, discard space for relocs against
symbols which turn out to need copy relocs or are not
dynamic. */
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
if (!h->non_got_ref
&& ((ELIMINATE_COPY_RELOCS
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
&& h->def_dynamic
&& !h->def_regular)
|| (htab->elf.dynamic_sections_created
&& (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined))))
@ -1944,7 +1996,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
if (h->dynindx == -1
&& (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
&& !h->forced_local
&& h->type != STT_PARISC_MILLI)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
@ -1967,7 +2019,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
asection *sreloc = elf_section_data (p->sec)->sreloc;
sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela);
sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
return TRUE;
@ -1988,7 +2040,7 @@ clobber_millicode_symbols (struct elf_link_hash_entry *h,
h = (struct elf_link_hash_entry *) h->root.u.i.link;
if (h->type == STT_PARISC_MILLI
&& (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
&& !h->forced_local)
{
elf32_hppa_hide_symbol (info, h, TRUE);
}
@ -2049,7 +2101,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
abort ();
s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
@ -2094,7 +2146,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
srel->_raw_size += p->count * sizeof (Elf32_External_Rela);
srel->size += p->count * sizeof (Elf32_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
@ -2114,10 +2166,10 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_got > 0)
{
*local_got = s->_raw_size;
s->_raw_size += GOT_ENTRY_SIZE;
*local_got = s->size;
s->size += GOT_ENTRY_SIZE;
if (info->shared)
srel->_raw_size += sizeof (Elf32_External_Rela);
srel->size += sizeof (Elf32_External_Rela);
}
else
*local_got = (bfd_vma) -1;
@ -2139,10 +2191,10 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
if (*local_plt > 0)
{
*local_plt = s->_raw_size;
s->_raw_size += PLT_ENTRY_SIZE;
*local_plt = s->size;
s->size += PLT_ENTRY_SIZE;
if (info->shared)
srel->_raw_size += sizeof (Elf32_External_Rela);
srel->size += sizeof (Elf32_External_Rela);
}
else
*local_plt = (bfd_vma) -1;
@ -2182,14 +2234,14 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (gotalign > pltalign)
bfd_set_section_alignment (dynobj, s, gotalign);
mask = ((bfd_size_type) 1 << gotalign) - 1;
s->_raw_size = (s->_raw_size + sizeof (plt_stub) + mask) & ~mask;
s->size = (s->size + sizeof (plt_stub) + mask) & ~mask;
}
}
else if (s == htab->sgot)
;
else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
{
if (s->_raw_size != 0)
if (s->size != 0)
{
/* Remember whether there are any reloc sections other
than .rela.plt. */
@ -2207,7 +2259,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
if (s->_raw_size == 0)
if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@ -2224,8 +2276,8 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Allocate memory for the section contents. Zero it, because
we may not fill in all the reloc sections. */
s->contents = bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
s->contents = bfd_zalloc (dynobj, s->size);
if (s->contents == NULL && s->size != 0)
return FALSE;
}
@ -2252,7 +2304,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
if (htab->srelplt->_raw_size != 0)
if (htab->srelplt->size != 0)
{
if (!add_dynamic_entry (DT_PLTRELSZ, 0)
|| !add_dynamic_entry (DT_PLTREL, DT_RELA)
@ -2409,10 +2461,7 @@ group_sections (struct elf32_hppa_link_hash_table *htab,
bfd_boolean big_sec;
curr = tail;
if (tail->_cooked_size)
total = tail->_cooked_size;
else
total = tail->_raw_size;
total = tail->size;
big_sec = total >= stub_group_size;
while ((prev = PREV_SEC (curr)) != NULL
@ -2550,8 +2599,8 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info)
&& (hash->elf.root.u.def.section->output_section->owner
== output_bfd)
&& hash->elf.root.u.def.section->owner == input_bfd
&& (hash->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
&& !(hash->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)
&& hash->elf.def_regular
&& !hash->elf.forced_local
&& ELF_ST_VISIBILITY (hash->elf.other) == STV_DEFAULT)
{
asection *sec;
@ -2577,8 +2626,8 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info)
}
else
{
(*_bfd_error_handler) (_("%s: duplicate export stub %s"),
bfd_archive_filename (input_bfd),
(*_bfd_error_handler) (_("%B: duplicate export stub %s"),
input_bfd,
stub_name);
}
}
@ -2860,10 +2909,7 @@ elf32_hppa_size_stubs
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
{
stub_sec->_raw_size = 0;
stub_sec->_cooked_size = 0;
}
stub_sec->size = 0;
bfd_hash_traverse (&htab->stub_hash_table, hppa_size_one_stub, htab);
@ -2918,8 +2964,8 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
? NULL : splt;
if (sec != NULL)
{
gp_val = sec->_raw_size;
if (gp_val > 0x2000 || (sgot && sgot->_raw_size > 0x2000))
gp_val = sec->size;
if (gp_val > 0x2000 || (sgot && sgot->size > 0x2000))
{
gp_val = 0x2000;
}
@ -2933,7 +2979,7 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
{
/* We know we don't have a .plt. If .got is large,
offset our LTP. */
if (sec->_raw_size > 0x2000)
if (sec->size > 0x2000)
gp_val = 0x2000;
}
}
@ -2984,11 +3030,11 @@ elf32_hppa_build_stubs (struct bfd_link_info *info)
bfd_size_type size;
/* Allocate memory to hold the linker stubs. */
size = stub_sec->_raw_size;
size = stub_sec->size;
stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL && size != 0)
return FALSE;
stub_sec->_raw_size = 0;
stub_sec->size = 0;
}
/* Build the stubs as directed by the stub hash table. */
@ -3111,7 +3157,7 @@ final_link_relocate (asection *input_section,
&& h->elf.dynindx != -1
&& !h->plabel
&& (info->shared
|| !(h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| !h->elf.def_regular
|| h->elf.root.type == bfd_link_hash_defweak)))
{
stub_entry = hppa_get_stub_entry (input_section, sym_sec,
@ -3171,9 +3217,9 @@ final_link_relocate (asection *input_section,
and convert the associated add instruction, so issue an
error. */
(*_bfd_error_handler)
(_("%s(%s+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
bfd_archive_filename (input_bfd),
input_section->name,
(_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
input_bfd,
input_section,
(long) rel->r_offset,
howto->name,
insn);
@ -3199,14 +3245,6 @@ final_link_relocate (asection *input_section,
== (((int) OP_ADDIL << 26) | (27 << 21)))
{
insn &= ~ (0x1f << 21);
#if 0 /* debug them. */
(*_bfd_error_handler)
(_("%s(%s+0x%lx): fixing %s"),
bfd_archive_filename (input_bfd),
input_section->name,
(long) rel->r_offset,
howto->name);
#endif
}
/* Now try to make things easy for the dynamic linker. */
@ -3324,9 +3362,9 @@ final_link_relocate (asection *input_section,
&& value + addend + max_branch_offset >= 2*max_branch_offset)
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
bfd_archive_filename (input_bfd),
input_section->name,
(_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
input_bfd,
input_section,
(long) rel->r_offset,
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
@ -3697,12 +3735,10 @@ elf32_hppa_relocate_section (bfd *output_bfd,
|| (!info->shared
&& h != NULL
&& h->elf.dynindx != -1
&& (h->elf.elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
&& !h->elf.non_got_ref
&& ((ELIMINATE_COPY_RELOCS
&& (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
&& h->elf.def_dynamic
&& !h->elf.def_regular)
|| h->elf.root.type == bfd_link_hash_undefweak
|| h->elf.root.type == bfd_link_hash_undefined)))
{
@ -3734,8 +3770,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
|| !IS_ABSOLUTE_RELOC (r_type)
|| !info->shared
|| !info->symbolic
|| (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| !h->elf.def_regular))
{
outrel.r_info = ELF32_R_INFO (h->elf.dynindx, r_type);
}
@ -3772,13 +3807,6 @@ elf32_hppa_relocate_section (bfd *output_bfd,
outrel.r_info = ELF32_R_INFO (indx, r_type);
}
#if 0
/* EH info can cause unaligned DIR32 relocs.
Tweak the reloc type for the dynamic linker. */
if (r_type == R_PARISC_DIR32 && (outrel.r_offset & 3) != 0)
outrel.r_info = ELF32_R_INFO (ELF32_R_SYM (outrel.r_info),
R_PARISC_DIR32U);
#endif
sreloc = elf_section_data (input_section)->sreloc;
if (sreloc == NULL)
abort ();
@ -3819,9 +3847,9 @@ elf32_hppa_relocate_section (bfd *output_bfd,
if (r == bfd_reloc_notsupported || !warned_undef)
{
(*_bfd_error_handler)
(_("%s(%s+0x%lx): cannot handle %s for %s"),
bfd_archive_filename (input_bfd),
input_section->name,
(_("%B(%A+0x%lx): cannot handle %s for %s"),
input_bfd,
input_section,
(long) rel->r_offset,
howto->name,
sym_name);
@ -3832,8 +3860,8 @@ elf32_hppa_relocate_section (bfd *output_bfd,
else
{
if (!((*info->callbacks->reloc_overflow)
(info, sym_name, howto->name, 0, input_bfd, input_section,
rel->r_offset)))
(info, (h ? &h->elf.root : NULL), sym_name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
return FALSE;
}
}
@ -3901,7 +3929,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd,
loc += htab->srelplt->reloc_count++ * sizeof (Elf32_External_Rela);
bfd_elf32_swap_reloca_out (htab->splt->output_section->owner, &rel, loc);
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
@ -3925,7 +3953,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd,
relocate_section function. */
if (info->shared
&& (info->symbolic || h->dynindx == -1)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
&& h->def_regular)
{
rel.r_info = ELF32_R_INFO (0, R_PARISC_DIR32);
rel.r_addend = (h->root.u.def.value
@ -3946,7 +3974,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd,
bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
}
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
if (h->needs_copy)
{
asection *s;
@ -4022,7 +4050,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
abort ();
dyncon = (Elf32_External_Dyn *) sdyn->contents;
dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@ -4047,7 +4075,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
case DT_PLTRELSZ:
s = htab->srelplt;
dyn.d_un.d_val = s->_raw_size;
dyn.d_un.d_val = s->size;
break;
case DT_RELASZ:
@ -4056,7 +4084,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
s = htab->srelplt;
if (s == NULL)
continue;
dyn.d_un.d_val -= s->_raw_size;
dyn.d_un.d_val -= s->size;
break;
case DT_RELA:
@ -4068,7 +4096,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
continue;
dyn.d_un.d_ptr += s->_raw_size;
dyn.d_un.d_ptr += s->size;
break;
}
@ -4076,7 +4104,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
}
}
if (htab->sgot != NULL && htab->sgot->_raw_size != 0)
if (htab->sgot != NULL && htab->sgot->size != 0)
{
/* Fill in the first entry in the global offset table.
We use it to point to our dynamic section, if we have one. */
@ -4092,7 +4120,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
->this_hdr.sh_entsize = GOT_ENTRY_SIZE;
}
if (htab->splt != NULL && htab->splt->_raw_size != 0)
if (htab->splt != NULL && htab->splt->size != 0)
{
/* Set plt entry size. */
elf_section_data (htab->splt->output_section)
@ -4102,12 +4130,12 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
{
/* Set up the .plt stub. */
memcpy (htab->splt->contents
+ htab->splt->_raw_size - sizeof (plt_stub),
+ htab->splt->size - sizeof (plt_stub),
plt_stub, sizeof (plt_stub));
if ((htab->splt->output_offset
+ htab->splt->output_section->vma
+ htab->splt->_raw_size)
+ htab->splt->size)
!= (htab->sgot->output_offset
+ htab->sgot->output_section->vma))
{
@ -4178,6 +4206,8 @@ elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
#define elf_backend_size_dynamic_sections elf32_hppa_size_dynamic_sections
#define elf_backend_gc_mark_hook elf32_hppa_gc_mark_hook
#define elf_backend_gc_sweep_hook elf32_hppa_gc_sweep_hook
#define elf_backend_grok_prstatus elf32_hppa_grok_prstatus
#define elf_backend_grok_psinfo elf32_hppa_grok_psinfo
#define elf_backend_object_p elf32_hppa_object_p
#define elf_backend_final_write_processing elf_hppa_final_write_processing
#define elf_backend_post_process_headers elf32_hppa_post_process_headers

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* VAX series support for 32-bit ELF
Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004 Free Software Foundation, Inc.
2004, 2005 Free Software Foundation, Inc.
Contributed by Matt Thomas <matt@3am-software.com>.
This file is part of BFD, the Binary File Descriptor library.
@ -704,7 +704,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
if (h == NULL)
continue;
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 1;
if (h->plt.refcount == -1)
h->plt.refcount = 1;
else
@ -728,8 +728,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (!info->symbolic
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)))
|| !h->def_regular)))
{
if (h != NULL)
{
@ -797,7 +796,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
}
}
sreloc->_raw_size += sizeof (Elf32_External_Rela);
sreloc->size += sizeof (Elf32_External_Rela);
/* If we are linking with -Bsymbolic, we count the number of
PC relative relocations we have entered for this symbol,
@ -933,18 +932,22 @@ elf_vax_gc_sweep_hook (abfd, info, sec, relocs)
for (rel = relocs; rel < relend; rel++)
{
unsigned long r_symndx;
struct elf_link_hash_entry *h;
struct elf_link_hash_entry *h = NULL;
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
}
switch (ELF32_R_TYPE (rel->r_info))
{
case R_VAX_GOT32:
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
if (h->got.refcount > 0)
--h->got.refcount;
}
if (h != NULL && h->got.refcount > 0)
--h->got.refcount;
break;
case R_VAX_PLT32:
@ -954,13 +957,8 @@ elf_vax_gc_sweep_hook (abfd, info, sec, relocs)
case R_VAX_8:
case R_VAX_16:
case R_VAX_32:
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
if (h->plt.refcount > 0)
--h->plt.refcount;
}
if (h != NULL && h->plt.refcount > 0)
--h->plt.refcount;
break;
default:
@ -990,24 +988,21 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
|| h->weakdef != NULL
|| ((h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_REF_REGULAR) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)));
&& (h->needs_plt
|| h->u.weakdef != NULL
|| (h->def_dynamic
&& h->ref_regular
&& !h->def_regular)));
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later,
when we know the address of the .got section. */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
|| h->needs_plt)
{
if (! info->shared
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
&& !h->def_dynamic
&& !h->ref_dynamic
/* We must always create the plt entry if it was referenced
by a PLTxxO relocation. In this case we already recorded
it as a dynamic symbol. */
@ -1018,7 +1013,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
object. In such a case, we don't actually need to build
a procedure linkage table, and we can just do a PCxx
reloc instead. */
BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
BFD_ASSERT (h->needs_plt);
h->plt.offset = (bfd_vma) -1;
return TRUE;
}
@ -1026,7 +1021,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* GC may have rendered this entry unused. */
if (h->plt.refcount <= 0)
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 0;
h->plt.offset = (bfd_vma) -1;
return TRUE;
}
@ -1043,9 +1038,9 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* If this is the first .plt entry, make room for the special
first entry. */
if (s->_raw_size == 0)
if (s->size == 0)
{
s->_raw_size += PLT_ENTRY_SIZE;
s->size += PLT_ENTRY_SIZE;
}
/* If this symbol is not defined in a regular file, and we are
@ -1054,29 +1049,29 @@ elf_vax_adjust_dynamic_symbol (info, h)
pointers compare as equal between the normal executable and
the shared library. */
if (!info->shared
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
&& !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = s->_raw_size;
h->root.u.def.value = s->size;
}
h->plt.offset = s->_raw_size;
h->plt.offset = s->size;
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .got.plt section, which
will be placed in the .got section by the linker script. */
s = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (s != NULL);
s->_raw_size += 4;
s->size += 4;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
s->_raw_size += sizeof (Elf32_External_Rela);
s->size += sizeof (Elf32_External_Rela);
return TRUE;
}
@ -1088,12 +1083,12 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
if (h->weakdef != NULL)
if (h->u.weakdef != NULL)
{
BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
|| h->weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
|| h->u.weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->u.weakdef->root.u.def.section;
h->root.u.def.value = h->u.weakdef->root.u.def.value;
return TRUE;
}
@ -1130,8 +1125,8 @@ elf_vax_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
srel->_raw_size += sizeof (Elf32_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
srel->size += sizeof (Elf32_External_Rela);
h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@ -1141,8 +1136,7 @@ elf_vax_adjust_dynamic_symbol (info, h)
power_of_two = 3;
/* Apply the required alignment. */
s->_raw_size = BFD_ALIGN (s->_raw_size,
(bfd_size_type) (1 << power_of_two));
s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (!bfd_set_section_alignment (dynobj, s, power_of_two))
@ -1151,10 +1145,10 @@ elf_vax_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
h->root.u.def.value = s->_raw_size;
h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
s->_raw_size += h->size;
s->size += h->size;
return TRUE;
}
@ -1182,7 +1176,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@ -1195,13 +1189,13 @@ elf_vax_size_dynamic_sections (output_bfd, info)
file below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
if (s != NULL)
s->_raw_size = 0;
s->size = 0;
s = bfd_get_section_by_name (dynobj, ".got.plt");
if (s != NULL)
s->_raw_size = 0;
s->size = 0;
s = bfd_get_section_by_name (dynobj, ".got");
if (s != NULL)
s->_raw_size = 0;
s->size = 0;
}
/* If this is a -Bsymbolic shared link, then we need to discard all PC
@ -1242,7 +1236,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".plt") == 0)
{
if (s->_raw_size == 0)
if (s->size == 0)
{
/* Strip this section if we don't need it; see the
comment below. */
@ -1256,7 +1250,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
}
else if (strncmp (name, ".rela", 5) == 0)
{
if (s->_raw_size == 0)
if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is mostly to handle .rela.bss and
@ -1312,8 +1306,8 @@ elf_vax_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
if (s->contents == NULL && s->size != 0)
return FALSE;
}
@ -1378,11 +1372,11 @@ elf_vax_discard_copies (h, ignore)
h = (struct elf_vax_link_hash_entry *) h->root.root.u.i.link;
/* We only discard relocs for symbols defined in a regular object. */
if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
if (!h->root.def_regular)
return TRUE;
for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
s->section->size -= s->count * sizeof (Elf32_External_Rela);
return TRUE;
}
@ -1433,8 +1427,8 @@ elf_vax_instantiate_got_entries (h, infoptr)
}
/* Allocate space in the .got and .rela.got sections. */
sgot->_raw_size += 4;
srelgot->_raw_size += sizeof (Elf32_External_Rela);
sgot->size += 4;
srelgot->size += sizeof (Elf32_External_Rela);
}
return TRUE;
@ -1539,12 +1533,10 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
&& elf_hash_table (info)->dynamic_sections_created
&& (! info->shared
|| (! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| !h->def_regular))
|| (info->shared
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
|| !h->def_regular)
&& ((input_section->flags & SEC_ALLOC) != 0
/* DWARF will emit R_VAX_32 relocations in its
sections against symbols defined externally
@ -1552,8 +1544,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
with them here. */
|| ((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0))
&& h->def_dynamic))
&& (r_type == R_VAX_8
|| r_type == R_VAX_16
|| r_type == R_VAX_32
@ -1589,11 +1580,11 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (h != NULL);
off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
BFD_ASSERT (off < sgot->_raw_size);
BFD_ASSERT (off < sgot->size);
if (info->shared
&& h->dynindx == -1
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
&& h->def_regular)
{
/* The symbol was forced to be local
because of a version file.. We must initialize
@ -1700,8 +1691,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
&& r_type != R_VAX_PC16
&& r_type != R_VAX_PC32)
|| (!info->symbolic
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)))
|| !h->def_regular)))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
@ -1749,8 +1739,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
become local. */
else if (h != NULL
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| !h->def_regular))
{
BFD_ASSERT (h->dynindx != -1);
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
@ -1858,7 +1847,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (h != NULL)
name = h->root.root.string;
name = NULL;
else
{
name = bfd_elf_string_from_elf_section (input_bfd,
@ -1870,8 +1859,9 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (!(info->callbacks->reloc_overflow
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset)))
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section,
rel->r_offset)))
return FALSE;
}
break;
@ -1958,7 +1948,7 @@ elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = srela->contents + plt_index * sizeof (Elf32_External_Rela);
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
@ -1989,7 +1979,7 @@ elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym)
the relocate_section function. */
if (info->shared
&& h->dynindx == -1
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
&& h->def_regular)
{
rela.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE);
}
@ -2006,7 +1996,7 @@ elf_vax_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
}
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
if (h->needs_copy)
{
asection *s;
Elf_Internal_Rela rela;
@ -2064,7 +2054,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@ -2093,10 +2083,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
case DT_PLTRELSZ:
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
BFD_ASSERT (s != NULL);
if (s->_cooked_size != 0)
dyn.d_un.d_val = s->_cooked_size;
else
dyn.d_un.d_val = s->_raw_size;
dyn.d_un.d_val = s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
@ -2110,19 +2097,14 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
about changing the DT_RELA entry. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s != NULL)
{
if (s->_cooked_size != 0)
dyn.d_un.d_val -= s->_cooked_size;
else
dyn.d_un.d_val -= s->_raw_size;
}
dyn.d_un.d_val -= s->size;
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
}
}
/* Fill in the first entry in the procedure linkage table. */
if (splt->_raw_size > 0)
if (splt->size > 0)
{
memcpy (splt->contents, elf_vax_plt0_entry, PLT_ENTRY_SIZE);
bfd_put_32 (output_bfd,
@ -2141,7 +2123,7 @@ elf_vax_finish_dynamic_sections (output_bfd, info)
}
/* Fill in the first three entries in the global offset table. */
if (sgot->_raw_size > 0)
if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);

View File

@ -1,5 +1,5 @@
/* Alpha specific support for 64-bit ELF
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
@ -75,7 +75,7 @@ static bfd_boolean elf64_alpha_object_p
static bfd_boolean elf64_alpha_section_from_shdr
PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static bfd_boolean elf64_alpha_section_flags
PARAMS ((flagword *, Elf_Internal_Shdr *));
PARAMS ((flagword *, const Elf_Internal_Shdr *));
static bfd_boolean elf64_alpha_fake_sections
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
static bfd_boolean elf64_alpha_create_got_section
@ -1036,6 +1036,7 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
{
bfd_reloc_status_type ret;
bfd_vma gp, relocation;
bfd_vma high_address;
bfd_byte *p_ldah, *p_lda;
/* Don't do anything if we're not doing a final link. */
@ -1045,8 +1046,9 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section,
return bfd_reloc_ok;
}
if (reloc_entry->address > input_section->_cooked_size ||
reloc_entry->address + reloc_entry->addend > input_section->_cooked_size)
high_address = bfd_get_section_limit (abfd, input_section);
if (reloc_entry->address > high_address
|| reloc_entry->address + reloc_entry->addend > high_address)
return bfd_reloc_outofrange;
/* The gp used in the portion of the output object to which this
@ -1255,8 +1257,8 @@ elf64_alpha_relax_with_lituse (info, symval, irel)
if (lit_insn >> 26 != OP_LDQ)
{
((*_bfd_error_handler)
("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
bfd_archive_filename (info->abfd), info->sec->name,
("%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn",
info->abfd, info->sec,
(unsigned long) irel->r_offset));
return TRUE;
}
@ -1300,9 +1302,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel)
/* Extract the displacement from the instruction, sign-extending
it if necessary, then test whether it is within 16 or 32 bits
displacement from GP. */
insn_disp = insn & 0x0000ffff;
if (insn_disp & 0x8000)
insn_disp |= ~0xffff; /* Negative: sign-extend. */
insn_disp = ((insn & 0xffff) ^ 0x8000) - 0x8000;
xdisp = disp + insn_disp;
fits16 = (xdisp >= - (bfd_signed_vma) 0x8000 && xdisp < 0x8000);
@ -1371,6 +1371,19 @@ elf64_alpha_relax_with_lituse (info, symval, irel)
bfd_vma optdest, org;
bfd_signed_vma odisp;
/* For undefined weak symbols, we're mostly interested in getting
rid of the got entry whenever possible, so optimize this to a
use of the zero register. */
if (info->h && info->h->root.root.type == bfd_link_hash_undefweak)
{
insn |= 31 << 16;
bfd_put_32 (info->abfd, (bfd_vma) insn,
info->contents + urel->r_offset);
info->changed_contents = TRUE;
break;
}
/* If not zero, place to jump without needing pv. */
optdest = elf64_alpha_relax_opt_call (info, symval);
org = (info->sec->output_section->vma
@ -1474,9 +1487,11 @@ elf64_alpha_relax_with_lituse (info, symval, irel)
info->contents + irel->r_offset);
info->changed_contents = TRUE;
}
}
return TRUE;
return TRUE;
}
else
return elf64_alpha_relax_got_load (info, symval, irel, R_ALPHA_LITERAL);
}
static bfd_vma
@ -1568,8 +1583,8 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
{
reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
((*_bfd_error_handler)
("%s: %s+0x%lx: warning: %s relocation against unexpected insn",
bfd_archive_filename (info->abfd), info->sec->name,
("%B: %A+0x%lx: warning: %s relocation against unexpected insn",
info->abfd, info->sec,
(unsigned long) irel->r_offset, howto->name));
return TRUE;
}
@ -1583,7 +1598,25 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
return TRUE;
if (r_type == R_ALPHA_LITERAL)
disp = symval - info->gp;
{
/* Look for nice constant addresses. This includes the not-uncommon
special case of 0 for undefweak symbols. */
if ((info->h && info->h->root.root.type == bfd_link_hash_undefweak)
|| (!info->link_info->shared
&& (symval >= (bfd_vma)-0x8000 || symval < 0x8000)))
{
disp = 0;
insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
insn |= (symval & 0xffff);
r_type = R_ALPHA_NONE;
}
else
{
disp = symval - info->gp;
insn = (OP_LDA << 26) | (insn & 0x03ff0000);
r_type = R_ALPHA_GPREL16;
}
}
else
{
bfd_vma dtp_base, tp_base;
@ -1592,17 +1625,26 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
dtp_base = alpha_get_dtprel_base (info->link_info);
tp_base = alpha_get_tprel_base (info->link_info);
disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
switch (r_type)
{
case R_ALPHA_GOTDTPREL:
r_type = R_ALPHA_DTPREL16;
break;
case R_ALPHA_GOTTPREL:
r_type = R_ALPHA_TPREL16;
break;
default:
BFD_ASSERT (0);
return FALSE;
}
}
if (disp < -0x8000 || disp >= 0x8000)
return TRUE;
/* Exchange LDQ for LDA. In the case of the TLS relocs, we're loading
a constant, so force the base register to be $31. */
if (r_type == R_ALPHA_LITERAL)
insn = (OP_LDA << 26) | (insn & 0x03ff0000);
else
insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset);
info->changed_contents = TRUE;
@ -1617,22 +1659,6 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
}
/* Smash the existing GOT relocation for its 16-bit immediate pair. */
switch (r_type)
{
case R_ALPHA_LITERAL:
r_type = R_ALPHA_GPREL16;
break;
case R_ALPHA_GOTDTPREL:
r_type = R_ALPHA_DTPREL16;
break;
case R_ALPHA_GOTTPREL:
r_type = R_ALPHA_TPREL16;
break;
default:
BFD_ASSERT (0);
return FALSE;
}
irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type);
info->changed_relocs = TRUE;
@ -1969,15 +1995,11 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
*again = FALSE;
if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| ((sec->flags & (SEC_CODE | SEC_RELOC | SEC_ALLOC))
!= (SEC_CODE | SEC_RELOC | SEC_ALLOC))
|| sec->reloc_count == 0)
return TRUE;
/* If this is the first time we have been called for this section,
initialize the cooked size. */
if (sec->_cooked_size == 0)
sec->_cooked_size = sec->_raw_size;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
@ -2012,12 +2034,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
info.contents = elf_section_data (sec)->this_hdr.contents;
else
{
info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
if (info.contents == NULL)
goto error_return;
if (! bfd_get_section_contents (abfd, sec, info.contents,
(file_ptr) 0, sec->_raw_size))
if (!bfd_malloc_and_get_section (abfd, sec, &info.contents))
goto error_return;
}
@ -2113,13 +2130,17 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
/* If the symbol is undefined, we can't do anything with it. */
if (h->root.root.type == bfd_link_hash_undefweak
|| h->root.root.type == bfd_link_hash_undefined)
if (h->root.root.type == bfd_link_hash_undefined)
continue;
/* If the symbol isn't defined in the current module, again
we can't do anything. */
if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
/* If the symbol isn't defined in the current module,
again we can't do anything. */
if (h->root.root.type == bfd_link_hash_undefweak)
{
info.tsec = bfd_abs_section_ptr;
symval = 0;
}
else if (!h->root.def_regular)
{
/* Except for TLSGD relocs, which can sometimes be
relaxed to GOTTPREL relocs. */
@ -2320,7 +2341,7 @@ elf64_alpha_section_from_shdr (abfd, hdr, name)
static bfd_boolean
elf64_alpha_section_flags (flags, hdr)
flagword *flags;
Elf_Internal_Shdr *hdr;
const Elf_Internal_Shdr *hdr;
{
if (hdr->sh_flags & SHF_ALPHA_GPREL)
*flags |= SEC_SMALL_DATA;
@ -2463,7 +2484,7 @@ elf64_alpha_create_dynamic_sections (abfd, info)
get_elf_backend_data (abfd)->collect, &bh)))
return FALSE;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->def_regular = 1;
h->type = STT_OBJECT;
if (info->shared
@ -2507,7 +2528,7 @@ elf64_alpha_create_dynamic_sections (abfd, info)
FALSE, get_elf_backend_data (abfd)->collect, &bh)))
return FALSE;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->def_regular = 1;
h->type = STT_OBJECT;
if (info->shared
@ -2577,7 +2598,6 @@ elf64_alpha_read_ecoff_info (abfd, section, debug)
#undef READ
debug->fdr = NULL;
debug->adjust = NULL;
return TRUE;
@ -2755,10 +2775,11 @@ elf64_alpha_output_extsym (h, data)
if (h->root.indx == -2)
strip = FALSE;
else if (((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
|| (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0)
&& (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
&& (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
else if ((h->root.def_dynamic
|| h->root.ref_dynamic
|| h->root.root.type == bfd_link_hash_new)
&& !h->root.def_regular
&& !h->root.ref_regular)
strip = TRUE;
else if (einfo->info->strip == strip_all
|| (einfo->info->strip == strip_some
@ -2845,7 +2866,7 @@ elf64_alpha_output_extsym (h, data)
else
h->esym.asym.value = 0;
}
else if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
else if (h->root.needs_plt)
{
/* Set type and value for a symbol with a function stub. */
h->esym.asym.st = stProc;
@ -2975,6 +2996,15 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
if (info->relocatable)
return TRUE;
/* Don't do anything special with non-loaded, non-alloced sections.
In particular, any relocs in such sections should not affect GOT
and PLT reference counting (ie. we don't allow them to create GOT
or PLT entries), there's no possibility or desire to optimize TLS
relocs, and there's not much point in propagating relocs to shared
libs that the dynamic linker won't relocate. */
if ((sec->flags & SEC_ALLOC) == 0)
return TRUE;
dynobj = elf_hash_table(info)->dynobj;
if (dynobj == NULL)
elf_hash_table(info)->dynobj = dynobj = abfd;
@ -3012,7 +3042,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
|| h->root.root.type == bfd_link_hash_warning)
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
h->root.elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
h->root.ref_regular = 1;
}
/* We can only get preliminary data on whether a symbol is
@ -3022,7 +3052,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
maybe_dynamic = FALSE;
if (h && ((info->shared
&& (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| !h->root.def_regular
|| h->root.root.type == bfd_link_hash_defweak))
maybe_dynamic = TRUE;
@ -3060,7 +3090,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
if ((info->shared && (sec->flags & SEC_ALLOC)) || maybe_dynamic)
if (info->shared || maybe_dynamic)
need = NEED_DYNREL;
break;
@ -3128,9 +3158,9 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
/* Make a guess as to whether a .plt entry is needed. */
if ((gotent_flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
&& !(gotent_flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC))
h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
h->root.needs_plt = 1;
else
h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->root.needs_plt = 0;
}
}
}
@ -3197,8 +3227,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
rent->srel = sreloc;
rent->rtype = r_type;
rent->count = 1;
rent->reltext = ((sec->flags & (SEC_READONLY | SEC_ALLOC))
== (SEC_READONLY | SEC_ALLOC));
rent->reltext = (sec->flags & SEC_READONLY) != 0;
rent->next = h->reloc_entries;
h->reloc_entries = rent;
@ -3210,9 +3239,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
{
/* If this is a shared library, and the section is to be
loaded into memory, we need a RELATIVE reloc. */
sreloc->_raw_size += sizeof (Elf64_External_Rela);
if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
== (SEC_READONLY | SEC_ALLOC))
sreloc->size += sizeof (Elf64_External_Rela);
if (sec->flags & SEC_READONLY)
info->flags |= DF_TEXTREL;
}
}
@ -3254,18 +3282,18 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
somewhere later. But for now don't bother. */
&& ah->got_entries)
{
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 1;
s = bfd_get_section_by_name(dynobj, ".plt");
if (!s && !elf64_alpha_create_dynamic_sections (dynobj, info))
return FALSE;
/* The first bit of the .plt is reserved. */
if (s->_raw_size == 0)
s->_raw_size = PLT_HEADER_SIZE;
if (s->size == 0)
s->size = PLT_HEADER_SIZE;
h->plt.offset = s->_raw_size;
s->_raw_size += PLT_ENTRY_SIZE;
h->plt.offset = s->size;
s->size += PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are not
generating a shared library, then set the symbol to the location
@ -3284,22 +3312,22 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
/* We also need a JMP_SLOT entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
s->_raw_size += sizeof (Elf64_External_Rela);
s->size += sizeof (Elf64_External_Rela);
return TRUE;
}
else
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 0;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
if (h->weakdef != NULL)
if (h->u.weakdef != NULL)
{
BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
|| h->weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
|| h->u.weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->u.weakdef->root.u.def.section;
h->root.u.def.value = h->u.weakdef->root.u.def.value;
return TRUE;
}
@ -3572,7 +3600,7 @@ elf64_alpha_calc_got_offsets_for_symbol (h, arg)
result = FALSE;
continue;
}
plge = &td->got->_raw_size;
plge = &td->got->size;
gotent->got_offset = *plge;
*plge += alpha_got_entry_size (gotent->reloc_type);
}
@ -3589,7 +3617,7 @@ elf64_alpha_calc_got_offsets (info)
/* First, zero out the .got sizes, as we may be recalculating the
.got after optimizing it. */
for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
alpha_elf_tdata(i)->got->_raw_size = 0;
alpha_elf_tdata(i)->got->size = 0;
/* Next, fill in the offsets for all the global entries. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
@ -3599,7 +3627,7 @@ elf64_alpha_calc_got_offsets (info)
/* Finally, fill in the offsets for the local entries. */
for (i = got_list; i ; i = alpha_elf_tdata(i)->got_link_next)
{
bfd_size_type got_offset = alpha_elf_tdata(i)->got->_raw_size;
bfd_size_type got_offset = alpha_elf_tdata(i)->got->size;
bfd *j;
for (j = i; j ; j = alpha_elf_tdata(j)->in_got_link_next)
@ -3620,8 +3648,7 @@ elf64_alpha_calc_got_offsets (info)
}
}
alpha_elf_tdata(i)->got->_raw_size = got_offset;
alpha_elf_tdata(i)->got->_cooked_size = got_offset;
alpha_elf_tdata(i)->got->size = got_offset;
}
}
@ -3653,9 +3680,8 @@ elf64_alpha_size_got_sections (info)
{
/* Yikes! A single object file has too many entries. */
(*_bfd_error_handler)
(_("%s: .got subsegment exceeds 64K (size %d)"),
bfd_archive_filename (i),
alpha_elf_tdata (this_got)->total_got_size);
(_("%B: .got subsegment exceeds 64K (size %d)"),
i, alpha_elf_tdata (this_got)->total_got_size);
return FALSE;
}
@ -3718,21 +3744,18 @@ elf64_alpha_size_plt_section (info)
if (splt == NULL)
return TRUE;
splt->_raw_size = 0;
splt->size = 0;
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
elf64_alpha_size_plt_section_1, splt);
splt->_cooked_size = splt->_raw_size;
/* Every plt entry requires a JMP_SLOT relocation. */
spltrel = bfd_get_section_by_name (dynobj, ".rela.plt");
if (splt->_raw_size)
entries = (splt->_raw_size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
if (splt->size)
entries = (splt->size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
else
entries = 0;
spltrel->_raw_size = entries * sizeof (Elf64_External_Rela);
spltrel->_cooked_size = spltrel->_raw_size;
spltrel->size = entries * sizeof (Elf64_External_Rela);
return TRUE;
}
@ -3746,7 +3769,7 @@ elf64_alpha_size_plt_section_1 (h, data)
struct alpha_elf_got_entry *gotent;
/* If we didn't need an entry before, we still don't. */
if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT))
if (!h->root.needs_plt)
return TRUE;
/* There must still be a LITERAL got entry for the function. */
@ -3759,14 +3782,14 @@ elf64_alpha_size_plt_section_1 (h, data)
a need for the PLT entry. */
if (gotent)
{
if (splt->_raw_size == 0)
splt->_raw_size = PLT_HEADER_SIZE;
h->root.plt.offset = splt->_raw_size;
splt->_raw_size += PLT_ENTRY_SIZE;
if (splt->size == 0)
splt->size = PLT_HEADER_SIZE;
h->root.plt.offset = splt->size;
splt->size += PLT_ENTRY_SIZE;
}
else
{
h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
h->root.needs_plt = 0;
h->root.plt.offset = -1;
/* Undo the definition frobbing begun in adjust_dynamic_symbol. */
@ -3804,9 +3827,9 @@ elf64_alpha_always_size_sections (output_bfd, info)
for ( ; i ; i = alpha_elf_tdata(i)->got_link_next)
{
asection *s = alpha_elf_tdata(i)->got;
if (s->_raw_size > 0)
if (s->size > 0)
{
s->contents = (bfd_byte *) bfd_zalloc (i, s->_raw_size);
s->contents = (bfd_byte *) bfd_zalloc (i, s->size);
if (s->contents == NULL)
return FALSE;
}
@ -3868,29 +3891,32 @@ elf64_alpha_calc_dynrel_sizes (h, info)
set. This is done for dynamic symbols in
elf_adjust_dynamic_symbol but this is not done for non-dynamic
symbols, somehow. */
if (((h->root.elf_link_hash_flags
& (ELF_LINK_HASH_DEF_REGULAR
| ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_DEF_DYNAMIC))
== ELF_LINK_HASH_REF_REGULAR)
if (!h->root.def_regular
&& h->root.ref_regular
&& !h->root.def_dynamic
&& (h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak)
&& !(h->root.root.u.def.section->owner->flags & DYNAMIC))
h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->root.def_regular = 1;
/* If the symbol is dynamic, we'll need all the relocations in their
natural form. If this is a shared object, and it has been forced
local, we'll need the same number of RELATIVE relocations. */
dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
/* If the symbol is a hidden undefined weak, then we never have any
relocations. Avoid the loop which may want to add RELATIVE relocs
based on info->shared. */
if (h->root.root.type == bfd_link_hash_undefweak && !dynamic)
return TRUE;
for (relent = h->reloc_entries; relent; relent = relent->next)
{
entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic,
info->shared);
if (entries)
{
relent->srel->_raw_size +=
relent->srel->size +=
entries * sizeof (Elf64_External_Rela) * relent->count;
if (relent->reltext)
info->flags |= DT_TEXTREL;
@ -3944,14 +3970,12 @@ elf64_alpha_size_rela_got_section (info)
BFD_ASSERT (entries == 0);
return TRUE;
}
srel->_raw_size = sizeof (Elf64_External_Rela) * entries;
srel->size = sizeof (Elf64_External_Rela) * entries;
/* Now do the non-local symbols. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
elf64_alpha_size_rela_got_1, info);
srel->_cooked_size = srel->_raw_size;
return TRUE;
}
@ -3973,9 +3997,14 @@ elf64_alpha_size_rela_got_1 (h, info)
/* If the symbol is dynamic, we'll need all the relocations in their
natural form. If this is a shared object, and it has been forced
local, we'll need the same number of RELATIVE relocations. */
dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
/* If the symbol is a hidden undefined weak, then we never have any
relocations. Avoid the loop which may want to add RELATIVE relocs
based on info->shared. */
if (h->root.root.type == bfd_link_hash_undefweak && !dynamic)
return TRUE;
entries = 0;
for (gotent = h->got_entries; gotent ; gotent = gotent->next)
if (gotent->use_count > 0)
@ -3992,7 +4021,7 @@ elf64_alpha_size_rela_got_1 (h, info)
bfd *dynobj = elf_hash_table(info)->dynobj;
asection *srel = bfd_get_section_by_name (dynobj, ".rela.got");
BFD_ASSERT (srel != NULL);
srel->_raw_size += sizeof (Elf64_External_Rela) * entries;
srel->size += sizeof (Elf64_External_Rela) * entries;
}
return TRUE;
@ -4019,7 +4048,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
@ -4062,7 +4091,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
if (strncmp (name, ".rela", 5) == 0)
{
strip = (s->_raw_size == 0);
strip = (s->size == 0);
if (!strip)
{
@ -4085,8 +4114,8 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
else
{
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL && s->size != 0)
return FALSE;
}
}
@ -4160,8 +4189,7 @@ elf64_alpha_emit_dynrel (abfd, info, sec, srel, offset, dynindx, rtype, addend)
loc = srel->contents;
loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size);
BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->size);
}
/* Relocate an Alpha ELF section for a relocatable link.
@ -4201,8 +4229,8 @@ elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
(_("%s: unknown relocation type %d"),
bfd_archive_filename (input_bfd), (int)r_type);
(_("%B: unknown relocation type %d"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@ -4251,7 +4279,6 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma gp, tp_base, dtp_base;
struct alpha_elf_got_entry **local_got_entries;
bfd_boolean ret_val;
const char *section_name;
/* Handle relocatable links with a smaller loop. */
if (info->relocatable)
@ -4271,11 +4298,17 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
else
srelgot = NULL;
section_name = (bfd_elf_string_from_elf_section
(input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
elf_section_data(input_section)->rel_hdr.sh_name));
BFD_ASSERT(section_name != NULL);
srel = bfd_get_section_by_name (dynobj, section_name);
if (input_section->flags & SEC_ALLOC)
{
const char *section_name;
section_name = (bfd_elf_string_from_elf_section
(input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
elf_section_data(input_section)->rel_hdr.sh_name));
BFD_ASSERT(section_name != NULL);
srel = bfd_get_section_by_name (dynobj, section_name);
}
else
srel = NULL;
/* Find the gp value for this input bfd. */
gotobj = alpha_elf_tdata (input_bfd)->gotobj;
@ -4327,8 +4360,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
(_("%s: unknown relocation type %d"),
bfd_archive_filename (input_bfd), (int)r_type);
(_("%B: unknown relocation type %d"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
@ -4387,8 +4420,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_merged_section_offset (output_bfd, &msec,
elf_section_data (sec)->
sec_info,
sym->st_value + ent->addend,
(bfd_vma) 0);
sym->st_value + ent->addend);
ent->addend -= sym->st_value;
ent->addend += msec->output_section->vma
+ msec->output_offset
@ -4470,7 +4502,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
/* If the symbol has been forced local, output a
RELATIVE reloc, otherwise it will be handled in
finish_dynamic_symbol. */
if (info->shared && !dynamic_symbol_p)
if (info->shared && !dynamic_symbol_p && !undef_weak_ref)
elf64_alpha_emit_dynrel (output_bfd, info, sgot, srelgot,
gotent->got_offset, 0,
R_ALPHA_RELATIVE, value);
@ -4500,8 +4532,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: gp-relative relocation against dynamic symbol %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: gp-relative relocation against dynamic symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT(gp != 0);
@ -4512,8 +4544,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: gp-relative relocation against dynamic symbol %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: gp-relative relocation against dynamic symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT(gp != 0);
@ -4538,8 +4570,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: pc-relative relocation against dynamic symbol %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: pc-relative relocation against dynamic symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
/* The regular PC-relative stuff measures from the start of
@ -4566,8 +4598,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
&& gotobj != alpha_elf_tdata (sec->owner)->gotobj)
{
(*_bfd_error_handler)
(_("%s: change in gp: BRSGP %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: change in gp: BRSGP %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
@ -4596,8 +4628,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
(*_bfd_error_handler)
(_("%s: !samegp reloc against symbol without .prologue: %s"),
bfd_archive_filename (input_bfd), name);
(_("%B: !samegp reloc against symbol without .prologue: %s"),
input_bfd, name);
ret_val = FALSE;
break;
}
@ -4642,13 +4674,14 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (info->shared
&& r_symndx != 0
&& (input_section->flags & SEC_ALLOC))
&& (input_section->flags & SEC_ALLOC)
&& !undef_weak_ref)
{
if (r_type == R_ALPHA_REFLONG)
{
(*_bfd_error_handler)
(_("%s: unhandled dynamic relocation against %s"),
bfd_archive_filename (input_bfd),
(_("%B: unhandled dynamic relocation against %s"),
input_bfd,
h->root.root.root.string);
ret_val = FALSE;
}
@ -4659,9 +4692,10 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
else
goto default_reloc;
elf64_alpha_emit_dynrel (output_bfd, info, input_section,
srel, rel->r_offset, dynindx,
dyntype, dynaddend);
if (input_section->flags & SEC_ALLOC)
elf64_alpha_emit_dynrel (output_bfd, info, input_section,
srel, rel->r_offset, dynindx,
dyntype, dynaddend);
}
goto default_reloc;
@ -4671,10 +4705,18 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: pc-relative relocation against dynamic symbol %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: pc-relative relocation against dynamic symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
else if ((info->shared || info->pie) && undef_weak_ref)
{
(*_bfd_error_handler)
(_("%B: pc-relative relocation against undefined weak symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
/* ??? .eh_frame references to discarded sections will be smashed
to relocations against SHN_UNDEF. The .eh_frame format allows
@ -4730,8 +4772,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: dtp-relative relocation against dynamic symbol %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: dtp-relative relocation against dynamic symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
@ -4746,15 +4788,15 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared)
{
(*_bfd_error_handler)
(_("%s: TLS local exec code cannot be linked into shared objects"),
bfd_archive_filename (input_bfd));
(_("%B: TLS local exec code cannot be linked into shared objects"),
input_bfd);
ret_val = FALSE;
}
else if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: tp-relative relocation against dynamic symbol %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
(_("%B: tp-relative relocation against dynamic symbol %s"),
input_bfd, h->root.root.root.string);
ret_val = FALSE;
}
BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
@ -4828,7 +4870,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
break;
if (h != NULL)
name = h->root.root.root.string;
name = NULL;
else
{
name = (bfd_elf_string_from_elf_section
@ -4839,8 +4881,9 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset)))
(info, (h ? &h->root.root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section,
rel->r_offset)))
ret_val = FALSE;
}
break;
@ -4936,7 +4979,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
loc = srel->contents + plt_index * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
if (!(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in the
.plt section. Leave the value alone. */
@ -5055,7 +5098,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@ -5084,10 +5127,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
out who is right. */
s = bfd_get_section_by_name (output_bfd, ".rela.plt");
if (s)
{
dyn.d_un.d_val -=
(s->_cooked_size ? s->_cooked_size : s->_raw_size);
}
dyn.d_un.d_val -= s->size;
break;
get_vma:
@ -5097,8 +5137,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
get_size:
s = bfd_get_section_by_name (output_bfd, name);
dyn.d_un.d_val =
(s->_cooked_size ? s->_cooked_size : s->_raw_size);
dyn.d_un.d_val = s->size;
break;
}
@ -5106,7 +5145,7 @@ elf64_alpha_finish_dynamic_sections (output_bfd, info)
}
/* Initialize the PLT0 entry. */
if (splt->_raw_size > 0)
if (splt->size > 0)
{
bfd_put_32 (output_bfd, PLT_HEADER_WORD1, splt->contents);
bfd_put_32 (output_bfd, PLT_HEADER_WORD2, splt->contents + 4);
@ -5217,7 +5256,7 @@ elf64_alpha_final_link (abfd, info)
if (s != NULL)
{
esym.asym.value = s->vma;
last = s->vma + s->_raw_size;
last = s->vma + s->size;
}
else
esym.asym.value = last;
@ -5262,7 +5301,7 @@ elf64_alpha_final_link (abfd, info)
input_swap = (get_elf_backend_data (input_bfd)
->elf_backend_ecoff_debug_swap);
BFD_ASSERT (p->size == input_section->_raw_size);
BFD_ASSERT (p->size == input_section->size);
/* The ECOFF linking code expects that we have already
read in the debugging information and set up an
@ -5345,7 +5384,7 @@ elf64_alpha_final_link (abfd, info)
return FALSE;
/* Set the size of the .mdebug section. */
o->_raw_size = bfd_ecoff_debug_size (abfd, &debug, swap);
o->size = bfd_ecoff_debug_size (abfd, &debug, swap);
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
@ -5378,7 +5417,7 @@ elf64_alpha_final_link (abfd, info)
if (! bfd_set_section_contents (abfd, sgot->output_section,
sgot->contents,
(file_ptr) sgot->output_offset,
sgot->_raw_size))
sgot->size))
return FALSE;
}
}

View File

@ -1,6 +1,6 @@
/* SPARC-specific support for 64-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004 Free Software Foundation, Inc.
2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -36,6 +36,10 @@
static struct bfd_link_hash_table * sparc64_elf_bfd_link_hash_table_create
PARAMS ((bfd *));
static bfd_boolean create_got_section
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean sparc64_elf_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_reloc_status_type init_insn_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *,
bfd *, bfd_vma *, bfd_vma *));
@ -56,6 +60,8 @@ static bfd_boolean sparc64_elf_check_relocs
const Elf_Internal_Rela *));
static bfd_boolean sparc64_elf_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static bfd_boolean sparc64_elf_omit_section_dynsym
PARAMS ((bfd *, struct bfd_link_info *, asection *));
static bfd_boolean sparc64_elf_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static int sparc64_elf_get_symbol_type
@ -478,7 +484,7 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
case because relocations against this section may use the
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
if (asect->_raw_size == 0)
if (asect->size == 0)
return TRUE;
rel_hdr = &d->this_hdr;
@ -736,6 +742,10 @@ struct sparc64_elf_link_hash_table
{
struct elf_link_hash_table root;
/* Short-cuts to get to dynamic linker sections. */
asection *sgot;
asection *srelgot;
struct sparc64_elf_app_reg app_regs [4];
};
@ -766,6 +776,57 @@ sparc64_elf_bfd_link_hash_table_create (abfd)
return &ret->root.root;
}
/* Create .got and .rela.got sections in DYNOBJ and set up
shortcuts to them in our hash table. */
static bfd_boolean
create_got_section (dynobj, info)
bfd *dynobj;
struct bfd_link_info *info;
{
struct sparc64_elf_link_hash_table *htab;
if (! _bfd_elf_create_got_section (dynobj, info))
return FALSE;
htab = sparc64_elf_hash_table (info);
htab->sgot = bfd_get_section_by_name (dynobj, ".got");
BFD_ASSERT (htab->sgot != NULL);
htab->srelgot = bfd_make_section (dynobj, ".rela.got");
if (htab->srelgot == NULL
|| ! bfd_set_section_flags (dynobj, htab->srelgot, SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
| SEC_IN_MEMORY
| SEC_LINKER_CREATED
| SEC_READONLY)
|| ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
return FALSE;
return TRUE;
}
/* Create .plt, .rela.plt, .got, .rela.got, .dynbss, and
.rela.bss sections in DYNOBJ, and set up shortcuts to them in our
hash table. */
static bfd_boolean
sparc64_elf_create_dynamic_sections (dynobj, info)
bfd *dynobj;
struct bfd_link_info *info;
{
struct sparc64_elf_link_hash_table *htab;
htab = sparc64_elf_hash_table (info);
if (!htab->sgot && !create_got_section (dynobj, info))
return FALSE;
if (!_bfd_elf_create_dynamic_sections (dynobj, info))
return FALSE;
return TRUE;
}
/* Utility for performing the standard initial work of an instruction
relocation.
@ -809,7 +870,7 @@ init_insn_reloc (abfd,
if (output_bfd != NULL)
return bfd_reloc_continue;
if (reloc_entry->address > input_section->_cooked_size)
if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
relocation = (symbol->value
@ -1135,35 +1196,22 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
if (dynobj == NULL)
{
/* Create the .got section. */
/* Create the .got and .rela.got sections. */
elf_hash_table (info)->dynobj = dynobj = abfd;
if (! _bfd_elf_create_got_section (dynobj, info))
if (! create_got_section (dynobj, info))
return FALSE;
}
if (sgot == NULL)
{
sgot = bfd_get_section_by_name (dynobj, ".got");
sgot = sparc64_elf_hash_table (info)->sgot;
BFD_ASSERT (sgot != NULL);
}
if (srelgot == NULL && (h != NULL || info->shared))
{
srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
if (srelgot == NULL)
{
srelgot = bfd_make_section (dynobj, ".rela.got");
if (srelgot == NULL
|| ! bfd_set_section_flags (dynobj, srelgot,
(SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
| SEC_IN_MEMORY
| SEC_LINKER_CREATED
| SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, srelgot, 3))
return FALSE;
}
srelgot = sparc64_elf_hash_table (info)->srelgot;
BFD_ASSERT (srelgot != NULL);
}
if (h != NULL)
@ -1173,7 +1221,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
/* We have already allocated space in the .got. */
break;
}
h->got.offset = sgot->_raw_size;
h->got.offset = sgot->size;
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@ -1182,7 +1230,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
return FALSE;
}
srelgot->_raw_size += sizeof (Elf64_External_Rela);
srelgot->size += sizeof (Elf64_External_Rela);
}
else
{
@ -1207,20 +1255,19 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
/* We have already allocated space in the .got. */
break;
}
local_got_offsets[r_symndx] = sgot->_raw_size;
local_got_offsets[r_symndx] = sgot->size;
if (info->shared)
{
/* If we are generating a shared object, we need to
output a R_SPARC_RELATIVE reloc so that the
dynamic linker can adjust this GOT entry. */
srelgot->_raw_size += sizeof (Elf64_External_Rela);
srelgot->size += sizeof (Elf64_External_Rela);
}
}
sgot->_raw_size += 8;
sgot->size += 8;
#if 0
/* Doesn't work for 64-bit -fPIC, since sethi/or builds
unsigned numbers. If we permit ourselves to modify
code so we get sethi/xor, this could work.
@ -1229,10 +1276,11 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
/* If the .got section is more than 0x1000 bytes, we add
0x1000 to the value of _GLOBAL_OFFSET_TABLE_, so that 13
bit relocations have a greater chance of working. */
if (sgot->_raw_size >= 0x1000
/*
if (sgot->size >= 0x1000
&& elf_hash_table (info)->hgot->root.u.def.value == 0)
elf_hash_table (info)->hgot->root.u.def.value = 0x1000;
#endif
*/
break;
@ -1265,7 +1313,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
return FALSE;
}
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
h->needs_plt = 1;
if (ELF64_R_TYPE_ID (rel->r_info) != R_SPARC_PLT32
&& ELF64_R_TYPE_ID (rel->r_info) != R_SPARC_PLT64)
break;
@ -1359,7 +1407,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
info->flags |= DF_TEXTREL;
}
sreloc->_raw_size += sizeof (Elf64_External_Rela);
sreloc->size += sizeof (Elf64_External_Rela);
}
break;
@ -1368,9 +1416,8 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
break;
default:
(*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
bfd_archive_filename (abfd),
ELF64_R_TYPE_ID (rel->r_info));
(*_bfd_error_handler) (_("%B: check_relocs: unhandled reloc type %d"),
abfd, ELF64_R_TYPE_ID (rel->r_info));
return FALSE;
}
}
@ -1405,8 +1452,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
case 6: reg -= 4; break;
default:
(*_bfd_error_handler)
(_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
bfd_archive_filename (abfd));
(_("%B: Only registers %%g[2367] can be declared using STT_REGISTER"),
abfd);
return FALSE;
}
@ -1425,10 +1472,10 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (p->name != NULL && strcmp (p->name, *namep))
{
(*_bfd_error_handler)
(_("Register %%g%d used incompatibly: %s in %s, previously %s in %s"),
(int) sym->st_value,
**namep ? *namep : "#scratch", bfd_archive_filename (abfd),
*p->name ? p->name : "#scratch", bfd_archive_filename (p->abfd));
(_("Register %%g%d used incompatibly: %s in %B, previously %s in %B"),
abfd, p->abfd, (int) sym->st_value,
**namep ? *namep : "#scratch",
*p->name ? p->name : "#scratch");
return FALSE;
}
@ -1448,9 +1495,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
(_("Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"),
*namep, bfd_archive_filename (abfd),
stt_types[type], bfd_archive_filename (p->abfd));
(_("Symbol `%s' has differing types: REGISTER in %B, previously %s in %B"),
abfd, p->abfd, *namep, stt_types[type]);
return FALSE;
}
@ -1494,9 +1540,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
(_("Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"),
*namep, stt_types[type], bfd_archive_filename (abfd),
bfd_archive_filename (p->abfd));
(_("Symbol `%s' has differing types: %s in %B, previously REGISTER in %B"),
abfd, p->abfd, *namep, stt_types[type]);
return FALSE;
}
}
@ -1615,14 +1660,11 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
|| h->weakdef != NULL
|| ((h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_REF_REGULAR) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)));
&& (h->needs_plt
|| h->u.weakdef != NULL
|| (h->def_dynamic
&& h->ref_regular
&& !h->def_regular)));
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
@ -1632,15 +1674,15 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
some of their functions as STT_NOTYPE when they really should be
STT_FUNC. */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
|| h->needs_plt
|| (h->type == STT_NOTYPE
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->flags & SEC_CODE) != 0))
{
if (! info->shared
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
&& !h->def_dynamic
&& !h->ref_dynamic
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_undefined)
{
@ -1649,7 +1691,7 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
In such a case, we don't actually need to build a
procedure linkage table, and we can just do a WDISP30
reloc instead. */
BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
BFD_ASSERT (h->needs_plt);
return TRUE;
}
@ -1657,11 +1699,11 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
BFD_ASSERT (s != NULL);
/* The first four bit in .plt is reserved. */
if (s->_raw_size == 0)
s->_raw_size = PLT_HEADER_SIZE;
if (s->size == 0)
s->size = PLT_HEADER_SIZE;
/* To simplify matters later, just store the plt index here. */
h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
h->plt.offset = s->size / PLT_ENTRY_SIZE;
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
@ -1669,31 +1711,25 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
pointers compare as equal between the normal executable and
the shared library. */
if (! info->shared
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
&& !h->def_regular)
{
h->root.u.def.section = s;
h->root.u.def.value = sparc64_elf_plt_entry_offset (h->plt.offset);
}
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
s->size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
s = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (s != NULL);
/* The first plt entries are reserved, and the relocations must
pair up exactly. */
if (s->_raw_size == 0)
s->_raw_size += (PLT_HEADER_SIZE/PLT_ENTRY_SIZE
* sizeof (Elf64_External_Rela));
s->_raw_size += sizeof (Elf64_External_Rela);
s->size += sizeof (Elf64_External_Rela);
/* The procedure linkage table size is bounded by the magnitude
of the offset we can describe in the entry. */
if (s->_raw_size >= (bfd_vma)1 << 32)
if (s->size >= (bfd_vma)1 << 32)
{
bfd_set_error (bfd_error_bad_value);
return FALSE;
@ -1705,12 +1741,12 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
if (h->weakdef != NULL)
if (h->u.weakdef != NULL)
{
BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
|| h->weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
|| h->u.weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->u.weakdef->root.u.def.section;
h->root.u.def.value = h->u.weakdef->root.u.def.value;
return TRUE;
}
@ -1747,8 +1783,8 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
srel->_raw_size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
srel->size += sizeof (Elf64_External_Rela);
h->needs_copy = 1;
}
/* We need to figure out the alignment required for this symbol. I
@ -1759,8 +1795,7 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
power_of_two = 4;
/* Apply the required alignment. */
s->_raw_size = BFD_ALIGN (s->_raw_size,
(bfd_size_type) (1 << power_of_two));
s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (dynobj, s))
{
if (! bfd_set_section_alignment (dynobj, s, power_of_two))
@ -1769,14 +1804,31 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
/* Define the symbol as being at this point in the section. */
h->root.u.def.section = s;
h->root.u.def.value = s->_raw_size;
h->root.u.def.value = s->size;
/* Increment the section size to make room for the symbol. */
s->_raw_size += h->size;
s->size += h->size;
return TRUE;
}
/* Return true if the dynamic symbol for a given section should be
omitted when creating a shared library. */
static bfd_boolean
sparc64_elf_omit_section_dynsym (bfd *output_bfd,
struct bfd_link_info *info,
asection *p)
{
/* We keep the .got section symbol so that explicit relocations
against the _GLOBAL_OFFSET_TABLE_ symbol emitted in PIC mode
can be turned into relocations against the .got symbol. */
if (strcmp (p->name, ".got") == 0)
return FALSE;
return _bfd_elf_link_omit_section_dynsym (output_bfd, info, p);
}
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@ -1798,7 +1850,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
s->size = sizeof ELF_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
@ -1809,9 +1861,9 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
not actually use these entries. Reset the size of .rela.got,
which will cause it to get stripped from the output file
below. */
s = bfd_get_section_by_name (dynobj, ".rela.got");
s = sparc64_elf_hash_table (info)->srelgot;
if (s != NULL)
s->_raw_size = 0;
s->size = 0;
}
/* The check_relocs and adjust_dynamic_symbol entry points have
@ -1834,7 +1886,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (strncmp (name, ".rela", 5) == 0)
{
if (s->_raw_size == 0)
if (s->size == 0)
{
/* If we don't need this section, strip it from the
output file. This is to handle .rela.bss and
@ -1873,8 +1925,8 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
/* Allocate memory for the section contents. Zero the memory
for the benefit of .rela.plt, which has 4 unused entries
at the beginning, and we don't want garbage. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL && s->size != 0)
return FALSE;
}
@ -2223,14 +2275,20 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
/* FIXME: Dynamic reloc handling really needs to be rewritten. */
if (!skip
&& h != NULL
&& ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
&& h->root.type == bfd_link_hash_undefweak)
skip = TRUE, relocate = TRUE;
if (skip)
memset (&outrel, 0, sizeof outrel);
/* h->dynindx may be -1 if the symbol was marked to
become local. */
else if (h != NULL && ! is_plt
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|| !h->def_regular))
{
BFD_ASSERT (h->dynindx != -1);
outrel.r_info
@ -2279,8 +2337,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
BFD_FAIL ();
(*_bfd_error_handler)
(_("%s: probably compiled without -fPIC?"),
bfd_archive_filename (input_bfd));
(_("%B: probably compiled without -fPIC?"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@ -2316,7 +2374,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
offset table. */
if (sgot == NULL)
{
sgot = bfd_get_section_by_name (dynobj, ".got");
sgot = sparc64_elf_hash_table (info)->sgot;
BFD_ASSERT (sgot != NULL);
}
@ -2332,8 +2390,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| (info->shared
&& (info->symbolic
|| h->dynindx == -1
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
|| h->forced_local)
&& h->def_regular))
{
/* This is actually a static link, or it is a -Bsymbolic
link and the symbol is defined locally, or the symbol
@ -2390,7 +2448,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* We need to generate a R_SPARC_RELATIVE reloc
for the dynamic linker. */
s = bfd_get_section_by_name(dynobj, ".rela.got");
s = sparc64_elf_hash_table (info)->srelgot;
BFD_ASSERT (s != NULL);
outrel.r_offset = (sgot->output_section->vma
@ -2520,7 +2578,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_WDISP30:
do_wplt30:
if (sec_do_relax (input_section)
&& rel->r_offset + 4 < input_section->_raw_size)
&& rel->r_offset + 4 < input_section->size)
{
#define G0 0
#define O7 15
@ -2621,11 +2679,10 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
not process them. */
if (unresolved_reloc
&& !((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
&& h->def_dynamic))
(*_bfd_error_handler)
(_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, input_section),
(_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
input_bfd, input_section,
(long) rel->r_offset,
h->root.root.string);
@ -2645,10 +2702,14 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* The Solaris native linker silently disregards
overflows. We don't, but this breaks stabs debugging
info, whose relocations are only 32-bits wide. Ignore
overflows for discarded entries. */
overflows in this case and also for discarded entries. */
if ((r_type == R_SPARC_32 || r_type == R_SPARC_DISP32)
&& _bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset) == (bfd_vma) -1)
&& (((input_section->flags & SEC_DEBUGGING) != 0
&& strcmp (bfd_section_name (input_bfd, input_section),
".stab") == 0)
|| _bfd_elf_section_offset (output_bfd, info,
input_section,
rel->r_offset) == (bfd_vma)-1))
break;
if (h != NULL)
@ -2664,7 +2725,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
name = h->root.root.string;
name = NULL;
}
else
{
@ -2678,8 +2739,9 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset)))
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section,
rel->r_offset)))
return FALSE;
}
break;
@ -2727,7 +2789,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
else
{
bfd_vma max = splt->_raw_size / PLT_ENTRY_SIZE;
bfd_vma max = splt->size / PLT_ENTRY_SIZE;
rela.r_offset = sparc64_elf_plt_ptr_offset (h->plt.offset, max);
rela.r_addend = -(sparc64_elf_plt_entry_offset (h->plt.offset) + 4)
-(splt->output_section->vma + splt->output_offset);
@ -2739,7 +2801,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
loc += h->plt.offset * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
if (!h->def_regular)
{
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
@ -2748,8 +2810,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
Otherwise, the PLT entry would provide a definition for
the symbol even if the symbol wasn't defined anywhere,
and so the symbol would never be NULL. */
if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
== 0)
if (!h->ref_regular_nonweak)
sym->st_value = 0;
}
}
@ -2763,8 +2824,8 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
/* This symbol has an entry in the GOT. Set it up. */
sgot = bfd_get_section_by_name (dynobj, ".got");
srela = bfd_get_section_by_name (dynobj, ".rela.got");
sgot = sparc64_elf_hash_table (info)->sgot;
srela = sparc64_elf_hash_table (info)->srelgot;
BFD_ASSERT (sgot != NULL && srela != NULL);
rela.r_offset = (sgot->output_section->vma
@ -2778,7 +2839,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
initialized in the relocate_section function. */
if (info->shared
&& (info->symbolic || h->dynindx == -1)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
&& h->def_regular)
{
asection *sec = h->root.u.def.section;
rela.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
@ -2799,7 +2860,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
}
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
if (h->needs_copy)
{
asection *s;
Elf_Internal_Rela rela;
@ -2855,7 +2916,7 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
BFD_ASSERT (splt != NULL && sdyn != NULL);
dyncon = (Elf64_External_Dyn *) sdyn->contents;
dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
@ -2895,21 +2956,16 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
if (! size)
dyn.d_un.d_ptr = s->vma;
else
{
if (s->_cooked_size != 0)
dyn.d_un.d_val = s->_cooked_size;
else
dyn.d_un.d_val = s->_raw_size;
}
dyn.d_un.d_val = s->size;
}
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
}
}
/* Initialize the contents of the .plt section. */
if (splt->_raw_size > 0)
if (splt->size > 0)
sparc64_elf_build_plt (output_bfd, splt->contents,
(int) (splt->_raw_size / PLT_ENTRY_SIZE));
(int) (splt->size / PLT_ENTRY_SIZE));
elf_section_data (splt->output_section)->this_hdr.sh_entsize =
PLT_ENTRY_SIZE;
@ -2917,9 +2973,9 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
/* Set the first entry in the global offset table to the address of
the dynamic section. */
sgot = bfd_get_section_by_name (dynobj, ".got");
sgot = sparc64_elf_hash_table (info)->sgot;
BFD_ASSERT (sgot != NULL);
if (sgot->_raw_size > 0)
if (sgot->size > 0)
{
if (sdyn == NULL)
bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents);
@ -3007,8 +3063,8 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
(_("%s: linking UltraSPARC specific with HAL specific code"),
bfd_archive_filename (ibfd));
(_("%B: linking UltraSPARC specific with HAL specific code"),
ibfd);
}
/* Choose the most restrictive memory ordering. */
old_mm = (old_flags & EF_SPARCV9_MM);
@ -3026,8 +3082,8 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
(_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
ibfd, (long) new_flags, (long) old_flags);
}
elf_elfheader (obfd)->e_flags = old_flags;
@ -3105,6 +3161,24 @@ sparc64_elf_object_p (abfd)
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach);
}
/* Return address for Ith PLT stub in section PLT, for relocation REL
or (bfd_vma) -1 if it should not be included. */
static bfd_vma
sparc64_elf_plt_sym_val (bfd_vma i, const asection *plt,
const arelent *rel ATTRIBUTE_UNUSED)
{
bfd_vma j;
i += PLT_HEADER_SIZE / PLT_ENTRY_SIZE;
if (i < LARGE_PLT_THRESHOLD)
return plt->vma + i * PLT_ENTRY_SIZE;
j = (i - LARGE_PLT_THRESHOLD) % 160;
i -= j;
return plt->vma + i * PLT_ENTRY_SIZE + j * 4 * 6;
}
/* Relocations in the 64 bit SPARC ELF ABI are more complex than in
standard ELF, because R_SPARC_OLO10 has secondary addend in
ELF64_R_TYPE_DATA field. This structure is used to redirect the
@ -3177,7 +3251,7 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_new_section_hook
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections
sparc64_elf_create_dynamic_sections
#define elf_backend_add_symbol_hook \
sparc64_elf_add_symbol_hook
#define elf_backend_get_symbol_type \
@ -3188,6 +3262,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_check_relocs
#define elf_backend_adjust_dynamic_symbol \
sparc64_elf_adjust_dynamic_symbol
#define elf_backend_omit_section_dynsym \
sparc64_elf_omit_section_dynsym
#define elf_backend_size_dynamic_sections \
sparc64_elf_size_dynamic_sections
#define elf_backend_relocate_section \
@ -3204,6 +3280,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_merge_private_bfd_data
#define elf_backend_fake_sections \
sparc64_elf_fake_sections
#define elf_backend_plt_sym_val \
sparc64_elf_plt_sym_val
#define elf_backend_size_info \
sparc64_elf_size_info

View File

@ -1,752 +0,0 @@
/* 32-bit ELF support for ARM new abi option.
Copyright 1999, 2000, 2001, 2002 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. */
#include "elf/arm.h"
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
#ifndef NUM_ELEM
#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
#endif
#define USE_REL 1
#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
#define TARGET_LITTLE_NAME "elf32-littlearm"
#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
#define TARGET_BIG_NAME "elf32-bigarm"
#define elf_info_to_howto 0
#define elf_info_to_howto_rel elf32_arm_info_to_howto
#define ARM_ELF_ABI_VERSION 0
#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
static reloc_howto_type * elf32_arm_reloc_type_lookup
PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
static bfd_boolean elf32_arm_nabi_grok_prstatus
PARAMS ((bfd *abfd, Elf_Internal_Note *note));
static bfd_boolean elf32_arm_nabi_grok_psinfo
PARAMS ((bfd *abfd, Elf_Internal_Note *note));
/* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g.
R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO
in that slot. */
static reloc_howto_type elf32_arm_howto_table[] =
{
/* No relocation */
HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_NONE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_PC24, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_PC24", /* name */
FALSE, /* partial_inplace */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* 32 bit absolute */
HOWTO (R_ARM_ABS32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS32", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
/* standard 32bit pc-relative reloc */
HOWTO (R_ARM_REL32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_REL32", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* 8 bit absolute */
HOWTO (R_ARM_PC13, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_PC13", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* 16 bit absolute */
HOWTO (R_ARM_ABS16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS16", /* name */
FALSE, /* partial_inplace */
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
/* 12 bit absolute */
HOWTO (R_ARM_ABS12, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
12, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS12", /* name */
FALSE, /* partial_inplace */
0x000008ff, /* src_mask */
0x000008ff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_ABS5, /* type */
6, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
5, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_ABS5", /* name */
FALSE, /* partial_inplace */
0x000007e0, /* src_mask */
0x000007e0, /* dst_mask */
FALSE), /* pcrel_offset */
/* 8 bit absolute */
HOWTO (R_ARM_ABS8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS8", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_SBREL32, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_SBREL32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_PC22, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
23, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC22", /* name */
FALSE, /* partial_inplace */
0x07ff07ff, /* src_mask */
0x07ff07ff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_THM_PC8, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC8", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_AMP_VCALL9, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_AMP_VCALL9", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_SWI24, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_SWI24", /* name */
FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0x00000000, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_SWI8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_SWI8", /* name */
FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0x00000000, /* dst_mask */
FALSE), /* pcrel_offset */
/* BLX instruction for the ARM. */
HOWTO (R_ARM_XPC25, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
25, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_XPC25", /* name */
FALSE, /* partial_inplace */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* BLX instruction for the Thumb. */
HOWTO (R_ARM_THM_XPC22, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
22, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_XPC22", /* name */
FALSE, /* partial_inplace */
0x07ff07ff, /* src_mask */
0x07ff07ff, /* dst_mask */
TRUE), /* pcrel_offset */
/* These next three relocs are not defined, but we need to fill the space. */
HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_unknown_17", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_unknown_18", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_unknown_19", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
/* Relocs used in ARM Linux */
HOWTO (R_ARM_COPY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_COPY", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_GLOB_DAT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_GLOB_DAT", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_JUMP_SLOT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_JUMP_SLOT", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RELATIVE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RELATIVE", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_GOTOFF, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_GOTOFF", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_GOTPC, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_GOTPC", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_GOT32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_GOT32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_PLT32, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_PLT32", /* name */
TRUE, /* partial_inplace */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* End of relocs used in ARM Linux */
HOWTO (R_ARM_RREL32, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RREL32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RABS32, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RABS32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RPC24, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RPC24", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RBASE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RBASE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
};
/* GNU extension to record C++ vtable hierarchy */
static reloc_howto_type elf32_arm_vtinherit_howto =
HOWTO (R_ARM_GNU_VTINHERIT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"R_ARM_GNU_VTINHERIT", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE); /* pcrel_offset */
/* GNU extension to record C++ vtable member usage */
static reloc_howto_type elf32_arm_vtentry_howto =
HOWTO (R_ARM_GNU_VTENTRY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_elf_rel_vtable_reloc_fn, /* special_function */
"R_ARM_GNU_VTENTRY", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE); /* pcrel_offset */
/* 12 bit pc relative */
static reloc_howto_type elf32_arm_thm_pc11_howto =
HOWTO (R_ARM_THM_PC11, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
11, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC11", /* name */
FALSE, /* partial_inplace */
0x000007ff, /* src_mask */
0x000007ff, /* dst_mask */
TRUE); /* pcrel_offset */
/* 12 bit pc relative */
static reloc_howto_type elf32_arm_thm_pc9_howto =
HOWTO (R_ARM_THM_PC9, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC9", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
TRUE); /* pcrel_offset */
static void elf32_arm_info_to_howto
PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
static void
elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd * abfd ATTRIBUTE_UNUSED;
arelent * bfd_reloc;
Elf_Internal_Rela * elf_reloc;
{
unsigned int r_type;
r_type = ELF32_R_TYPE (elf_reloc->r_info);
switch (r_type)
{
case R_ARM_GNU_VTINHERIT:
bfd_reloc->howto = & elf32_arm_vtinherit_howto;
break;
case R_ARM_GNU_VTENTRY:
bfd_reloc->howto = & elf32_arm_vtentry_howto;
break;
case R_ARM_THM_PC11:
bfd_reloc->howto = & elf32_arm_thm_pc11_howto;
break;
case R_ARM_THM_PC9:
bfd_reloc->howto = & elf32_arm_thm_pc9_howto;
break;
default:
if (r_type >= NUM_ELEM (elf32_arm_howto_table))
bfd_reloc->howto = NULL;
else
bfd_reloc->howto = & elf32_arm_howto_table[r_type];
break;
}
}
struct elf32_arm_reloc_map
{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
{
{BFD_RELOC_NONE, R_ARM_NONE},
{BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24},
{BFD_RELOC_ARM_PCREL_BLX, R_ARM_XPC25},
{BFD_RELOC_THUMB_PCREL_BLX, R_ARM_THM_XPC22},
{BFD_RELOC_32, R_ARM_ABS32},
{BFD_RELOC_32_PCREL, R_ARM_REL32},
{BFD_RELOC_8, R_ARM_ABS8},
{BFD_RELOC_16, R_ARM_ABS16},
{BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12},
{BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5},
{BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22},
{BFD_RELOC_ARM_COPY, R_ARM_COPY},
{BFD_RELOC_ARM_GLOB_DAT, R_ARM_GLOB_DAT},
{BFD_RELOC_ARM_JUMP_SLOT, R_ARM_JUMP_SLOT},
{BFD_RELOC_ARM_RELATIVE, R_ARM_RELATIVE},
{BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF},
{BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC},
{BFD_RELOC_ARM_GOT32, R_ARM_GOT32},
{BFD_RELOC_ARM_PLT32, R_ARM_PLT32}
};
static reloc_howto_type *
elf32_arm_reloc_type_lookup (abfd, code)
bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
switch (code)
{
case BFD_RELOC_VTABLE_INHERIT:
return & elf32_arm_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return & elf32_arm_vtentry_howto;
case BFD_RELOC_THUMB_PCREL_BRANCH12:
return & elf32_arm_thm_pc11_howto;
case BFD_RELOC_THUMB_PCREL_BRANCH9:
return & elf32_arm_thm_pc9_howto;
default:
for (i = 0; i < NUM_ELEM (elf32_arm_reloc_map); i ++)
if (elf32_arm_reloc_map[i].bfd_reloc_val == code)
return & elf32_arm_howto_table[elf32_arm_reloc_map[i].elf_reloc_val];
return NULL;
}
}
/* Support for core dump NOTE sections */
static bfd_boolean
elf32_arm_nabi_grok_prstatus (abfd, note)
bfd *abfd;
Elf_Internal_Note *note;
{
int offset;
size_t raw_size;
switch (note->descsz)
{
default:
return FALSE;
case 148: /* Linux/ARM 32-bit*/
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
raw_size = 72;
break;
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg",
raw_size, note->descpos + offset);
}
static bfd_boolean
elf32_arm_nabi_grok_psinfo (abfd, note)
bfd *abfd;
Elf_Internal_Note *note;
{
switch (note->descsz)
{
default:
return FALSE;
case 124: /* Linux/ARM elf_prpsinfo */
elf_tdata (abfd)->core_program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
command[n - 1] = '\0';
}
return TRUE;
}
#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
#include "elf32-arm.h"

View File

@ -1,426 +0,0 @@
/* 32-bit ELF support for ARM old abi option.
Copyright 1999, 2000, 2001, 2002 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. */
#define OLD_ARM_ABI
#define bfd_elf32_arm_allocate_interworking_sections \
bfd_elf32_arm_oabi_allocate_interworking_sections
#define bfd_elf32_arm_get_bfd_for_interworking \
bfd_elf32_arm_oabi_get_bfd_for_interworking
#define bfd_elf32_arm_process_before_allocation \
bfd_elf32_arm_oabi_process_before_allocation
#define bfd_elf32_arm_add_glue_sections_to_bfd \
bfd_elf32_arm_oabi_add_glue_sections_to_bfd
#include "elf/arm.h"
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
#ifndef NUM_ELEM
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
#endif
#define TARGET_LITTLE_SYM bfd_elf32_littlearm_oabi_vec
#define TARGET_LITTLE_NAME "elf32-littlearm-oabi"
#define TARGET_BIG_SYM bfd_elf32_bigarm_oabi_vec
#define TARGET_BIG_NAME "elf32-bigarm-oabi"
#define elf_info_to_howto elf32_arm_info_to_howto
#define elf_info_to_howto_rel 0
#define ARM_ELF_ABI_VERSION 0
#define ARM_ELF_OS_ABI_VERSION 0
static reloc_howto_type * find_howto PARAMS ((unsigned int));
static void elf32_arm_info_to_howto PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
static reloc_howto_type * elf32_arm_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
static reloc_howto_type elf32_arm_howto_table[] =
{
/* No relocation. */
HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_NONE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_PC24, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_PC24", /* name */
FALSE, /* partial_inplace */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* 32 bit absolute. */
HOWTO (R_ARM_ABS32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS32", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
/* Standard 32bit pc-relative reloc. */
HOWTO (R_ARM_REL32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_REL32", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* 8 bit absolute. */
HOWTO (R_ARM_ABS8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS8", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
FALSE), /* pcrel_offset */
/* 16 bit absolute. */
HOWTO (R_ARM_ABS16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS16", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
/* 12 bit absolute. */
HOWTO (R_ARM_ABS12, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
12, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_ABS12", /* name */
FALSE, /* partial_inplace */
0x000008ff, /* src_mask */
0x000008ff, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_ABS5, /* type */
6, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
5, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_ABS5", /* name */
FALSE, /* partial_inplace */
0x000007e0, /* src_mask */
0x000007e0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_THM_PC22, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
23, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC22", /* name */
FALSE, /* partial_inplace */
0x07ff07ff, /* src_mask */
0x07ff07ff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_SBREL32, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_SBREL32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_AMP_VCALL9, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_AMP_VCALL9", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
TRUE), /* pcrel_offset */
/* 12 bit pc relative. */
HOWTO (R_ARM_THM_PC11, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
11, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC11", /* name */
FALSE, /* partial_inplace */
0x000007ff, /* src_mask */
0x000007ff, /* dst_mask */
TRUE), /* pcrel_offset */
/* 12 bit pc relative. */
HOWTO (R_ARM_THM_PC9, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC9", /* name */
FALSE, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
TRUE), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_ARM_GNU_VTINHERIT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"R_ARM_GNU_VTINHERIT", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
/* GNU extension to record C++ vtable member usage. */
HOWTO (R_ARM_GNU_VTENTRY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
_bfd_elf_rel_vtable_reloc_fn, /* special_function */
"R_ARM_GNU_VTENTRY", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
/* XXX - gap in index numbering here. */
HOWTO (R_ARM_PLT32, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_PLT32", /* name */
TRUE, /* partial_inplace */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
TRUE), /* pcrel_offset */
/* XXX - gap in index numbering here. */
HOWTO (R_ARM_RREL32, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RREL32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RABS32, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RABS32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RPC24, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RPC24", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
HOWTO (R_ARM_RBASE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_RBASE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE) /* pcrel_offset */
};
/* Locate a reloc in the howto table. This function must be used
when the entry number is is > R_ARM_GNU_VTINHERIT. */
static reloc_howto_type *
find_howto (r_type)
unsigned int r_type;
{
int i;
for (i = NUM_ELEM (elf32_arm_howto_table); i--;)
if (elf32_arm_howto_table [i].type == r_type)
return elf32_arm_howto_table + i;
return NULL;
}
static void
elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd *abfd ATTRIBUTE_UNUSED;
arelent *bfd_reloc;
Elf_Internal_Rela *elf_reloc;
{
unsigned int r_type;
r_type = ELF32_R_TYPE (elf_reloc->r_info);
if (r_type <= R_ARM_GNU_VTINHERIT)
bfd_reloc->howto = & elf32_arm_howto_table[r_type];
else
bfd_reloc->howto = find_howto (r_type);
}
struct elf32_arm_reloc_map
{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char elf_reloc_val;
};
static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
{
{BFD_RELOC_NONE, R_ARM_NONE },
{BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24 },
{BFD_RELOC_32, R_ARM_ABS32 },
{BFD_RELOC_32_PCREL, R_ARM_REL32 },
{BFD_RELOC_8, R_ARM_ABS8 },
{BFD_RELOC_16, R_ARM_ABS16 },
{BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12 },
{BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5 },
{BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22 },
{BFD_RELOC_NONE, R_ARM_SBREL32 },
{BFD_RELOC_NONE, R_ARM_AMP_VCALL9 },
{BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_PC11 },
{BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9 },
{BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT },
{BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY }
};
static reloc_howto_type *
elf32_arm_reloc_type_lookup (abfd, code)
bfd * abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
for (i = NUM_ELEM (elf32_arm_reloc_map); i--;)
if (elf32_arm_reloc_map[i].bfd_reloc_val == code)
return & elf32_arm_howto_table [elf32_arm_reloc_map[i].elf_reloc_val];
if (code == BFD_RELOC_ARM_PLT32)
return find_howto (R_ARM_PLT32);
return NULL;
}
#include "elf32-arm.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* Generic BFD support for file formats.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
2003, 2005 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -247,16 +247,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
matching_vector[match_count] = temp;
match_count++;
#ifdef GNU960
/* Big- and little-endian b.out archives look the same, but it
doesn't matter: there is no difference in their headers, and
member file byte orders will (I hope) be handled appropriately
by bfd. Ditto for big and little coff archives. And the 4
coff/b.out object formats are unambiguous. So accept the
first match we find. */
break;
#endif
}
else if ((err = bfd_get_error ()) == bfd_error_wrong_object_format
|| err == bfd_error_file_ambiguously_recognized)

View File

@ -7,7 +7,8 @@
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -96,6 +97,7 @@ extern void *bfd_realloc
extern void *bfd_zmalloc
(bfd_size_type);
extern void _bfd_default_error_handler (const char *s, ...);
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
@ -217,6 +219,8 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
#define _bfd_generic_bfd_copy_private_symbol_data \
((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
#define _bfd_generic_bfd_copy_private_header_data \
((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
#define _bfd_generic_bfd_print_private_bfd_data \
((bfd_boolean (*) (bfd *, void *)) bfd_true)
@ -301,6 +305,8 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
#define _bfd_nosymbols_bfd_is_local_label_name \
((bfd_boolean (*) (bfd *, const char *)) bfd_false)
#define _bfd_nosymbols_bfd_is_target_special_symbol \
((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define _bfd_nosymbols_get_lineno \
((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr)
#define _bfd_nosymbols_find_nearest_line \
@ -360,6 +366,9 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_merge_sections \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
#define _bfd_nolink_bfd_is_group_section \
((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
bfd_false)
#define _bfd_nolink_bfd_discard_group \
((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
@ -375,6 +384,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
#define _bfd_nolink_section_already_linked \
((void (*) (bfd *, struct bfd_section *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@ -383,6 +394,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
#define _bfd_nodynamic_get_synthetic_symtab \
((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1)
#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
#define _bfd_nodynamic_canonicalize_dynamic_reloc \
((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
@ -472,6 +485,9 @@ extern bfd_boolean _bfd_generic_final_link
extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
extern void _bfd_generic_section_already_linked
(bfd *, struct bfd_section *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
(bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
@ -496,7 +512,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
(bfd *, void **, asection *, asection *, void **, bfd_size_type *);
(bfd *, struct stab_info *, asection *, asection *, void **,
bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
@ -505,28 +522,28 @@ extern bfd_boolean _bfd_discard_section_stabs
/* Write out the .stab section when linking stabs in sections. */
extern bfd_boolean _bfd_write_section_stabs
(bfd *, void **, asection *, void **, bfd_byte *);
(bfd *, struct stab_info *, asection *, void **, bfd_byte *);
/* Write out the .stabstr string table when linking stabs in sections. */
extern bfd_boolean _bfd_write_stab_strings
(bfd *, void **);
(bfd *, struct stab_info *);
/* Find an offset within a .stab section when linking stabs in
sections. */
extern bfd_vma _bfd_stab_section_offset
(bfd *, void **, asection *, void **, bfd_vma);
(asection *, void *, bfd_vma);
/* Attempt to merge a SEC_MERGE section. */
/* Register a SEC_MERGE section as a candidate for merging. */
extern bfd_boolean _bfd_merge_section
extern bfd_boolean _bfd_add_merge_section
(bfd *, void **, asection *, void **);
/* Attempt to merge SEC_MERGE sections. */
extern bfd_boolean _bfd_merge_sections
(bfd *, void *, void (*) (bfd *, asection *));
(bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *));
/* Write out a merged section. */
@ -536,7 +553,7 @@ extern bfd_boolean _bfd_write_merged_section
/* Find an offset within a modified SEC_MERGE section. */
extern bfd_vma _bfd_merged_section_offset
(bfd *, asection **, void *, bfd_vma, bfd_vma);
(bfd *, asection **, void *, bfd_vma);
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init
@ -584,10 +601,10 @@ void bfd_assert
(const char*,int);
#define BFD_ASSERT(x) \
{ if (!(x)) bfd_assert(__FILE__,__LINE__); }
do { if (!(x)) bfd_assert(__FILE__,__LINE__); } while (0)
#define BFD_FAIL() \
{ bfd_assert(__FILE__,__LINE__); }
do { bfd_assert(__FILE__,__LINE__); } while (0)
extern void _bfd_abort
(const char *, int, const char *) ATTRIBUTE_NORETURN;
@ -650,6 +667,34 @@ extern bfd_boolean _bfd_sh_align_load_span
bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
#endif
/* This is the shape of the elements inside the already_linked hash
table. It maps a name onto a list of already_linked elements with
the same name. */
struct bfd_section_already_linked_hash_entry
{
struct bfd_hash_entry root;
struct bfd_section_already_linked *entry;
};
struct bfd_section_already_linked
{
struct bfd_section_already_linked *next;
asection *sec;
};
extern struct bfd_section_already_linked_hash_entry *
bfd_section_already_linked_table_lookup (const char *);
extern void bfd_section_already_linked_table_insert
(struct bfd_section_already_linked_hash_entry *, asection *);
extern void bfd_section_already_linked_table_traverse
(bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *,
void *), void *);
extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *);
extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *);
/* Extracted from init.c. */
/* Extracted from libbfd.c. */
bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
@ -657,6 +702,27 @@ bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
unsigned int bfd_log2 (bfd_vma x);
/* Extracted from bfdio.c. */
struct bfd_iovec
{
/* To avoid problems with macros, a "b" rather than "f"
prefix is prepended to each method name. */
/* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
bytes starting at PTR. Return the number of bytes actually
transfered (a read past end-of-file returns less than NBYTES),
or -1 (setting <<bfd_error>>) if an error occurs. */
file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
file_ptr nbytes);
/* Return the current IOSTREAM file offset, or -1 (setting <<bfd_error>>
if an error occurs. */
file_ptr (*btell) (struct bfd *abfd);
/* For the following, on successful completion a value of 0 is returned.
Otherwise, a value of -1 is returned (and <<bfd_error>> is set). */
int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
int (*bclose) (struct bfd *abfd);
int (*bflush) (struct bfd *abfd);
int (*bstat) (struct bfd *abfd, struct stat *sb);
};
/* Extracted from bfdwin.c. */
struct _bfd_window_internal {
struct _bfd_window_internal *next;
@ -670,9 +736,9 @@ struct _bfd_window_internal {
extern bfd *bfd_last_cache;
#define bfd_cache_lookup(x) \
((x)==bfd_last_cache? \
(FILE*) (bfd_last_cache->iostream): \
bfd_cache_lookup_worker(x))
((x) == bfd_last_cache ? \
(FILE *) (bfd_last_cache->iostream): \
bfd_cache_lookup_worker (x))
bfd_boolean bfd_cache_init (bfd *abfd);
bfd_boolean bfd_cache_close (bfd *abfd);
@ -699,6 +765,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_16_PCREL",
"BFD_RELOC_12_PCREL",
"BFD_RELOC_8_PCREL",
"BFD_RELOC_32_SECREL",
"BFD_RELOC_32_GOT_PCREL",
"BFD_RELOC_16_GOT_PCREL",
"BFD_RELOC_8_GOT_PCREL",
@ -840,8 +907,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_HI16",
"BFD_RELOC_HI16_S",
"BFD_RELOC_LO16",
"BFD_RELOC_PCREL_HI16_S",
"BFD_RELOC_PCREL_LO16",
"BFD_RELOC_MIPS16_HI16",
"BFD_RELOC_MIPS16_HI16_S",
"BFD_RELOC_MIPS16_LO16",
"BFD_RELOC_MIPS_LITERAL",
"BFD_RELOC_MIPS_GOT16",
"BFD_RELOC_MIPS_CALL16",
@ -864,6 +932,19 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_REL16",
"BFD_RELOC_MIPS_RELGOT",
"BFD_RELOC_MIPS_JALR",
"BFD_RELOC_MIPS_TLS_DTPMOD32",
"BFD_RELOC_MIPS_TLS_DTPREL32",
"BFD_RELOC_MIPS_TLS_DTPMOD64",
"BFD_RELOC_MIPS_TLS_DTPREL64",
"BFD_RELOC_MIPS_TLS_GD",
"BFD_RELOC_MIPS_TLS_LDM",
"BFD_RELOC_MIPS_TLS_DTPREL_HI16",
"BFD_RELOC_MIPS_TLS_DTPREL_LO16",
"BFD_RELOC_MIPS_TLS_GOTTPREL",
"BFD_RELOC_MIPS_TLS_TPREL32",
"BFD_RELOC_MIPS_TLS_TPREL64",
"BFD_RELOC_MIPS_TLS_TPREL_HI16",
"BFD_RELOC_MIPS_TLS_TPREL_LO16",
"BFD_RELOC_FRV_LABEL16",
"BFD_RELOC_FRV_LABEL24",
@ -888,6 +969,22 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_FRV_GOTOFF12",
"BFD_RELOC_FRV_GOTOFFHI",
"BFD_RELOC_FRV_GOTOFFLO",
"BFD_RELOC_FRV_GETTLSOFF",
"BFD_RELOC_FRV_TLSDESC_VALUE",
"BFD_RELOC_FRV_GOTTLSDESC12",
"BFD_RELOC_FRV_GOTTLSDESCHI",
"BFD_RELOC_FRV_GOTTLSDESCLO",
"BFD_RELOC_FRV_TLSMOFF12",
"BFD_RELOC_FRV_TLSMOFFHI",
"BFD_RELOC_FRV_TLSMOFFLO",
"BFD_RELOC_FRV_GOTTLSOFF12",
"BFD_RELOC_FRV_GOTTLSOFFHI",
"BFD_RELOC_FRV_GOTTLSOFFLO",
"BFD_RELOC_FRV_TLSOFF",
"BFD_RELOC_FRV_TLSDESC_RELAX",
"BFD_RELOC_FRV_GETTLSOFF_RELAX",
"BFD_RELOC_FRV_TLSOFF_RELAX",
"BFD_RELOC_FRV_TLSMOFF",
"BFD_RELOC_MN10300_GOTOFF24",
"BFD_RELOC_MN10300_GOT32",
@ -1056,6 +1153,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_ADRL_IMMEDIATE",
"BFD_RELOC_ARM_OFFSET_IMM",
"BFD_RELOC_ARM_SHIFT_IMM",
"BFD_RELOC_ARM_SMI",
"BFD_RELOC_ARM_SWI",
"BFD_RELOC_ARM_MULTI",
"BFD_RELOC_ARM_CP_OFF_IMM",
@ -1079,8 +1177,21 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_RELATIVE",
"BFD_RELOC_ARM_GOTOFF",
"BFD_RELOC_ARM_GOTPC",
"BFD_RELOC_ARM_TARGET1",
"BFD_RELOC_ARM_ROSEGREL32",
"BFD_RELOC_ARM_SBREL32",
"BFD_RELOC_ARM_TARGET2",
"BFD_RELOC_ARM_PREL31",
"BFD_RELOC_SH_PCDISP8BY2",
"BFD_RELOC_SH_PCDISP12BY2",
"BFD_RELOC_SH_IMM3",
"BFD_RELOC_SH_IMM3U",
"BFD_RELOC_SH_DISP12",
"BFD_RELOC_SH_DISP12BY2",
"BFD_RELOC_SH_DISP12BY4",
"BFD_RELOC_SH_DISP12BY8",
"BFD_RELOC_SH_DISP20",
"BFD_RELOC_SH_DISP20BY8",
"BFD_RELOC_SH_IMM4",
"BFD_RELOC_SH_IMM4BY2",
"BFD_RELOC_SH_IMM4BY4",
@ -1199,6 +1310,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M32R_JMP_SLOT",
"BFD_RELOC_M32R_RELATIVE",
"BFD_RELOC_M32R_GOTOFF",
"BFD_RELOC_M32R_GOTOFF_HI_ULO",
"BFD_RELOC_M32R_GOTOFF_HI_SLO",
"BFD_RELOC_M32R_GOTOFF_LO",
"BFD_RELOC_M32R_GOTPC24",
"BFD_RELOC_M32R_GOT16_HI_ULO",
"BFD_RELOC_M32R_GOT16_HI_SLO",
@ -1225,6 +1339,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_V850_LONGCALL",
"BFD_RELOC_V850_LONGJUMP",
"BFD_RELOC_V850_ALIGN",
"BFD_RELOC_V850_LO16_SPLIT_OFFSET",
"BFD_RELOC_MN10300_32_PCREL",
"BFD_RELOC_MN10300_16_PCREL",
"BFD_RELOC_TIC30_LDP",
@ -1287,6 +1402,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_HI8_LDI_PM_NEG",
"BFD_RELOC_AVR_HH8_LDI_PM_NEG",
"BFD_RELOC_AVR_CALL",
"BFD_RELOC_AVR_LDI",
"BFD_RELOC_AVR_6",
"BFD_RELOC_AVR_6_ADIW",
"BFD_RELOC_390_12",
"BFD_RELOC_390_GOT12",
"BFD_RELOC_390_PLT32",
@ -1441,10 +1559,75 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_M68HC11_PAGE",
"BFD_RELOC_M68HC11_24",
"BFD_RELOC_M68HC12_5B",
"BFD_RELOC_16C_NUM08",
"BFD_RELOC_16C_NUM08_C",
"BFD_RELOC_16C_NUM16",
"BFD_RELOC_16C_NUM16_C",
"BFD_RELOC_16C_NUM32",
"BFD_RELOC_16C_NUM32_C",
"BFD_RELOC_16C_DISP04",
"BFD_RELOC_16C_DISP04_C",
"BFD_RELOC_16C_DISP08",
"BFD_RELOC_16C_DISP08_C",
"BFD_RELOC_16C_DISP16",
"BFD_RELOC_16C_DISP16_C",
"BFD_RELOC_16C_DISP24",
"BFD_RELOC_16C_DISP24_C",
"BFD_RELOC_16C_DISP24a",
"BFD_RELOC_16C_DISP24a_C",
"BFD_RELOC_16C_REG04",
"BFD_RELOC_16C_REG04_C",
"BFD_RELOC_16C_REG04a",
"BFD_RELOC_16C_REG04a_C",
"BFD_RELOC_16C_REG14",
"BFD_RELOC_16C_REG14_C",
"BFD_RELOC_16C_REG16",
"BFD_RELOC_16C_REG16_C",
"BFD_RELOC_16C_REG20",
"BFD_RELOC_16C_REG20_C",
"BFD_RELOC_16C_ABS20",
"BFD_RELOC_16C_ABS20_C",
"BFD_RELOC_16C_ABS24",
"BFD_RELOC_16C_ABS24_C",
"BFD_RELOC_16C_IMM04",
"BFD_RELOC_16C_IMM04_C",
"BFD_RELOC_16C_IMM16",
"BFD_RELOC_16C_IMM16_C",
"BFD_RELOC_16C_IMM20",
"BFD_RELOC_16C_IMM20_C",
"BFD_RELOC_16C_IMM24",
"BFD_RELOC_16C_IMM24_C",
"BFD_RELOC_16C_IMM32",
"BFD_RELOC_16C_IMM32_C",
"BFD_RELOC_CRX_REL4",
"BFD_RELOC_CRX_REL8",
"BFD_RELOC_CRX_REL8_CMP",
"BFD_RELOC_CRX_REL16",
"BFD_RELOC_CRX_REL24",
"BFD_RELOC_CRX_REL32",
"BFD_RELOC_CRX_REGREL12",
"BFD_RELOC_CRX_REGREL22",
"BFD_RELOC_CRX_REGREL28",
"BFD_RELOC_CRX_REGREL32",
"BFD_RELOC_CRX_ABS16",
"BFD_RELOC_CRX_ABS32",
"BFD_RELOC_CRX_NUM8",
"BFD_RELOC_CRX_NUM16",
"BFD_RELOC_CRX_NUM32",
"BFD_RELOC_CRX_IMM16",
"BFD_RELOC_CRX_IMM32",
"BFD_RELOC_CRX_SWITCH8",
"BFD_RELOC_CRX_SWITCH16",
"BFD_RELOC_CRX_SWITCH32",
"BFD_RELOC_CRIS_BDISP8",
"BFD_RELOC_CRIS_UNSIGNED_5",
"BFD_RELOC_CRIS_SIGNED_6",
"BFD_RELOC_CRIS_UNSIGNED_6",
"BFD_RELOC_CRIS_SIGNED_8",
"BFD_RELOC_CRIS_UNSIGNED_8",
"BFD_RELOC_CRIS_SIGNED_16",
"BFD_RELOC_CRIS_UNSIGNED_16",
"BFD_RELOC_CRIS_LAPCQ_OFFSET",
"BFD_RELOC_CRIS_UNSIGNED_4",
"BFD_RELOC_CRIS_COPY",
"BFD_RELOC_CRIS_GLOB_DAT",
@ -1508,6 +1691,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MSP430_16",
"BFD_RELOC_MSP430_16_PCREL_BYTE",
"BFD_RELOC_MSP430_16_BYTE",
"BFD_RELOC_MSP430_2X_PCREL",
"BFD_RELOC_MSP430_RL_PCREL",
"BFD_RELOC_IQ2000_OFFSET_16",
"BFD_RELOC_IQ2000_OFFSET_21",
"BFD_RELOC_IQ2000_UHI16",
@ -1516,6 +1701,39 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XTENSA_JMP_SLOT",
"BFD_RELOC_XTENSA_RELATIVE",
"BFD_RELOC_XTENSA_PLT",
"BFD_RELOC_XTENSA_DIFF8",
"BFD_RELOC_XTENSA_DIFF16",
"BFD_RELOC_XTENSA_DIFF32",
"BFD_RELOC_XTENSA_SLOT0_OP",
"BFD_RELOC_XTENSA_SLOT1_OP",
"BFD_RELOC_XTENSA_SLOT2_OP",
"BFD_RELOC_XTENSA_SLOT3_OP",
"BFD_RELOC_XTENSA_SLOT4_OP",
"BFD_RELOC_XTENSA_SLOT5_OP",
"BFD_RELOC_XTENSA_SLOT6_OP",
"BFD_RELOC_XTENSA_SLOT7_OP",
"BFD_RELOC_XTENSA_SLOT8_OP",
"BFD_RELOC_XTENSA_SLOT9_OP",
"BFD_RELOC_XTENSA_SLOT10_OP",
"BFD_RELOC_XTENSA_SLOT11_OP",
"BFD_RELOC_XTENSA_SLOT12_OP",
"BFD_RELOC_XTENSA_SLOT13_OP",
"BFD_RELOC_XTENSA_SLOT14_OP",
"BFD_RELOC_XTENSA_SLOT0_ALT",
"BFD_RELOC_XTENSA_SLOT1_ALT",
"BFD_RELOC_XTENSA_SLOT2_ALT",
"BFD_RELOC_XTENSA_SLOT3_ALT",
"BFD_RELOC_XTENSA_SLOT4_ALT",
"BFD_RELOC_XTENSA_SLOT5_ALT",
"BFD_RELOC_XTENSA_SLOT6_ALT",
"BFD_RELOC_XTENSA_SLOT7_ALT",
"BFD_RELOC_XTENSA_SLOT8_ALT",
"BFD_RELOC_XTENSA_SLOT9_ALT",
"BFD_RELOC_XTENSA_SLOT10_ALT",
"BFD_RELOC_XTENSA_SLOT11_ALT",
"BFD_RELOC_XTENSA_SLOT12_ALT",
"BFD_RELOC_XTENSA_SLOT13_ALT",
"BFD_RELOC_XTENSA_SLOT14_ALT",
"BFD_RELOC_XTENSA_OP0",
"BFD_RELOC_XTENSA_OP1",
"BFD_RELOC_XTENSA_OP2",

View File

@ -1,86 +0,0 @@
# Configuration fragment for BFD.
# This is almost always correct.
Set selarchs "&bfd_{target_cpu}_arch"
Set defvec ""
Set selvecs ""
Set havevecs ""
If "{target_canonical}" =~ /m68k-apple-macos/
Set BFD_BACKENDS '"{o}"coff-m68k.c.o "{o}"cofflink.c.o'
Set defvec m68kcoff_vec
Set selvecs '&m68kcoff_vec'
Set havevecs '-d HAVE_m68kcoff_vec'
Else If "{target_canonical}" =~ /powerpc-apple-macos/
Set BFD_BACKENDS '"{o}"coff-pmac.c.o "{o}"xcofflink.c.o'
Set defvec pmac_xcoff_vec
Set selvecs '&pmac_xcoff_vec'
Set havevecs '-d HAVE_pmac_xcoff_vec'
Set selarchs "&bfd_powerpc_arch"
Else If "{target_canonical}" =~ /i386-\Option-x-go32/
Set BFD_BACKENDS '"{o}"coff-i386.c.o'
Set defvec i386coff_vec
Set selvecs '&i386coff_vec'
Set havevecs '-d HAVE_i386coff_vec'
Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
Set BFD_BACKENDS '"{o}"coff-mips.c.o "{o}"ecoff.c.o "{o}"ecofflink.c.o "{o}"elf32.c.o "{o}"elf32-mips.c.o "{o}"elflink.c.o'
Set defvec ecoff_big_vec
Set selvecs '&ecoff_big_vec,&ecoff_little_vec,&bfd_elf32_bigmips_vec'
Set havevecs '-d HAVE_ecoff_big_vec -d HAVE_ecoff_little_vec -d HAVE_bfd_elf32_bigmips_vec'
Else If "{target_canonical}" =~ /sh-\Option-x-hms/
Set BFD_BACKENDS '"{o}"coff-sh.c.o "{o}"cofflink.c.o'
Set defvec shcoff_vec
Set selvecs '&shcoff_vec,&shlcoff_vec'
Set havevecs '-d HAVE_shcoff_vec -d HAVE_shlcoff_vec'
End If
Set ta `echo {selarchs} | sed -e 's/&bfd_/{o}cpu-/g' -e 's/_arch/.c.o/g'`
Set tdefaults "-d DEFAULT_VECTOR={defvec} -d SELECT_VECS={selvecs} -d SELECT_ARCHITECTURES={selarchs} {havevecs}"
Echo '# From mpw-config.in' > "{o}"mk.tmp
Echo 'WORDSIZE = 32' >> "{o}"mk.tmp
Echo 'BFD_MACHINES = ' {ta} >> "{o}"mk.tmp
Echo 'BFD_BACKENDS = ' {BFD_BACKENDS} >> "{o}"mk.tmp
Echo 'TDEFAULTS = ' {tdefaults} >> "{o}"mk.tmp
Echo 'HDEPFILES = ' >> "{o}"mk.tmp
Echo 'TDEPFILES = ' >> "{o}"mk.tmp
Echo '# End from mpw-config.in' >> "{o}"mk.tmp
Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
Echo '#include "mpw.h"' >> "{o}"config.new
MoveIfChange "{o}"config.new "{o}"config.h
# We can only handle 32-bit targets right now.
sed -e 's/@WORDSIZE@/32/' \Option-d
-e 's/@wordsize@/32/' \Option-d
-e "s/@VERSION@/`Catenate {srcdir}VERSION`/" \Option-d
-e 's/@BFD_HOST_64_BIT_DEFINED@/0/' \Option-d
-e 's/@BFD_HOST_64_BIT@//' \Option-d
-e 's/@BFD_HOST_U_64_BIT@//' \Option-d
-e 's/@BFD_HOST_64BIT_LONG@/0/' \Option-d
"{srcdir}"bfd-in2.h >"{o}"bfd.h-new
MoveIfChange "{o}"bfd.h-new "{o}"bfd.h
sed -e 's/NN/32/g' "{srcdir}"elfxx-target.h >"{o}"elf32-target.h-new
MoveIfChange "{o}"elf32-target.h-new "{o}"elf32-target.h
# Pre-expand some macros in coffswap.h, so MPW C doesn't choke.
sed -e 's/^ PUT_AOUTHDR_TSIZE (/ bfd_h_put_32 (/' \Option-d
-e 's/^ PUT_AOUTHDR_DSIZE (/ bfd_h_put_32 (/' \Option-d
-e 's/^ PUT_AOUTHDR_BSIZE (/ bfd_h_put_32 (/' \Option-d
-e 's/^ PUT_AOUTHDR_ENTRY (/ bfd_h_put_32 (/' \Option-d
-e 's/^ PUT_AOUTHDR_TEXT_START (/ bfd_h_put_32 (/' \Option-d
-e 's/^ PUT_AOUTHDR_DATA_START (/ bfd_h_put_32 (/' \Option-d
"{srcdir}"coffswap.h >"{o}"coffswap.h-new
MoveIfChange "{o}"coffswap.h-new "{o}"coffswap.h

View File

@ -1,81 +0,0 @@
# Sed commands to finish translating the Unix BFD Makefile into MPW syntax.
# Whack out unused host and target define bits.
/HDEFINES/s/@HDEFINES@//
/TDEFINES/s/@TDEFINES@//
# Fix pathnames to include directories.
/^INCDIR = /s/^INCDIR = .*$/INCDIR = "{topsrcdir}"include/
/^CSEARCH = /s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
# Comment out setting of vars, configure script will add these itself.
/^WORDSIZE =/s/^/#/
# /^ALL_BACKENDS/s/^/#/
/^BFD_BACKENDS/s/^/#/
/^BFD_MACHINES/s/^/#/
/^TDEFAULTS/s/^/#/
# Remove extra, useless, "all".
/^all \\Option-f _oldest/,/^$/d
# Remove the Makefile rebuild rule.
/^Makefile /,/--recheck/d
# Don't do any recursive subdir stuff.
/ subdir_do/s/{MAKE}/null-command/
/BFD_H/s/^{BFD_H}/#{BFD_H}/
# Add explicit srcdir paths to special files.
/config.bfd/s/ config.bfd/ "{s}"config.bfd/g
/targmatch.sed/s/ targmatch.sed/ "{s}"targmatch.sed/g
# Point at include files that are always in the objdir.
/bfd/s/"{s}"bfd\.h/"{o}"bfd.h/g
/config/s/"{s}"config\.h/"{o}"config.h/g
/targmatch/s/"{s}"targmatch\.h/"{o}"targmatch.h/g
/targmatch/s/^targmatch\.h/"{o}"targmatch.h/
/elf32-target/s/"{s}"elf32-target\.h/"{o}"elf32-target.h/g
/elf32-target/s/^elf32-target\.h/"{o}"elf32-target.h/
/elf64-target/s/"{s}"elf64-target\.h/"{o}"elf64-target.h/g
/elf64-target/s/^elf64-target\.h/"{o}"elf64-target.h/
/"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
/dep/s/\.dep/__dep/g
# Removing duplicates is cool but presently unnecessary,
# so whack this out.
/^ofiles \\Option-f/,/^$/d
/ofiles/s/{OFILES} ofiles/{OFILES}/
/echo ofiles = /d
/cat ofiles/s/`cat ofiles`/{OFILES}/
# No corefile support.
/COREFILE/s/@COREFILE@//
/COREFLAG/s/@COREFLAG@//
# No PIC foolery in this environment.
/@ALLLIBS@/s/@ALLLIBS@/{TARGETLIB}/
/@PICLIST@/s/@PICLIST@//
/@PICFLAG@/s/@PICFLAG@//
/^{OFILES} \\Option-f stamp-picdir/,/^$/d
# Remove the pic trickery from the default build rule.
/^\.c\.o \\Option-f /,/End If/c\
.c.o \\Option-f .c
# MPW Make doesn't know about $<.
/"{o}"targets.c.o \\Option-f "{s}"targets.c Makefile/,/^$/c\
"{o}"targets.c.o \\Option-f "{s}"targets.c Makefile\
{CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"targets.c -o "{o}"targets.c.o
/"{o}"archures.c.o \\Option-f "{s}"archures.c Makefile/,/^$/c\
"{o}"archures.c.o \\Option-f "{s}"archures.c Makefile\
{CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"archures.c -o "{o}"archures.c.o
# Remove the .h rebuilding rules, we don't currently have a doc subdir,
# or a way to build the prototype-hacking tool that's in it.
/^"{srcdir}"bfd-in2.h \\Option-f /,/^$/d
/^"{srcdir}"libbfd.h \\Option-f /,/^$/d
/^"{srcdir}"libcoff.h \\Option-f /,/^$/d

View File

@ -1 +0,0 @@
*.gmo

View File

@ -1,6 +1,6 @@
/* BFD support for handling relocation entries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004
2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -623,8 +623,7 @@ bfd_perform_relocation (bfd *abfd,
}
/* Is the address of the relocation really within the section? */
if (reloc_entry->address > (input_section->_cooked_size
/ bfd_octets_per_byte (abfd)))
if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@ -716,7 +715,6 @@ bfd_perform_relocation (bfd *abfd,
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
{
#if 1
/* For m68k-coff, the addend was being subtracted twice during
relocation with -r. Removing the line below this comment
fixes that problem; see PR 2953.
@ -787,7 +785,6 @@ space consuming. For each target:
right
*/
relocation -= reloc_entry->addend;
#endif
reloc_entry->addend = 0;
}
else
@ -1013,8 +1010,7 @@ bfd_install_relocation (bfd *abfd,
}
/* Is the address of the relocation really within the section? */
if (reloc_entry->address > (input_section->_cooked_size
/ bfd_octets_per_byte (abfd)))
if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
/* Work out which section the relocation is targeted at and the
@ -1102,10 +1098,10 @@ bfd_install_relocation (bfd *abfd,
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
{
#if 1
/* For m68k-coff, the addend was being subtracted twice during
relocation with -r. Removing the line below this comment
fixes that problem; see PR 2953.
/* For m68k-coff, the addend was being subtracted twice during
relocation with -r. Removing the line below this comment
fixes that problem; see PR 2953.
However, Ian wrote the following, regarding removing the line below,
which explains why it is still enabled: --djm
@ -1172,7 +1168,6 @@ space consuming. For each target:
7) if they are different you have to figure out which version is
right. */
relocation -= reloc_entry->addend;
#endif
reloc_entry->addend = 0;
}
else
@ -1350,7 +1345,7 @@ _bfd_final_link_relocate (reloc_howto_type *howto,
bfd_vma relocation;
/* Sanity check the address. */
if (address > input_section->_raw_size)
if (address > bfd_get_section_limit (input_bfd, input_section))
return bfd_reloc_outofrange;
/* This function assumes that we are dealing with a basic relocation
@ -1646,6 +1641,11 @@ the section containing the relocation. It depends on the specific target.
The 24-bit relocation is used in some Intel 960 configurations.
ENUM
BFD_RELOC_32_SECREL
ENUMDOC
Section relative relocations. Some targets need this for DWARF2.
ENUM
BFD_RELOC_32_GOT_PCREL
ENUMX
@ -2072,14 +2072,22 @@ ENUM
BFD_RELOC_LO16
ENUMDOC
Low 16 bits.
ENUM
BFD_RELOC_PCREL_HI16_S
BFD_RELOC_MIPS16_HI16
ENUMDOC
Like BFD_RELOC_HI16_S, but PC relative.
MIPS16 high 16 bits of 32-bit value.
ENUM
BFD_RELOC_PCREL_LO16
BFD_RELOC_MIPS16_HI16_S
ENUMDOC
Like BFD_RELOC_LO16, but PC relative.
MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
extended and added to form the final result. If the low 16
bits form a negative number, we need to add one to the high value
to compensate for the borrow when the low bits are added.
ENUM
BFD_RELOC_MIPS16_LO16
ENUMDOC
MIPS16 low 16 bits.
ENUM
BFD_RELOC_MIPS_LITERAL
@ -2128,6 +2136,32 @@ ENUMX
BFD_RELOC_MIPS_RELGOT
ENUMX
BFD_RELOC_MIPS_JALR
ENUMX
BFD_RELOC_MIPS_TLS_DTPMOD32
ENUMX
BFD_RELOC_MIPS_TLS_DTPREL32
ENUMX
BFD_RELOC_MIPS_TLS_DTPMOD64
ENUMX
BFD_RELOC_MIPS_TLS_DTPREL64
ENUMX
BFD_RELOC_MIPS_TLS_GD
ENUMX
BFD_RELOC_MIPS_TLS_LDM
ENUMX
BFD_RELOC_MIPS_TLS_DTPREL_HI16
ENUMX
BFD_RELOC_MIPS_TLS_DTPREL_LO16
ENUMX
BFD_RELOC_MIPS_TLS_GOTTPREL
ENUMX
BFD_RELOC_MIPS_TLS_TPREL32
ENUMX
BFD_RELOC_MIPS_TLS_TPREL64
ENUMX
BFD_RELOC_MIPS_TLS_TPREL_HI16
ENUMX
BFD_RELOC_MIPS_TLS_TPREL_LO16
ENUMDOC
MIPS ELF relocations.
COMMENT
@ -2178,6 +2212,38 @@ ENUMX
BFD_RELOC_FRV_GOTOFFHI
ENUMX
BFD_RELOC_FRV_GOTOFFLO
ENUMX
BFD_RELOC_FRV_GETTLSOFF
ENUMX
BFD_RELOC_FRV_TLSDESC_VALUE
ENUMX
BFD_RELOC_FRV_GOTTLSDESC12
ENUMX
BFD_RELOC_FRV_GOTTLSDESCHI
ENUMX
BFD_RELOC_FRV_GOTTLSDESCLO
ENUMX
BFD_RELOC_FRV_TLSMOFF12
ENUMX
BFD_RELOC_FRV_TLSMOFFHI
ENUMX
BFD_RELOC_FRV_TLSMOFFLO
ENUMX
BFD_RELOC_FRV_GOTTLSOFF12
ENUMX
BFD_RELOC_FRV_GOTTLSOFFHI
ENUMX
BFD_RELOC_FRV_GOTTLSOFFLO
ENUMX
BFD_RELOC_FRV_TLSOFF
ENUMX
BFD_RELOC_FRV_TLSDESC_RELAX
ENUMX
BFD_RELOC_FRV_GETTLSOFF_RELAX
ENUMX
BFD_RELOC_FRV_TLSOFF_RELAX
ENUMX
BFD_RELOC_FRV_TLSMOFF
ENUMDOC
Fujitsu Frv Relocations.
COMMENT
@ -2575,6 +2641,8 @@ ENUMX
BFD_RELOC_ARM_OFFSET_IMM
ENUMX
BFD_RELOC_ARM_SHIFT_IMM
ENUMX
BFD_RELOC_ARM_SMI
ENUMX
BFD_RELOC_ARM_SWI
ENUMX
@ -2624,11 +2692,50 @@ ENUMX
ENUMDOC
These relocs are only used within the ARM assembler. They are not
(at present) written to any object files.
ENUM
BFD_RELOC_ARM_TARGET1
ENUMDOC
Pc-relative or absolute relocation depending on target. Used for
entries in .init_array sections.
ENUM
BFD_RELOC_ARM_ROSEGREL32
ENUMDOC
Read-only segment base relative address.
ENUM
BFD_RELOC_ARM_SBREL32
ENUMDOC
Data segment base relative address.
ENUM
BFD_RELOC_ARM_TARGET2
ENUMDOC
This reloc is used for References to RTTI dta from exception handling
tables. The actual definition depends on the target. It may be a
pc-relative or some form of GOT-indirect relocation.
ENUM
BFD_RELOC_ARM_PREL31
ENUMDOC
31-bit PC relative address.
ENUM
BFD_RELOC_SH_PCDISP8BY2
ENUMX
BFD_RELOC_SH_PCDISP12BY2
ENUMX
BFD_RELOC_SH_IMM3
ENUMX
BFD_RELOC_SH_IMM3U
ENUMX
BFD_RELOC_SH_DISP12
ENUMX
BFD_RELOC_SH_DISP12BY2
ENUMX
BFD_RELOC_SH_DISP12BY4
ENUMX
BFD_RELOC_SH_DISP12BY8
ENUMX
BFD_RELOC_SH_DISP20
ENUMX
BFD_RELOC_SH_DISP20BY8
ENUMX
BFD_RELOC_SH_IMM4
ENUMX
@ -2964,6 +3071,12 @@ ENUMX
BFD_RELOC_M32R_RELATIVE
ENUMX
BFD_RELOC_M32R_GOTOFF
ENUMX
BFD_RELOC_M32R_GOTOFF_HI_ULO
ENUMX
BFD_RELOC_M32R_GOTOFF_HI_SLO
ENUMX
BFD_RELOC_M32R_GOTOFF_LO
ENUMX
BFD_RELOC_M32R_GOTPC24
ENUMX
@ -3067,6 +3180,11 @@ ENUM
BFD_RELOC_V850_ALIGN
ENUMDOC
Used to maintain alignment whilst relaxing.
ENUM
BFD_RELOC_V850_LO16_SPLIT_OFFSET
ENUMDOC
This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
instructions.
ENUM
BFD_RELOC_MN10300_32_PCREL
ENUMDOC
@ -3331,6 +3449,21 @@ ENUM
ENUMDOC
This is a 32 bit reloc for the AVR that stores 23 bit value
into 22 bits.
ENUM
BFD_RELOC_AVR_LDI
ENUMDOC
This is a 16 bit reloc for the AVR that stores all needed bits
for absolute addressing with ldi with overflow check to linktime
ENUM
BFD_RELOC_AVR_6
ENUMDOC
This is a 6 bit reloc for the AVR that stores offset for ldd/std
instructions
ENUM
BFD_RELOC_AVR_6_ADIW
ENUMDOC
This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
instructions
ENUM
BFD_RELOC_390_12
@ -3781,6 +3914,132 @@ ENUMDOC
Motorola 68HC12 reloc.
This is the 5 bits of a value.
ENUM
BFD_RELOC_16C_NUM08
ENUMX
BFD_RELOC_16C_NUM08_C
ENUMX
BFD_RELOC_16C_NUM16
ENUMX
BFD_RELOC_16C_NUM16_C
ENUMX
BFD_RELOC_16C_NUM32
ENUMX
BFD_RELOC_16C_NUM32_C
ENUMX
BFD_RELOC_16C_DISP04
ENUMX
BFD_RELOC_16C_DISP04_C
ENUMX
BFD_RELOC_16C_DISP08
ENUMX
BFD_RELOC_16C_DISP08_C
ENUMX
BFD_RELOC_16C_DISP16
ENUMX
BFD_RELOC_16C_DISP16_C
ENUMX
BFD_RELOC_16C_DISP24
ENUMX
BFD_RELOC_16C_DISP24_C
ENUMX
BFD_RELOC_16C_DISP24a
ENUMX
BFD_RELOC_16C_DISP24a_C
ENUMX
BFD_RELOC_16C_REG04
ENUMX
BFD_RELOC_16C_REG04_C
ENUMX
BFD_RELOC_16C_REG04a
ENUMX
BFD_RELOC_16C_REG04a_C
ENUMX
BFD_RELOC_16C_REG14
ENUMX
BFD_RELOC_16C_REG14_C
ENUMX
BFD_RELOC_16C_REG16
ENUMX
BFD_RELOC_16C_REG16_C
ENUMX
BFD_RELOC_16C_REG20
ENUMX
BFD_RELOC_16C_REG20_C
ENUMX
BFD_RELOC_16C_ABS20
ENUMX
BFD_RELOC_16C_ABS20_C
ENUMX
BFD_RELOC_16C_ABS24
ENUMX
BFD_RELOC_16C_ABS24_C
ENUMX
BFD_RELOC_16C_IMM04
ENUMX
BFD_RELOC_16C_IMM04_C
ENUMX
BFD_RELOC_16C_IMM16
ENUMX
BFD_RELOC_16C_IMM16_C
ENUMX
BFD_RELOC_16C_IMM20
ENUMX
BFD_RELOC_16C_IMM20_C
ENUMX
BFD_RELOC_16C_IMM24
ENUMX
BFD_RELOC_16C_IMM24_C
ENUMX
BFD_RELOC_16C_IMM32
ENUMX
BFD_RELOC_16C_IMM32_C
ENUMDOC
NS CR16C Relocations.
ENUM
BFD_RELOC_CRX_REL4
ENUMX
BFD_RELOC_CRX_REL8
ENUMX
BFD_RELOC_CRX_REL8_CMP
ENUMX
BFD_RELOC_CRX_REL16
ENUMX
BFD_RELOC_CRX_REL24
ENUMX
BFD_RELOC_CRX_REL32
ENUMX
BFD_RELOC_CRX_REGREL12
ENUMX
BFD_RELOC_CRX_REGREL22
ENUMX
BFD_RELOC_CRX_REGREL28
ENUMX
BFD_RELOC_CRX_REGREL32
ENUMX
BFD_RELOC_CRX_ABS16
ENUMX
BFD_RELOC_CRX_ABS32
ENUMX
BFD_RELOC_CRX_NUM8
ENUMX
BFD_RELOC_CRX_NUM16
ENUMX
BFD_RELOC_CRX_NUM32
ENUMX
BFD_RELOC_CRX_IMM16
ENUMX
BFD_RELOC_CRX_IMM32
ENUMX
BFD_RELOC_CRX_SWITCH8
ENUMX
BFD_RELOC_CRX_SWITCH16
ENUMX
BFD_RELOC_CRX_SWITCH32
ENUMDOC
NS CRX Relocations.
ENUM
BFD_RELOC_CRIS_BDISP8
ENUMX
@ -3789,6 +4048,16 @@ ENUMX
BFD_RELOC_CRIS_SIGNED_6
ENUMX
BFD_RELOC_CRIS_UNSIGNED_6
ENUMX
BFD_RELOC_CRIS_SIGNED_8
ENUMX
BFD_RELOC_CRIS_UNSIGNED_8
ENUMX
BFD_RELOC_CRIS_SIGNED_16
ENUMX
BFD_RELOC_CRIS_UNSIGNED_16
ENUMX
BFD_RELOC_CRIS_LAPCQ_OFFSET
ENUMX
BFD_RELOC_CRIS_UNSIGNED_4
ENUMDOC
@ -3950,6 +4219,10 @@ ENUMX
BFD_RELOC_MSP430_16_PCREL_BYTE
ENUMX
BFD_RELOC_MSP430_16_BYTE
ENUMX
BFD_RELOC_MSP430_2X_PCREL
ENUMX
BFD_RELOC_MSP430_RL_PCREL
ENUMDOC
msp430 specific relocation codes
@ -3981,6 +4254,87 @@ ENUM
ENUMDOC
Xtensa relocation used in ELF object files for symbols that may require
PLT entries. Otherwise, this is just a generic 32-bit relocation.
ENUM
BFD_RELOC_XTENSA_DIFF8
ENUMX
BFD_RELOC_XTENSA_DIFF16
ENUMX
BFD_RELOC_XTENSA_DIFF32
ENUMDOC
Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
assuming no relaxation. The relocation encodes the position of the
first symbol so the linker can determine whether to adjust the field
value.
ENUM
BFD_RELOC_XTENSA_SLOT0_OP
ENUMX
BFD_RELOC_XTENSA_SLOT1_OP
ENUMX
BFD_RELOC_XTENSA_SLOT2_OP
ENUMX
BFD_RELOC_XTENSA_SLOT3_OP
ENUMX
BFD_RELOC_XTENSA_SLOT4_OP
ENUMX
BFD_RELOC_XTENSA_SLOT5_OP
ENUMX
BFD_RELOC_XTENSA_SLOT6_OP
ENUMX
BFD_RELOC_XTENSA_SLOT7_OP
ENUMX
BFD_RELOC_XTENSA_SLOT8_OP
ENUMX
BFD_RELOC_XTENSA_SLOT9_OP
ENUMX
BFD_RELOC_XTENSA_SLOT10_OP
ENUMX
BFD_RELOC_XTENSA_SLOT11_OP
ENUMX
BFD_RELOC_XTENSA_SLOT12_OP
ENUMX
BFD_RELOC_XTENSA_SLOT13_OP
ENUMX
BFD_RELOC_XTENSA_SLOT14_OP
ENUMDOC
Generic Xtensa relocations for instruction operands. Only the slot
number is encoded in the relocation. The relocation applies to the
last PC-relative immediate operand, or if there are no PC-relative
immediates, to the last immediate operand.
ENUM
BFD_RELOC_XTENSA_SLOT0_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT1_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT2_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT3_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT4_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT5_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT6_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT7_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT8_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT9_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT10_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT11_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT12_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT13_ALT
ENUMX
BFD_RELOC_XTENSA_SLOT14_ALT
ENUMDOC
Alternate Xtensa relocations. Only the slot is encoded in the
relocation. The meaning of these relocations is opcode-specific.
ENUM
BFD_RELOC_XTENSA_OP0
ENUMX
@ -3988,9 +4342,8 @@ ENUMX
ENUMX
BFD_RELOC_XTENSA_OP2
ENUMDOC
Generic Xtensa relocations. Only the operand number is encoded
in the relocation. The details are determined by extracting the
instruction opcode.
Xtensa relocations for backward compatibility. These have all been
replaced by BFD_RELOC_XTENSA_SLOT0_OP.
ENUM
BFD_RELOC_XTENSA_ASM_EXPAND
ENUMDOC
@ -4107,8 +4460,7 @@ SYNOPSIS
DESCRIPTION
Provides default handling for relaxing for back ends which
don't do relaxing -- i.e., does nothing except make sure that the
final size of the section is set.
don't do relaxing.
*/
bfd_boolean
@ -4117,11 +4469,6 @@ bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
bfd_boolean *again)
{
/* We're not relaxing the section, so just copy the size info if it's
zero. Someone else, like bfd_merge_sections, might have set it, so
don't overwrite a non-zero value. */
if (section->_cooked_size == 0)
section->_cooked_size = section->_raw_size;
*again = FALSE;
return TRUE;
}
@ -4200,6 +4547,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
bfd_size_type sz;
if (reloc_size < 0)
goto error_return;
@ -4209,22 +4557,10 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
goto error_return;
/* Read in the section. */
if (!bfd_get_section_contents (input_bfd,
input_section,
data,
0,
input_section->_raw_size))
sz = input_section->rawsize ? input_section->rawsize : input_section->size;
if (!bfd_get_section_contents (input_bfd, input_section, data, 0, sz))
goto error_return;
/* Don't set input_section->_cooked_size here. The caller has set
_cooked_size or called bfd_relax_section, which sets _cooked_size.
Despite using this generic relocation function, some targets perform
target-specific relaxation or string merging, which happens before
this function is called. We do not want to clobber the _cooked_size
they computed. */
input_section->reloc_done = TRUE;
reloc_count = bfd_canonicalize_reloc (input_bfd,
input_section,
reloc_vector,
@ -4275,7 +4611,8 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
break;
case bfd_reloc_overflow:
if (!((*link_info->callbacks->reloc_overflow)
(link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
(link_info, NULL,
bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
(*parent)->howto->name, (*parent)->addend,
input_bfd, input_section, (*parent)->address)))
goto error_return;

View File

@ -1,6 +1,6 @@
/* Generic target-file-type support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004
2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -25,6 +25,14 @@
#include "libbfd.h"
#include "fnmatch.h"
/*
It's okay to see some:
#if 0
directives in this source file, as targets.c uses them to exclude
certain BFD vectors. This comment is specially formatted to catch
users who grep for ^#if 0, so please keep it this way!
*/
/*
SECTION
Targets
@ -201,7 +209,7 @@ DESCRIPTION
. unsigned short ar_max_namelen;
.
. {* Entries for byte swapping for data. These are different from the
. other entry points, since they don't take a BFD asthe first argument.
. other entry points, since they don't take a BFD as the first argument.
. Certain other handlers could do the same. *}
. bfd_uint64_t (*bfd_getx64) (const void *);
. bfd_int64_t (*bfd_getx_signed_64) (const void *);
@ -265,6 +273,7 @@ BFD_JUMP_TABLE macros.
. NAME##_bfd_merge_private_bfd_data, \
. NAME##_bfd_copy_private_section_data, \
. NAME##_bfd_copy_private_symbol_data, \
. NAME##_bfd_copy_private_header_data, \
. NAME##_bfd_set_private_flags, \
. NAME##_bfd_print_private_bfd_data
.
@ -282,6 +291,10 @@ BFD_JUMP_TABLE macros.
. to another. *}
. bfd_boolean (*_bfd_copy_private_symbol_data)
. (bfd *, asymbol *, bfd *, asymbol *);
. {* Called to copy BFD private header data from one object file
. to another. *}
. bfd_boolean (*_bfd_copy_private_header_data)
. (bfd *, bfd *);
. {* Called to set private backend flags. *}
. bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
.
@ -333,6 +346,7 @@ BFD_JUMP_TABLE macros.
. NAME##_print_symbol, \
. NAME##_get_symbol_info, \
. NAME##_bfd_is_local_label_name, \
. NAME##_bfd_is_target_special_symbol, \
. NAME##_get_lineno, \
. NAME##_find_nearest_line, \
. NAME##_bfd_make_debug_symbol, \
@ -351,7 +365,7 @@ BFD_JUMP_TABLE macros.
. (bfd *, struct bfd_symbol *, symbol_info *);
.#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
. bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
.
. bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
. alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
. bfd_boolean (*_bfd_find_nearest_line)
. (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
@ -406,7 +420,9 @@ BFD_JUMP_TABLE macros.
. NAME##_bfd_link_split_section, \
. NAME##_bfd_gc_sections, \
. NAME##_bfd_merge_sections, \
. NAME##_bfd_discard_group
. NAME##_bfd_is_group_section, \
. NAME##_bfd_discard_group, \
. NAME##_section_already_linked \
.
. int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
. bfd_byte * (*_bfd_get_relocated_section_contents)
@ -443,13 +459,21 @@ BFD_JUMP_TABLE macros.
. {* Attempt to merge SEC_MERGE sections. *}
. bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
.
. {* Is this section a member of a group? *}
. bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
.
. {* Discard members of a group. *}
. bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
.
. {* Check if SEC has been already linked during a reloceatable or
. final link. *}
. void (*_section_already_linked) (bfd *, struct bfd_section *);
.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
. NAME##_get_dynamic_symtab_upper_bound, \
. NAME##_canonicalize_dynamic_symtab, \
. NAME##_get_synthetic_symtab, \
. NAME##_get_dynamic_reloc_upper_bound, \
. NAME##_canonicalize_dynamic_reloc
.
@ -458,6 +482,10 @@ BFD_JUMP_TABLE macros.
. {* Read in the dynamic symbols. *}
. long (*_bfd_canonicalize_dynamic_symtab)
. (bfd *, struct bfd_symbol **);
. {* Create synthetized symbols. *}
. long (*_bfd_get_synthetic_symtab)
. (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
. struct bfd_symbol **);
. {* Get the amount of memory required to hold the dynamic relocs. *}
. long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
. {* Read in the dynamic relocs. *}
@ -514,10 +542,13 @@ extern const bfd_target bfd_efi_app_ia64_vec;
extern const bfd_target bfd_elf32_avr_vec;
extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigarc_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
extern const bfd_target bfd_elf32_bigarm_symbian_vec;
extern const bfd_target bfd_elf32_bigarm_vxworks_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_cr16c_vec;
extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_crx_vec;
extern const bfd_target bfd_elf32_d10v_vec;
extern const bfd_target bfd_elf32_d30v_vec;
extern const bfd_target bfd_elf32_dlx_big_vec;
@ -540,8 +571,9 @@ extern const bfd_target bfd_elf32_ip2k_vec;
extern const bfd_target bfd_elf32_iq2000_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
extern const bfd_target bfd_elf32_littlearm_symbian_vec;
extern const bfd_target bfd_elf32_littlearm_vxworks_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m32rle_vec;
@ -576,6 +608,7 @@ extern const bfd_target bfd_elf32_sh64nbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_shl_symbian_vec;
extern const bfd_target bfd_elf32_shlin_vec;
extern const bfd_target bfd_elf32_shlnbsd_vec;
extern const bfd_target bfd_elf32_shnbsd_vec;
@ -660,9 +693,11 @@ extern const bfd_target m68knetbsd_vec;
extern const bfd_target m68ksysvcoff_vec;
extern const bfd_target m88kbcs_vec;
extern const bfd_target m88kmach3_vec;
extern const bfd_target m88kopenbsd_vec;
extern const bfd_target mach_o_be_vec;
extern const bfd_target mach_o_le_vec;
extern const bfd_target mach_o_fat_vec;
extern const bfd_target maxqcoff_vec;
extern const bfd_target mcore_pe_big_vec;
extern const bfd_target mcore_pe_little_vec;
extern const bfd_target mcore_pei_big_vec;
@ -806,10 +841,13 @@ static const bfd_target * const _bfd_target_vector[] = {
the file even if we don't recognize the machine type. */
&bfd_elf32_big_generic_vec,
&bfd_elf32_bigarc_vec,
&bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigarm_vec,
&bfd_elf32_bigarm_symbian_vec,
&bfd_elf32_bigarm_vxworks_vec,
&bfd_elf32_bigmips_vec,
&bfd_elf32_cr16c_vec,
&bfd_elf32_cris_vec,
&bfd_elf32_crx_vec,
&bfd_elf32_d10v_vec,
&bfd_elf32_d30v_vec,
&bfd_elf32_dlx_big_vec,
@ -834,8 +872,9 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_iq2000_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlearm_vec,
&bfd_elf32_littlearm_symbian_vec,
&bfd_elf32_littlearm_vxworks_vec,
&bfd_elf32_littlemips_vec,
&bfd_elf32_m32r_vec,
&bfd_elf32_m32rle_vec,
@ -866,6 +905,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
&bfd_elf32_shl_vec,
&bfd_elf32_shl_symbian_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
&bfd_elf32_shnbsd_vec,
@ -984,9 +1024,11 @@ static const bfd_target * const _bfd_target_vector[] = {
&m68ksysvcoff_vec,
&m88kbcs_vec,
&m88kmach3_vec,
&m88kopenbsd_vec,
&mach_o_be_vec,
&mach_o_le_vec,
&mach_o_fat_vec,
&maxqcoff_vec,
&mcore_pe_big_vec,
&mcore_pe_little_vec,
&mcore_pei_big_vec,

View File

@ -38,6 +38,7 @@ NetBSD_DISABLED_config.text:
rm -f asconfig.texi
rm -f config.texi
echo '@set VERSION $(VERSION)' > config.texi
echo "@set UPDATED `date "+%B %Y"`" >> config.texi
binutils_TEXI = $(srcdir)/binutils.texi

View File

@ -75,6 +75,7 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
@ -89,6 +90,7 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNATBIND = @GNATBIND@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
HDEFINES = @HDEFINES@
@ -99,6 +101,7 @@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
LEX = @LEX@
LIBTOOL = @LIBTOOL@
LN = @LN@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@ -120,7 +123,15 @@ WARN_CFLAGS = @WARN_CFLAGS@
YACC = @YACC@
bfdincludedir = @bfdincludedir@
bfdlibdir = @bfdlibdir@
build_noncanonical = @build_noncanonical@
build_subdir = @build_subdir@
do_compare = @do_compare@
host_noncanonical = @host_noncanonical@
host_subdir = @host_subdir@
l = @l@
ncn_cv_ = @ncn_cv_@
target_noncanonical = @target_noncanonical@
target_subdir = @target_subdir@
AUTOMAKE_OPTIONS = cygnus
@ -438,6 +449,7 @@ config.texi: Makefile
NetBSD_DISABLED_config.text:
rm -f config.texi
echo '@set VERSION $(VERSION)' > config.texi
echo "@set UPDATED `date "+%B %Y"`" >> config.texi
binutils.dvi: $(binutils_TEXI) config.texi

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "ADDR2LINE 1"
.TH ADDR2LINE 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH ADDR2LINE 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
addr2line \- convert addresses into file names and line numbers.
.SH "SYNOPSIS"
@ -219,8 +219,8 @@ Display only the base of each file name.
Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "DLLTOOL 1"
.TH DLLTOOL 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH DLLTOOL 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
dlltool \- Create files needed to build and use DLLs.
.SH "SYNOPSIS"
@ -145,6 +145,7 @@ dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR]
[\fB\-D\fR|\fB\-\-dllname\fR \fIname\fR] [\fB\-m\fR|\fB\-\-machine\fR \fImachine\fR]
[\fB\-a\fR|\fB\-\-add\-indirect\fR] [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-k\fR|\fB\-\-kill\-at\fR]
[\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR]
[\fB\-p\fR|\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR]
[\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] [\fB\-i\fR|\fB\-\-interwork\fR]
[\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR]
[\fB\-v\fR|\fB\-\-verbose\fR]
@ -165,13 +166,13 @@ When creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is nece
to have three other files. \fBdlltool\fR can help with the creation of
these files.
.PP
The first file is a \fB.def\fR file which specifies which functions are
The first file is a \fI.def\fR file which specifies which functions are
exported from the \s-1DLL\s0, which functions the \s-1DLL\s0 imports, and so on. This
is a text file and can be created by hand, or \fBdlltool\fR can be used
to create it using the \fB\-z\fR option. In this case \fBdlltool\fR
will scan the object files specified on its command line looking for
those functions which have been specially marked as being exported and
put entries for them in the .def file it creates.
put entries for them in the \fI.def\fR file it creates.
.PP
In order to mark a function as being exported from a \s-1DLL\s0, it needs to
have an \fB\-export:<name_of_function>\fR entry in the \fB.drectve\fR
@ -180,7 +181,7 @@ section of the object file. This can be done in C by using the
.PP
.Vb 2
\& asm (".section .drectve");
\& asm (".ascii \e"-export:my_func\e"");
\& asm (".ascii \e"\-export:my_func\e"");
.Ve
.PP
.Vb 1
@ -191,12 +192,12 @@ The second file needed for \s-1DLL\s0 creation is an exports file. This file
is linked with the object files that make up the body of the \s-1DLL\s0 and it
handles the interface between the \s-1DLL\s0 and the outside world. This is a
binary file and it can be created by giving the \fB\-e\fR option to
\&\fBdlltool\fR when it is creating or reading in a .def file.
\&\fBdlltool\fR when it is creating or reading in a \fI.def\fR file.
.PP
The third file needed for \s-1DLL\s0 creation is the library file that programs
will link with in order to access the functions in the \s-1DLL\s0. This file
can be created by giving the \fB\-l\fR option to dlltool when it
is creating or reading in a .def file.
is creating or reading in a \fI.def\fR file.
.PP
\&\fBdlltool\fR builds the library file by hand, but it builds the
exports file by creating temporary files containing assembler statements
@ -213,10 +214,10 @@ also creating a program (from an object file called \fBprogram.o\fR)
that uses that \s-1DLL:\s0
.PP
.Vb 4
\& gcc -c dll.c
\& dlltool -e exports.o -l dll.lib dll.o
\& gcc dll.o exports.o -o dll.dll
\& gcc program.o dll.lib -o program
\& gcc \-c dll.c
\& dlltool \-e exports.o \-l dll.lib dll.o
\& gcc dll.o exports.o \-o dll.dll
\& gcc program.o dll.lib \-o program
.Ve
.SH "OPTIONS"
.IX Header "OPTIONS"
@ -227,7 +228,7 @@ The command line options have the following meanings:
.IP "\fB\-\-input\-def\fR \fIfilename\fR" 4
.IX Item "--input-def filename"
.PD
Specifies the name of a .def file to be read in and processed.
Specifies the name of a \fI.def\fR file to be read in and processed.
.IP "\fB\-b\fR \fIfilename\fR" 4
.IX Item "-b filename"
.PD 0
@ -250,7 +251,7 @@ Specifies the name of the export file to be created by dlltool.
.IP "\fB\-\-output\-def\fR \fIfilename\fR" 4
.IX Item "--output-def filename"
.PD
Specifies the name of the .def file to be created by dlltool.
Specifies the name of the \fI.def\fR file to be created by dlltool.
.IP "\fB\-l\fR \fIfilename\fR" 4
.IX Item "-l filename"
.PD 0
@ -267,7 +268,7 @@ option. You may add to the list of symbols to not export by using the
\&\fB\-\-exclude\-symbols\fR option.
.IP "\fB\-\-no\-export\-all\-symbols\fR" 4
.IX Item "--no-export-all-symbols"
Only export symbols explicitly listed in an input .def file or in
Only export symbols explicitly listed in an input \fI.def\fR file or in
\&\fB.drectve\fR sections in the input object files. This is the default
behaviour. The \fB.drectve\fR sections are created by \fBdllexport\fR
attributes in the source code.
@ -312,10 +313,10 @@ double quotes.
.IP "\fB\-\-dll\-name\fR \fIname\fR" 4
.IX Item "--dll-name name"
.PD
Specifies the name to be stored in the .def file as the name of the \s-1DLL\s0
when the \fB\-e\fR option is used. If this option is not present, then
the filename given to the \fB\-e\fR option will be used as the name of
the \s-1DLL\s0.
Specifies the name to be stored in the \fI.def\fR file as the name of
the \s-1DLL\s0 when the \fB\-e\fR option is used. If this option is not
present, then the filename given to the \fB\-e\fR option will be
used as the name of the \s-1DLL\s0.
.IP "\fB\-m\fR \fImachine\fR" 4
.IX Item "-m machine"
.PD 0
@ -364,6 +365,15 @@ function in a \s-1DLL\s0, other than by name.
Specifies that when \fBdlltool\fR is creating the exports file it
should add aliases for stdcall symbols without \fB@ <number>\fR
in addition to the symbols with \fB@ <number>\fR.
.IP "\fB\-p\fR" 4
.IX Item "-p"
.PD 0
.IP "\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR" 4
.IX Item "--ext-prefix-alias prefix"
.PD
Causes \fBdlltool\fR to create external aliases for all \s-1DLL\s0
imports with the specified prefix. The aliases are created for both
external and import symbols with no leading underscore.
.IP "\fB\-x\fR" 4
.IX Item "-x"
.PD 0
@ -433,11 +443,11 @@ Displays a list of command line options and then exits.
Displays dlltool's version number and then exits.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
the Info entries for \fIbinutils\fR.
The Info pages for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "NLMCONV 1"
.TH NLMCONV 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH NLMCONV 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
nlmconv \- converts object code into an NLM.
.SH "SYNOPSIS"
@ -219,8 +219,8 @@ Prints the version number for \fBnlmconv\fR.
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "NM 1"
.TH NM 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH NM 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
nm \- list symbols from object files
.SH "SYNOPSIS"
@ -136,7 +136,7 @@ nm \- list symbols from object files
nm [\fB\-a\fR|\fB\-\-debug\-syms\fR] [\fB\-g\fR|\fB\-\-extern\-only\fR]
[\fB\-B\fR] [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] [\fB\-D\fR|\fB\-\-dynamic\fR]
[\fB\-S\fR|\fB\-\-print\-size\fR] [\fB\-s\fR|\fB\-\-print\-armap\fR]
[\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR]
[\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR][\fB\-\-special\-syms\fR]
[\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] [\fB\-p\fR|\fB\-\-no\-sort\fR]
[\fB\-r\fR|\fB\-\-reverse\-sort\fR] [\fB\-\-size\-sort\fR] [\fB\-u\fR|\fB\-\-undefined\-only\fR]
[\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] [\fB\-P\fR|\fB\-\-portability\fR]
@ -223,7 +223,9 @@ The symbol is a weak symbol that has not been specifically tagged as a
weak object symbol. When a weak defined symbol is linked with a normal
defined symbol, the normal defined symbol is used with no error.
When a weak undefined symbol is linked and the symbol is not defined,
the value of the weak symbol becomes zero with no error.
the value of the symbol is determined in a system-specific manner without
error. On some systems, uppercase indicates that a default value has been
specified.
.ie n .IP """\-""" 4
.el .IP "\f(CW\-\fR" 4
.IX Item "-"
@ -373,6 +375,14 @@ the value of the symbol and the value of the symbol with the next higher
value. If the \f(CW\*(C`bsd\*(C'\fR output format is used the size of the symbol
is printed, rather than the value, and \fB\-S\fR must be used in order
both size and value to be printed.
.IP "\fB\-\-special\-syms\fR" 4
.IX Item "--special-syms"
Display symbols which have a target-specific special meaning. These
symbols are usually used by the target for some special processing and
are not normally helpful when included included in the normal symbol
lists. For example for \s-1ARM\s0 targets this option would skip the mapping
symbols used to mark transistions between \s-1ARM\s0 code, \s-1THUMB\s0 code and
data.
.IP "\fB\-t\fR \fIradix\fR" 4
.IX Item "-t radix"
.PD 0
@ -415,8 +425,8 @@ Show a summary of the options to \fBnm\fR and exit.
\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "OBJCOPY 1"
.TH OBJCOPY 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH OBJCOPY 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
objcopy \- copy and translate object files
.SH "SYNOPSIS"
@ -141,6 +141,7 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
[\fB\-g\fR|\fB\-\-strip\-debug\fR]
[\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
[\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
[\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR]
[\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR]
[\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR]
[\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR]
@ -172,6 +173,7 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
[\fB\-\-weaken\fR]
[\fB\-\-keep\-symbols=\fR\fIfilename\fR]
[\fB\-\-strip\-symbols=\fR\fIfilename\fR]
[\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR]
[\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR]
[\fB\-\-localize\-symbols=\fR\fIfilename\fR]
[\fB\-\-weaken\-symbols=\fR\fIfilename\fR]
@ -326,6 +328,10 @@ be given more than once.
.PD
Do not copy symbol \fIsymbolname\fR from the source file. This option
may be given more than once.
.IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4
.IX Item "--strip-unneeded-symbol=symbolname"
Do not copy symbol \fIsymbolname\fR from the source file unless it is needed
by a relocation. This option may be given more than once.
.IP "\fB\-G\fR \fIsymbolname\fR" 4
.IX Item "-G symbolname"
.PD 0
@ -364,7 +370,7 @@ point (!) then the sense of the switch is reversed for that symbol.
For example:
.Sp
.Vb 1
\& -w -W !foo -W fo*
\& \-w \-W !foo \-W fo*
.Ve
.Sp
would cause objcopy to weaken all symbols that start with ``fo''
@ -540,8 +546,8 @@ you wanted instead to create a section called .rodata containing binary
data you could use the following command line to achieve it:
.Sp
.Vb 3
\& objcopy -I binary -O <output_format> -B <architecture> \e
\& --rename-section .data=.rodata,alloc,load,readonly,data,contents \e
\& objcopy \-I binary \-O <output_format> \-B <architecture> \e
\& \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e
\& <input_binary_file> <output_object_file>
.Ve
.IP "\fB\-\-change\-leading\-char\fR" 4
@ -603,6 +609,12 @@ Apply \fB\-\-strip\-symbol\fR option to each symbol listed in the file
\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character.
This option may be given more than once.
.IP "\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR" 4
.IX Item "--strip-unneeded-symbols=filename"
Apply \fB\-\-strip\-unneeded\-symbol\fR option to each symbol listed in
the file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
symbol name per line. Line comments may be introduced by the hash
character. This option may be given more than once.
.IP "\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR" 4
.IX Item "--keep-global-symbols=filename"
Apply \fB\-\-keep\-global\-symbol\fR option to each symbol listed in the
@ -737,8 +749,8 @@ Display a list showing all architectures and object formats available.
\&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "OBJDUMP 1"
.TH OBJDUMP 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH OBJDUMP 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
objdump \- display information from object files.
.SH "SYNOPSIS"
@ -165,6 +165,7 @@ objdump [\fB\-a\fR|\fB\-\-archive\-headers\fR]
[\fB\-\-prefix\-addresses\fR]
[\fB\-\-[no\-]show\-raw\-insn\fR]
[\fB\-\-adjust\-vma=\fR\fIoffset\fR]
[\fB\-\-special\-syms\fR]
[\fB\-V\fR|\fB\-\-version\fR]
[\fB\-H\fR|\fB\-\-help\fR]
\fIobjfile\fR...
@ -214,7 +215,7 @@ automatically recognize many formats.
For example,
.Sp
.Vb 1
\& objdump -b oasys -m vax -h fu.o
\& objdump \-b oasys \-m vax \-h fu.o
.Ve
.Sp
displays summary information from the section headers (\fB\-h\fR) of
@ -403,11 +404,17 @@ For \s-1PPC\s0, \fBbooke\fR, \fBbooke32\fR and \fBbooke64\fR select
disassembly of BookE instructions. \fB32\fR and \fB64\fR select
PowerPC and PowerPC64 disassembly, respectively.
.Sp
For \s-1MIPS\s0, this option controls the printing of register names in
disassembled instructions. Multiple selections from the
following may be specified as a comma separated string, and invalid
options are ignored:
For \s-1MIPS\s0, this option controls the printing of instruction mneumonic
names and register names in disassembled instructions. Multiple
selections from the following may be specified as a comma separated
string, and invalid options are ignored:
.RS 4
.ie n .IP """no\-aliases""" 4
.el .IP "\f(CWno\-aliases\fR" 4
.IX Item "no-aliases"
Print the 'raw' instruction mneumonic instead of some pseudo
instruction mneumonic. I.E. print 'daddu' or 'or' instead of 'move',
\&'sll' instead of 'nop', etc.
.ie n .IP """gpr\-names=\f(CI\s-1ABI\s0\f(CW""" 4
.el .IP "\f(CWgpr\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
.IX Item "gpr-names=ABI"
@ -543,6 +550,11 @@ Print the dynamic symbol table entries of the file. This is only
meaningful for dynamic objects, such as certain types of shared
libraries. This is similar to the information provided by the \fBnm\fR
program when given the \fB\-D\fR (\fB\-\-dynamic\fR) option.
.IP "\fB\-\-special\-syms\fR" 4
.IX Item "--special-syms"
When displaying symbols include those which the target considers to be
special in some way and which would not normally be of interest to the
user.
.IP "\fB\-V\fR" 4
.IX Item "-V"
.PD 0
@ -558,7 +570,7 @@ Print the version number of \fBobjdump\fR and exit.
.PD
Display all available header information, including the symbol table and
relocation entries. Using \fB\-x\fR is equivalent to specifying all of
\&\fB\-a \-f \-h \-r \-t\fR.
\&\fB\-a \-f \-h \-p \-r \-t\fR.
.IP "\fB\-w\fR" 4
.IX Item "-w"
.PD 0
@ -581,8 +593,8 @@ any other data.
\&\fInm\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "RANLIB 1"
.TH RANLIB 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH RANLIB 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
ranlib \- generate index to archive.
.SH "SYNOPSIS"
@ -164,8 +164,8 @@ Show the version number of \fBranlib\fR.
\&\fIar\fR\|(1), \fInm\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "READELF 1"
.TH READELF 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH READELF 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
readelf \- Displays information about ELF files.
.SH "SYNOPSIS"
@ -137,6 +137,7 @@ readelf [\fB\-a\fR|\fB\-\-all\fR]
[\fB\-h\fR|\fB\-\-file\-header\fR]
[\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
[\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
[\fB\-g\fR|\fB\-\-section\-groups\fR]
[\fB\-e\fR|\fB\-\-headers\fR]
[\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
[\fB\-n\fR|\fB\-\-notes\fR]
@ -147,8 +148,8 @@ readelf [\fB\-a\fR|\fB\-\-all\fR]
[\fB\-A\fR|\fB\-\-arch\-specific\fR]
[\fB\-D\fR|\fB\-\-use\-dynamic\fR]
[\fB\-x\fR <number>|\fB\-\-hex\-dump=\fR<number>]
[\fB\-w[liaprmfFso]\fR|
\fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]]
[\fB\-w[liaprmfFsoR]\fR|
\fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]]
[\fB\-I\fR|\fB\-histogram\fR]
[\fB\-v\fR|\fB\-\-version\fR]
[\fB\-W\fR|\fB\-\-wide\fR]
@ -209,6 +210,14 @@ has any.
.PD
Displays the information contained in the file's section headers, if it
has any.
.IP "\fB\-g\fR" 4
.IX Item "-g"
.PD 0
.IP "\fB\-\-section\-groups\fR" 4
.IX Item "--section-groups"
.PD
Displays the information contained in the file's section groups, if it
has any.
.IP "\fB\-s\fR" 4
.IX Item "-s"
.PD 0
@ -231,7 +240,7 @@ Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR.
.IP "\fB\-\-notes\fR" 4
.IX Item "--notes"
.PD
Displays the contents of the \s-1NOTE\s0 segment, if it exists.
Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
.IP "\fB\-r\fR" 4
.IX Item "-r"
.PD 0
@ -247,14 +256,6 @@ Displays the contents of the file's relocation section, if it has one.
.PD
Displays the contents of the file's unwind section, if it has one. Only
the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
.IP "\fB\-u\fR" 4
.IX Item "-u"
.PD 0
.IP "\fB\-\-unwind\fR" 4
.IX Item "--unwind"
.PD
Displays the contents of the file's unwind section, if it has one. Only
the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
.IP "\fB\-d\fR" 4
.IX Item "-d"
.PD 0
@ -294,11 +295,11 @@ symbols section.
.IX Item "--hex-dump=<number>"
.PD
Displays the contents of the indicated section as a hexadecimal dump.
.IP "\fB\-w[liaprmfFso]\fR" 4
.IX Item "-w[liaprmfFso]"
.IP "\fB\-w[liaprmfFsoR]\fR" 4
.IX Item "-w[liaprmfFsoR]"
.PD 0
.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]\fR" 4
.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]"
.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]\fR" 4
.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]"
.PD
Displays the contents of the debug sections in the file, if any are
present. If one of the optional letters or words follows the switch
@ -341,8 +342,8 @@ Display the command line options understood by \fBreadelf\fR.
\&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "SIZE 1"
.TH SIZE 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH SIZE 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
size \- list section sizes and total size.
.SH "SYNOPSIS"
@ -169,7 +169,7 @@ Here is an example of the Berkeley (default) format of output from
\&\fBsize\fR:
.Sp
.Vb 4
\& $ size --format=Berkeley ranlib size
\& $ size \-\-format=Berkeley ranlib size
\& text data bss dec hex filename
\& 294880 81920 11592 388392 5ed28 ranlib
\& 294880 81920 11888 388688 5ee50 size
@ -178,7 +178,7 @@ Here is an example of the Berkeley (default) format of output from
This is the same data, but displayed closer to System V conventions:
.Sp
.Vb 7
\& $ size --format=SysV ranlib size
\& $ size \-\-format=SysV ranlib size
\& ranlib :
\& section size addr
\& .text 294880 8192
@ -239,8 +239,8 @@ Display the version number of \fBsize\fR.
\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "STRINGS 1"
.TH STRINGS 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH STRINGS 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
strings \- print the strings of printable characters in files.
.SH "SYNOPSIS"
@ -225,8 +225,8 @@ Print the program version number on the standard output and exit.
and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "STRIP 1"
.TH STRIP 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH STRIP 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
strip \- Discard symbols from object files.
.SH "SYNOPSIS"
@ -260,7 +260,7 @@ point (!) then the sense of the switch is reversed for that symbol.
For example:
.Sp
.Vb 1
\& -w -K !foo -K fo*
\& \-w \-K !foo \-K fo*
.Ve
.Sp
would cause strip to only keep symbols that start with the letters
@ -353,8 +353,8 @@ archives, \fBstrip \-v\fR lists all members of the archive.
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -128,7 +128,7 @@
.\" ========================================================================
.\"
.IX Title "WINDRES 1"
.TH WINDRES 1 "2004-12-08" "binutils-2.15" "GNU Development Tools"
.TH WINDRES 1 "2005-04-20" "binutils-2.15.97" "GNU Development Tools"
.SH "NAME"
windres \- manipulate Windows resources.
.SH "SYNOPSIS"
@ -319,8 +319,8 @@ this will turn on parser debugging.
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1

View File

@ -1,42 +0,0 @@
/* Resources for GNU binutils. */
#include "SysTypes.r"
/* Version resources. */
resource 'vers' (1) {
0,
0,
0,
0,
verUs,
VERSION_STRING,
VERSION_STRING " (C) 1986-95 FSF, Inc."
};
resource 'vers' (2, purgeable) {
0,
0,
0,
0,
verUs,
VERSION_STRING,
"binutils " VERSION_STRING " for MPW"
};
#ifdef WANT_CFRG
#include "CodeFragmentTypes.r"
resource 'cfrg' (0) {
{
kPowerPC,
kFullLib,
kNoVersionNum, kNoVersionNum,
0,0,
kIsApp, kOnDiskFlat, kZeroOffset, kWholeFork,
PROG_NAME
}
};
#endif /* WANT_CFRG */

View File

@ -1,27 +0,0 @@
# Configuration fragment for binutils.
Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
# (should canonicalize arch name) */
Set archname ARCH_{target_arch}
Set underscore 0
If "{target_canonical}" =~ /sh-hitachi-hms/
Set underscore 1
End If
Echo '# From mpw-config.in' > "{o}"mk.tmp
Echo "ARCHDEFS = -d" {archname} >> "{o}"mk.tmp
Echo "UNDERSCORE = " {underscore} >> "{o}"mk.tmp
Echo "BUILD_NLMCONV = " >> "{o}"mk.tmp
Echo "BUILD_SRCONV = " >> "{o}"mk.tmp
Echo "SYSINFO_PROG = " >> "{o}"mk.tmp
Echo "BUILD_DLLTOOL = " >> "{o}"mk.tmp
Echo '# End from mpw-config.in' >> "{o}"mk.tmp
Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
Echo '#include "mpw.h"' >> "{o}"config.new
MoveIfChange "{o}"config.new "{o}"config.h

View File

@ -1,115 +0,0 @@
# Sed commands to finish translating the binutils Unix makefile into MPW syntax.
# Add a rule.
/^#### .*/a\
\
"{o}"underscore.c.o \\Option-f "{o}"underscore.c\
# Comment out any alias settings.
/^host_alias =/s/^/#/
/^target_alias =/s/^/#/
# Whack out unused host define bits.
/HDEFINES/s/@HDEFINES@//
# Don't build specialized tools.
/BUILD_NLMCONV/s/@BUILD_NLMCONV@//
/BUILD_SRCONV/s/@BUILD_SRCONV@//
/BUILD_DLLTOOL/s/@BUILD_DLLTOOL@//
/UNDERSCORE/s/@UNDERSCORE@/{UNDERSCORE}/
# Don't need this.
/@HLDFLAGS@/s/@HLDFLAGS@//
# Point at the libraries directly.
/@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
/@OPCODES@/s/@OPCODES@/::opcodes:libopcodes.o/
# Whack out target makefile fragment.
/target_makefile_fragment/s/target_makefile_fragment@//
# Fix and add to the include paths.
/^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
/BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
/INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
# Use byacc instead of bison (for now anyway).
/BISON/s/^BISON =.*$/BISON = byacc/
#/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
# Embed the version in symbolic doublequotes that will expand to
# the right thing for each compiler.
/VERSION/s/'"{VERSION}"'/{dq}{VERSION}{dq}/
# '+' is a special char to MPW, don't use it ever.
/c++filt/s/c++filt/cplusfilt/
# All of the binutils use the same Rez file, change names to refer to it.
/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/
/{[A-Z]*_PROG}\.r/s/{[A-Z]*_PROG}\.r/mac-binutils.r/
# There are auto-generated references to BFD .h files that are not
# in the objdir (like bfd.h) but are in the source dir.
/::bfd:lib/s/::bfd:lib\([a-z]*\)\.h/{BFDDIR}:lib\1.h/g
# Fix the locations of generated files.
/config/s/"{s}"config\.h/"{o}"config.h/g
/config/s/^config\.h/"{o}"config\.h/
/underscore/s/"{s}"underscore\.c/"{o}"underscore.c/g
/underscore/s/^underscore\.c/"{o}"underscore\.c/
# Fix paths to generated source files.
/lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
/lex.yy.c/s/^lex\.yy\.c/"{o}"lex.yy.c/
/arlex.c/s/"{s}"arlex\.c/"{o}"arlex.c/g
/arlex.c/s/^arlex\.c/"{o}"arlex.c/
/y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
/y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
/arparse.c/s/"{s}"arparse\.c/"{o}"arparse.c/g
/arparse.c/s/^arparse\.c/"{o}"arparse.c/
/y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
/y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
/arparse.h/s/"{s}"arparse\.h/"{o}"arparse.h/g
/arparse.h/s/^arparse\.h/"{o}"arparse.h/
/"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
# The generated lexer may include an ifdef for older Mac compilers that
# needs to work with newer compilers also.
/lex.yy.c/s/Rename -y \([^ ]*\) \([^ ]*\)$/sed -e 's,ifdef macintosh,if defined(macintosh) || defined(__MWERKS__),' \1 > \2/
# Fix an over-eagerness.
/echo.*WARNING.*This file/s/'.*'/' '/
# Add a "stamps" target.
$a\
stamps \\Option-f stamp-under\
/^install \\Option-f /,/^$/c\
install \\Option-f all install-only\
\
install-only \\Option-f\
NewFolderRecursive "{bindir}"\
# Need to copy all the tools\
For prog in {PROGS}\
Set progname `echo {prog} | sed -e 's/.new//'`\
Duplicate -y :{prog} "{bindir}"{progname}\
End For\
/true/s/ ; @true$//
# dot files are trouble, remove them and their actions.
/^\.dep/,/^$/d
# Remove un-useful targets.
/^Makefile \\Option-f/,/^$/d
/^"{o}"config.h \\Option-f/,/^$/d
/^config.status \\Option-f/,/^$/d
# Don't try to make the demangler's man page, it's useless.
/^{DEMANGLER_PROG}\.1 \\Option-f/,/^$/d
# Don't depend on it either.
/{DEMANGLER_PROG}/s/ {DEMANGLER_PROG}\.1//

View File

@ -1,6 +1,6 @@
/* objcopy.c -- copy object file from input to output, optionally massaging it.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004
2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@ -193,6 +193,7 @@ static bfd_boolean wildcard = FALSE;
/* List of symbols to strip, keep, localize, keep-global, weaken,
or redefine. */
static struct symlist *strip_specific_list = NULL;
static struct symlist *strip_unneeded_list = NULL;
static struct symlist *keep_specific_list = NULL;
static struct symlist *localize_specific_list = NULL;
static struct symlist *keepglobal_specific_list = NULL;
@ -232,6 +233,8 @@ enum command_line_switch
OPTION_SREC_LEN,
OPTION_SREC_FORCES3,
OPTION_STRIP_SYMBOLS,
OPTION_STRIP_UNNEEDED_SYMBOL,
OPTION_STRIP_UNNEEDED_SYMBOLS,
OPTION_KEEP_SYMBOLS,
OPTION_LOCALIZE_SYMBOLS,
OPTION_KEEPGLOBAL_SYMBOLS,
@ -341,6 +344,8 @@ static struct option copy_options[] =
{"strip-all", no_argument, 0, 'S'},
{"strip-debug", no_argument, 0, 'g'},
{"strip-unneeded", no_argument, 0, OPTION_STRIP_UNNEEDED},
{"strip-unneeded-symbol", required_argument, 0, OPTION_STRIP_UNNEEDED_SYMBOL},
{"strip-unneeded-symbols", required_argument, 0, OPTION_STRIP_UNNEEDED_SYMBOLS},
{"strip-symbol", required_argument, 0, 'N'},
{"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS},
{"target", required_argument, 0, 'F'},
@ -378,6 +383,7 @@ extern unsigned long bfd_external_machine;
/* Forward declarations. */
static void setup_section (bfd *, asection *, void *);
static void setup_bfd_headers (bfd *, bfd *);
static void copy_section (bfd *, asection *, void *);
static void get_sections (bfd *, asection *, void *);
static int compare_section_lma (const void *, const void *);
@ -405,13 +411,16 @@ copy_usage (FILE *stream, int exit_status)
-g --strip-debug Remove all debugging symbols & sections\n\
--strip-unneeded Remove all symbols not needed by relocations\n\
-N --strip-symbol <name> Do not copy symbol <name>\n\
--strip-unneeded-symbol <name>\n\
Do not copy symbol <name> unless needed by\n\
relocations\n\
--only-keep-debug Strip everything but the debug information\n\
-K --keep-symbol <name> Only copy symbol <name>\n\
-L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
-G --keep-global-symbol <name> Localize all symbols except <name>\n\
-W --weaken-symbol <name> Force symbol <name> to be marked as a weak\n\
--weaken Force all global symbols to be marked as weak\n\
-w --wildcard Permit wildcard in symbol comparasion\n\
-w --wildcard Permit wildcard in symbol comparison\n\
-x --discard-all Remove all non-global symbols\n\
-X --discard-locals Remove any compiler-generated symbols\n\
-i --interleave <number> Only copy one out of every <number> bytes\n\
@ -443,6 +452,9 @@ copy_usage (FILE *stream, int exit_status)
--srec-len <number> Restrict the length of generated Srecords\n\
--srec-forceS3 Restrict the type of generated Srecords to S3\n\
--strip-symbols <file> -N for all symbols listed in <file>\n\
--strip-unneeded-symbols <file>\n\
--strip-unneeded-symbol for all symbols listed\n\
in <file>\n\
--keep-symbols <file> -K for all symbols listed in <file>\n\
--localize-symbols <file> -L for all symbols listed in <file>\n\
--keep-global-symbols <file> -G for all symbols listed in <file>\n\
@ -486,7 +498,7 @@ strip_usage (FILE *stream, int exit_status)
--only-keep-debug Strip everything but the debug information\n\
-N --strip-symbol=<name> Do not copy symbol <name>\n\
-K --keep-symbol=<name> Only copy symbol <name>\n\
-w --wildcard Permit wildcard in symbol comparasion\n\
-w --wildcard Permit wildcard in symbol comparison\n\
-x --discard-all Remove all non-global symbols\n\
-X --discard-locals Remove any compiler-generated symbols\n\
-v --verbose List all object files modified\n\
@ -536,7 +548,7 @@ parse_flags (const char *s)
PARSE_FLAG ("code", SEC_CODE);
PARSE_FLAG ("data", SEC_DATA);
PARSE_FLAG ("rom", SEC_ROM);
PARSE_FLAG ("share", SEC_SHARED);
PARSE_FLAG ("share", SEC_COFF_SHARED);
PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
#undef PARSE_FLAG
else
@ -700,8 +712,8 @@ add_specific_symbols (const char *filename, struct symlist **list)
;
if (! IS_LINE_TERMINATOR (* extra))
non_fatal (_("Ignoring rubbish found on line %d of %s"),
line_count, filename);
non_fatal (_("%s:%d: Ignoring rubbish found on this line"),
filename, line_count);
}
* name_end = '\0';
@ -891,7 +903,7 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
keep = (strip_symbols != STRIP_DEBUG
&& strip_symbols != STRIP_UNNEEDED
&& ! convert_debugging);
else if (bfd_get_section (sym)->comdat)
else if (bfd_coff_get_comdat_section (abfd, bfd_get_section (sym)))
/* COMDAT sections store special information in local
symbols, so we cannot risk stripping any of them. */
keep = 1;
@ -903,6 +915,10 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
if (keep && is_specified_symbol (name, strip_specific_list))
keep = 0;
if (keep
&& !(flags & BSF_KEEP)
&& is_specified_symbol (name, strip_unneeded_list))
keep = 0;
if (!keep && is_specified_symbol (name, keep_specific_list))
keep = 1;
if (keep && is_strip_section (abfd, bfd_get_section (sym)))
@ -1068,10 +1084,10 @@ add_redefine_syms_file (const char *filename)
continue;
}
else
fatal (_("%s: garbage at end of line %d"), filename, lineno);
fatal (_("%s:%d: garbage found at end of line"), filename, lineno);
comment:
if (len != 0 && (outsym_off == 0 || outsym_off == len))
fatal (_("%s: missing new symbol name at line %d"), filename, lineno);
fatal (_("%s:%d: missing new symbol name"), filename, lineno);
buf[len++] = '\0';
/* Eat the rest of the line and finish it. */
@ -1081,7 +1097,7 @@ add_redefine_syms_file (const char *filename)
}
if (len != 0)
fatal (_("%s: premature end of file at line %d"), filename, lineno);
fatal (_("%s:%d: premature end of file"), filename, lineno);
free (buf);
}
@ -1179,6 +1195,8 @@ copy_object (bfd *ibfd, bfd *obfd)
any output is done. Thus, we traverse all sections multiple times. */
bfd_map_over_sections (ibfd, setup_section, obfd);
setup_bfd_headers (ibfd, obfd);
if (add_sections != NULL)
{
struct section_add *padd;
@ -1714,7 +1732,7 @@ copy_file (const char *input_filename, const char *output_filename,
if (delete)
{
unlink (output_filename);
unlink_if_ordinary (output_filename);
status = 1;
}
}
@ -1809,6 +1827,32 @@ find_section_rename (bfd * ibfd ATTRIBUTE_UNUSED, sec_ptr isection,
return old_name;
}
/* Once each of the sections is copied, we may still need to do some
finalization work for private section headers. Do that here. */
static void
setup_bfd_headers (bfd *ibfd, bfd *obfd)
{
const char *err;
/* Allow the BFD backend to copy any private data it understands
from the input section to the output section. */
if (! bfd_copy_private_header_data (ibfd, obfd))
{
err = _("private header data");
goto loser;
}
/* All went well. */
return;
loser:
non_fatal (_("%s: error in %s: %s"),
bfd_get_filename (ibfd),
err, bfd_errmsg (bfd_get_error ()));
status = 1;
}
/* Create a section in OBFD with the same
name and attributes as ISECTION in IBFD. */
@ -1986,7 +2030,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
return;
osection = isection->output_section;
size = bfd_get_section_size_before_reloc (isection);
size = bfd_get_section_size (isection);
if (size == 0 || osection == 0)
return;
@ -2042,9 +2086,6 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
free (relpp);
}
isection->_cooked_size = isection->_raw_size;
isection->reloc_done = TRUE;
if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS
&& bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS)
{
@ -2136,9 +2177,9 @@ compare_section_lma (const void *arg1, const void *arg2)
return -1;
/* Sort sections with the same LMA by size. */
if ((*sec1)->_raw_size > (*sec2)->_raw_size)
if (bfd_get_section_size (*sec1) > bfd_get_section_size (*sec2))
return 1;
else if ((*sec1)->_raw_size < (*sec2)->_raw_size)
else if (bfd_get_section_size (*sec1) < bfd_get_section_size (*sec2))
return -1;
return 0;
@ -2398,7 +2439,7 @@ strip_main (int argc, char *argv[])
status = hold_status;
}
else
unlink (tmpname);
unlink_if_ordinary (tmpname);
if (output_file == NULL)
free (tmpname);
}
@ -2500,6 +2541,10 @@ copy_main (int argc, char *argv[])
add_specific_symbol (optarg, &strip_specific_list);
break;
case OPTION_STRIP_UNNEEDED_SYMBOL:
add_specific_symbol (optarg, &strip_unneeded_list);
break;
case 'L':
add_specific_symbol (optarg, &localize_specific_list);
break;
@ -2833,6 +2878,10 @@ copy_main (int argc, char *argv[])
add_specific_symbols (optarg, &strip_specific_list);
break;
case OPTION_STRIP_UNNEEDED_SYMBOLS:
add_specific_symbols (optarg, &strip_unneeded_list);
break;
case OPTION_KEEP_SYMBOLS:
add_specific_symbols (optarg, &keep_specific_list);
break;

View File

@ -1 +0,0 @@
*.gmo

View File

@ -1,6 +1,6 @@
/* strings -- print the strings of printable characters in files
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003 Free Software Foundation, Inc.
2002, 2003, 2004 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
@ -67,6 +67,7 @@
#include "bucomm.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include <sys/stat.h>
/* Some platforms need to put stdin into binary mode, to read
binary files. */
@ -104,6 +105,13 @@ typedef off64_t file_off;
typedef off_t file_off;
#define file_open(s,m) fopen(s, m)
#endif
#ifdef HAVE_STAT64
typedef struct stat64 statbuf;
#define file_stat(f,s) stat64(f, s)
#else
typedef struct stat statbuf;
#define file_stat(f,s) stat(f, s)
#endif
/* Radix for printing addresses (must be 8, 10 or 16). */
static int address_radix;
@ -317,7 +325,7 @@ strings_a_section (bfd *abfd, asection *sect, void *filearg)
if ((sect->flags & DATA_FLAGS) == DATA_FLAGS)
{
bfd_size_type sz = bfd_get_section_size_before_reloc (sect);
bfd_size_type sz = bfd_get_section_size (sect);
void *mem = xmalloc (sz);
if (bfd_get_section_contents (abfd, sect, mem, (file_ptr) 0, sz))
@ -370,8 +378,17 @@ strings_object_file (const char *file)
static bfd_boolean
strings_file (char *file)
{
if (get_file_size (file) < 1)
return FALSE;
statbuf st;
if (file_stat (file, &st) < 0)
{
if (errno == ENOENT)
non_fatal (_("'%s': No such file"), file);
else
non_fatal (_("Warning: could not locate '%s'. reason: %s"),
file, strerror (errno));
return FALSE;
}
/* If we weren't told to scan the whole file,
try to open it as an object file and only look at
@ -512,7 +529,7 @@ print_strings (const char *filename, FILE *stream, file_off address,
}
/* We found a run of `string_min' graphic characters. Print up
to the next non-graphic character. */
to the next non-graphic character. */
if (print_filenames)
printf ("%s: ", filename);
@ -557,7 +574,8 @@ print_strings (const char *filename, FILE *stream, file_off address,
#else
# if !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start)
printf ("%lx%8.8lx ", start >> 32, start & 0xffffffff);
printf ("%lx%8.8lx ", (unsigned long) (start >> 32),
(unsigned long) (start & 0xffffffff));
else
# endif
#endif
@ -637,7 +655,7 @@ usage (FILE *stream, int status)
-f --print-file-name Print the name of the file before each string\n\
-n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\
-<number> least [number] characters (default 4).\n\
-t --radix={o,x,d} Print the location of the string in base 8, 10 or 16\n\
-t --radix={o,d,x} Print the location of the string in base 8, 10 or 16\n\
-o An alias for --radix=o\n\
-T --target=<BFDNAME> Specify the binary file format\n\
-e --encoding={s,S,b,l,B,L} Select character size and endianness:\n\

View File

@ -1,37 +0,0 @@
#! /dev/null
# Don't call it directly. This shell script fragment is called to
# determine:
#
# 1. libstcxx_incdir: the interface name for libstdc++.
#
# 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
# Set libstdcxx_incdir.
# This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4.
if test -z "$gcc_version"; then
if test -z "${gcc_version_trigger}" \
&& test -f ${if_topsrcdir}/gcc/version.c; then
gcc_version_trigger=${if_topsrcdir}/gcc/version.c
fi
if test -f "${gcc_version_trigger}"; then
gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
else
gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
fi
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
fi
libstdcxx_incdir=c++/${gcc_version}

View File

@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2004-02-16'
timestamp='2004-11-30'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -145,7 +145,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis)
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@ -237,7 +237,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m68000 | m68k | m88k | mcore \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -262,12 +262,12 @@ case $basic_machine in
| pyramid \
| sh | sh[12345] | sh[23]e | sh[34]eb | shbe | shle | sh[12345]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@ -300,7 +300,7 @@ case $basic_machine in
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@ -308,9 +308,9 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -326,8 +326,9 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@ -336,14 +337,14 @@ case $basic_machine in
| sh-* | sh[12345]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[12345]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
@ -445,6 +446,10 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
@ -452,9 +457,16 @@ case $basic_machine in
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@ -477,6 +489,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@ -655,10 +671,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@ -739,10 +751,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -1025,6 +1033,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@ -1055,6 +1067,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@ -1077,7 +1092,7 @@ case $basic_machine in
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@ -1290,6 +1305,9 @@ case $os in
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-none)
;;
*)
@ -1370,6 +1388,9 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;

View File

@ -1 +0,0 @@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
2002-07-03 Nick Clifton <nickc@cambridge.redhat.com>
* ChangeLog: Newly created.
* texi2pod.pl: Imported from FSF GCC sources.

View File

@ -1,431 +0,0 @@
#! /usr/bin/perl -w
# Copyright (C) 1999, 2000, 2001 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 does trivial (and I mean _trivial_) conversion of Texinfo
# markup to Perl POD format. It's intended to be used to extract
# something suitable for a manpage from a Texinfo document.
$output = 0;
$skipping = 0;
%sects = ();
$section = "";
@icstack = ();
@endwstack = ();
@skstack = ();
@instack = ();
$shift = "";
%defs = ();
$fnno = 1;
$inf = "";
$ibase = "";
while ($_ = shift) {
if (/^-D(.*)$/) {
if ($1 ne "") {
$flag = $1;
} else {
$flag = shift;
}
$value = "";
($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/);
die "no flag specified for -D\n"
unless $flag ne "";
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
$defs{$flag} = $value;
} elsif (/^-/) {
usage();
} else {
$in = $_, next unless defined $in;
$out = $_, next unless defined $out;
usage();
}
}
if (defined $in) {
$inf = gensym();
open($inf, "<$in") or die "opening \"$in\": $!\n";
$ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
} else {
$inf = \*STDIN;
}
if (defined $out) {
open(STDOUT, ">$out") or die "opening \"$out\": $!\n";
}
while(defined $inf) {
while(<$inf>) {
# Certain commands are discarded without further processing.
/^\@(?:
[a-z]+index # @*index: useful only in complete manual
|need # @need: useful only in printed manual
|(?:end\s+)?group # @group .. @end group: ditto
|page # @page: ditto
|node # @node: useful only in .info file
|(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents
)\b/x and next;
chomp;
# Look for filename and title markers.
/^\@setfilename\s+([^.]+)/ and $fn = $1, next;
/^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
# Identify a man title but keep only the one we are interested in.
/^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do {
if (exists $defs{$1}) {
$fn = $1;
$tl = postprocess($2);
}
next;
};
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
# This really oughta be @ifman ... @end ifman and the like, but such
# would require rev'ing all other Texinfo translators.
/^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
$output = 1 if exists $defs{$2};
$sect = $1;
next;
};
/^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
/^\@c\s+man\s+end/ and do {
$sects{$sect} = "" unless exists $sects{$sect};
$sects{$sect} .= postprocess($section);
$section = "";
$output = 0;
next;
};
# handle variables
/^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
$defs{$1} = $2;
next;
};
/^\@clear\s+([a-zA-Z0-9_-]+)/ and do {
delete $defs{$1};
next;
};
next unless $output;
# Discard comments. (Can't do it above, because then we'd never see
# @c man lines.)
/^\@c\b/ and next;
# End-block handler goes up here because it needs to operate even
# if we are skipping.
/^\@end\s+([a-z]+)/ and do {
# Ignore @end foo, where foo is not an operation which may
# cause us to skip, if we are presently skipping.
my $ended = $1;
next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
$endw = pop @endwstack;
if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
$skipping = pop @skstack;
next;
} elsif ($ended =~ /^(?:example|smallexample|display)$/) {
$shift = "";
$_ = ""; # need a paragraph break
} elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
$_ = "\n=back\n";
$ic = pop @icstack;
} else {
die "unknown command \@end $ended at line $.\n";
}
};
# We must handle commands which can cause skipping even while we
# are skipping, otherwise we will not process nested conditionals
# correctly.
/^\@ifset\s+([a-zA-Z0-9_-]+)/ and do {
push @endwstack, $endw;
push @skstack, $skipping;
$endw = "ifset";
$skipping = 1 unless exists $defs{$1};
next;
};
/^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do {
push @endwstack, $endw;
push @skstack, $skipping;
$endw = "ifclear";
$skipping = 1 if exists $defs{$1};
next;
};
/^\@(ignore|menu|iftex)\b/ and do {
push @endwstack, $endw;
push @skstack, $skipping;
$endw = $1;
$skipping = 1;
next;
};
next if $skipping;
# Character entities. First the ones that can be replaced by raw text
# or discarded outright:
s/\@copyright\{\}/(c)/g;
s/\@dots\{\}/.../g;
s/\@enddots\{\}/..../g;
s/\@([.!? ])/$1/g;
s/\@[:-]//g;
s/\@bullet(?:\{\})?/*/g;
s/\@TeX\{\}/TeX/g;
s/\@pounds\{\}/\#/g;
s/\@minus(?:\{\})?/-/g;
s/\\,/,/g;
# Now the ones that have to be replaced by special escapes
# (which will be turned back into text by unmunge())
s/&/&amp;/g;
s/\@\{/&lbrace;/g;
s/\@\}/&rbrace;/g;
s/\@\@/&at;/g;
# Inside a verbatim block, handle @var specially.
if ($shift ne "") {
s/\@var\{([^\}]*)\}/<$1>/g;
}
# POD doesn't interpret E<> inside a verbatim block.
if ($shift eq "") {
s/</&lt;/g;
s/>/&gt;/g;
} else {
s/</&LT;/g;
s/>/&GT;/g;
}
# Single line command handlers.
/^\@include\s+(.+)$/ and do {
push @instack, $inf;
$inf = gensym();
# Try cwd and $ibase.
open($inf, "<" . $1)
or open($inf, "<" . $ibase . "/" . $1)
or die "cannot open $1 or $ibase/$1: $!\n";
next;
};
/^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
and $_ = "\n=head2 $1\n";
/^\@subsection\s+(.+)$/
and $_ = "\n=head3 $1\n";
# Block command handlers:
/^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
push @endwstack, $endw;
push @icstack, $ic;
$ic = $1;
$_ = "\n=over 4\n";
$endw = "itemize";
};
/^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do {
push @endwstack, $endw;
push @icstack, $ic;
if (defined $1) {
$ic = $1 . ".";
} else {
$ic = "1.";
}
$_ = "\n=over 4\n";
$endw = "enumerate";
};
/^\@([fv]?table)\s+(\@[a-z]+)/ and do {
push @endwstack, $endw;
push @icstack, $ic;
$endw = $1;
$ic = $2;
$ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/;
$ic =~ s/\@(?:code|kbd)/C/;
$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
$ic =~ s/\@(?:file)/F/;
$_ = "\n=over 4\n";
};
/^\@((?:small)?example|display)/ and do {
push @endwstack, $endw;
$endw = $1;
$shift = "\t";
$_ = ""; # need a paragraph break
};
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
# Entity escapes prevent munging by the <> processing below.
$_ = "\n=item $ic\&LT;$1\&GT;\n";
} else {
$_ = "\n=item $ic\n";
$ic =~ y/A-Ya-y/B-Zb-z/;
$ic =~ s/(\d+)/$1 + 1/eg;
}
};
$section .= $shift.$_."\n";
}
# End of current file.
close($inf);
$inf = pop @instack;
}
die "No filename or title\n" unless defined $fn && defined $tl;
$sects{NAME} = "$fn \- $tl\n";
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
if(exists $sects{$sect}) {
$head = $sect;
$head =~ s/SEEALSO/SEE ALSO/;
print "=head1 $head\n\n";
print scalar unmunge ($sects{$sect});
print "\n";
}
}
sub usage
{
die "usage: $0 [-D toggle...] [infile [outfile]]\n";
}
sub postprocess
{
local $_ = $_[0];
# @value{foo} is replaced by whatever 'foo' is defined as.
while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) {
if (! exists $defs{$2}) {
print STDERR "Option $2 not defined\n";
s/\Q$1\E//;
} else {
$value = $defs{$2};
s/\Q$1\E/$value/;
}
}
# Formatting commands.
# Temporary escape for @r.
s/\@r\{([^\}]*)\}/R<$1>/g;
s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
s/\@sc\{([^\}]*)\}/\U$1/g;
s/\@file\{([^\}]*)\}/F<$1>/g;
s/\@w\{([^\}]*)\}/S<$1>/g;
s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
# Cross references are thrown away, as are @noindent and @refill.
# (@noindent is impossible in .pod, and @refill is unnecessary.)
# @* is also impossible in .pod; we discard it and any newline that
# follows it. Similarly, our macro @gol must be discarded.
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
s/\@noindent\s*//g;
s/\@refill//g;
s/\@gol//g;
s/\@\*\s*\n?//g;
# @uref can take one, two, or three arguments, with different
# semantics each time. @url and @email are just like @uref with
# one argument, for our purposes.
s/\@(?:uref|url|email)\{([^\},]*)\}/&lt;B<$1>&gt;/g;
s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
# Un-escape <> at this point.
s/&LT;/</g;
s/&GT;/>/g;
# Now un-nest all B<>, I<>, R<>. Theoretically we could have
# indefinitely deep nesting; in practice, one level suffices.
1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1</g;
# Replace R<...> with bare ...; eliminate empty markup, B<>;
# shift white space at the ends of [BI]<...> expressions outside
# the expression.
s/R<([^<>]*)>/$1/g;
s/[BI]<>//g;
s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g;
s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g;
# Extract footnotes. This has to be done after all other
# processing because otherwise the regexp will choke on formatting
# inside @footnote.
while (/\@footnote/g) {
s/\@footnote\{([^\}]+)\}/[$fnno]/;
add_footnote($1, $fnno);
$fnno++;
}
return $_;
}
sub unmunge
{
# Replace escaped symbols with their equivalents.
local $_ = $_[0];
s/&lt;/E<lt>/g;
s/&gt;/E<gt>/g;
s/&lbrace;/\{/g;
s/&rbrace;/\}/g;
s/&at;/\@/g;
s/&amp;/&/g;
return $_;
}
sub add_footnote
{
unless (exists $sects{FOOTNOTES}) {
$sects{FOOTNOTES} = "\n=over 4\n\n";
}
$sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++;
$sects{FOOTNOTES} .= $_[0];
$sects{FOOTNOTES} .= "\n\n";
}
# stolen from Symbol.pm
{
my $genseq = 0;
sub gensym
{
my $name = "GEN" . $genseq++;
my $ref = \*{$name};
delete $::{$name};
return $ref;
}
}

View File

@ -1,561 +0,0 @@
2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
* configure.texi: Use "i[3-7]86" in example.
2003-01-02 H.J. Lu <hjl@gnu.org>
* Makefile.in (DESTDIR): New.
(install-info): Use it.
2002-06-11 Nick Clifton <nickc@cambridge.redhat.com>
Import the following patches from the FSF GCC sources:
2002-03-25 Zack Weinberg <zack@codesourcery.com>
* texi2pod.pl: Handle @end ftable and @end vtable.
2001-12-12 Matthias Klose <doko@debian.org>
* texi2pod.pl: Merge changes from binutils' texi2pod.pl. Allows
generation of more than one man page from one source.
Add '-' to set of valid chars for an identifier.
Let -D option accept flags of the form <flag>=<value>.
Use \s+ for whitespace detection in '@c man' lines.
Handle @set and @clear independent of $output.
Substitute all @value{}'s in a line.
2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
* texi2pod.pl: Handle @ifnottex, @iftex and @display. Handle @var
in verbatim blocks specially. Handle @unnumbered, @unnumberedsec
and @center. Allow [a-z] after @enumerate. Handle 0 and numbers
greater than 9 in enumerations.
2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk>
* texi2pod.pl: Handle @r inside @item.
2002-02-27 Andrew Cagney <ac131313@redhat.com>
* fdl.texi: New file.
2002-02-24 Andrew Cagney <ac131313@redhat.com>
* standards.texi: Import February 14, 2002 version.
* make-stds.texi: Import 2001 version.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* Makefile.in (install): Depend on install-info.
2001-03-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* texi2pod.pl: New file (from gcc/contrib).
1999-04-01 Jim Blandy <jimb@zwingli.cygnus.com>
* add-log.el, add-log.vi: New files.
1999-01-20 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-verify: Remove some checks that are no longer valid.
1998-12-03 Nick Clifton <nickc@cygnus.com>
* targetdoc/fr30.texi: New document.
1998-10-01 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-fix, cross-tools-fix: Replace /usr/include
with ${FIXINCDIR}.
1998-08-11 Doug Evans <devans@canuck.cygnus.com>
* make-rel-sym-tree (version): Update calculation.
1998-06-12 Ian Lance Taylor <ian@cygnus.com>
* configure.texi: Various additions.
* Makefile.in (TEXI2HTML, DVIPS): New variables.
(standards.ps): New target.
(configure.dvi): Copy .tin files in as well.
(configure.ps, configure.html): New targets.
(clean): Remove configdev.jpg and configbuild.jpg.
* configdev.fig: New file.
* configdev.ein: New file (EPS version of configdev.fig).
* configdev.jin: New file (JPEG version of configdev.fig).
* configbuild.fig: New file.
* configbuild.ein: New file (EPS version of configbuild.fig).
* configbuild.jin: New file (JPEG version of configbuild.fig).
1998-06-10 Ian Lance Taylor <ian@cygnus.com>
* configure.texi: New file.
* configdev.tin: New file.
* configbuild.tin: New file.
* Makefile.in (MAKEINFO): Use makeinfo from texinfo directory if
it exists.
(TEXI2DVI): Likewise for texi2dvi.
(INFOFILES): Add configure.info.
(DVIFILES): Add configure.dvi.
(info): Only build info files if the source files exist.
(install-info): Only install info files if they exist.
(dvi): Only build DVI files if the sources files exist.
(configure.info): New target.
(configure.dvi): New target.
(clean): Remove configdev and configbuild derived files.
Remove obsolete documentation.
* intro.texi: Remove.
* install.texi: Remove.
* config-names.texi: Remove.
* screen1.eps: Remove.
* screen1.obj: Remove.
* screen2.eps: Remove.
* screen2.obj: Remove.
* Makefile.in: Remove references to the above.
Thu May 21 14:34:51 1998 Nick Clifton <nickc@cygnus.com>
* targetdoc/arm-interwork.texi: Add note about ignoring linker
warning message when using --support-old-code.
Mon May 18 14:27:37 1998 Angela Marie Thomas (angela@cygnus.com)
* Install.in, comp-tools-fix, comp-tools-verify, cross-tools-fix:
Use $GCCvn rather than substitute everywhere.
Thu May 14 14:43:10 1998 Nick Clifton <nickc@cygnus.com>
* targetdoc/arm-interwork.texi: Document dlltool support of
interworking.
Thu May 7 16:49:38 1998 Jason Molenda (crash@bugshack.cygnus.com)
* Install.in: Remove references to TCL_LIBRARY, TK_LIBRARY,
and GDBTK_FILENAME.
Wed Apr 1 17:11:44 1998 Nick Clifton <nickc@cygnus.com>
* targetdoc/arm-interwork.texi: Document ARM/thumb interworking.
Tue Mar 31 15:28:20 1998 Ian Lance Taylor <ian@cygnus.com>
* standards.texi, make-stds.texi: Update to current FSF versions.
* Makefile.in (standards.info): Depend upon make-std.texi.
Tue Mar 24 16:13:26 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
* configure: Regenerate with autoconf 2.12.1 to fix shell issues
for NT native builds.
Mon Mar 9 16:41:04 1998 Doug Evans <devans@canuck.cygnus.com>
* make-rel-sym-tree (binprogs): Add objcopy.
Tue Feb 24 18:11:58 1998 Doug Evans <devans@canuck.cygnus.com>
* make-rel-sym-tree: as.new -> as-new, ld.new -> ld-new
nm.new -> nm-new. Make symlinks to crt*.o.
Fri Nov 21 12:54:58 1997 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in: Add --no-split argument to avoid creating files
with names longer than 14 characters.
Thu Sep 25 13:13:11 1997 Jason Molenda (crash@pern.cygnus.com)
* intro.texi: Add closing ifset.
Mon Sep 1 10:31:32 1997 Angela Marie Thomas (angela@cygnus.com)
* Install.in: Move setting HOST and TARGET to the beginning
of the file for editing convenience.
Mon Sep 1 10:28:37 1997 Angela Marie Thomas (angela@cygnus.com)
* Install.in.: More friendly options/messages when extracting
from a file instead of a tape device.
Tue Jun 17 15:50:23 1997 Angela Marie Thomas (angela@cygnus.com)
* Install.in: Add /usr/bsd to PATH for Irix (home of compress)
Thu Jun 12 13:47:00 1997 Angela Marie Thomas (angela@cygnus.com)
* Install.in (show_exec_prefix_msg): fix quoting
Wed Jun 4 15:31:43 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
* rebuilding.texi: Removed.
Sat May 24 18:02:20 1997 Angela Marie Thomas (angela@cygnus.com)
* cross-tools-fix: Remove host check since it doesn't matter
for this case.
* Install.in (guess_system): clean up more unused hosts.
* Install.in, cross-tools-fix, comp-tools-fix, comp-tools-verify:
Hack for host check to not warn the user for certain cases.
Fri May 23 23:46:10 1997 Angela Marie Thomas (angela@cygnus.com)
* subst-strings: Remove a lot of unused code
* Install.in: Remove reference to TAPEdflt, use variables instead of
string substitution when able.
Fri Apr 11 17:25:52 1997 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Change file named in AC_INIT to Makefile.in.
* configure: Rebuild.
Fri Apr 11 18:12:42 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
* Install.in (guess_system): Back out change to INSTALLHOST to
call all IRIX systems "mips-sgi-irix4"
* Makefile.in: Remove references to configure.texi and cfg-paper.texi.
Thu Apr 10 23:26:45 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
* srctree.texi, emacs-relnotes.texi, cfg-paper.texi: Remove.
* Install.in: Remove Ultrix-specific hacks.
Update Cygnus phone numbers.
(guess_system): Remove some old systems (Ultrix, OSF1 v1 & 2,
m68k-HPUX, m68k SunOS, etc.)
(show_gnu_root_msg): Remove.
Removed all the remove option code.
Thu Apr 10 23:23:33 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
* configure.man, configure.texi: Remote.
Mon Apr 7 18:15:00 1997 Brendan Kehoe <brendan@cygnus.com>
* Fix the version string for OSF1 4.0 to recognize either
V4.* or X4.*
Mon Apr 7 15:34:47 1997 Ian Lance Taylor <ian@cygnus.com>
* standards.texi, make-stds.texi: Update to current FSF versions.
Tue Nov 19 15:36:14 1996 Doug Evans <dje@canuck.cygnus.com>
* make-rel-sym-tree: New file.
Wed Oct 23 00:34:07 1996 Angela Marie Thomas (angela@cygnus.com)
* Lots of patches from progressive...
* Install.in: restore DDOPTS for AIX 4.x
* Install.in, subst-strings: add case for DG Aviion
* subst-strings: fix typo in INSTALLdir var setting
* comp-tools-verify: set SHLIB_PATH for shared libs
* Install.in, subst-strings: add case for solaris2.5
* Install.in: fix regression for hppa1.1 check
* comp-tools-fix: set LD_LIBRARY_PATH
* comp-tools-fix: If fixincludes fixes /usr/include/limits.h,
install it as syslimits.h.
Wed Oct 16 19:20:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* Install.in (guess_system): Treat powerpc-ibm-aix4.1 the same as
rs6000-ibm-aix4.1, since the compiler now uses common mode by
default.
Wed Oct 2 15:39:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
* configure.in (AC_PROG_INSTALL): Added.
* Makefile.in (distclean): Remove config.cache.
Wed Oct 2 14:33:58 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
* configure.in: Switch to autoconf configure.in.
* configure: New.
* Makefile.in: Use autoconf-substituted values.
Tue Jun 25 18:56:08 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
* Makefile.in (datadir): Changed to $(prefix)/share.
Fri Mar 29 11:38:01 1996 J.T. Conklin (jtc@lisa.cygnus.com)
* configure.man: Changed to be recognized by catman -w on Solaris.
Wed Dec 6 15:40:28 1995 Doug Evans <dje@canuck.cygnus.com>
* comp-tools-fix (fixincludes): Define FIXPROTO_DEFINES from
.../install-tools/fixproto-defines.
Sun Nov 12 19:31:27 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* comp-tools-verify (verify_cxx_initializers): delete argv,
argc declarations, add -static to compile line.
(verify_cxx_hello_world): delete argv, argc declarations, add
-static to compile line.
Wed Sep 20 13:21:52 1995 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (maintainer-clean): New target, synonym for
realclean.
Mon Aug 28 17:25:49 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* Install.in (PATH): add /usr/ucb to $PATH (for SunOS 4.1.x).
Tue Aug 15 21:51:58 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* Install.in (guess_system): Match OSF/1 v3.x as the same as
v2.x--v2.x binaries are upward compatible.
Tue Aug 15 21:46:54 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* Install.in (guess_system): recognize HP 9000/800 systems as the
same as HP 9000/700 systems.
Tue Aug 8 13:11:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
* Install.in: For emacs, run show_emacs_alternate_msg and exit.
(show_emacs_alternate_msg): New message saying how emacs can't be
installed in an alternate prefix.
Thu Jun 8 00:42:56 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
* subst-strings: change du commands to $BINDIR/. & $SRCDIR/. just
in case they are symlinks.
Tue Apr 18 14:23:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* cdk-fix: Extracted table of targets that don't need their
headers fixed from gcc's configure script.
* cdk-fix, cdk-verify: Use ${HOST} instead of ||HOSTstr||
* cdk-fix, cdk-verify: New files, install script fragments used
for Cygnus Developer's Kit.
* Install.in (do_mkdir): New function.
* Install.in: Added support for --with and --without options.
Changed so that tape commands are not run when extracting
from a file.
(do_mt): Changed to take only one argument.
Wed Mar 29 11:16:38 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* Install.in: catch UNAME==alpha-dec-osf2.x and correct entry for
alpha-dec-osf1.x
Fri Jan 27 12:04:29 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* subst-strings (mips-sgi-irix5): New entry in table.
Thu Jan 19 12:15:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* Install.in: Major rewrite, bundle dependent code (for example,
fixincludes for comp-tools) will be inserted into the Install
script when it is generated.
Tue Jan 17 16:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* Makefile.in (Makefile): Rebuild using $(SHELL).
Thu Nov 3 19:30:33 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
* Makefile.in (install-info): Depend on info.
Fri Aug 19 16:16:38 1994 Jason Molenda (crash@phydeaux.cygnus.com)
* Install.in: set $FIX_HEADER so fixproto can find fix-header.
Fri May 6 16:18:58 1994 Jason Molenda (crash@sendai.cygnus.com)
* Makefile.in (install-info): add a semicolon in the if statement.
Fri Apr 29 16:56:07 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* cfg-paper.texi: Update some outdated information.
* Makefile.in (install-info): Pass file, not directory, as last
arg to INSTALL_DATA.
(uninstall): New target.
Thu Apr 28 14:42:22 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* configure.texi: Comment out @smallbook.
* Makefile.in: Define TEXI2DVI and TEXIDIR, and use the latter.
Remove info files in realclean, not clean, per coding standards.
Remove TeX output in clean.
Tue Apr 26 17:18:03 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: fixincludes output is actually put in fixincludes.log,
but echo'ed messages claim it is fixinc.log. This is the same
messages as I logged in March 4 1994, but for some reason we found
the change hadn't been done. I'll have to dig through the logs
and find out what I really did do that day. :)
Mon Apr 25 20:28:19 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: use eval to call do_mt() for Ultrix brokenness.
Mon Apr 25 20:00:00 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in(do_mt): exit with error status 1 if # of parameters
!= 3.
Mon Apr 25 19:42:36 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: lose TAPE_FORWARD and TAPE_REWIND, add do_mt()
to do all tape movement operations. Currently untested. Addresses
PR # 4886 from bull.
* Install.in: add 1994 to the copyright thing.
Fri Apr 22 19:05:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* standards.texi: Update from FSF.
Fri Apr 22 15:46:10 1994 Jason Molenda (crash@cygnus.com)
* Install.in: Add $DDOPTS, has ``bs=124b'' for all systems except
AIX (some versions of AIX don't understand bs=124b. Silly OS).
Mon Apr 4 22:55:05 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: null out $TOOLS before adding stuff to it
non-destructively.
Wed Mar 30 21:45:35 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* standards.texi: Fix typo.
* configure.texi, configure.man: Document --disable-.
Mon Mar 28 13:22:15 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* standards.texi: Update from FSF.
Sat Mar 26 09:21:44 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* standards.texi, make-stds.texi: Update from FSF.
Fri Mar 25 22:59:45 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* configure.texi, configure.man: Document --enable-* options.
Wed Mar 23 23:38:24 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: set CPP to be gcc -E for fixincludes.
Wed Mar 23 13:42:48 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: set PATH to $PATH:/bin:/usr/bin so we can pick
up native tools even if the user doesn't have them in his
path.
* Install.in: ``hppa-1.1-hp-hpux'' -> ``hppa1.1-hp-hpux''.
Tue Mar 15 22:09:20 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: TAPE_REWIND and TAPE_FORWARD variables for Unixunaware,
added switch statement to detect if system is Unixunaware.
Fri Mar 4 12:10:30 1994 Jason Molenda (crash@sendai.cygnus.com)
* Install.in: fixincludes output is actually put in fixincludes.log,
but echo'ed messages claim it is fixinc.log.
Wed Nov 3 02:58:02 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com)
* subst-strings: output TEXBUNDLE for more install notes matching
* install-texi.in: PRMS info now exists
Tue Oct 26 16:57:12 1993 K. Richard Pixley (rich@sendai.cygnus.com)
* subst-strings: match solaris*. Also, add default case to catch
and error out for unrecognized systems.
Thu Aug 19 18:21:31 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
* Install.in: handle the new fixproto work
Mon Jul 19 12:05:41 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com)
* Install.in: remove "MT=tctl" for AIX (not needed, and barely
worked anyway)
Mon Jun 14 19:09:22 1993 Jeffrey Osier (jeffrey@cygnus.com)
* subst-strings: changed HOST to recognize Solaris for install notes
Thu Jun 10 16:01:25 1993 Jeffrey Osier (jeffrey@cygnus.com)
* dos-inst.texi: new file.
Wed Jun 9 19:23:59 1993 Jeffrey Osier (jeffrey@rtl.cygnus.com)
* install-texi.in: added conditionals (nearly complete)
cleaned up
added support for other releases (not done)
Wed Jun 9 15:53:58 1993 Jim Kingdon (kingdon@cygnus.com)
* Makefile.in (install-info): Use INSTALL_DATA.
({dist,real}clean): Also delete Makefile and config.status.
Fri Jun 4 17:09:56 1993 Jeffrey Osier (jeffrey@cygnus.com)
* subst-strings: added data for OS_STRING
* subst-strings: added support for OS_STRING
Thu Jun 3 00:37:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Install.in: pull COPYING and COPYING.LIB off of the tape
Tue Jun 1 16:52:08 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* subst-strings: replace RELEASE_DIR too
Mon Mar 22 23:55:27 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: add installcheck target
Wed Mar 17 02:21:15 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Install.in: fix 'source only' extraction bug where it looked for
the src dir under H-<host>/src instead of src; also remove stray
reference to EMACSHIBIN
Mon Mar 15 01:25:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* make-stds.texi: added 'installcheck' to the standard targets
Tue Mar 9 19:48:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* standards.texi: added INFO-DIR-ENTRY, updated version from the FSF
Tue Feb 9 12:40:23 1993 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (standards.info): Added -I$(srcdir) to find
make-stds.texi.
Mon Feb 1 16:32:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* standards.texi: updated to latest FSF version, which includes:
* make-stds.texi: new file
Mon Nov 30 01:31:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* install-texi.in, relnotes.texi, intro.texi: changed Cygnus phone
numbers from the old Palo Alto ones to the new Mtn. View numbers
Mon Nov 16 16:50:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: define $(RM) to "rm -f"
Sun Oct 11 16:05:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* intro.texi: added INFO-DIR-ENTRY

View File

@ -1,573 +0,0 @@
;;; ============ NOTE WELL! =============
;;;
;;; You only need to use this file if you're using a version of Emacs
;;; prior to 20.1 to work on GDB. The only difference between this
;;; and the standard add-log.el provided with 19.34 is that it
;;; generates dates using the terser format used by Emacs 20. This is
;;; the format recommended for use in GDB ChangeLogs.
;;;
;;; To use this code, you should create a directory `~/elisp', save the code
;;; below in `~/elisp/add-log.el', and then put something like this in
;;; your `~/.emacs' file, to tell Emacs where to find it:
;;;
;;; (setq load-path
;;; (cons (expand-file-name "~/elisp")
;;; load-path))
;;;
;;; If you want, you can also byte-compile it --- it'll run a little
;;; faster, and use a little less memory. (Not that those matter much for
;;; this file.) To do that, after you've saved the text as
;;; ~/elisp/add-log.el, bring it up in Emacs, and type
;;;
;;; C-u M-x byte-compile-file
;;;
;;; --- Jim Blandy
;;; add-log.el --- change log maintenance commands for Emacs
;; Copyright (C) 1985, 1986, 1988, 1993, 1994 Free Software Foundation, Inc.
;; Keywords: maint
;; This file is part of GNU Emacs.
;; GNU Emacs 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 Emacs 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 Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; This facility is documented in the Emacs Manual.
;;; Code:
(defvar change-log-default-name nil
"*Name of a change log file for \\[add-change-log-entry].")
(defvar add-log-current-defun-function nil
"\
*If non-nil, function to guess name of current function from surrounding text.
\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
instead) with no arguments. It returns a string or nil if it cannot guess.")
;;;###autoload
(defvar add-log-full-name nil
"*Full name of user, for inclusion in ChangeLog daily headers.
This defaults to the value returned by the `user-full-name' function.")
;;;###autoload
(defvar add-log-mailing-address nil
"*Electronic mail address of user, for inclusion in ChangeLog daily headers.
This defaults to the value of `user-mail-address'.")
(defvar change-log-font-lock-keywords
'(("^[SMTWF].+" . font-lock-function-name-face) ; Date line.
("^\t\\* \\([^ :\n]+\\)" 1 font-lock-comment-face) ; File name.
("(\\([^)\n]+\\)):" 1 font-lock-keyword-face)) ; Function name.
"Additional expressions to highlight in Change Log mode.")
(defvar change-log-mode-map nil
"Keymap for Change Log major mode.")
(if change-log-mode-map
nil
(setq change-log-mode-map (make-sparse-keymap))
(define-key change-log-mode-map "\M-q" 'change-log-fill-paragraph))
(defun change-log-name ()
(or change-log-default-name
(if (eq system-type 'vax-vms)
"$CHANGE_LOG$.TXT"
(if (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))
"changelo"
"ChangeLog"))))
;;;###autoload
(defun prompt-for-change-log-name ()
"Prompt for a change log name."
(let* ((default (change-log-name))
(name (expand-file-name
(read-file-name (format "Log file (default %s): " default)
nil default))))
;; Handle something that is syntactically a directory name.
;; Look for ChangeLog or whatever in that directory.
(if (string= (file-name-nondirectory name) "")
(expand-file-name (file-name-nondirectory default)
name)
;; Handle specifying a file that is a directory.
(if (file-directory-p name)
(expand-file-name (file-name-nondirectory default)
(file-name-as-directory name))
name))))
;;;###autoload
(defun find-change-log (&optional file-name)
"Find a change log file for \\[add-change-log-entry] and return the name.
Optional arg FILE-NAME specifies the file to use.
If FILE-NAME is nil, use the value of `change-log-default-name'.
If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
\(or whatever we use on this operating system).
If 'change-log-default-name' contains a leading directory component, then
simply find it in the current directory. Otherwise, search in the current
directory and its successive parents for a file so named.
Once a file is found, `change-log-default-name' is set locally in the
current buffer to the complete file name."
;; If user specified a file name or if this buffer knows which one to use,
;; just use that.
(or file-name
(setq file-name (and change-log-default-name
(file-name-directory change-log-default-name)
change-log-default-name))
(progn
;; Chase links in the source file
;; and use the change log in the dir where it points.
(setq file-name (or (and buffer-file-name
(file-name-directory
(file-chase-links buffer-file-name)))
default-directory))
(if (file-directory-p file-name)
(setq file-name (expand-file-name (change-log-name) file-name)))
;; Chase links before visiting the file.
;; This makes it easier to use a single change log file
;; for several related directories.
(setq file-name (file-chase-links file-name))
(setq file-name (expand-file-name file-name))
;; Move up in the dir hierarchy till we find a change log file.
(let ((file1 file-name)
parent-dir)
(while (and (not (or (get-file-buffer file1) (file-exists-p file1)))
(progn (setq parent-dir
(file-name-directory
(directory-file-name
(file-name-directory file1))))
;; Give up if we are already at the root dir.
(not (string= (file-name-directory file1)
parent-dir))))
;; Move up to the parent dir and try again.
(setq file1 (expand-file-name
(file-name-nondirectory (change-log-name))
parent-dir)))
;; If we found a change log in a parent, use that.
(if (or (get-file-buffer file1) (file-exists-p file1))
(setq file-name file1)))))
;; Make a local variable in this buffer so we needn't search again.
(set (make-local-variable 'change-log-default-name) file-name)
file-name)
;;;###autoload
(defun add-change-log-entry (&optional whoami file-name other-window new-entry)
"Find change log file and add an entry for today.
Optional arg (interactive prefix) non-nil means prompt for user name and site.
Second arg is file name of change log. If nil, uses `change-log-default-name'.
Third arg OTHER-WINDOW non-nil means visit in other window.
Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
never append to an existing entry."
(interactive (list current-prefix-arg
(prompt-for-change-log-name)))
(or add-log-full-name
(setq add-log-full-name (user-full-name)))
(or add-log-mailing-address
(setq add-log-mailing-address user-mail-address))
(if whoami
(progn
(setq add-log-full-name (read-input "Full name: " add-log-full-name))
;; Note that some sites have room and phone number fields in
;; full name which look silly when inserted. Rather than do
;; anything about that here, let user give prefix argument so that
;; s/he can edit the full name field in prompter if s/he wants.
(setq add-log-mailing-address
(read-input "Mailing address: " add-log-mailing-address))))
(let ((defun (funcall (or add-log-current-defun-function
'add-log-current-defun)))
paragraph-end entry)
(setq file-name (expand-file-name (find-change-log file-name)))
;; Set ENTRY to the file name to use in the new entry.
(and buffer-file-name
;; Never want to add a change log entry for the ChangeLog file itself.
(not (string= buffer-file-name file-name))
(setq entry (if (string-match
(concat "^" (regexp-quote (file-name-directory
file-name)))
buffer-file-name)
(substring buffer-file-name (match-end 0))
(file-name-nondirectory buffer-file-name))))
(if (and other-window (not (equal file-name buffer-file-name)))
(find-file-other-window file-name)
(find-file file-name))
(or (eq major-mode 'change-log-mode)
(change-log-mode))
(undo-boundary)
(goto-char (point-min))
(let ((heading (format "%s %s <%s>"
(format-time-string "%Y-%m-%d")
add-log-full-name
add-log-mailing-address)))
(if (looking-at (regexp-quote heading))
(forward-line 1)
(insert heading "\n\n")))
;; Search only within the first paragraph.
(if (looking-at "\n*[^\n* \t]")
(skip-chars-forward "\n")
(forward-paragraph 1))
(setq paragraph-end (point))
(goto-char (point-min))
;; Now insert the new line for this entry.
(cond ((re-search-forward "^\\s *\\*\\s *$" paragraph-end t)
;; Put this file name into the existing empty entry.
(if entry
(insert entry)))
((and (not new-entry)
(let (case-fold-search)
(re-search-forward
(concat (regexp-quote (concat "* " entry))
;; Don't accept `foo.bar' when
;; looking for `foo':
"\\(\\s \\|[(),:]\\)")
paragraph-end t)))
;; Add to the existing entry for the same file.
(re-search-forward "^\\s *$\\|^\\s \\*")
(goto-char (match-beginning 0))
;; Delete excess empty lines; make just 2.
(while (and (not (eobp)) (looking-at "^\\s *$"))
(delete-region (point) (save-excursion (forward-line 1) (point))))
(insert "\n\n")
(forward-line -2)
(indent-relative-maybe))
(t
;; Make a new entry.
(forward-line 1)
(while (looking-at "\\sW")
(forward-line 1))
(while (and (not (eobp)) (looking-at "^\\s *$"))
(delete-region (point) (save-excursion (forward-line 1) (point))))
(insert "\n\n\n")
(forward-line -2)
(indent-to left-margin)
(insert "* " (or entry ""))))
;; Now insert the function name, if we have one.
;; Point is at the entry for this file,
;; either at the end of the line or at the first blank line.
(if defun
(progn
;; Make it easy to get rid of the function name.
(undo-boundary)
(insert (if (save-excursion
(beginning-of-line 1)
(looking-at "\\s *$"))
""
" ")
"(" defun "): "))
;; No function name, so put in a colon unless we have just a star.
(if (not (save-excursion
(beginning-of-line 1)
(looking-at "\\s *\\(\\*\\s *\\)?$")))
(insert ": ")))))
;;;###autoload
(defun add-change-log-entry-other-window (&optional whoami file-name)
"Find change log file in other window and add an entry for today.
Optional arg (interactive prefix) non-nil means prompt for user name and site.
Second arg is file name of change log. \
If nil, uses `change-log-default-name'."
(interactive (if current-prefix-arg
(list current-prefix-arg
(prompt-for-change-log-name))))
(add-change-log-entry whoami file-name t))
;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
;;;###autoload
(defun change-log-mode ()
"Major mode for editing change logs; like Indented Text Mode.
Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window].
Each entry behaves as a paragraph, and the entries for one day as a page.
Runs `change-log-mode-hook'."
(interactive)
(kill-all-local-variables)
(indented-text-mode)
(setq major-mode 'change-log-mode
mode-name "Change Log"
left-margin 8
fill-column 74
indent-tabs-mode t
tab-width 8)
(use-local-map change-log-mode-map)
;; Let each entry behave as one paragraph:
;; We really do want "^" in paragraph-start below: it is only the lines that
;; begin at column 0 (despite the left-margin of 8) that we are looking for.
(set (make-local-variable 'paragraph-start) "\\s *$\\|\f\\|^\\sw")
(set (make-local-variable 'paragraph-separate) "\\s *$\\|\f\\|^\\sw")
;; Let all entries for one day behave as one page.
;; Match null string on the date-line so that the date-line
;; is grouped with what follows.
(set (make-local-variable 'page-delimiter) "^\\<\\|^\f")
(set (make-local-variable 'version-control) 'never)
(set (make-local-variable 'adaptive-fill-regexp) "\\s *")
(set (make-local-variable 'font-lock-defaults)
'(change-log-font-lock-keywords t))
(run-hooks 'change-log-mode-hook))
;; It might be nice to have a general feature to replace this. The idea I
;; have is a variable giving a regexp matching text which should not be
;; moved from bol by filling. change-log-mode would set this to "^\\s *\\s(".
;; But I don't feel up to implementing that today.
(defun change-log-fill-paragraph (&optional justify)
"Fill the paragraph, but preserve open parentheses at beginning of lines.
Prefix arg means justify as well."
(interactive "P")
(let ((end (save-excursion (forward-paragraph) (point)))
(beg (save-excursion (backward-paragraph)(point)))
(paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
(fill-region beg end justify)))
(defvar add-log-current-defun-header-regexp
"^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]"
"*Heuristic regexp used by `add-log-current-defun' for unknown major modes.")
;;;###autoload
(defun add-log-current-defun ()
"Return name of function definition point is in, or nil.
Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
Texinfo (@node titles), Perl, and Fortran.
Other modes are handled by a heuristic that looks in the 10K before
point for uppercase headings starting in the first column or
identifiers followed by `:' or `=', see variable
`add-log-current-defun-header-regexp'.
Has a preference of looking backwards."
(condition-case nil
(save-excursion
(let ((location (point)))
(cond ((memq major-mode '(emacs-lisp-mode lisp-mode scheme-mode
lisp-interaction-mode))
;; If we are now precisely at the beginning of a defun,
;; make sure beginning-of-defun finds that one
;; rather than the previous one.
(or (eobp) (forward-char 1))
(beginning-of-defun)
;; Make sure we are really inside the defun found, not after it.
(if (and (looking-at "\\s(")
(progn (end-of-defun)
(< location (point)))
(progn (forward-sexp -1)
(>= location (point))))
(progn
(if (looking-at "\\s(")
(forward-char 1))
(forward-sexp 1)
(skip-chars-forward " '")
(buffer-substring (point)
(progn (forward-sexp 1) (point))))))
((and (memq major-mode '(c-mode c++-mode c++-c-mode objc-mode))
(save-excursion (beginning-of-line)
;; Use eq instead of = here to avoid
;; error when at bob and char-after
;; returns nil.
(while (eq (char-after (- (point) 2)) ?\\)
(forward-line -1))
(looking-at "[ \t]*#[ \t]*define[ \t]")))
;; Handle a C macro definition.
(beginning-of-line)
(while (eq (char-after (- (point) 2)) ?\\) ;not =; note above
(forward-line -1))
(search-forward "define")
(skip-chars-forward " \t")
(buffer-substring (point)
(progn (forward-sexp 1) (point))))
((memq major-mode '(c-mode c++-mode c++-c-mode objc-mode))
(beginning-of-line)
;; See if we are in the beginning part of a function,
;; before the open brace. If so, advance forward.
(while (not (looking-at "{\\|\\(\\s *$\\)"))
(forward-line 1))
(or (eobp)
(forward-char 1))
(beginning-of-defun)
(if (progn (end-of-defun)
(< location (point)))
(progn
(backward-sexp 1)
(let (beg tem)
(forward-line -1)
;; Skip back over typedefs of arglist.
(while (and (not (bobp))
(looking-at "[ \t\n]"))
(forward-line -1))
;; See if this is using the DEFUN macro used in Emacs,
;; or the DEFUN macro used by the C library.
(if (condition-case nil
(and (save-excursion
(end-of-line)
(while (= (preceding-char) ?\\)
(end-of-line 2))
(backward-sexp 1)
(beginning-of-line)
(setq tem (point))
(looking-at "DEFUN\\b"))
(>= location tem))
(error nil))
(progn
(goto-char tem)
(down-list 1)
(if (= (char-after (point)) ?\")
(progn
(forward-sexp 1)
(skip-chars-forward " ,")))
(buffer-substring (point)
(progn (forward-sexp 1) (point))))
(if (looking-at "^[+-]")
(get-method-definition)
;; Ordinary C function syntax.
(setq beg (point))
(if (and (condition-case nil
;; Protect against "Unbalanced parens" error.
(progn
(down-list 1) ; into arglist
(backward-up-list 1)
(skip-chars-backward " \t")
t)
(error nil))
;; Verify initial pos was after
;; real start of function.
(save-excursion
(goto-char beg)
;; For this purpose, include the line
;; that has the decl keywords. This
;; may also include some of the
;; comments before the function.
(while (and (not (bobp))
(save-excursion
(forward-line -1)
(looking-at "[^\n\f]")))
(forward-line -1))
(>= location (point)))
;; Consistency check: going down and up
;; shouldn't take us back before BEG.
(> (point) beg))
(let (end middle)
;; Don't include any final newline
;; in the name we use.
(if (= (preceding-char) ?\n)
(forward-char -1))
(setq end (point))
(backward-sexp 1)
;; Now find the right beginning of the name.
;; Include certain keywords if they
;; precede the name.
(setq middle (point))
(forward-word -1)
;; Ignore these subparts of a class decl
;; and move back to the class name itself.
(while (looking-at "public \\|private ")
(skip-chars-backward " \t:")
(setq end (point))
(backward-sexp 1)
(setq middle (point))
(forward-word -1))
(and (bolp)
(looking-at "struct \\|union \\|class ")
(setq middle (point)))
(buffer-substring middle end)))))))))
((memq major-mode
'(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el
plain-tex-mode latex-mode;; cmutex.el
))
(if (re-search-backward
"\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" nil t)
(progn
(goto-char (match-beginning 0))
(buffer-substring (1+ (point));; without initial backslash
(progn
(end-of-line)
(point))))))
((eq major-mode 'texinfo-mode)
(if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t)
(buffer-substring (match-beginning 1)
(match-end 1))))
((eq major-mode 'perl-mode)
(if (re-search-backward "^sub[ \t]+\\([^ \t\n]+\\)" nil t)
(buffer-substring (match-beginning 1)
(match-end 1))))
((eq major-mode 'fortran-mode)
;; must be inside function body for this to work
(beginning-of-fortran-subprogram)
(let ((case-fold-search t)) ; case-insensitive
;; search for fortran subprogram start
(if (re-search-forward
"^[ \t]*\\(program\\|subroutine\\|function\
\\|[ \ta-z0-9*]*[ \t]+function\\)"
nil t)
(progn
;; move to EOL or before first left paren
(if (re-search-forward "[(\n]" nil t)
(progn (forward-char -1)
(skip-chars-backward " \t"))
(end-of-line))
;; Use the name preceding that.
(buffer-substring (point)
(progn (forward-sexp -1)
(point)))))))
(t
;; If all else fails, try heuristics
(let (case-fold-search)
(end-of-line)
(if (re-search-backward add-log-current-defun-header-regexp
(- (point) 10000)
t)
(buffer-substring (match-beginning 1)
(match-end 1))))))))
(error nil)))
(defvar get-method-definition-md)
;; Subroutine used within get-method-definition.
;; Add the last match in the buffer to the end of `md',
;; followed by the string END; move to the end of that match.
(defun get-method-definition-1 (end)
(setq get-method-definition-md
(concat get-method-definition-md
(buffer-substring (match-beginning 1) (match-end 1))
end))
(goto-char (match-end 0)))
;; For objective C, return the method name if we are in a method.
(defun get-method-definition ()
(let ((get-method-definition-md "["))
(save-excursion
(if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t)
(get-method-definition-1 " ")))
(save-excursion
(cond
((re-search-forward "^\\([-+]\\)[ \t\n\f\r]*\\(([^)]*)\\)?\\s-*" nil t)
(get-method-definition-1 "")
(while (not (looking-at "[{;]"))
(looking-at
"\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ \t\n\f\r]*")
(get-method-definition-1 ""))
(concat get-method-definition-md "]"))))))
(provide 'add-log)
;;; add-log.el ends here

View File

@ -1,11 +0,0 @@
Here is a vi macro to create entries in the recommended format for
GDB's ChangeLogs.
map  1GO:r !date '+\%Y-\%m-\%d'2GA Jason Molenda (:r !whoamikJxA@:r !hostnameA)kJxkddjO * k$
It contains control and escape sequences, so don't just cut and paste it.
You'll need to change the "Jason Molenda" bit, of course. :-) Put this
in your $HOME/.exrc and when you type control-X in move-around-mode,
you'll have a changelog template inserted.
--- Jason Molenda

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -86,6 +86,9 @@ case "${host}" in
esac
AC_SUBST(GDBINIT)
#We need this for the host. BOUT header is in host order.
AC_C_BIGENDIAN
te_file=generic
# Makefile target for installing gas in $(tooldir)/bin.
@ -114,59 +117,14 @@ emulations=""
for this_target in $target $canon_targets ; do
changequote(,)dnl
eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
changequote([,])dnl
targ=${this_target}
. ${srcdir}/configure.tgt
# check for architecture variants
arch=
endian=
case ${cpu} in
am33_2.0) cpu_type=mn10300 endian=little ;;
alpha*) cpu_type=alpha ;;
arm*b|xscale*b|strongarm*b) cpu_type=arm endian=big ;;
arm*|xscale*|strongarm*) cpu_type=arm endian=little ;;
c4x*) cpu_type=tic4x ;;
hppa*) cpu_type=hppa ;;
changequote(,)dnl
i[3-7]86) cpu_type=i386 arch=i386;;
x86_64) cpu_type=i386 arch=x86_64;;
ia64) cpu_type=ia64 ;;
ip2k) cpu_type=ip2k endian=big ;;
iq2000) cpu_type=iq2000 endian=big ;;
m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
m680[012346]0) cpu_type=m68k ;;
changequote([,])dnl
m68008) cpu_type=m68k ;;
m683??) cpu_type=m68k ;;
m5200) cpu_type=m68k ;;
m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
or32*) cpu_type=or32 endian=big ;;
pjl*) cpu_type=pj endian=little ;;
pj*) cpu_type=pj endian=big ;;
powerpc*le*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
s390x*) cpu_type=s390 arch=s390x ;;
s390*) cpu_type=s390 arch=s390 ;;
sh5*) cpu_type=sh64 endian=big ;;
sh5le*) cpu_type=sh64 endian=little ;;
sh64*) cpu_type=sh64 endian=big ;;
sh64le*) cpu_type=sh64 endian=little ;;
sh*le) cpu_type=sh endian=little ;;
sh*) cpu_type=sh endian=big ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
sparc86x*) cpu_type=sparc arch=sparc86x ;;
sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
v850*) cpu_type=v850 ;;
xtensa*) cpu_type=xtensa arch=xtensa ;;
m32r) cpu_type=m32r target_cpu=m32r endian=big ;;
m32rle) cpu_type=m32r target_cpu=m32r endian=little ;;
*) cpu_type=${cpu} ;;
case ${target_cpu} in
crisv32)
AC_DEFINE_UNQUOTED(DEFAULT_CRIS_ARCH, $arch,
[Default CRIS architecture.])
;;
esac
if test ${this_target} = $target ; then
@ -175,354 +133,53 @@ changequote([,])dnl
continue
fi
generic_target=${cpu_type}-$vendor-$os
dev=no
bfd_gas=no
em=generic
# assign object format
generic_target=${cpu_type}-${target_vendor}-${target_os}
case ${generic_target} in
a29k-*-coff) fmt=coff ;;
a29k-amd-udi) fmt=coff ;;
a29k-amd-ebmon) fmt=coff ;;
a29k-nyu-sym1) fmt=coff ;;
a29k-*-rtems*) fmt=coff ;;
a29k-*-vxworks*) fmt=coff ;;
i386-*-sco3.2v5*)
if test ${this_target} = $target; then
AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
fi
;;
alpha*-*-*vms*) fmt=evax ;;
alpha*-*-netware*) fmt=ecoff ;;
alpha*-*-osf*) fmt=ecoff ;;
alpha*-*-linuxecoff*) fmt=ecoff ;;
alpha*-*-linux-gnu*) fmt=elf em=linux ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
alpha*-*-openbsd*) fmt=elf em=obsd ;;
# cpu_type for am33_2.0 is set to mn10300
mn10300-*-linux*) fmt=elf bfd_gas=yes em=linux ;;
arc-*-elf*) fmt=elf ;;
arm-*-aout) fmt=aout ;;
arm-*-coff | thumb-*-coff) fmt=coff ;;
arm-*-rtems* | thumb-*-rtems*) fmt=elf ;;
arm-*-elf | thumb-*-elf) fmt=elf ;;
arm-*-kaos*) fmt=elf ;;
arm*-*-conix*) fmt=elf ;;
arm-*-linux*aout*) fmt=aout em=linux ;;
arm*-*-linux-gnu*) fmt=elf em=linux ;;
arm*-*-uclinux*) fmt=elf em=linux ;;
arm-*-netbsdelf*) fmt=elf em=nbsd ;;
arm-*-*n*bsd*) fmt=aout em=nbsd ;;
arm-**-nto*) fmt=elf ;;
arm-*-oabi | thumb-*-oabi) fmt=elf ;;
arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
arm-wince-pe | arm-*-wince) fmt=coff em=wince-pe ;;
arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
arm-*-riscix*) fmt=aout em=riscix ;;
avr-*-*) fmt=elf ;;
cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
cris-*-*) fmt=multi bfd_gas=yes ;;
d10v-*-*) fmt=elf ;;
d30v-*-*) fmt=elf ;;
dlx-*-*) fmt=elf ;;
fr30-*-*) fmt=elf ;;
frv-*-*linux*) fmt=elf em=linux;;
frv-*-*) fmt=elf ;;
hppa-*-linux*) case ${cpu} in
hppa*64*) fmt=elf em=hppalinux64;;
hppa*) fmt=elf em=linux;;
esac ;;
hppa-*-*elf*) fmt=elf em=hppa ;;
hppa-*-lites*) fmt=elf em=hppa ;;
hppa-*-netbsd*) fmt=elf em=nbsd ;;
hppa-*-openbsd*) fmt=elf em=hppa ;;
hppa-*-osf*) fmt=som em=hppa ;;
hppa-*-rtems*) fmt=elf em=hppa ;;
hppa-*-hpux11*) case ${cpu} in
hppa*64*) fmt=elf em=hppa64 ;;
hppa*) fmt=som em=hppa ;;
esac ;;
hppa-*-hpux*) fmt=som em=hppa ;;
hppa-*-mpeix*) fmt=som em=hppa ;;
hppa-*-bsd*) fmt=som em=hppa ;;
hppa-*-hiux*) fmt=som em=hppa ;;
h8300-*-rtems*) fmt=coff ;;
h8300-*-coff) fmt=coff ;;
h8300-*-elf) fmt=elf ;;
h8500-*-rtems*) fmt=coff ;;
h8500-*-coff) fmt=coff ;;
i370-*-elf* | i370-*-linux*) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix ;;
i386-*-beospe*) fmt=coff em=pe ;;
i386-*-beos*) fmt=elf ;;
i386-*-coff) fmt=coff ;;
i386-*-elf) fmt=elf ;;
i386-*-kaos*) fmt=elf ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsdpe*) fmt=coff em=pe ;;
i386-*-netbsd*-gnu* | \
i386-*-knetbsd*-gnu | \
i386-*-netbsdelf*) fmt=elf em=nbsd ;;
i386-*-*n*bsd*) case ${cpu} in
x86_64) fmt=elf em=nbsd ;;
*) fmt=aout em=nbsd ;;
esac ;;
i386-*-linux*aout*) fmt=aout em=linux ;;
i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
i386-*-linux-gnu*) fmt=elf em=linux ;;
x86_64-*-linux-gnu*) fmt=elf em=linux ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
changequote(,)dnl
i386-*-sysv[45]*) fmt=elf ;;
i386-*-solaris*) fmt=elf ;;
i386-*-freebsdaout*) fmt=aout em=386bsd ;;
i386-*-freebsd[12].*) fmt=aout em=386bsd ;;
i386-*-freebsd[12]) fmt=aout em=386bsd ;;
changequote([,])dnl
i386-*-freebsd* | i386-*-kfreebsd*-gnu)
fmt=elf em=freebsd ;;
i386-*-sysv*) fmt=coff ;;
i386-*-sco3.2v5*coff) fmt=coff ;;
i386-*-isc*) fmt=coff ;;
i386-*-sco3.2v5*) fmt=elf
if test ${this_target} = $target; then
AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
fi ;;
i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
i386-*-msdosdjgpp* \
| i386-*-go32* \
| i386-go32-rtems*) fmt=coff em=go32
AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) ;;
i386-*-rtemself*) fmt=elf ;;
i386-*-rtemscoff*) fmt=coff ;;
i386-*-rtems*) fmt=elf ;;
i386-*-gnu*) fmt=elf ;;
i386-*-mach*) fmt=aout em=mach ;;
i386-*-msdos*) fmt=aout ;;
i386-*-moss*) fmt=elf ;;
i386-*-pe) fmt=coff em=pe ;;
i386-*-cygwin*) fmt=coff em=pe ;;
i386-*-interix*) fmt=coff em=interix ;;
i386-*-mingw32*) fmt=coff em=pe ;;
i386-*-nto-qnx*) fmt=elf ;;
i386-*-*nt*) fmt=coff em=pe ;;
i386-*-chaos) fmt=elf ;;
| i386-go32-rtems*)
AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?])
;;
i860-*-*) fmt=elf endian=little
AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;;
i960-*-bout) fmt=bout ;;
i960-*-coff) fmt=coff em=ic960 ;;
i960-*-rtems*) fmt=coff em=ic960 ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks5.0) fmt=bout ;;
i960-*-vxworks5.*) fmt=coff em=ic960 ;;
i960-*-vxworks*) fmt=bout ;;
i960-*-elf*) fmt=elf ;;
i860-*-*)
AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress)
;;
ia64-*-elf*) fmt=elf ;;
ia64-*-aix*) fmt=elf em=ia64aix ;;
ia64-*-linux-gnu*) fmt=elf em=linux ;;
ia64-*-hpux*) fmt=elf em=hpux ;;
ia64-*-netbsd*) fmt=elf em=nbsd ;;
ip2k-*-*) fmt=elf ;;
iq2000-*-elf) fmt=elf bfd_gas=yes ;;
m32r-*-elf*) fmt=elf ;;
m32r-*-linux*) fmt=elf em=linux;;
m68hc11-*-* | m6811-*-*) fmt=elf ;;
m68hc12-*-* | m6812-*-*) fmt=elf ;;
m68k-*-vxworks*) fmt=aout em=sun3 ;;
m68k-ericsson-ose) fmt=aout em=sun3 ;;
m68k-*-sunos*) fmt=aout em=sun3 ;;
m68k-motorola-sysv*) fmt=coff em=delta ;;
m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
m68k-apollo-*) fmt=coff em=apollo ;;
m68k-*-elf*) fmt=elf ;;
m68k-*-sysv4*) fmt=elf em=svr4 ;;
m68k-*-sysv*) fmt=coff ;;
m68k-*-coff | m68k-*-rtemscoff*) fmt=coff ;;
m68k-*-rtems*) fmt=elf ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
m68k-*-linux-gnu*) fmt=elf em=linux ;;
m68k-*-uclinux*) fmt=elf ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-apple-aux*) fmt=coff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
m88k-*-coff*) fmt=coff ;;
mcore-*-elf) fmt=elf ;;
mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
# don't change em like *-*-bsd does
mips-dec-openbsd*) fmt=elf endian=little ;;
mips-sony-bsd*) fmt=ecoff ;;
mips-sony-bsd*)
;;
mips-*-bsd*)
AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
mips-*-ultrix*) fmt=ecoff endian=little ;;
mips-*-osf*) fmt=ecoff endian=little ;;
mips-*-ecoff*) fmt=ecoff ;;
mips-*-pe*) fmt=coff endian=little em=pe ;;
mips-*-irix6*) fmt=elf em=irix ;;
mips-*-irix5*) fmt=elf em=irix ;;
mips-*-irix*) fmt=ecoff em=irix ;;
mips-*-lnews*) fmt=ecoff em=lnews ;;
mips-*-riscos*) fmt=ecoff ;;
mips*-*-linux*) fmt=elf em=tmips ;;
mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
mips-*-sysv*) fmt=ecoff ;;
mips-*-elf* | mips-*-rtems*) fmt=elf ;;
mips-*-netbsd*) fmt=elf em=tmips;;
mips-*-openbsd*) fmt=elf ;;
AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
;;
mmix-*-*) fmt=elf ;;
mn10200-*-*) fmt=elf ;;
mn10300-*-*) fmt=elf ;;
msp430-*-*) fmt=elf ;;
openrisc-*-*) fmt=elf ;;
or32-*-rtems*) fmt=elf ;;
or32-*-coff) fmt=coff ;;
or32-*-elf) fmt=elf ;;
pj*) fmt=elf ;;
ppc-*-pe | ppc-*-cygwin*) fmt=coff em=pe ;;
ppc-*-winnt*) fmt=coff em=pe ;;
changequote(,)dnl
ppc-*-aix5.[01]) fmt=coff em=aix5 ;;
changequote([,])dnl
ppc-*-aix5.*) fmt=coff em=aix5
AC_DEFINE(AIX_WEAK_SUPPORT, 1,
ppc-*-aix5.*)
AC_DEFINE(AIX_WEAK_SUPPORT, 1,
[Define if using AIX 5.2 value for C_WEAKEXT.])
;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf em=nbsd ;;
ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
ppc-*-linux-gnu*) fmt=elf em=linux
case "$endian" in
big) ;;
*) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
esac ;;
ppc-*-solaris*) fmt=elf
if test ${this_target} = $target; then
AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
[Define if default target is PowerPC Solaris.])
fi
if test x${endian} = xbig; then
AC_MSG_ERROR(Solaris must be configured little endian)
fi ;;
ppc-*-rtems*) fmt=elf ;;
ppc-*-macos* | ppc-*-mpw*) fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
ppc-**-nto*) fmt=elf ;;
ppc-*-kaos*) fmt=elf ;;
;;
ppc-*-linux-gnu*)
case "$endian" in
big) ;;
*) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
esac
;;
ppc-*-solaris*)
if test ${this_target} = $target; then
AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
[Define if default target is PowerPC Solaris.])
fi
if test x${endian} = xbig; then
AC_MSG_ERROR(Solaris must be configured little endian)
fi
;;
s390x-*-linux-gnu*) fmt=elf em=linux ;;
s390-*-linux-gnu*) fmt=elf em=linux ;;
sh*-*-linux*) fmt=elf em=linux
case ${cpu} in
sh*eb) endian=big ;;
*) endian=little ;;
esac ;;
sh5*-*-netbsd*) fmt=elf em=nbsd ;;
sh64*-*-netbsd*) fmt=elf em=nbsd ;;
sh*-*-netbsdelf*) fmt=elf em=nbsd ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-nto*) fmt=elf ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
sh-*-rtemscoff*) fmt=coff ;;
sh-*-rtems*) fmt=elf ;;
sh-*-kaos*) fmt=elf ;;
shle*-*-kaos*) fmt=elf ;;
sh64-*-elf*) fmt=elf ;;
ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
ns32k-*-*n*bsd*) fmt=aout em=nbsd532 ;;
sparc-*-rtemsaout*) fmt=aout ;;
sparc-*-rtemself*) fmt=elf ;;
sparc-*-rtems*) fmt=elf ;;
sparc-*-sunos4*) fmt=aout em=sun3 ;;
sparc-*-aout | sparc*-*-vxworks*) fmt=aout em=sparcaout ;;
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
sparc-*-linux-gnu*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf) fmt=elf ;;
sparc-*-sysv4*) fmt=elf ;;
sparc-*-solaris*) fmt=elf ;;
sparc-*-netbsdelf*) fmt=elf em=nbsd ;;
sparc-*-*n*bsd*) case ${cpu} in
sparc64) fmt=elf em=nbsd ;;
*) fmt=aout em=nbsd ;;
esac ;;
strongarm-*-coff) fmt=coff ;;
strongarm-*-elf) fmt=elf ;;
strongarm-*-kaos*) fmt=elf ;;
xscale-*-coff) fmt=coff ;;
xscale-*-elf) fmt=elf ;;
tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
tic4x-*-* | c4x-*-*) fmt=coff bfd_gas=yes ;;
tic54x-*-* | c54x*-*-*) fmt=coff bfd_gas=yes need_libm=yes;;
tic80-*-*) fmt=coff ;;
v850-*-*) fmt=elf ;;
v850e-*-*) fmt=elf ;;
v850ea-*-*) fmt=elf ;;
vax-*-netbsdelf*) fmt=elf em=nbsd ;;
vax-*-netbsd*) fmt=aout em=nbsd ;;
vax-*-bsd* | vax-*-ultrix*) fmt=aout ;;
vax-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
vax-*-vms) fmt=vms ;;
w65-*-*) fmt=coff ;;
xstormy16-*-*) fmt=elf ;;
xtensa-*-*) fmt=elf ;;
z8k-*-coff | z8k-*-sim) fmt=coff ;;
*-*-aout | *-*-scout) fmt=aout ;;
*-*-freebsd* | *-*-kfreebsd*-gnu) fmt=elf em=freebsd ;;
*-*-nindy*) fmt=bout ;;
*-*-bsd*) fmt=aout em=sun3 ;;
*-*-generic) fmt=generic ;;
*-*-xray | *-*-hms) fmt=coff ;;
*-*-sim) fmt=coff ;;
*-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf dev=yes ;;
*-*-aros*) fmt=elf em=linux bfd_gas=yes ;;
*-*-vxworks | *-*-windiss) fmt=elf ;;
*-*-netware) fmt=elf ;;
sh*-*-symbianelf*)
AC_DEFINE(TARGET_SYMBIAN, 1, [Define if target is Symbian OS.])
;;
esac
if test ${this_target} = $target ; then
@ -538,13 +195,6 @@ changequote([,])dnl
fi
fi
case ${cpu_type}-${fmt} in
alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
| pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
| *-elf | *-ecoff | *-som)
bfd_gas=yes ;;
esac
# Other random stuff.
case ${cpu_type} in

View File

@ -1,42 +0,0 @@
/* Resources for GNU AS. */
#include "SysTypes.r"
/* Version resources. */
resource 'vers' (1) {
0,
0,
0,
0,
verUs,
VERSION_STRING,
VERSION_STRING " (C) 1986-95 FSF, Inc."
};
resource 'vers' (2, purgeable) {
0,
0,
0,
0,
verUs,
VERSION_STRING,
"GAS " VERSION_STRING " for MPW"
};
#ifdef WANT_CFRG
#include "CodeFragmentTypes.r"
resource 'cfrg' (0) {
{
kPowerPC,
kFullLib,
kNoVersionNum, kNoVersionNum,
0,0,
kIsApp, kOnDiskFlat, kZeroOffset, kWholeFork,
PROG_NAME
}
};
#endif /* WANT_CFRG */

View File

@ -1,115 +0,0 @@
# Configuration fragment for GAS.
Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
If "{target_arch}" =~ /powerpc/
Set short_arch_name "ppc"
Set target_cpu "powerpc"
Else
Set short_arch_name "{target_arch}"
End If
# The following works for many configurations, though not all.
Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
Set target_os `echo {target_canonical} | sed -e 's/.*-.*-//'`
Set bfd_gas no
Set TDEFINES ""
Set EXTRA_OBJECTS ""
# Default emulation.
Set em generic
If "{target_canonical}" =~ /m68k-apple-macos/
Set obj_format "coff"
Set TDEFINES '-d M68KCOFF'
Set EXTRA_OBJECTS '"{o}"m68k-parse.c.o'
Else If "{target_canonical}" =~ /powerpc-apple-macos/
Set obj_format "coff"
Set bfd_gas yes
Set em macos
Else If "{target_canonical}" =~ /i386-\Option-x-go32/
Set obj_format "coff"
Set TDEFINES '-d I386COFF'
Else If "{target_canonical}" =~ /m68k-\Option-x-coff/
Set TDEFINES '-d M68KCOFF'
Else If "{target_canonical}" =~ /mips-idt-ecoff/
Set bfd_gas yes
Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
Else If "{target_canonical}" =~ /mips-\Option-x-\Option-x/
# Assume other OSes etc use ELF
Set obj_format "elf"
Set bfd_gas yes
Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN=1'
forward-include "{srcroot}"bfd:elf-bfd.h 'bfd/elf-bfd.h'
Else If "{target_canonical}" =~ /sh-\Option-x-hms/
Set obj_format "coff"
forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
End If
forward-include "{srcdir}"config:tc-{short_arch_name}.c targ-cpu.c
forward-include "{srcdir}"config:tc-{short_arch_name}.h targ-cpu.h
forward-include "{srcdir}"config:obj-{obj_format}.c obj-format.c
forward-include "{srcdir}"config:obj-{obj_format}.h obj-format.h
forward-include "{srcdir}"config:te-{em}.h targ-env.h
# Special cases for float handling.
If "{target_arch}" =~ /ns32k/
forward-include "{srcdir}"config:atof-ns32k.c atof-targ.c
Else If "{target_arch}" =~ /tahoe/
forward-include "{srcdir}"config:atof-tahoe.c atof-targ.c
Else If "{target_arch}" =~ /vax/
forward-include "{srcdir}"config:atof-vax.c atof-targ.c
Else
# Use IEEE by default.
forward-include "{srcdir}"config:atof-ieee.c atof-targ.c
End If
Echo '# From mpw-config.in' > "{o}"mk.tmp
Echo "TDEFINES = " {TDEFINES} >> "{o}"mk.tmp
Echo "EXTRA_OBJECTS = " {EXTRA_OBJECTS} >> "{o}"mk.tmp
# (We use the -n option here so as not to get extra spaces inserted)
Echo -n 'TARG_CPU_DEP = {TARG_CPU_DEP_' >> "{o}"mk.tmp
Echo -n {short_arch_name} >> "{o}"mk.tmp
Echo -n '}' >> "{o}"mk.tmp
Echo '# End from mpw-config.in' >> "{o}"mk.tmp
Echo '/* conf. Generated by mpw-configure. */' > "{o}"conf.new
Echo -n '#define TARGET_CPU "' >> "{o}"conf.new
Echo -n "{target_cpu}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo -n '#define TARGET_OS "' >> "{o}"conf.new
Echo -n "{target_os}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo -n '#define TARGET_ALIAS "' >> "{o}"conf.new
Echo -n "{target_alias}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo -n '#define TARGET_CANONICAL "' >> "{o}"conf.new
Echo -n "{target_canonical}" >> "{o}"conf.new
Echo '"' >> "{o}"conf.new
Echo '#include "mpw.h"' >> "{o}"conf.new
If "{bfd_gas}" =~ /yes/
Echo "#define BFD_ASSEMBLER" >> "{o}"conf.new
Else
Echo "#define MANY_SEGMENTS" >> "{o}"conf.new
End If
Echo '#define CR_EOL' >> "{o}"conf.new
Echo '#define OBJ_COFF_OMIT_TIMESTAMP' >> "{o}"conf.new
Echo '#define LOSING_COMPILER' >> "{o}"conf.new
MoveIfChange "{o}"conf.new "{o}"conf
sed -e "s/@srcdir@/{srcdir}/" "{srcdir}"gdbinit.in > "{o}"_gdbinit

View File

@ -1,96 +0,0 @@
# Sed commands that finish translating the GAS Unix Makefile to MPW syntax.
/^# @target_frag@/a\
\
HDEFINES = \
LOCAL_LOADLIBES = \
/^srcroot = /s/^/#/
/^target_alias = /s/^/#/
/INCLUDES/s/-i "{srcdir}":\([a-z]*\)/-i "{topsrcdir}"\1/
/INCLUDES/s/-i "{srcdir}"\.\./-i "{topsrcdir}"/
/^INCLUDES = .*$/s/$/ -i "{topsrcdir}"include:mpw: -i ::extra-include:/
/$(TARG_CPU_DEP_@target_cpu_type@)/s/$(TARG_CPU_DEP_@target_cpu_type@)/{TARG_CPU_DEP}/
/@OPCODES_LIB@/s/@OPCODES_LIB@/::opcodes:libopcodes.o/
/@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
# Point at the libraries directly.
/@OPCODES_DEP@/s/@OPCODES_DEP@/::opcodes:libopcodes.o/
/@BFDDEP@/s/@BFDDEP@/::bfd:libbfd.o/
# Don't need this.
/@HLDFLAGS@/s/@HLDFLAGS@//
/extra_objects@/s/extra_objects@/{EXTRA_OBJECTS}/
/LOADLIBES/s/{LOADLIBES}/{EXTRALIBS}/
/@ALL_OBJ_DEPS@/s/@ALL_OBJ_DEPS@/::bfd:bfd.h/
# This causes problems - not sure why.
/^tags TAGS/,/etags /d
/^make-gas.com/s/^/#/
/true/s/ ; @true$//
# Remove references to conf.in, we don't need them.
/conf\.in/s/conf\.in//g
# Use _gdbinit everywhere instead of .gdbinit.
/gdbinit/s/\.gdbinit/_gdbinit/g
/atof-targ/s/"{s}"atof-targ\.c/"{o}"atof-targ.c/g
/config/s/"{s}"config\.h/"{o}"config.h/g
/config/s/^config\.h/"{o}"config.h/
/obj-format/s/"{s}"obj-format\.c/"{o}"obj-format.c/g
/obj-format/s/"{s}"obj-format\.h/"{o}"obj-format.h/g
/targ-cpu/s/"{s}"targ-cpu\.c/"{o}"targ-cpu.c/g
/targ-cpu/s/"{s}"targ-cpu\.h/"{o}"targ-cpu.h/g
/targ-env/s/"{s}"targ-env\.h/"{o}"targ-env.h/g
/m68k-parse.c/s/"{s}"m68k-parse\.c/"{o}"m68k-parse.c/g
/m68k-parse.c/s/^m68k-parse\.c/"{o}"m68k-parse.c/
# Whack out the config.h dependency, it only causes excess rebuilds.
/{OBJS}/s/{OBJS} \\Option-f "{o}"config.h/{OBJS} \\Option-f/
# ALL_CFLAGS includes TDEFINES, which is not desirable at link time.
/CC_LD/s/ALL_CFLAGS/CFLAGS/g
# The resource file is called mac-as.r.
/as.new.r/s/as\.new\.r/mac-as.r/
# ...and the PROG_NAME doesn't have a .new in it.
/PROG_NAME/s/PROG_NAME='"'as.new'"'/PROG_NAME='"'as'"'/
# Whack out recursive makes, they won't work.
/^[ ][ ]*srcroot=/,/^[ ][ ]*(cd /d
# Work around quoting problems by using multiple echo commands.
/'#define GAS_VERSION "{VERSION}"'/c\
Echo -n '#define GAS_VERSION "' >> "{o}"config.new\
Echo -n "{VERSION}" >> "{o}"config.new\
Echo -n '"' >> "{o}"config.new
# Add a "stamps" target.
$a\
stamps \\Option-f config-stamp\
/^install \\Option-f/,/^$/c\
install \\Option-f all install-only\
\
install-only \\Option-f\
NewFolderRecursive "{bindir}"\
Duplicate -y :as.new "{bindir}"as\
# Whack out config-rebuilding targets, they won't work.
/^Makefile \\Option-f/,/^$/d
/^config.status \\Option-f/,/^$/d
/^"{o}"config.h \\Option-f/s/^/#/

6523
gnu/dist/binutils/md5.sum vendored Normal file

File diff suppressed because it is too large Load Diff