mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
Import GNU binutils-2.9.1. This will break things for a few minutes
until I've made the commits to resolve the conflicts. Submitted by: Doug Rabson <dfr>
This commit is contained in:
parent
11ab2a9095
commit
f3c0afbfb0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/binutils/dist/; revision=38889
|
@ -1,6 +1,7 @@
|
|||
#
|
||||
# Makefile for directory with subdirs to build.
|
||||
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
|
||||
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
# Free Software Foundation
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -20,16 +21,25 @@
|
|||
srcdir = .
|
||||
|
||||
prefix = /usr/local
|
||||
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/bin
|
||||
libdir = $(exec_prefix)/lib
|
||||
|
||||
bindir=${exec_prefix}/bin
|
||||
sbindir=${exec_prefix}/sbin
|
||||
libexecdir=${exec_prefix}/libexec
|
||||
datadir=${prefix}/share
|
||||
sysconfdir=${prefix}/etc
|
||||
sharedstatedir=${prefix}/com
|
||||
localstatedir=${prefix}/var
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
oldincludedir=/usr/include
|
||||
infodir=${prefix}/info
|
||||
mandir=${prefix}/man
|
||||
|
||||
tooldir = $(exec_prefix)/$(target)
|
||||
|
||||
program_transform_name =
|
||||
|
||||
datadir = $(prefix)/share
|
||||
mandir = $(prefix)/man
|
||||
man1dir = $(mandir)/man1
|
||||
man2dir = $(mandir)/man2
|
||||
man3dir = $(mandir)/man3
|
||||
|
@ -39,16 +49,18 @@ man6dir = $(mandir)/man6
|
|||
man7dir = $(mandir)/man7
|
||||
man8dir = $(mandir)/man8
|
||||
man9dir = $(mandir)/man9
|
||||
infodir = $(prefix)/info
|
||||
includedir = $(prefix)/include
|
||||
GDB_NLM_DEPS =
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
INSTALL = $$s/install.sh -c
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
|
||||
# cygwin32 host.
|
||||
INSTALL_PROGRAM_ARGS =
|
||||
|
||||
INSTALL = $(SHELL) $$s/install-sh -c
|
||||
INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
|
||||
INSTALL_SCRIPT = $(INSTALL)
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
|
||||
|
||||
INSTALL_DOSREL = install-dosrel-fake
|
||||
|
||||
|
@ -63,9 +75,10 @@ HOST_CC = $(CC_FOR_BUILD)
|
|||
HOST_PREFIX =
|
||||
HOST_PREFIX_1 = loser-
|
||||
|
||||
# We don't specify -g -O because many compilers don't support -g -O,
|
||||
# and/or -O is broken in and of itself.
|
||||
# These flag values are normally overridden by the configure script.
|
||||
CFLAGS = -g
|
||||
CXXFLAGS = -g -O2
|
||||
|
||||
LIBCFLAGS = $(CFLAGS)
|
||||
CFLAGS_FOR_TARGET = $(CFLAGS)
|
||||
LDFLAGS_FOR_TARGET =
|
||||
|
@ -73,10 +86,9 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
|||
PICFLAG =
|
||||
PICFLAG_FOR_TARGET =
|
||||
|
||||
CXX = gcc
|
||||
CXX = c++
|
||||
|
||||
# Use -O2 to stress test the compiler.
|
||||
CXXFLAGS = -g -O2
|
||||
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
|
||||
CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
@ -84,8 +96,12 @@ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
|||
RANLIB = ranlib
|
||||
|
||||
DLLTOOL = dlltool
|
||||
WINDRES = windres
|
||||
|
||||
NM = nm
|
||||
|
||||
LD = ld
|
||||
|
||||
# Not plain GZIP, since gzip looks there for extra command-line options.
|
||||
GZIPPROG = gzip
|
||||
|
||||
|
@ -93,7 +109,20 @@ GZIPPROG = gzip
|
|||
DEFAULT_YACC = yacc
|
||||
DEFAULT_LEX = lex
|
||||
|
||||
BISON = bison -y
|
||||
BISON = `if [ -f $$r/bison/bison ] ; then \
|
||||
echo $$r/bison/bison -L $$s/bison/ ; \
|
||||
else \
|
||||
echo bison ; \
|
||||
fi`
|
||||
|
||||
YACC = `if [ -f $$r/bison/bison ] ; then \
|
||||
echo $$r/bison/bison -y -L $$s/bison/ ; \
|
||||
elif [ -f $$r/byacc/byacc ] ; then \
|
||||
echo $$r/byacc/byacc ; \
|
||||
else \
|
||||
echo ${DEFAULT_YACC} ; \
|
||||
fi`
|
||||
|
||||
LEX = `if [ -f $$r/flex/flex ] ; \
|
||||
then echo $$r/flex/flex ; \
|
||||
else echo ${DEFAULT_LEX} ; fi`
|
||||
|
@ -130,7 +159,7 @@ OTHERS =
|
|||
|
||||
# This is set by the configure script to the list of directories which
|
||||
# should be built using the target tools.
|
||||
TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
|
||||
TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup opcodes cygmon
|
||||
|
||||
# Target libraries are put under this directory:
|
||||
# Changed by configure to $(target_alias) if cross.
|
||||
|
@ -153,11 +182,11 @@ REALLY_SET_LIB_PATH = \
|
|||
export $(RPATH_ENVVAR);
|
||||
|
||||
ALL = all.normal
|
||||
INSTALL_TARGET = install-dirs \
|
||||
INSTALL_TARGET = installdirs \
|
||||
install-gcc \
|
||||
$(INSTALL_MODULES) \
|
||||
$(INSTALL_TARGET_MODULES) \
|
||||
$(INSTALL_X11_MODULES) \
|
||||
install-gcc \
|
||||
$(INSTALL_DOSREL)
|
||||
|
||||
|
||||
|
@ -165,7 +194,7 @@ CC_FOR_TARGET = ` \
|
|||
if [ -f $$r/gcc/xgcc ] ; then \
|
||||
if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
|
||||
if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
|
||||
echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
|
||||
echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
|
||||
else \
|
||||
echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
|
||||
fi; \
|
||||
|
@ -191,7 +220,7 @@ CXX_FOR_TARGET = ` \
|
|||
if [ -f $$r/gcc/xgcc ] ; then \
|
||||
if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
|
||||
if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
|
||||
echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
|
||||
echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
|
||||
else \
|
||||
echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
|
||||
fi; \
|
||||
|
@ -202,13 +231,13 @@ CXX_FOR_TARGET = ` \
|
|||
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
||||
echo $(CXX); \
|
||||
else \
|
||||
t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
|
||||
t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
AS_FOR_TARGET = ` \
|
||||
if [ -f $$r/gas/as.new ] ; then \
|
||||
echo $$r/gas/as.new ; \
|
||||
if [ -f $$r/gas/as-new ] ; then \
|
||||
echo $$r/gas/as-new ; \
|
||||
else \
|
||||
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
||||
echo $(AS); \
|
||||
|
@ -218,8 +247,8 @@ AS_FOR_TARGET = ` \
|
|||
fi`
|
||||
|
||||
LD_FOR_TARGET = ` \
|
||||
if [ -f $$r/ld/ld.new ] ; then \
|
||||
echo $$r/ld/ld.new ; \
|
||||
if [ -f $$r/ld/ld-new ] ; then \
|
||||
echo $$r/ld/ld-new ; \
|
||||
else \
|
||||
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
||||
echo $(LD); \
|
||||
|
@ -239,6 +268,17 @@ DLLTOOL_FOR_TARGET = ` \
|
|||
fi; \
|
||||
fi`
|
||||
|
||||
WINDRES_FOR_TARGET = ` \
|
||||
if [ -f $$r/binutils/windres ] ; then \
|
||||
echo $$r/binutils/windres ; \
|
||||
else \
|
||||
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
||||
echo $(WINDRES); \
|
||||
else \
|
||||
t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
AR_FOR_TARGET = ` \
|
||||
if [ -f $$r/binutils/ar ] ; then \
|
||||
echo $$r/binutils/ar ; \
|
||||
|
@ -262,8 +302,8 @@ RANLIB_FOR_TARGET = ` \
|
|||
fi`
|
||||
|
||||
NM_FOR_TARGET = ` \
|
||||
if [ -f $$r/binutils/nm.new ] ; then \
|
||||
echo $$r/binutils/nm.new ; \
|
||||
if [ -f $$r/binutils/nm-new ] ; then \
|
||||
echo $$r/binutils/nm-new ; \
|
||||
else \
|
||||
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
||||
echo $(NM); \
|
||||
|
@ -294,7 +334,7 @@ BASE_FLAGS_TO_PASS = \
|
|||
"INSTALL=$(INSTALL)" \
|
||||
"INSTALL_DATA=$(INSTALL_DATA)" \
|
||||
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||
"INSTALL_XFORM=$(INSTALL_XFORM)" \
|
||||
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
||||
"LDFLAGS=$(LDFLAGS)" \
|
||||
"LEX=$(LEX)" \
|
||||
"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
|
||||
|
@ -309,14 +349,29 @@ BASE_FLAGS_TO_PASS = \
|
|||
"PICFLAG=$(PICFLAG)" \
|
||||
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
||||
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
|
||||
"RPATH_ENVVAR=$(RPATH_ENVVAR)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
"EXPECT=$(EXPECT)" \
|
||||
"RUNTEST=$(RUNTEST)" \
|
||||
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
||||
"YACC=$(BISON)" \
|
||||
"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
|
||||
"YACC=$(YACC)" \
|
||||
"bindir=$(bindir)" \
|
||||
"datadir=$(datadir)" \
|
||||
"exec_prefix=$(exec_prefix)" \
|
||||
"includedir=$(includedir)" \
|
||||
"infodir=$(infodir)" \
|
||||
"libdir=$(libdir)" \
|
||||
"libexecdir=$(libexecdir)" \
|
||||
"lispdir=$(lispdir)" \
|
||||
"localstatedir=$(localstatedir)" \
|
||||
"mandir=$(mandir)" \
|
||||
"oldincludedir=$(oldincludedir)" \
|
||||
"prefix=$(prefix)" \
|
||||
"tooldir=$(tooldir)"
|
||||
"sbindir=$(sbindir)" \
|
||||
"sharedstatedir=$(sharedstatedir)" \
|
||||
"sysconfdir=$(sysconfdir)" \
|
||||
"tooldir=$(tooldir)"
|
||||
|
||||
# Flags to pass down to most sub-makes, in which we're building with
|
||||
# the host environment.
|
||||
|
@ -327,9 +382,10 @@ EXTRA_HOST_FLAGS = \
|
|||
'CC=$(CC)' \
|
||||
'CXX=$(CXX)' \
|
||||
'DLLTOOL=$(DLLTOOL)' \
|
||||
'LD=$(LD)' \
|
||||
'NM=$(NM)' \
|
||||
'RANLIB=$(RANLIB)'
|
||||
|
||||
'RANLIB=$(RANLIB)' \
|
||||
'WINDRES=$(WINDRES)'
|
||||
|
||||
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
|
||||
|
||||
|
@ -362,7 +418,8 @@ EXTRA_TARGET_FLAGS = \
|
|||
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
|
||||
'NM=$$(NM_FOR_TARGET)' \
|
||||
'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
|
||||
'RANLIB=$$(RANLIB_FOR_TARGET)'
|
||||
'RANLIB=$$(RANLIB_FOR_TARGET)' \
|
||||
'WINDRES=$$(WINDRES_FOR_TARGET)'
|
||||
|
||||
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
|
||||
|
||||
|
@ -383,16 +440,17 @@ EXTRA_GCC_FLAGS = \
|
|||
'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
|
||||
'NM=$(NM)' \
|
||||
'RANLIB=$$(RANLIB_FOR_TARGET)' \
|
||||
'WINDRES=$$(WINDRES_FOR_TARGET)' \
|
||||
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
|
||||
`if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
|
||||
`if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
|
||||
`if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
|
||||
`if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
|
||||
`if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
|
||||
`if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
|
||||
`if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
|
||||
`if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
|
||||
`if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
|
||||
"`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
|
||||
"`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
|
||||
|
||||
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
|
||||
|
||||
|
@ -401,11 +459,13 @@ GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
|
|||
ALL_MODULES = \
|
||||
all-apache \
|
||||
all-autoconf \
|
||||
all-automake \
|
||||
all-bash \
|
||||
all-bfd \
|
||||
all-binutils \
|
||||
all-bison \
|
||||
all-byacc \
|
||||
all-cvs \
|
||||
all-cvssrc \
|
||||
all-db \
|
||||
all-dejagnu \
|
||||
all-diff \
|
||||
|
@ -417,6 +477,8 @@ ALL_MODULES = \
|
|||
all-flex \
|
||||
all-gas \
|
||||
all-gawk \
|
||||
all-gettext \
|
||||
all-gnuserv \
|
||||
all-gprof \
|
||||
all-grep \
|
||||
all-grez \
|
||||
|
@ -424,9 +486,11 @@ ALL_MODULES = \
|
|||
all-hello \
|
||||
all-indent \
|
||||
all-inet \
|
||||
all-intl \
|
||||
all-ispell \
|
||||
all-itcl \
|
||||
all-ld \
|
||||
all-libgui \
|
||||
all-libiberty \
|
||||
all-m4 \
|
||||
all-make \
|
||||
|
@ -443,7 +507,7 @@ ALL_MODULES = \
|
|||
all-send-pr \
|
||||
all-shellutils \
|
||||
all-sim \
|
||||
all-sn \
|
||||
all-snavigator \
|
||||
all-tar \
|
||||
all-tcl \
|
||||
all-texinfo \
|
||||
|
@ -460,16 +524,18 @@ ALL_MODULES = \
|
|||
# are tested as part of the host's native tool-chain, and not
|
||||
# tested in a cross configuration.
|
||||
NATIVE_CHECK_MODULES = \
|
||||
check-bison \
|
||||
check-byacc \
|
||||
check-flex
|
||||
|
||||
CROSS_CHECK_MODULES = \
|
||||
check-apache \
|
||||
check-autoconf \
|
||||
check-automake \
|
||||
check-bash \
|
||||
check-bfd \
|
||||
check-binutils \
|
||||
check-cvs \
|
||||
check-cvssrc \
|
||||
check-db \
|
||||
check-dejagnu \
|
||||
check-diff \
|
||||
|
@ -479,15 +545,19 @@ CROSS_CHECK_MODULES = \
|
|||
check-find \
|
||||
check-gas \
|
||||
check-gawk \
|
||||
check-gettext \
|
||||
check-gnuserv \
|
||||
check-gprof \
|
||||
check-grep \
|
||||
check-gzip \
|
||||
check-hello \
|
||||
check-indent \
|
||||
check-inet \
|
||||
check-intl \
|
||||
check-ispell \
|
||||
check-itcl \
|
||||
check-ld \
|
||||
check-libgui \
|
||||
check-libiberty \
|
||||
check-m4 \
|
||||
check-make \
|
||||
|
@ -502,7 +572,7 @@ CROSS_CHECK_MODULES = \
|
|||
check-sed \
|
||||
check-send-pr \
|
||||
check-shellutils \
|
||||
check-sn \
|
||||
check-snavigator \
|
||||
check-sim \
|
||||
check-tar \
|
||||
check-tcl \
|
||||
|
@ -520,15 +590,19 @@ CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
|
|||
# We put install-opcodes before install-binutils because the installed
|
||||
# binutils might be on PATH, and they might need the shared opcodes
|
||||
# library.
|
||||
# We put install-tcl before install-itcl because itcl wants to run a
|
||||
# program on installation which uses the Tcl libraries.
|
||||
INSTALL_MODULES = \
|
||||
install-apache \
|
||||
install-autoconf \
|
||||
install-automake \
|
||||
install-bash \
|
||||
install-bfd \
|
||||
install-opcodes \
|
||||
install-binutils \
|
||||
install-bison \
|
||||
install-byacc \
|
||||
install-cvs \
|
||||
install-cvssrc \
|
||||
install-db \
|
||||
install-dejagnu \
|
||||
install-diff \
|
||||
|
@ -540,6 +614,8 @@ INSTALL_MODULES = \
|
|||
install-flex \
|
||||
install-gas \
|
||||
install-gawk \
|
||||
install-gettext \
|
||||
install-gnuserv \
|
||||
install-gprof \
|
||||
install-grep \
|
||||
install-grez \
|
||||
|
@ -547,9 +623,12 @@ INSTALL_MODULES = \
|
|||
install-hello \
|
||||
install-indent \
|
||||
install-inet \
|
||||
install-intl \
|
||||
install-ispell \
|
||||
install-tcl \
|
||||
install-itcl \
|
||||
install-ld \
|
||||
install-libgui \
|
||||
install-libiberty \
|
||||
install-m4 \
|
||||
install-make \
|
||||
|
@ -564,9 +643,8 @@ INSTALL_MODULES = \
|
|||
install-send-pr \
|
||||
install-shellutils \
|
||||
install-sim \
|
||||
install-sn \
|
||||
install-snavigator \
|
||||
install-tar \
|
||||
install-tcl \
|
||||
install-textutils \
|
||||
install-tgas \
|
||||
install-time \
|
||||
|
@ -583,7 +661,8 @@ ALL_X11_MODULES = \
|
|||
all-gash \
|
||||
all-guile \
|
||||
all-tclX \
|
||||
all-tk
|
||||
all-tk \
|
||||
all-tix
|
||||
|
||||
# This is a list of the check targets for all of the modules which are
|
||||
# compiled using $(X11_FLAGS_TO_PASS).
|
||||
|
@ -593,7 +672,9 @@ CHECK_X11_MODULES = \
|
|||
check-guile \
|
||||
check-expect \
|
||||
check-gash \
|
||||
check-tclX
|
||||
check-tclX \
|
||||
check-tk \
|
||||
check-tix
|
||||
|
||||
# This is a list of the install targets for all the modules which are
|
||||
# compiled using $(X11_FLAGS_TO_PASS).
|
||||
|
@ -605,7 +686,8 @@ INSTALL_X11_MODULES = \
|
|||
install-expect \
|
||||
install-gash \
|
||||
install-tclX \
|
||||
install-tk
|
||||
install-tk \
|
||||
install-tix
|
||||
|
||||
# This is a list of the targets for all of the modules which are compiled
|
||||
# using $(TARGET_FLAGS_TO_PASS).
|
||||
|
@ -618,7 +700,9 @@ ALL_TARGET_MODULES = \
|
|||
all-target-winsup \
|
||||
all-target-libgloss \
|
||||
all-target-libiberty \
|
||||
all-target-examples
|
||||
all-target-gperf \
|
||||
all-target-examples \
|
||||
all-target-cygmon
|
||||
|
||||
# This is a list of the configure targets for all of the modules which
|
||||
# are compiled using the target tools.
|
||||
|
@ -631,7 +715,9 @@ CONFIGURE_TARGET_MODULES = \
|
|||
configure-target-winsup \
|
||||
configure-target-libgloss \
|
||||
configure-target-libiberty \
|
||||
configure-target-examples
|
||||
configure-target-gperf \
|
||||
configure-target-examples \
|
||||
configure-target-cygmon
|
||||
|
||||
# This is a list of the check targets for all of the modules which are
|
||||
# compiled using $(TARGET_FLAGS_TO_PASS).
|
||||
|
@ -641,7 +727,8 @@ CHECK_TARGET_MODULES = \
|
|||
check-target-libg++ \
|
||||
check-target-newlib \
|
||||
check-target-winsup \
|
||||
check-target-libiberty
|
||||
check-target-libiberty \
|
||||
check-target-gperf
|
||||
|
||||
# This is a list of the install targets for all of the modules which are
|
||||
# compiled using $(TARGET_FLAGS_TO_PASS).
|
||||
|
@ -652,17 +739,20 @@ INSTALL_TARGET_MODULES = \
|
|||
install-target-newlib \
|
||||
install-target-winsup \
|
||||
install-target-libgloss \
|
||||
install-target-libiberty
|
||||
install-target-libiberty \
|
||||
install-target-gperf
|
||||
|
||||
# This is a list of the targets for which we can do a clean-{target}.
|
||||
CLEAN_MODULES = \
|
||||
clean-apache \
|
||||
clean-autoconf \
|
||||
clean-automake \
|
||||
clean-bash \
|
||||
clean-bfd \
|
||||
clean-binutils \
|
||||
clean-bison \
|
||||
clean-byacc \
|
||||
clean-cvs \
|
||||
clean-cvssrc \
|
||||
clean-db \
|
||||
clean-dejagnu \
|
||||
clean-diff \
|
||||
|
@ -674,6 +764,8 @@ CLEAN_MODULES = \
|
|||
clean-flex \
|
||||
clean-gas \
|
||||
clean-gawk \
|
||||
clean-gettext \
|
||||
clean-gnuserv \
|
||||
clean-gprof \
|
||||
clean-grep \
|
||||
clean-grez \
|
||||
|
@ -681,9 +773,11 @@ CLEAN_MODULES = \
|
|||
clean-hello \
|
||||
clean-indent \
|
||||
clean-inet \
|
||||
clean-intl \
|
||||
clean-ispell \
|
||||
clean-itcl \
|
||||
clean-ld \
|
||||
clean-libgui \
|
||||
clean-libiberty \
|
||||
clean-m4 \
|
||||
clean-make \
|
||||
|
@ -700,7 +794,7 @@ CLEAN_MODULES = \
|
|||
clean-send-pr \
|
||||
clean-shellutils \
|
||||
clean-sim \
|
||||
clean-sn \
|
||||
clean-snavigator \
|
||||
clean-tar \
|
||||
clean-tcl \
|
||||
clean-texinfo \
|
||||
|
@ -720,7 +814,9 @@ CLEAN_TARGET_MODULES = \
|
|||
clean-target-winsup \
|
||||
clean-target-libgloss \
|
||||
clean-target-libiberty \
|
||||
clean-target-examples
|
||||
clean-target-gperf \
|
||||
clean-target-examples \
|
||||
clean-target-cygmon
|
||||
|
||||
# All of the x11 modules that can be cleaned
|
||||
CLEAN_X11_MODULES = \
|
||||
|
@ -731,7 +827,8 @@ CLEAN_X11_MODULES = \
|
|||
clean-gash \
|
||||
clean-guile \
|
||||
clean-tclX \
|
||||
clean-tk
|
||||
clean-tk \
|
||||
clean-tix
|
||||
|
||||
# The first rule in the file had better be this one. Don't put any above it.
|
||||
all: all.normal
|
||||
|
@ -741,8 +838,8 @@ all: all.normal
|
|||
.PHONY: all.normal
|
||||
all.normal: \
|
||||
$(ALL_MODULES) \
|
||||
$(ALL_TARGET_MODULES) \
|
||||
$(ALL_X11_MODULES) \
|
||||
$(ALL_TARGET_MODULES) \
|
||||
all-gcc
|
||||
|
||||
# Do a target for all the subdirectories. A ``make do-X'' will do a
|
||||
|
@ -782,12 +879,12 @@ $(DO_X):
|
|||
done; \
|
||||
;; \
|
||||
esac ; \
|
||||
export AR AS CC CXX NM RANLIB DLLTOOL; \
|
||||
export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
|
||||
if (cd ./$$i; \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
|
||||
$${target}); \
|
||||
then true; else exit 1; fi; \
|
||||
else true; fi; \
|
||||
|
@ -801,12 +898,12 @@ $(DO_X):
|
|||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
|
||||
done; \
|
||||
export AR AS CC CXX NM RANLIB DLLTOOL; \
|
||||
export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
|
||||
if (cd $(TARGET_SUBDIR)/$$i; \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
|
||||
$${target}); \
|
||||
then true; else exit 1; fi; \
|
||||
else true; fi; \
|
||||
|
@ -889,7 +986,7 @@ check: $(CHECK_MODULES) \
|
|||
# Installation targets.
|
||||
|
||||
.PHONY: install uninstall source-vault binary-vault vault-install
|
||||
install: $(INSTALL_TARGET) install-info
|
||||
install: $(INSTALL_TARGET)
|
||||
|
||||
uninstall:
|
||||
@echo "the uninstall target is not supported in this tree"
|
||||
|
@ -929,7 +1026,7 @@ inet-install:
|
|||
# the fixed header files.
|
||||
.PHONY: install-no-fixedincludes
|
||||
install-no-fixedincludes: \
|
||||
install-dirs \
|
||||
installdirs \
|
||||
$(INSTALL_MODULES) \
|
||||
$(INSTALL_TARGET_MODULES) \
|
||||
$(INSTALL_X11_MODULES) \
|
||||
|
@ -956,6 +1053,7 @@ gcc-no-fixedincludes:
|
|||
mv gcc/tmp-include gcc/include 2>/dev/null; \
|
||||
else true; fi
|
||||
|
||||
|
||||
# This rule is used to build the modules which use FLAGS_TO_PASS. To
|
||||
# build a target all-X means to cd to X and make all.
|
||||
#
|
||||
|
@ -1006,7 +1104,7 @@ $(CROSS_CHECK_MODULES):
|
|||
# This rule is used to install the modules which use FLAGS_TO_PASS.
|
||||
# To build a target install-X means to cd to X and make install.
|
||||
.PHONY: $(INSTALL_MODULES)
|
||||
$(INSTALL_MODULES): install-dirs
|
||||
$(INSTALL_MODULES): installdirs
|
||||
@dir=`echo $@ | sed -e 's/install-//'`; \
|
||||
if [ -f ./$${dir}/Makefile ] ; then \
|
||||
r=`pwd`; export r; \
|
||||
|
@ -1061,6 +1159,7 @@ $(CONFIGURE_TARGET_MODULES):
|
|||
LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
|
||||
NM="$(NM_FOR_TARGET)"; export NM; \
|
||||
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
|
||||
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
|
||||
echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
|
||||
cd $(TARGET_SUBDIR)/$${dir}; \
|
||||
case $(srcdir) in \
|
||||
|
@ -1144,7 +1243,7 @@ $(CHECK_TARGET_MODULES):
|
|||
# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
|
||||
# and make install.
|
||||
.PHONY: $(INSTALL_TARGET_MODULES)
|
||||
$(INSTALL_TARGET_MODULES): install-dirs
|
||||
$(INSTALL_TARGET_MODULES): installdirs
|
||||
@dir=`echo $@ | sed -e 's/install-target-//'`; \
|
||||
if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
|
||||
r=`pwd`; export r; \
|
||||
|
@ -1189,7 +1288,7 @@ $(CHECK_X11_MODULES):
|
|||
# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
|
||||
# To build a target install-X means to cd to X and make install.
|
||||
.PHONY: $(INSTALL_X11_MODULES)
|
||||
$(INSTALL_X11_MODULES):
|
||||
$(INSTALL_X11_MODULES): installdirs
|
||||
@dir=`echo $@ | sed -e 's/install-//'`; \
|
||||
if [ -f ./$${dir}/Makefile ] ; then \
|
||||
r=`pwd`; export r; \
|
||||
|
@ -1251,7 +1350,7 @@ install-gcc:
|
|||
# This rule is used to install the modules which use FLAGS_TO_PASS.
|
||||
# To build a target install-X means to cd to X and make install.
|
||||
.PHONY: install-dosrel
|
||||
install-dosrel: install-dirs info
|
||||
install-dosrel: installdirs info
|
||||
@dir=`echo $@ | sed -e 's/install-//'`; \
|
||||
if [ -f ./$${dir}/Makefile ] ; then \
|
||||
r=`pwd`; export r; \
|
||||
|
@ -1267,17 +1366,21 @@ install-dosrel-fake:
|
|||
|
||||
# This is a list of inter-dependencies among modules.
|
||||
all-apache:
|
||||
all-autoconf: all-m4
|
||||
all-autoconf: all-m4 all-texinfo
|
||||
all-automake:
|
||||
all-bash:
|
||||
all-bfd:
|
||||
all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
|
||||
all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
|
||||
all-bison: all-texinfo
|
||||
all-byacc:
|
||||
all-cvs:
|
||||
all-cvssrc:
|
||||
configure-target-cygmon: $(ALL_GCC)
|
||||
all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
|
||||
all-db:
|
||||
all-dejagnu: all-tcl all-expect all-tk
|
||||
all-diff: all-libiberty
|
||||
all-emacs:
|
||||
all-emacs19: all-byacc
|
||||
all-emacs19: all-bison all-byacc
|
||||
all-etc:
|
||||
configure-target-examples: $(ALL_GCC)
|
||||
all-target-examples: configure-target-examples
|
||||
|
@ -1285,15 +1388,19 @@ all-expect: all-tcl all-tk
|
|||
all-fileutils: all-libiberty
|
||||
all-findutils:
|
||||
all-find:
|
||||
all-flex: all-libiberty all-byacc
|
||||
all-flex: all-libiberty all-bison all-byacc
|
||||
all-gas: all-libiberty all-opcodes all-bfd
|
||||
all-gash: all-tcl
|
||||
all-gawk:
|
||||
ALL_GCC = all-gcc
|
||||
all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
|
||||
all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
|
||||
GDB_TK = all-tk all-tcl
|
||||
all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
|
||||
all-gcc: all-bison all-byacc all-binutils all-gas all-ld
|
||||
all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
|
||||
GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
|
||||
all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
|
||||
all-gettext:
|
||||
all-gnuserv:
|
||||
configure-target-gperf: $(ALL_GCC)
|
||||
all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
|
||||
all-gprof: all-libiberty all-bfd all-opcodes
|
||||
all-grep: all-libiberty
|
||||
all-grez: all-libiberty all-bfd all-opcodes
|
||||
|
@ -1303,15 +1410,18 @@ all-gzip: all-libiberty
|
|||
all-hello: all-libiberty
|
||||
all-indent:
|
||||
all-inet: all-tcl all-send-pr all-perl
|
||||
all-intl:
|
||||
all-ispell: all-emacs19
|
||||
all-itcl: all-tcl all-tk
|
||||
all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
|
||||
all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
|
||||
configure-target-libg++: $(ALL_GCC) configure-target-librx
|
||||
all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
|
||||
configure-target-libgloss: $(ALL_GCC)
|
||||
all-target-libgloss: configure-target-libgloss configure-target-newlib
|
||||
configure-target-libio: $(ALL_GCC)
|
||||
all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
|
||||
check-target-libio: all-target-libstdc++
|
||||
all-libgui: all-tcl all-tk all-itcl
|
||||
all-libiberty:
|
||||
configure-target-librx: $(ALL_GCC) configure-target-newlib
|
||||
all-target-librx: configure-target-librx
|
||||
|
@ -1332,8 +1442,8 @@ all-recode: all-libiberty
|
|||
all-sed: all-libiberty
|
||||
all-send-pr: all-prms
|
||||
all-shellutils:
|
||||
all-sim: all-libiberty all-bfd all-opcodes
|
||||
all-sn: all-tcl all-tk all-itcl all-db
|
||||
all-sim: all-libiberty all-bfd all-opcodes all-readline
|
||||
all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep
|
||||
all-tar: all-libiberty
|
||||
all-tcl:
|
||||
all-tclX: all-tcl all-tk
|
||||
|
@ -1342,38 +1452,24 @@ all-texinfo: all-libiberty
|
|||
all-textutils:
|
||||
all-tgas: all-libiberty all-bfd all-opcodes
|
||||
all-time:
|
||||
all-tix: all-tcl all-tk
|
||||
all-wdiff:
|
||||
all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
|
||||
all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
|
||||
configure-target-winsup: configure-target-newlib
|
||||
all-uudecode: all-libiberty
|
||||
configure-target-libiberty: $(ALL_GCC)
|
||||
all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
|
||||
all-target: $(ALL_TARGET_MODULES)
|
||||
install-target: $(INSTALL_TARGET_MODULES)
|
||||
|
||||
install-gdbtk: install-tcl install-tk install-itcl install-tix install-libgui install-gdb
|
||||
### other supporting targets
|
||||
|
||||
MAKEDIRS= \
|
||||
$(prefix) \
|
||||
$(exec_prefix)
|
||||
.PHONY: install-dirs
|
||||
install-dirs:
|
||||
@for i in .. $(MAKEDIRS) ; do \
|
||||
if [ x$$i != x.. ]; then \
|
||||
echo Making $$i... ; \
|
||||
parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
|
||||
if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
|
||||
if [ ! -d $$i ] ; then \
|
||||
if mkdir $$i ; then \
|
||||
true ; \
|
||||
else \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
else \
|
||||
true ; \
|
||||
fi ; \
|
||||
else true; fi; \
|
||||
done
|
||||
.PHONY: installdirs
|
||||
installdirs: mkinstalldirs
|
||||
$(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
|
||||
|
||||
dir.info: do-install-info
|
||||
if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
|
||||
|
@ -1410,37 +1506,26 @@ Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
|
|||
DEVO_SUPPORT= README Makefile.in configure configure.in \
|
||||
config.guess config.sub config move-if-change \
|
||||
mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
|
||||
COPYING COPYING.LIB install.sh config-ml.in symlink-tree
|
||||
COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
|
||||
mkinstalldirs ltconfig ltmain.sh missing ylwrap
|
||||
|
||||
# Files in devo/etc used in any net release.
|
||||
# ChangeLog omitted because it may refer to files which are not in this
|
||||
# distribution (perhaps it would be better to include it anyway).
|
||||
ETC_SUPPORT= Makefile.in cfg-paper.texi configure configure.in configure.man \
|
||||
configure.texi standards.texi make-stds.texi \
|
||||
configure.info* standards.info* cfg-paper.info*
|
||||
ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
|
||||
make-stds.texi standards.info*
|
||||
|
||||
# When you use `make setup-dirs' or `make taz' you should always redefine
|
||||
# this macro.
|
||||
SUPPORT_FILES = list-of-support-files-for-tool-in-question
|
||||
# Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
|
||||
DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in ld/Makefile.in
|
||||
|
||||
.PHONY: taz
|
||||
|
||||
taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
|
||||
texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
|
||||
# Make sure "diststuff" files get built properly.
|
||||
for f in $(DISTBISONFILES) ; do \
|
||||
if [ -r $$f ]; then \
|
||||
sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
|
||||
mv -f tmp $$f ; \
|
||||
else true; fi ; \
|
||||
done
|
||||
# Take out texinfo from a few places; make simple BISON=bison line.
|
||||
sed -e '/^all\.normal: /s/\all-texinfo //' \
|
||||
-e '/^ install-texinfo /d' \
|
||||
-e '/^BISON = `if/,/^$$/d' \
|
||||
-e '/^# BISON:/s/.*/BISON = bison -y/' \
|
||||
<Makefile.in >tmp
|
||||
mv -f tmp Makefile.in
|
||||
#
|
||||
|
@ -1489,8 +1574,12 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
|
|||
ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
|
||||
else true; fi
|
||||
chmod og=u `find . -print`
|
||||
$(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) \
|
||||
VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
|
||||
if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
|
||||
ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
|
||||
else \
|
||||
ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
|
||||
fi; \
|
||||
$(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
|
||||
|
||||
do-tar-gz:
|
||||
echo "==> Making $(TOOL)-$(VER).tar.gz"
|
||||
|
|
|
@ -30,16 +30,13 @@ explicitly set CC in the environment before running configure, and to
|
|||
also set CC when running make. For example (assuming sh/bash/ksh):
|
||||
|
||||
CC=gcc ./configure
|
||||
make CC=gcc
|
||||
make
|
||||
|
||||
A similar example using csh:
|
||||
|
||||
setenv CC gcc
|
||||
./configure
|
||||
make CC=gcc
|
||||
|
||||
See etc/cfg-paper.texi, etc/configure.texi, and/or the README files in
|
||||
various subdirectories, for more details.
|
||||
make
|
||||
|
||||
Much of the code and documentation enclosed is copyright by
|
||||
the Free Software Foundation, Inc. See the file COPYING or
|
||||
|
|
File diff suppressed because it is too large
Load diff
977
contrib/binutils/bfd/Makefile.am
Normal file
977
contrib/binutils/bfd/Makefile.am
Normal file
|
@ -0,0 +1,977 @@
|
|||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCDIR = $(srcdir)/../include
|
||||
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
|
||||
DEP = mkdep
|
||||
|
||||
SUBDIRS = doc
|
||||
|
||||
docdir = doc
|
||||
|
||||
lib_LTLIBRARIES = libbfd.la
|
||||
|
||||
# bfd.h goes here, for now
|
||||
BFD_H = bfd.h
|
||||
|
||||
# Jim Kingdon notes:
|
||||
# Writing S-records should be included in all (or at least most)
|
||||
# *-*-coff, *-*-aout, etc., configurations, because people will want to
|
||||
# be able to use objcopy to create S-records. (S-records are not useful
|
||||
# for the debugger, so if you are downloading things as S-records you
|
||||
# need two copies of the executable, one to download and one for the
|
||||
# debugger).
|
||||
BFD_LIBS = \
|
||||
archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
|
||||
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
|
||||
section.lo syms.lo targets.lo hash.lo linker.lo \
|
||||
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo
|
||||
|
||||
BFD_LIBS_CFILES = \
|
||||
archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
|
||||
format.c init.c libbfd.c opncls.c reloc.c \
|
||||
section.c syms.c targets.c hash.c linker.c \
|
||||
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c
|
||||
|
||||
# This list is alphabetized to make it easier to keep in sync
|
||||
# with the decls and initializer in archures.c.
|
||||
ALL_MACHINES = \
|
||||
cpu-a29k.lo \
|
||||
cpu-alpha.lo \
|
||||
cpu-arc.lo \
|
||||
cpu-arm.lo \
|
||||
cpu-d10v.lo \
|
||||
cpu-h8300.lo \
|
||||
cpu-h8500.lo \
|
||||
cpu-hppa.lo \
|
||||
cpu-i386.lo \
|
||||
cpu-i860.lo \
|
||||
cpu-i960.lo \
|
||||
cpu-m32r.lo \
|
||||
cpu-m68k.lo \
|
||||
cpu-m88k.lo \
|
||||
cpu-mips.lo \
|
||||
cpu-m10200.lo \
|
||||
cpu-m10300.lo \
|
||||
cpu-ns32k.lo \
|
||||
cpu-powerpc.lo \
|
||||
cpu-rs6000.lo \
|
||||
cpu-sh.lo \
|
||||
cpu-sparc.lo \
|
||||
cpu-tic30.lo \
|
||||
cpu-v850.lo \
|
||||
cpu-vax.lo \
|
||||
cpu-we32k.lo \
|
||||
cpu-w65.lo \
|
||||
cpu-z8k.lo
|
||||
|
||||
ALL_MACHINES_CFILES = \
|
||||
cpu-a29k.c \
|
||||
cpu-alpha.c \
|
||||
cpu-arc.c \
|
||||
cpu-arm.c \
|
||||
cpu-h8300.c \
|
||||
cpu-h8500.c \
|
||||
cpu-hppa.c \
|
||||
cpu-i386.c \
|
||||
cpu-i860.c \
|
||||
cpu-i960.c \
|
||||
cpu-m32r.c \
|
||||
cpu-m68k.c \
|
||||
cpu-m88k.c \
|
||||
cpu-mips.c \
|
||||
cpu-m10200.c \
|
||||
cpu-m10300.c \
|
||||
cpu-ns32k.c \
|
||||
cpu-powerpc.c \
|
||||
cpu-rs6000.c \
|
||||
cpu-sh.c \
|
||||
cpu-sparc.c \
|
||||
cpu-tic30.c \
|
||||
cpu-v850.c \
|
||||
cpu-vax.c \
|
||||
cpu-we32k.c \
|
||||
cpu-w65.c \
|
||||
cpu-z8k.c
|
||||
|
||||
# The .o files needed by all of the 32 bit vectors that are configured into
|
||||
# target_vector in targets.c if configured with --enable-targets=all.
|
||||
BFD32_BACKENDS = \
|
||||
aout-adobe.lo \
|
||||
aout-arm.lo \
|
||||
aout-ns32k.lo \
|
||||
aout-sparcle.lo \
|
||||
aout-tic30.lo \
|
||||
aout0.lo \
|
||||
aout32.lo \
|
||||
bout.lo \
|
||||
cf-i386lynx.lo \
|
||||
cf-m68klynx.lo \
|
||||
cf-sparclynx.lo \
|
||||
coff-a29k.lo \
|
||||
coff-apollo.lo \
|
||||
coff-arm.lo \
|
||||
coff-aux.lo \
|
||||
coff-h8300.lo \
|
||||
coff-h8500.lo \
|
||||
coff-i386.lo \
|
||||
coff-go32.lo \
|
||||
coff-i860.lo \
|
||||
coff-i960.lo \
|
||||
coff-m68k.lo \
|
||||
coff-m88k.lo \
|
||||
coff-mips.lo \
|
||||
coff-pmac.lo \
|
||||
coff-rs6000.lo \
|
||||
coff-sh.lo \
|
||||
coff-sparc.lo \
|
||||
coff-stgo32.lo \
|
||||
coff-svm68k.lo \
|
||||
coff-tic30.lo \
|
||||
coff-u68k.lo \
|
||||
coff-we32k.lo \
|
||||
coff-w65.lo \
|
||||
coff-z8k.lo \
|
||||
cofflink.lo \
|
||||
dwarf2.lo \
|
||||
ecoff.lo \
|
||||
ecofflink.lo \
|
||||
elf.lo \
|
||||
elf32-arc.lo \
|
||||
elf32-d10v.lo \
|
||||
elf32-gen.lo \
|
||||
elf32-hppa.lo \
|
||||
elf32-i386.lo \
|
||||
elf32-i860.lo \
|
||||
elf32-m32r.lo \
|
||||
elf32-m68k.lo \
|
||||
elf32-m88k.lo \
|
||||
elf32-mips.lo \
|
||||
elf-m10200.lo \
|
||||
elf-m10300.lo \
|
||||
elf32-ppc.lo \
|
||||
elf32-sh.lo \
|
||||
elf32-sparc.lo \
|
||||
elf32-v850.lo \
|
||||
elf32.lo \
|
||||
elflink.lo \
|
||||
hp300bsd.lo \
|
||||
hp300hpux.lo \
|
||||
som.lo \
|
||||
i386aout.lo \
|
||||
i386bsd.lo \
|
||||
i386dynix.lo \
|
||||
i386freebsd.lo \
|
||||
i386linux.lo \
|
||||
i386lynx.lo \
|
||||
i386msdos.lo \
|
||||
i386netbsd.lo \
|
||||
i386mach3.lo \
|
||||
i386os9k.lo \
|
||||
ieee.lo \
|
||||
m68k4knetbsd.lo \
|
||||
m68klinux.lo \
|
||||
m68klynx.lo \
|
||||
m68knetbsd.lo \
|
||||
m88kmach3.lo \
|
||||
mipsbsd.lo \
|
||||
newsos3.lo \
|
||||
nlm.lo \
|
||||
nlm32-i386.lo \
|
||||
nlm32-sparc.lo \
|
||||
nlm32-ppc.lo \
|
||||
nlm32.lo \
|
||||
ns32knetbsd.lo \
|
||||
oasys.lo \
|
||||
pc532-mach.lo \
|
||||
pe-arm.lo \
|
||||
pei-arm.lo \
|
||||
pe-i386.lo \
|
||||
pei-i386.lo \
|
||||
pe-ppc.lo \
|
||||
pei-ppc.lo \
|
||||
ppcboot.lo \
|
||||
reloc16.lo \
|
||||
riscix.lo \
|
||||
sparclinux.lo \
|
||||
sparclynx.lo \
|
||||
sparcnetbsd.lo \
|
||||
sunos.lo \
|
||||
vaxnetbsd.lo \
|
||||
versados.lo \
|
||||
xcofflink.lo
|
||||
|
||||
BFD32_BACKENDS_CFILES = \
|
||||
aout-adobe.c \
|
||||
aout-arm.c \
|
||||
aout-ns32k.c \
|
||||
aout-sparcle.c \
|
||||
aout-tic30.c \
|
||||
aout0.c \
|
||||
aout32.c \
|
||||
bout.c \
|
||||
cf-i386lynx.c \
|
||||
cf-m68klynx.c \
|
||||
cf-sparclynx.c \
|
||||
coff-a29k.c \
|
||||
coff-apollo.c \
|
||||
coff-arm.c \
|
||||
coff-aux.c \
|
||||
coff-h8300.c \
|
||||
coff-h8500.c \
|
||||
coff-i386.c \
|
||||
coff-i860.c \
|
||||
coff-go32.c \
|
||||
coff-i960.c \
|
||||
coff-m68k.c \
|
||||
coff-m88k.c \
|
||||
coff-mips.c \
|
||||
coff-pmac.c \
|
||||
coff-rs6000.c \
|
||||
coff-sh.c \
|
||||
coff-sparc.c \
|
||||
coff-stgo32.c \
|
||||
coff-svm68k.c \
|
||||
coff-tic30.c \
|
||||
coff-u68k.c \
|
||||
coff-we32k.c \
|
||||
coff-w65.c \
|
||||
coff-z8k.c \
|
||||
cofflink.c \
|
||||
dwarf2.c \
|
||||
ecoff.c \
|
||||
ecofflink.c \
|
||||
elf.c \
|
||||
elf32-arc.c \
|
||||
elf32-d10v.c \
|
||||
elf32-gen.c \
|
||||
elf32-hppa.c \
|
||||
elf32-i386.c \
|
||||
elf32-i860.c \
|
||||
elf32-m32r.c \
|
||||
elf32-m68k.c \
|
||||
elf32-m88k.c \
|
||||
elf32-mips.c \
|
||||
elf-m10200.c \
|
||||
elf-m10300.c \
|
||||
elf32-ppc.c \
|
||||
elf32-sh.c \
|
||||
elf32-sparc.c \
|
||||
elf32-v850.c \
|
||||
elf32.c \
|
||||
elflink.c \
|
||||
hp300bsd.c \
|
||||
hp300hpux.c \
|
||||
som.c \
|
||||
i386aout.c \
|
||||
i386bsd.c \
|
||||
i386dynix.c \
|
||||
i386freebsd.c \
|
||||
i386linux.c \
|
||||
i386lynx.c \
|
||||
i386msdos.c \
|
||||
i386netbsd.c \
|
||||
i386mach3.c \
|
||||
i386os9k.c \
|
||||
ieee.c \
|
||||
m68k4knetbsd.c \
|
||||
m68klinux.c \
|
||||
m68klynx.c \
|
||||
m68knetbsd.c \
|
||||
m88kmach3.c \
|
||||
mipsbsd.c \
|
||||
newsos3.c \
|
||||
nlm.c \
|
||||
nlm32-i386.c \
|
||||
nlm32-sparc.c \
|
||||
nlm32-ppc.c \
|
||||
nlm32.c \
|
||||
ns32knetbsd.c \
|
||||
oasys.c \
|
||||
pc532-mach.c \
|
||||
pe-arm.c \
|
||||
pei-arm.c \
|
||||
pe-i386.c \
|
||||
pei-i386.c \
|
||||
pe-ppc.c \
|
||||
pei-ppc.c \
|
||||
ppcboot.c \
|
||||
reloc16.c \
|
||||
riscix.c \
|
||||
sparclinux.c \
|
||||
sparclynx.c \
|
||||
sparcnetbsd.c \
|
||||
sunos.c \
|
||||
vaxnetbsd.c \
|
||||
versados.c \
|
||||
xcofflink.c
|
||||
|
||||
# The .o files needed by all of the 64 bit vectors that are configured into
|
||||
# target_vector in targets.c if configured with --enable-targets=all
|
||||
# and --enable-64-bit-bfd.
|
||||
BFD64_BACKENDS = \
|
||||
aout64.lo \
|
||||
coff-alpha.lo \
|
||||
demo64.lo \
|
||||
elf64-alpha.lo \
|
||||
elf64-gen.lo \
|
||||
elf64-mips.lo \
|
||||
elf64-sparc.lo \
|
||||
elf64.lo \
|
||||
evax-alpha.lo \
|
||||
evax-egsd.lo \
|
||||
evax-etir.lo \
|
||||
evax-emh.lo \
|
||||
evax-misc.lo \
|
||||
nlm32-alpha.lo \
|
||||
nlm64.lo
|
||||
|
||||
BFD64_BACKENDS_CFILES = \
|
||||
aout64.c \
|
||||
coff-alpha.c \
|
||||
demo64.c \
|
||||
elf64-alpha.c \
|
||||
elf64-gen.c \
|
||||
elf64-mips.c \
|
||||
elf64-sparc.c \
|
||||
elf64.c \
|
||||
evax-alpha.c \
|
||||
evax-egsd.c \
|
||||
evax-etir.c \
|
||||
evax-emh.c \
|
||||
evax-misc.c \
|
||||
nlm32-alpha.c \
|
||||
nlm64.c
|
||||
|
||||
OPTIONAL_BACKENDS = \
|
||||
aix386-core.lo \
|
||||
hpux-core.lo \
|
||||
irix-core.lo \
|
||||
lynx-core.lo \
|
||||
osf-core.lo \
|
||||
trad-core.lo \
|
||||
cisco-core.lo
|
||||
|
||||
OPTIONAL_BACKENDS_CFILES = \
|
||||
aix386-core.c \
|
||||
hpux-core.c \
|
||||
irix-core.c \
|
||||
lynx-core.c \
|
||||
osf-core.c \
|
||||
trad-core.c \
|
||||
cisco-core.c
|
||||
|
||||
# These are defined by configure.in:
|
||||
WORDSIZE = @wordsize@
|
||||
ALL_BACKENDS = @all_backends@
|
||||
BFD_BACKENDS = @bfd_backends@
|
||||
BFD_MACHINES = @bfd_machines@
|
||||
TDEFAULTS = @tdefaults@
|
||||
|
||||
INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES)
|
||||
|
||||
# C source files that correspond to .o's.
|
||||
CFILES = \
|
||||
$(BFD_LIBS_CFILES) \
|
||||
$(ALL_MACHINES_CFILES) \
|
||||
$(BFD32_BACKENDS_CFILES) \
|
||||
$(BFD64_BACKENDS_CFILES) \
|
||||
$(OPTIONAL_BACKENDS_CFILES)
|
||||
|
||||
HFILES = \
|
||||
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \
|
||||
ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \
|
||||
elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \
|
||||
libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \
|
||||
libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \
|
||||
targmatch.h
|
||||
|
||||
diststuff: info
|
||||
|
||||
# Various kinds of .o files to put in libbfd.a:
|
||||
# BFD_BACKENDS Routines the configured targets need.
|
||||
# BFD_MACHINES Architecture-specific routines the configured targets need.
|
||||
# COREFILE Core file routines for a native configuration
|
||||
OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
|
||||
|
||||
stamp-ofiles: Makefile
|
||||
rm -f tofiles
|
||||
f=""; \
|
||||
for i in $(OFILES) ; do \
|
||||
case " $$f " in \
|
||||
*" $$i "*) ;; \
|
||||
*) f="$$f $$i" ;; \
|
||||
esac ; \
|
||||
done ; \
|
||||
echo $$f > tofiles
|
||||
$(SHELL) $(srcdir)/../move-if-change tofiles ofiles
|
||||
touch stamp-ofiles
|
||||
|
||||
ofiles: stamp-ofiles ; @true
|
||||
|
||||
libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
|
||||
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
|
||||
libbfd_la_LIBADD = `cat ofiles`
|
||||
libbfd_la_LDFLAGS = -release $(VERSION)
|
||||
|
||||
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
|
||||
# directory so that we don't have to convert all the programs that use
|
||||
# libbfd.a simultaneously. This is a hack which should be removed if
|
||||
# everything else starts using libtool. FIXME.
|
||||
|
||||
noinst_LIBRARIES = libbfd.a
|
||||
libbfd_a_SOURCES =
|
||||
|
||||
stamp-lib: libbfd.la
|
||||
if [ -f .libs/libbfd.a ]; then \
|
||||
cp .libs/libbfd.a libbfd.tmp; \
|
||||
$(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
|
||||
else true; fi
|
||||
touch stamp-lib
|
||||
|
||||
libbfd.a: stamp-lib ; @true
|
||||
|
||||
# This file holds an array associating configuration triplets and
|
||||
# vector names. It is built from config.bfd. It is not compiled by
|
||||
# itself, but is included by targets.c.
|
||||
targmatch.h: config.bfd targmatch.sed
|
||||
rm -f targmatch.h
|
||||
sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new
|
||||
mv -f targmatch.new targmatch.h
|
||||
|
||||
# When compiling archures.c and targets.c, supply the default target
|
||||
# info from configure.
|
||||
|
||||
targets.lo: targets.c config.status
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c
|
||||
|
||||
archures.lo: archures.c config.status
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
|
||||
|
||||
elf32-target.h : elfxx-target.h
|
||||
rm -f elf32-target.h
|
||||
sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
|
||||
mv -f elf32-target.new elf32-target.h
|
||||
|
||||
elf64-target.h : elfxx-target.h
|
||||
rm -f elf64-target.h
|
||||
sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
|
||||
mv -f elf64-target.new elf64-target.h
|
||||
|
||||
BFD_H_DEPS= $(INCDIR)/ansidecl.h
|
||||
LOCAL_H_DEPS= libbfd.h sysdep.h config.h
|
||||
$(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
|
||||
$(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
|
||||
$(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
|
||||
$(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
|
||||
|
||||
# Install BFD include file, and others that it needs.
|
||||
install-data-local: $(BFD_H)
|
||||
$(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h
|
||||
$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
|
||||
$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h
|
||||
|
||||
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
|
||||
.dep: dep.sed $(CFILES) $(HFILES) bfd.h
|
||||
rm -f .dep1
|
||||
$(MAKE) DEP=$(DEP) .dep1
|
||||
sed -f dep.sed <.dep1 >.dep
|
||||
|
||||
# This rule really wants a mkdep that runs "gcc -MM".
|
||||
# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
|
||||
# the "DO NOT DELETE" line.
|
||||
# Other mkdep versions require a file that already exists, and do insert it.
|
||||
# Hence the weirdness....
|
||||
.dep1: $(CFILES)
|
||||
rm -f .dep2 .dep2a
|
||||
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
|
||||
echo > .dep2a
|
||||
$(DEP) -f .dep2a $(INCLUDES) $(CFLAGS) $?
|
||||
sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
|
||||
rm -f .dep2a
|
||||
$(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
|
||||
|
||||
dep.sed: dep-in.sed config.status
|
||||
sed <$(srcdir)/dep-in.sed >dep.sed \
|
||||
-e 's!@BFD_H@!$(BFD_H)!' \
|
||||
-e 's!@INCDIR@!$(INCDIR)!' \
|
||||
-e 's!@SRCDIR@!$(srcdir)!'
|
||||
|
||||
dep: .dep
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat .dep >> tmp-Makefile
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
|
||||
dep-in: .dep
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
|
||||
cat .dep >> tmp-Makefile.in
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
|
||||
dep-am: .dep
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
|
||||
cat .dep >> tmp-Makefile.am
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
|
||||
host-aout.lo: Makefile
|
||||
|
||||
# The following program can be used to generate a simple config file
|
||||
# which can be folded into an h-XXX file for a new host, with some editing.
|
||||
aout-params.h: gen-aout
|
||||
./gen-aout host > aout-params.h
|
||||
gen-aout: $(srcdir)/gen-aout.c Makefile
|
||||
$(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
|
||||
|
||||
$(BFD_H): stmp-bfd-h ; @true
|
||||
|
||||
stmp-bfd-h: bfd-in3.h
|
||||
rm -f bfd-tmp.h
|
||||
cp bfd-in3.h bfd-tmp.h
|
||||
$(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H)
|
||||
rm -f bfd-tmp.h
|
||||
touch stmp-bfd-h
|
||||
|
||||
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
|
||||
reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
|
||||
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
|
||||
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
|
||||
|
||||
# Could really use a "copy-if-change"...
|
||||
headers:
|
||||
(cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS))
|
||||
cp $(docdir)/bfd.h bfd-in2.h-new
|
||||
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
|
||||
cp $(docdir)/libbfd.h libbfd.h-new
|
||||
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
|
||||
cp $(docdir)/libcoff.h libcoff.h-new
|
||||
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
|
||||
|
||||
# We only rebuild the header files automatically if we have been
|
||||
# configured with --enable-maintainer-mode.
|
||||
|
||||
$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
|
||||
stmp-bin2-h: $(BFD_H_FILES)
|
||||
(cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
|
||||
cp $(docdir)/bfd.h bfd-in2.h-new
|
||||
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
|
||||
touch stmp-bin2-h
|
||||
|
||||
$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true
|
||||
stmp-lbfd-h: $(LIBBFD_H_FILES)
|
||||
(cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h)
|
||||
cp $(docdir)/libbfd.h libbfd.h-new
|
||||
$(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
|
||||
touch stmp-lbfd-h
|
||||
|
||||
$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true
|
||||
stmp-lcoff-h: $(LIBCOFF_H_FILES)
|
||||
(cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h)
|
||||
cp $(docdir)/libcoff.h libcoff.h-new
|
||||
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
|
||||
touch stmp-lcoff-h
|
||||
|
||||
MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \
|
||||
targmatch.h
|
||||
|
||||
CLEANFILES = bfd.h dep.sed stmp-bfd-h .dep .dep1 libbfd.a stamp-lib \
|
||||
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
|
||||
|
||||
|
||||
|
||||
# What appears below is generated by a hacked mkdep using gcc -MM.
|
||||
|
||||
# DO NOT DELETE THIS LINE -- mkdep uses it.
|
||||
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
|
||||
archive.lo: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
|
||||
archures.lo: archures.c
|
||||
bfd.lo: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \
|
||||
libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
|
||||
cache.lo: cache.c
|
||||
coffgen.lo: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h
|
||||
corefile.lo: corefile.c
|
||||
format.lo: format.c
|
||||
init.lo: init.c
|
||||
libbfd.lo: libbfd.c
|
||||
opncls.lo: opncls.c $(INCDIR)/objalloc.h
|
||||
reloc.lo: reloc.c $(INCDIR)/bfdlink.h
|
||||
section.lo: section.c
|
||||
syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def
|
||||
targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h
|
||||
hash.lo: hash.c $(INCDIR)/objalloc.h
|
||||
linker.lo: linker.c $(INCDIR)/bfdlink.h genlink.h
|
||||
srec.lo: srec.c $(INCDIR)/libiberty.h
|
||||
binary.lo: binary.c
|
||||
tekhex.lo: tekhex.c $(INCDIR)/libiberty.h
|
||||
ihex.lo: ihex.c $(INCDIR)/libiberty.h
|
||||
stabs.lo: stabs.c $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
|
||||
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
|
||||
cpu-a29k.lo: cpu-a29k.c
|
||||
cpu-alpha.lo: cpu-alpha.c
|
||||
cpu-arc.lo: cpu-arc.c
|
||||
cpu-arm.lo: cpu-arm.c
|
||||
cpu-h8300.lo: cpu-h8300.c
|
||||
cpu-h8500.lo: cpu-h8500.c
|
||||
cpu-hppa.lo: cpu-hppa.c
|
||||
cpu-i386.lo: cpu-i386.c
|
||||
cpu-i860.lo: cpu-i860.c
|
||||
cpu-i960.lo: cpu-i960.c
|
||||
cpu-m32r.lo: cpu-m32r.c
|
||||
cpu-m68k.lo: cpu-m68k.c
|
||||
cpu-m88k.lo: cpu-m88k.c
|
||||
cpu-mips.lo: cpu-mips.c
|
||||
cpu-m10200.lo: cpu-m10200.c
|
||||
cpu-m10300.lo: cpu-m10300.c
|
||||
cpu-ns32k.lo: cpu-ns32k.c ns32k.h
|
||||
cpu-powerpc.lo: cpu-powerpc.c
|
||||
cpu-rs6000.lo: cpu-rs6000.c
|
||||
cpu-sh.lo: cpu-sh.c
|
||||
cpu-sparc.lo: cpu-sparc.c
|
||||
cpu-tic30.lo: cpu-tic30.c
|
||||
cpu-v850.lo: cpu-v850.c
|
||||
cpu-vax.lo: cpu-vax.c
|
||||
cpu-we32k.lo: cpu-we32k.c
|
||||
cpu-w65.lo: cpu-w65.c
|
||||
cpu-z8k.lo: cpu-z8k.c
|
||||
aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
|
||||
$(INCDIR)/bfdlink.h
|
||||
aout-arm.lo: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
|
||||
aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
|
||||
ns32k.h libaout.h $(INCDIR)/bfdlink.h
|
||||
aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
|
||||
libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
|
||||
aout-target.h
|
||||
aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
|
||||
$(INCDIR)/aout/ar.h aoutx.h
|
||||
aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
|
||||
aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
|
||||
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
|
||||
$(INCDIR)/aout/ar.h
|
||||
bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
|
||||
cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-a29k.lo: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-apollo.lo: coff-apollo.c $(INCDIR)/coff/apollo.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-arm.lo: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-aux.lo: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/m68k.h coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-h8300.lo: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \
|
||||
$(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-h8500.lo: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||
coff-i386.lo: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-i860.lo: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-i960.lo: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-m68k.lo: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-m88k.lo: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
|
||||
coff-mips.lo: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
|
||||
$(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \
|
||||
ecoffswap.h
|
||||
coff-pmac.lo: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-sh.lo: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||
coff-sparc.lo: coff-sparc.c $(INCDIR)/coff/sparc.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
|
||||
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
|
||||
go32stub.h
|
||||
coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-we32k.lo: coff-we32k.c $(INCDIR)/coff/we32k.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffcode.h coffswap.h
|
||||
coff-w65.lo: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||
coff-z8k.lo: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||
cofflink.lo: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h
|
||||
dwarf2.lo: dwarf2.c $(INCDIR)/libiberty.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
$(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
|
||||
ecoff.lo: ecoff.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/ar.h \
|
||||
$(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
|
||||
libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
|
||||
libcoff.h libecoff.h
|
||||
ecofflink.lo: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
|
||||
libcoff.h libecoff.h
|
||||
elf.lo: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
|
||||
elf32-arc.lo: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/elf/arc.h elf32-target.h
|
||||
elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf32-target.h
|
||||
elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf32-target.h
|
||||
elf32-hppa.lo: elf32-hppa.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
elf32-hppa.h libhppa.h $(INCDIR)/elf/hppa.h hppa_stubs.h \
|
||||
elf32-target.h
|
||||
elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
elf32-target.h
|
||||
elf32-i860.lo: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf32-target.h
|
||||
elf32-m32r.lo: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/elf/m32r.h elf32-target.h
|
||||
elf32-m68k.lo: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
elf32-target.h
|
||||
elf32-m88k.lo: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf32-target.h
|
||||
elf32-mips.lo: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \
|
||||
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
|
||||
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
|
||||
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
|
||||
elf32-target.h
|
||||
elf-m10200.lo: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf32-target.h
|
||||
elf-m10300.lo: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf32-target.h
|
||||
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
$(INCDIR)/elf/ppc.h elf32-target.h
|
||||
elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
elf32-target.h
|
||||
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
$(INCDIR)/elf/sparc.h elf32-target.h
|
||||
elf32-v850.lo: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
$(INCDIR)/elf/v850.h elf32-target.h
|
||||
elf32.lo: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
$(INCDIR)/fnmatch.h elfcore.h elflink.h
|
||||
elflink.lo: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
|
||||
hp300bsd.lo: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
|
||||
aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
|
||||
aout-target.h
|
||||
som.lo: som.c
|
||||
i386aout.lo: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
i386bsd.lo: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
|
||||
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
|
||||
aout-target.h
|
||||
i386freebsd.lo: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
i386linux.lo: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h aout-target.h
|
||||
i386lynx.lo: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
i386msdos.lo: i386msdos.c libaout.h $(INCDIR)/bfdlink.h
|
||||
i386netbsd.lo: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
i386mach3.lo: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h aout-target.h
|
||||
i386os9k.lo: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \
|
||||
$(INCDIR)/os9k.h
|
||||
ieee.lo: ieee.c $(INCDIR)/ieee.h libieee.h
|
||||
m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
m68klinux.lo: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h aout-target.h
|
||||
m68klynx.lo: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
m68knetbsd.lo: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
m88kmach3.lo: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
mipsbsd.lo: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
newsos3.lo: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h aout-target.h
|
||||
nlm.lo: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
|
||||
$(INCDIR)/nlm/external.h
|
||||
nlm32-i386.lo: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \
|
||||
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
|
||||
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
|
||||
nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \
|
||||
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
|
||||
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
|
||||
nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \
|
||||
$(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
|
||||
nlmswap.h nlm-target.h
|
||||
nlm32.lo: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
|
||||
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
|
||||
ns32knetbsd.lo: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
oasys.lo: oasys.c $(INCDIR)/oasys.h liboasys.h
|
||||
pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
pe-arm.lo: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h coffcode.h peicode.h
|
||||
pei-arm.lo: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h coffcode.h peicode.h
|
||||
pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h coffcode.h peicode.h
|
||||
pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h coffcode.h peicode.h
|
||||
pe-ppc.lo: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h coffcode.h peicode.h
|
||||
pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \
|
||||
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
|
||||
$(INCDIR)/bfdlink.h coffcode.h peicode.h
|
||||
ppcboot.lo: ppcboot.c
|
||||
reloc16.lo: reloc16.c $(INCDIR)/bfdlink.h genlink.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h
|
||||
riscix.lo: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
|
||||
aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
|
||||
$(INCDIR)/aout/ar.h
|
||||
sparclinux.lo: sparclinux.c $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
|
||||
libaout.h $(INCDIR)/bfdlink.h aout-target.h
|
||||
sparclynx.lo: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \
|
||||
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
|
||||
sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \
|
||||
$(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
|
||||
vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
|
||||
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
versados.lo: versados.c $(INCDIR)/libiberty.h
|
||||
xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
|
||||
libcoff.h
|
||||
aout64.lo: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
|
||||
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
|
||||
$(INCDIR)/aout/ar.h
|
||||
coff-alpha.lo: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
|
||||
$(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \
|
||||
libecoff.h coffswap.h ecoffswap.h
|
||||
demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \
|
||||
libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
|
||||
aout-target.h
|
||||
elf64-alpha.lo: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/elf/alpha.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
|
||||
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
|
||||
$(INCDIR)/aout/ar.h libcoff.h libecoff.h ecoffswap.h \
|
||||
elf64-target.h
|
||||
elf64-gen.lo: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
elf64-target.h
|
||||
elf64-mips.lo: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \
|
||||
genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
|
||||
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/coff/sym.h \
|
||||
$(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
|
||||
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \
|
||||
elf64-target.h
|
||||
elf64-sparc.lo: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
|
||||
$(INCDIR)/elf/sparc.h elf64-target.h
|
||||
elf64.lo: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \
|
||||
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
|
||||
$(INCDIR)/fnmatch.h elfcore.h elflink.h
|
||||
evax-alpha.lo: evax-alpha.c $(INCDIR)/bfdlink.h evax.h
|
||||
evax-egsd.lo: evax-egsd.c $(INCDIR)/bfdlink.h evax.h
|
||||
evax-etir.lo: evax-etir.c $(INCDIR)/bfdlink.h evax.h
|
||||
evax-emh.lo: evax-emh.c $(INCDIR)/bfdlink.h evax.h
|
||||
evax-misc.lo: evax-misc.c $(INCDIR)/bfdlink.h evax.h
|
||||
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \
|
||||
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
|
||||
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
|
||||
nlm64.lo: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
|
||||
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
|
||||
aix386-core.lo: aix386-core.c $(INCDIR)/coff/i386.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
|
||||
hpux-core.lo: hpux-core.c
|
||||
irix-core.lo: irix-core.c
|
||||
lynx-core.lo: lynx-core.c
|
||||
osf-core.lo: osf-core.c
|
||||
trad-core.lo: trad-core.c libaout.h $(INCDIR)/bfdlink.h
|
||||
cisco-core.lo: cisco-core.c
|
||||
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
File diff suppressed because it is too large
Load diff
|
@ -27,13 +27,11 @@ BFD supports the following configure options:
|
|||
bit integer type, such as gcc.
|
||||
--enable-shared
|
||||
Build BFD as a shared library.
|
||||
--enable-commonbfdlib
|
||||
Build BFD, opcodes, and libiberty as a single shared library.
|
||||
--with-mmap
|
||||
Use mmap when accessing files. This is faster on some hosts,
|
||||
but slower on others. It may not work on all hosts.
|
||||
|
||||
Report bugs with BFD to bug-gnu-utils@prep.ai.mit.edu.
|
||||
Report bugs with BFD to bug-gnu-utils@gnu.org.
|
||||
|
||||
Patches are encouraged. When sending patches, always send the output
|
||||
of diff -u or diff -c from the original file to the new file. Do not
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
|
||||
/* Name of package. */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version of package. */
|
||||
#undef VERSION
|
||||
|
||||
/* Whether strstr must be declared even if <string.h> is included. */
|
||||
#undef NEED_DECLARATION_STRSTR
|
||||
|
||||
|
|
67
contrib/binutils/bfd/acinclude.m4
Normal file
67
contrib/binutils/bfd/acinclude.m4
Normal file
|
@ -0,0 +1,67 @@
|
|||
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
|
||||
AC_DEFUN(BFD_BINARY_FOPEN,
|
||||
[AC_REQUIRE([AC_CANONICAL_SYSTEM])
|
||||
case "${host}" in
|
||||
changequote(,)dnl
|
||||
i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
|
||||
changequote([,])dnl
|
||||
AC_DEFINE(USE_BINARY_FOPEN) ;;
|
||||
esac])dnl
|
||||
|
||||
dnl Get a default for CC_FOR_BUILD to put into Makefile.
|
||||
AC_DEFUN(BFD_CC_FOR_BUILD,
|
||||
[# Put a plausible default for CC_FOR_BUILD in Makefile.
|
||||
if test -z "$CC_FOR_BUILD"; then
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
CC_FOR_BUILD='$(CC)'
|
||||
else
|
||||
CC_FOR_BUILD=gcc
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
# Also set EXEEXT_FOR_BUILD.
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
EXEEXT_FOR_BUILD='$(EXEEXT)'
|
||||
else
|
||||
AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
|
||||
[cat > ac_c_test.c << 'EOF'
|
||||
int main() {
|
||||
/* Nothing needed here */
|
||||
}
|
||||
EOF
|
||||
${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
|
||||
bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
|
||||
rm -f ac_c_test*
|
||||
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
|
||||
EXEEXT_FOR_BUILD=""
|
||||
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
|
||||
fi
|
||||
AC_SUBST(EXEEXT_FOR_BUILD)])dnl
|
||||
|
||||
dnl See whether we need a declaration for a function.
|
||||
AC_DEFUN(BFD_NEED_DECLARATION,
|
||||
[AC_MSG_CHECKING([whether $1 must be declared])
|
||||
AC_CACHE_VAL(bfd_cv_decl_needed_$1,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif],
|
||||
[char *(*pfn) = (char *(*)) $1],
|
||||
bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
|
||||
AC_MSG_RESULT($bfd_cv_decl_needed_$1)
|
||||
if test $bfd_cv_decl_needed_$1 = yes; then
|
||||
bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
AC_DEFINE_UNQUOTED($bfd_tr_decl)
|
||||
fi
|
||||
])dnl
|
481
contrib/binutils/bfd/aclocal.m4
vendored
481
contrib/binutils/bfd/aclocal.m4
vendored
|
@ -1,9 +1,21 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.2e
|
||||
|
||||
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
dnl This Makefile.in is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
|
||||
AC_DEFUN(BFD_BINARY_FOPEN,
|
||||
[AC_REQUIRE([AC_CANONICAL_SYSTEM])
|
||||
case "${host}" in
|
||||
changequote(,)dnl
|
||||
i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
|
||||
i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
|
||||
changequote([,])dnl
|
||||
AC_DEFINE(USE_BINARY_FOPEN) ;;
|
||||
esac])dnl
|
||||
|
@ -18,7 +30,25 @@ if test -z "$CC_FOR_BUILD"; then
|
|||
CC_FOR_BUILD=gcc
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CC_FOR_BUILD)])dnl
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
# Also set EXEEXT_FOR_BUILD.
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
EXEEXT_FOR_BUILD='$(EXEEXT)'
|
||||
else
|
||||
AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
|
||||
[cat > ac_c_test.c << 'EOF'
|
||||
int main() {
|
||||
/* Nothing needed here */
|
||||
}
|
||||
EOF
|
||||
${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
|
||||
bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
|
||||
rm -f ac_c_test*
|
||||
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
|
||||
EXEEXT_FOR_BUILD=""
|
||||
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
|
||||
fi
|
||||
AC_SUBST(EXEEXT_FOR_BUILD)])dnl
|
||||
|
||||
dnl See whether we need a declaration for a function.
|
||||
AC_DEFUN(BFD_NEED_DECLARATION,
|
||||
|
@ -47,3 +77,450 @@ if test $bfd_cv_decl_needed_$1 = yes; then
|
|||
AC_DEFINE_UNQUOTED($bfd_tr_decl)
|
||||
fi
|
||||
])dnl
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AM_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_PROG_INSTALL,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
||||
AC_SUBST(INSTALL_SCRIPT)dnl
|
||||
])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# serial 24 AM_PROG_LIBTOOL
|
||||
AC_DEFUN(AM_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AM_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AM_PROG_LD])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags=
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
])
|
||||
|
||||
# AM_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_SHARED,
|
||||
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
|
||||
changequote([, ])dnl
|
||||
[ --enable-shared=PKGS only build shared libraries if the current package
|
||||
appears as an element in the PKGS list],
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AM_DISABLE_SHARED,
|
||||
[AM_ENABLE_SHARED(no)])
|
||||
|
||||
# AM_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AM_DISABLE_STATIC,
|
||||
[AM_ENABLE_STATIC(no)])
|
||||
|
||||
# AM_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_STATIC,
|
||||
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
|
||||
changequote([, ])dnl
|
||||
[ --enable-static=PKGS only build shared libraries if the current package
|
||||
appears as an element in the PKGS list],
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AM_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
/* | [A-Za-z]:\\*)
|
||||
changequote([,])dnl
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AM_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AM_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AM_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[case "$NM" in
|
||||
changequote(,)dnl
|
||||
/* | [A-Za-z]:\\*)
|
||||
changequote([,])dnl
|
||||
ac_cv_path_NM="$NM" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
else
|
||||
ac_cv_path_NM="$ac_dir/nm"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
;;
|
||||
esac])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
dnl This file resides in the same directory as the config header
|
||||
dnl that is generated. We must strip everything past the first ":",
|
||||
dnl and everything past the last "/".
|
||||
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
||||
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
||||
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
||||
<<am_indx=1
|
||||
for am_file in <<$1>>; do
|
||||
case " <<$>>CONFIG_HEADERS " in
|
||||
*" <<$>>am_file "*<<)>>
|
||||
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
||||
;;
|
||||
esac
|
||||
am_indx=`expr "<<$>>am_indx" + 1`
|
||||
done<<>>dnl>>)
|
||||
changequote([,]))])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_MAINTAINER_MODE,
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
||||
if test $USE_MAINTAINER_MODE = yes; then
|
||||
MAINT=
|
||||
else
|
||||
MAINT='#M#'
|
||||
fi
|
||||
AC_SUBST(MAINT)dnl
|
||||
]
|
||||
)
|
||||
|
||||
# Check to see if we're running under Cygwin32, without using
|
||||
# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
|
||||
# Otherwise set it to "no".
|
||||
|
||||
dnl AM_CYGWIN32()
|
||||
AC_DEFUN(AM_CYGWIN32,
|
||||
[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
|
||||
[AC_TRY_COMPILE(,[return __CYGWIN32__;],
|
||||
am_cv_cygwin32=yes, am_cv_cygwin32=no)
|
||||
rm -f conftest*])
|
||||
CYGWIN32=
|
||||
test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
|
||||
|
||||
# Check to see if we're running under Win32, without using
|
||||
# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
|
||||
# Otherwise set it to "".
|
||||
|
||||
dnl AM_EXEEXT()
|
||||
dnl This knows we add .exe if we're building in the Cygwin32
|
||||
dnl environment. But if we're not, then it compiles a test program
|
||||
dnl to see if there is a suffix for executables.
|
||||
AC_DEFUN(AM_EXEEXT,
|
||||
[AC_REQUIRE([AM_CYGWIN32])
|
||||
AC_REQUIRE([AM_MINGW32])
|
||||
AC_MSG_CHECKING([for executable suffix])
|
||||
AC_CACHE_VAL(am_cv_exeext,
|
||||
[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
|
||||
am_cv_exeext=.exe
|
||||
else
|
||||
cat > am_c_test.c << 'EOF'
|
||||
int main() {
|
||||
/* Nothing needed here */
|
||||
}
|
||||
EOF
|
||||
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
|
||||
am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
|
||||
rm -f am_c_test*])
|
||||
test x"${am_cv_exeext}" = x && am_cv_exeext=no
|
||||
fi
|
||||
EXEEXT=""
|
||||
test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
|
||||
AC_MSG_RESULT(${am_cv_exeext})
|
||||
AC_SUBST(EXEEXT)])
|
||||
|
||||
# Check to see if we're running under Mingw, without using
|
||||
# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
|
||||
# Otherwise set it to "no".
|
||||
|
||||
dnl AM_MINGW32()
|
||||
AC_DEFUN(AM_MINGW32,
|
||||
[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
|
||||
[AC_TRY_COMPILE(,[return __MINGW32__;],
|
||||
am_cv_mingw32=yes, am_cv_mingw32=no)
|
||||
rm -f conftest*])
|
||||
MINGW32=
|
||||
test "$am_cv_mingw32" = yes && MINGW32=yes])
|
||||
|
||||
|
|
|
@ -606,7 +606,7 @@ const bfd_target MY(vec) =
|
|||
(HAS_RELOC | EXEC_P | /* object flags */
|
||||
HAS_LINENO | HAS_DEBUG |
|
||||
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
|
||||
MY_symbol_leading_char,
|
||||
AR_PAD_CHAR, /* ar_pad_char */
|
||||
15, /* ar_max_namelen */
|
||||
|
|
1062
contrib/binutils/bfd/aout-tic30.c
Normal file
1062
contrib/binutils/bfd/aout-tic30.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
|||
/* A.out "format 1" file handling code for BFD.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -124,19 +125,19 @@ sunos_set_arch_mach (abfd, machtype)
|
|||
/* Some Sun3s make magic numbers without cpu types in them, so
|
||||
we'll default to the 68000. */
|
||||
arch = bfd_arch_m68k;
|
||||
machine = 68000;
|
||||
machine = bfd_mach_m68000;
|
||||
break;
|
||||
|
||||
case M_68010:
|
||||
case M_HP200:
|
||||
arch = bfd_arch_m68k;
|
||||
machine = 68010;
|
||||
machine = bfd_mach_m68010;
|
||||
break;
|
||||
|
||||
case M_68020:
|
||||
case M_HP300:
|
||||
arch = bfd_arch_m68k;
|
||||
machine = 68020;
|
||||
machine = bfd_mach_m68020;
|
||||
break;
|
||||
|
||||
case M_SPARC:
|
||||
|
@ -213,14 +214,14 @@ sunos_write_object_contents (abfd)
|
|||
case bfd_arch_m68k:
|
||||
switch (bfd_get_mach (abfd))
|
||||
{
|
||||
case 68000:
|
||||
case bfd_mach_m68000:
|
||||
N_SET_MACHTYPE (*execp, M_UNKNOWN);
|
||||
break;
|
||||
case 68010:
|
||||
case bfd_mach_m68010:
|
||||
N_SET_MACHTYPE (*execp, M_68010);
|
||||
break;
|
||||
default:
|
||||
case 68020:
|
||||
case bfd_mach_m68020:
|
||||
N_SET_MACHTYPE (*execp, M_68020);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* BFD semi-generic back-end for a.out binaries.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -715,11 +716,11 @@ NAME(aout,machine_type) (arch, machine, unknown)
|
|||
|
||||
case bfd_arch_m68k:
|
||||
switch (machine) {
|
||||
case 0: arch_flags = M_68010; break;
|
||||
case 68000: arch_flags = M_UNKNOWN; *unknown = false; break;
|
||||
case 68010: arch_flags = M_68010; break;
|
||||
case 68020: arch_flags = M_68020; break;
|
||||
default: arch_flags = M_UNKNOWN; break;
|
||||
case 0: arch_flags = M_68010; break;
|
||||
case bfd_mach_m68000: arch_flags = M_UNKNOWN; *unknown = false; break;
|
||||
case bfd_mach_m68010: arch_flags = M_68010; break;
|
||||
case bfd_mach_m68020: arch_flags = M_68020; break;
|
||||
default: arch_flags = M_UNKNOWN; break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -3880,10 +3881,29 @@ NAME(aout,final_link) (abfd, info, callback)
|
|||
obj_datasec (abfd)->reloc_count =
|
||||
exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd);
|
||||
|
||||
/* Write out the string table. */
|
||||
if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0)
|
||||
goto error_return;
|
||||
return emit_stringtab (abfd, aout_info.strtab);
|
||||
/* Write out the string table, unless there are no symbols. */
|
||||
if (abfd->symcount > 0)
|
||||
{
|
||||
if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0
|
||||
|| ! emit_stringtab (abfd, aout_info.strtab))
|
||||
goto error_return;
|
||||
}
|
||||
else if (obj_textsec (abfd)->reloc_count == 0
|
||||
&& obj_datasec (abfd)->reloc_count == 0)
|
||||
{
|
||||
bfd_byte b;
|
||||
|
||||
b = 0;
|
||||
if (bfd_seek (abfd,
|
||||
(obj_datasec (abfd)->filepos
|
||||
+ exec_hdr (abfd)->a_data
|
||||
- 1),
|
||||
SEEK_SET) != 0
|
||||
|| bfd_write (&b, 1, 1, abfd) != 1)
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
error_return:
|
||||
if (aout_info.contents != NULL)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* BFD back-end for archive files (libraries).
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
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.
|
||||
|
@ -412,8 +413,10 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
|
|||
}
|
||||
/* BSD4.4-style long filename.
|
||||
Only implemented for reading, so far! */
|
||||
else if (hdr.ar_name[0] == '#' && hdr.ar_name[1] == '1'
|
||||
&& hdr.ar_name[2] == '/' && isdigit (hdr.ar_name[3]))
|
||||
else if (hdr.ar_name[0] == '#'
|
||||
&& hdr.ar_name[1] == '1'
|
||||
&& hdr.ar_name[2] == '/'
|
||||
&& isdigit ((unsigned char) hdr.ar_name[3]))
|
||||
{
|
||||
/* BSD-4.4 extended name */
|
||||
namelen = atoi (&hdr.ar_name[3]);
|
||||
|
@ -643,6 +646,8 @@ bfd_generic_archive_p (abfd)
|
|||
{
|
||||
bfd_release (abfd, bfd_ardata (abfd));
|
||||
abfd->tdata.aout_ar_data = tdata_hold;
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -650,6 +655,8 @@ bfd_generic_archive_p (abfd)
|
|||
{
|
||||
bfd_release (abfd, bfd_ardata (abfd));
|
||||
abfd->tdata.aout_ar_data = tdata_hold;
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1390,10 +1397,12 @@ bfd_ar_hdr_from_filesystem (abfd, filename)
|
|||
a strong stomach to write this, and it does, but it takes even a
|
||||
stronger stomach to try to code around such a thing! */
|
||||
|
||||
struct ar_hdr *bfd_special_undocumented_glue PARAMS ((bfd *, const char *));
|
||||
|
||||
struct ar_hdr *
|
||||
bfd_special_undocumented_glue (abfd, filename)
|
||||
bfd *abfd;
|
||||
char *filename;
|
||||
const char *filename;
|
||||
{
|
||||
struct areltdata *ar_elt = bfd_ar_hdr_from_filesystem (abfd, filename);
|
||||
if (ar_elt == NULL)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD library support routines for architectures.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 91-97, 1998 Free Software Foundation, Inc.
|
||||
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -70,6 +70,13 @@ DESCRIPTION
|
|||
. bfd_arch_unknown, {* File arch not known *}
|
||||
. bfd_arch_obscure, {* Arch known, not one of these *}
|
||||
. bfd_arch_m68k, {* Motorola 68xxx *}
|
||||
.#define bfd_mach_m68000 1
|
||||
.#define bfd_mach_m68008 2
|
||||
.#define bfd_mach_m68010 3
|
||||
.#define bfd_mach_m68020 4
|
||||
.#define bfd_mach_m68030 5
|
||||
.#define bfd_mach_m68040 6
|
||||
.#define bfd_mach_m68060 7
|
||||
. bfd_arch_vax, {* DEC Vax *}
|
||||
. bfd_arch_i960, {* Intel 960 *}
|
||||
. {* The order of the following is important.
|
||||
|
@ -103,6 +110,20 @@ DESCRIPTION
|
|||
.#define bfd_mach_sparc_v9_p(mach) \
|
||||
. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
|
||||
. bfd_arch_mips, {* MIPS Rxxxx *}
|
||||
.#define bfd_mach_mips3000 3000
|
||||
.#define bfd_mach_mips3900 3900
|
||||
.#define bfd_mach_mips4000 4000
|
||||
.#define bfd_mach_mips4010 4010
|
||||
.#define bfd_mach_mips4100 4100
|
||||
.#define bfd_mach_mips4300 4300
|
||||
.#define bfd_mach_mips4400 4400
|
||||
.#define bfd_mach_mips4600 4600
|
||||
.#define bfd_mach_mips4650 4650
|
||||
.#define bfd_mach_mips5000 5000
|
||||
.#define bfd_mach_mips6000 6000
|
||||
.#define bfd_mach_mips8000 8000
|
||||
.#define bfd_mach_mips10000 10000
|
||||
.#define bfd_mach_mips16 16
|
||||
. bfd_arch_i386, {* Intel 386 *}
|
||||
.#define bfd_mach_i386_i386 0
|
||||
.#define bfd_mach_i386_i8086 1
|
||||
|
@ -127,11 +148,27 @@ DESCRIPTION
|
|||
.#define bfd_mach_z8002 2
|
||||
. bfd_arch_h8500, {* Hitachi H8/500 *}
|
||||
. bfd_arch_sh, {* Hitachi SH *}
|
||||
.#define bfd_mach_sh 0
|
||||
.#define bfd_mach_sh3 0x30
|
||||
.#define bfd_mach_sh3e 0x3e
|
||||
.#define bfd_mach_sh4 0x40
|
||||
. bfd_arch_alpha, {* Dec Alpha *}
|
||||
. bfd_arch_arm, {* Advanced Risc Machines ARM *}
|
||||
.#define bfd_mach_arm_2 1
|
||||
.#define bfd_mach_arm_2a 2
|
||||
.#define bfd_mach_arm_3 3
|
||||
.#define bfd_mach_arm_3M 4
|
||||
.#define bfd_mach_arm_4 5
|
||||
.#define bfd_mach_arm_4T 6
|
||||
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
|
||||
. bfd_arch_w65, {* WDC 65816 *}
|
||||
. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
|
||||
. bfd_arch_v850, {* NEC V850 *}
|
||||
.#define bfd_mach_v850 0
|
||||
. bfd_arch_arc, {* Argonaut RISC Core *}
|
||||
.#define bfd_mach_arc_base 0
|
||||
. bfd_arch_m32r, {* Mitsubishi M32R/D *}
|
||||
.#define bfd_mach_m32r 0 {* backwards compatibility *}
|
||||
. bfd_arch_mn10200, {* Matsushita MN10200 *}
|
||||
. bfd_arch_mn10300, {* Matsushita MN10300 *}
|
||||
. bfd_arch_last
|
||||
|
@ -174,6 +211,7 @@ DESCRIPTION
|
|||
|
||||
extern const bfd_arch_info_type bfd_a29k_arch;
|
||||
extern const bfd_arch_info_type bfd_alpha_arch;
|
||||
extern const bfd_arch_info_type bfd_arc_arch;
|
||||
extern const bfd_arch_info_type bfd_arm_arch;
|
||||
extern const bfd_arch_info_type bfd_d10v_arch;
|
||||
extern const bfd_arch_info_type bfd_h8300_arch;
|
||||
|
@ -192,11 +230,13 @@ extern const bfd_arch_info_type bfd_powerpc_arch;
|
|||
extern const bfd_arch_info_type bfd_rs6000_arch;
|
||||
extern const bfd_arch_info_type bfd_sh_arch;
|
||||
extern const bfd_arch_info_type bfd_sparc_arch;
|
||||
extern const bfd_arch_info_type bfd_tic30_arch;
|
||||
extern const bfd_arch_info_type bfd_vax_arch;
|
||||
extern const bfd_arch_info_type bfd_we32k_arch;
|
||||
extern const bfd_arch_info_type bfd_z8k_arch;
|
||||
extern const bfd_arch_info_type bfd_ns32k_arch;
|
||||
extern const bfd_arch_info_type bfd_w65_arch;
|
||||
extern const bfd_arch_info_type bfd_v850_arch;
|
||||
|
||||
static const bfd_arch_info_type * const bfd_archures_list[] =
|
||||
{
|
||||
|
@ -205,6 +245,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
|
|||
#else
|
||||
&bfd_a29k_arch,
|
||||
&bfd_alpha_arch,
|
||||
&bfd_arc_arch,
|
||||
&bfd_arm_arch,
|
||||
&bfd_d10v_arch,
|
||||
&bfd_h8300_arch,
|
||||
|
@ -223,11 +264,13 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
|
|||
&bfd_rs6000_arch,
|
||||
&bfd_sh_arch,
|
||||
&bfd_sparc_arch,
|
||||
&bfd_tic30_arch,
|
||||
&bfd_vax_arch,
|
||||
&bfd_we32k_arch,
|
||||
&bfd_z8k_arch,
|
||||
&bfd_ns32k_arch,
|
||||
&bfd_w65_arch,
|
||||
&bfd_v850_arch,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
@ -289,6 +332,61 @@ bfd_scan_arch (string)
|
|||
|
||||
|
||||
|
||||
/*
|
||||
FUNCTION
|
||||
bfd_arch_list
|
||||
|
||||
SYNOPSIS
|
||||
const char **bfd_arch_list(void);
|
||||
|
||||
DESCRIPTION
|
||||
Return a freshly malloced NULL-terminated vector of the names
|
||||
of all the valid BFD architectures. Do not modify the names.
|
||||
|
||||
*/
|
||||
|
||||
const char **
|
||||
bfd_arch_list ()
|
||||
{
|
||||
int vec_length = 0;
|
||||
const char **name_ptr;
|
||||
const char **name_list;
|
||||
const bfd_arch_info_type * const *app;
|
||||
|
||||
/* Determine the number of architectures */
|
||||
vec_length = 0;
|
||||
for (app = bfd_archures_list; *app != NULL; app++)
|
||||
{
|
||||
const bfd_arch_info_type *ap;
|
||||
for (ap = *app; ap != NULL; ap = ap->next)
|
||||
{
|
||||
vec_length++;
|
||||
}
|
||||
}
|
||||
|
||||
name_list = (CONST char **)
|
||||
bfd_malloc ((vec_length + 1) * sizeof (char **));
|
||||
if (name_list == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Point the list at each of the names */
|
||||
name_ptr = name_list;
|
||||
for (app = bfd_archures_list; *app != NULL; app++)
|
||||
{
|
||||
const bfd_arch_info_type *ap;
|
||||
for (ap = *app; ap != NULL; ap = ap->next)
|
||||
{
|
||||
*name_ptr = ap->printable_name;
|
||||
name_ptr++;
|
||||
}
|
||||
}
|
||||
*name_ptr = NULL;
|
||||
|
||||
return name_list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FUNCTION
|
||||
bfd_arch_get_compatible
|
||||
|
@ -540,11 +638,59 @@ bfd_default_scan (info, string)
|
|||
const char *ptr_tst;
|
||||
unsigned long number;
|
||||
enum bfd_architecture arch;
|
||||
const char *printable_name_colon;
|
||||
|
||||
/* First test for an exact match */
|
||||
if (strcmp (string, info->printable_name) == 0)
|
||||
/* Exact match of the architecture name (ARCH_NAME) and also the
|
||||
default architecture? */
|
||||
if (strcasecmp (string, info->arch_name) == 0
|
||||
&& info->the_default)
|
||||
return true;
|
||||
|
||||
/* Exact match of the machine name (PRINTABLE_NAME)? */
|
||||
if (strcasecmp (string, info->printable_name) == 0)
|
||||
return true;
|
||||
|
||||
/* Given that printable_name contains no colon, attempt to match:
|
||||
ARCH_NAME [ ":" ] PRINTABLE_NAME? */
|
||||
printable_name_colon = strchr (info->printable_name, ':');
|
||||
if (printable_name_colon == NULL)
|
||||
{
|
||||
int strlen_arch_name = strlen (info->arch_name);
|
||||
if (strncasecmp (string, info->arch_name, strlen_arch_name) == 0)
|
||||
{
|
||||
if (string[strlen_arch_name] == ':')
|
||||
{
|
||||
if (strcasecmp (string + strlen_arch_name + 1,
|
||||
info->printable_name) == 0)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcasecmp (string + strlen_arch_name,
|
||||
info->printable_name) == 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>;
|
||||
Attempt to match: <arch> <mach>? */
|
||||
if (printable_name_colon != NULL)
|
||||
{
|
||||
int colon_index = printable_name_colon - info->printable_name;
|
||||
if (strncasecmp (string, info->printable_name, colon_index) == 0
|
||||
&& strcasecmp (string + colon_index,
|
||||
info->printable_name + colon_index + 1) == 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>; Do not
|
||||
attempt to match just <mach>, it could be ambigious. This test
|
||||
is left until later. */
|
||||
|
||||
/* NOTE: The below is retained for compatibility only. Please do not
|
||||
add to this code */
|
||||
|
||||
/* See how much of the supplied string matches with the
|
||||
architecture, eg the string m68k:68020 would match the 68k entry
|
||||
up to the :, then we get left with the machine number */
|
||||
|
@ -569,69 +715,56 @@ bfd_default_scan (info, string)
|
|||
}
|
||||
|
||||
number = 0;
|
||||
while (isdigit(*ptr_src))
|
||||
while (isdigit ((unsigned char) *ptr_src))
|
||||
{
|
||||
number = number * 10 + *ptr_src - '0';
|
||||
ptr_src++;
|
||||
}
|
||||
|
||||
/* NOTE: The below is retained for compatibility only.
|
||||
PLEASE DO NOT ADD TO THIS CODE. */
|
||||
|
||||
switch (number)
|
||||
{
|
||||
case 65:
|
||||
arch = bfd_arch_w65;
|
||||
break;
|
||||
|
||||
case 300:
|
||||
arch = bfd_arch_h8300;
|
||||
break;
|
||||
|
||||
case 500:
|
||||
arch = bfd_arch_h8500;
|
||||
break;
|
||||
|
||||
case 68010:
|
||||
case 68020:
|
||||
case 68030:
|
||||
case 68040:
|
||||
case 68332:
|
||||
case 68050:
|
||||
/* FIXME: These are needed to parse IEEE objects. */
|
||||
case 68000:
|
||||
arch = bfd_arch_m68k;
|
||||
arch = bfd_arch_m68k;
|
||||
number = bfd_mach_m68000;
|
||||
break;
|
||||
|
||||
case 386:
|
||||
case 80386:
|
||||
case 486:
|
||||
case 80486:
|
||||
arch = bfd_arch_i386;
|
||||
case 68010:
|
||||
arch = bfd_arch_m68k;
|
||||
number = bfd_mach_m68010;
|
||||
break;
|
||||
|
||||
case 29000:
|
||||
arch = bfd_arch_a29k;
|
||||
case 68020:
|
||||
arch = bfd_arch_m68k;
|
||||
number = bfd_mach_m68020;
|
||||
break;
|
||||
|
||||
case 8000:
|
||||
arch = bfd_arch_z8k;
|
||||
case 68030:
|
||||
arch = bfd_arch_m68k;
|
||||
number = bfd_mach_m68030;
|
||||
break;
|
||||
case 68040:
|
||||
arch = bfd_arch_m68k;
|
||||
number = bfd_mach_m68040;
|
||||
break;
|
||||
case 68332:
|
||||
arch = bfd_arch_m68k;
|
||||
/* FIXME: This should be cpu32. */
|
||||
number = bfd_mach_m68020;
|
||||
break;
|
||||
|
||||
case 32000:
|
||||
arch = bfd_arch_we32k;
|
||||
break;
|
||||
|
||||
case 860:
|
||||
case 80860:
|
||||
arch = bfd_arch_i860;
|
||||
break;
|
||||
case 960:
|
||||
case 80960:
|
||||
arch = bfd_arch_i960;
|
||||
case 3000:
|
||||
arch = bfd_arch_mips;
|
||||
number = bfd_mach_mips3000;
|
||||
break;
|
||||
|
||||
case 2000:
|
||||
case 3000:
|
||||
case 4000:
|
||||
case 4400:
|
||||
arch = bfd_arch_mips;
|
||||
number = bfd_mach_mips4000;
|
||||
break;
|
||||
|
||||
case 6000:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* Main header file for the bfd library -- portable access to object files.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
|
||||
|
@ -309,6 +310,7 @@ typedef struct sec *sec_ptr;
|
|||
#define bfd_section_name(bfd, ptr) ((ptr)->name)
|
||||
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
|
||||
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
|
||||
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
|
||||
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
|
||||
#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
|
||||
#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
|
||||
|
@ -605,6 +607,8 @@ extern boolean bfd_elf64_record_link_assignment
|
|||
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
|
||||
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
extern boolean bfd_elf_get_bfd_needed_list
|
||||
PARAMS ((bfd *, struct bfd_link_needed_list **));
|
||||
extern boolean bfd_elf32_size_dynamic_sections
|
||||
PARAMS ((bfd *, const char *, const char *, boolean, const char *,
|
||||
const char * const *, struct bfd_link_info *, struct sec **,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* Main header file for the bfd library -- portable access to object files.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
|
||||
|
@ -309,6 +310,7 @@ typedef struct sec *sec_ptr;
|
|||
#define bfd_section_name(bfd, ptr) ((ptr)->name)
|
||||
#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
|
||||
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
|
||||
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
|
||||
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
|
||||
#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
|
||||
#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
|
||||
|
@ -605,6 +607,8 @@ extern boolean bfd_elf64_record_link_assignment
|
|||
PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
|
||||
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
extern boolean bfd_elf_get_bfd_needed_list
|
||||
PARAMS ((bfd *, struct bfd_link_needed_list **));
|
||||
extern boolean bfd_elf32_size_dynamic_sections
|
||||
PARAMS ((bfd *, const char *, const char *, boolean, const char *,
|
||||
const char * const *, struct bfd_link_info *, struct sec **,
|
||||
|
@ -721,77 +725,77 @@ bfd_create PARAMS ((CONST char *filename, bfd *templ));
|
|||
#define bfd_put_8(abfd, val, ptr) \
|
||||
(*((unsigned char *)(ptr)) = (unsigned char)(val))
|
||||
#define bfd_put_signed_8 \
|
||||
bfd_put_8
|
||||
bfd_put_8
|
||||
#define bfd_get_8(abfd, ptr) \
|
||||
(*(unsigned char *)(ptr))
|
||||
#define bfd_get_signed_8(abfd, ptr) \
|
||||
((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
|
||||
((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
|
||||
|
||||
#define bfd_put_16(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
|
||||
#define bfd_put_signed_16 \
|
||||
bfd_put_16
|
||||
bfd_put_16
|
||||
#define bfd_get_16(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx16, (ptr))
|
||||
#define bfd_get_signed_16(abfd, ptr) \
|
||||
BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
|
||||
BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
|
||||
|
||||
#define bfd_put_32(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
|
||||
#define bfd_put_signed_32 \
|
||||
bfd_put_32
|
||||
bfd_put_32
|
||||
#define bfd_get_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx32, (ptr))
|
||||
#define bfd_get_signed_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
|
||||
BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
|
||||
|
||||
#define bfd_put_64(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
|
||||
#define bfd_put_signed_64 \
|
||||
bfd_put_64
|
||||
bfd_put_64
|
||||
#define bfd_get_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx64, (ptr))
|
||||
#define bfd_get_signed_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
||||
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
||||
|
||||
|
||||
/* Byte swapping macros for file header data. */
|
||||
|
||||
#define bfd_h_put_8(abfd, val, ptr) \
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
#define bfd_h_put_signed_8(abfd, val, ptr) \
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
#define bfd_h_get_8(abfd, ptr) \
|
||||
bfd_get_8 (abfd, ptr)
|
||||
bfd_get_8 (abfd, ptr)
|
||||
#define bfd_h_get_signed_8(abfd, ptr) \
|
||||
bfd_get_signed_8 (abfd, ptr)
|
||||
bfd_get_signed_8 (abfd, ptr)
|
||||
|
||||
#define bfd_h_put_16(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
|
||||
#define bfd_h_put_signed_16 \
|
||||
bfd_h_put_16
|
||||
bfd_h_put_16
|
||||
#define bfd_h_get_16(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx16,(ptr))
|
||||
#define bfd_h_get_signed_16(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
|
||||
|
||||
#define bfd_h_put_32(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
|
||||
#define bfd_h_put_signed_32 \
|
||||
bfd_h_put_32
|
||||
bfd_h_put_32
|
||||
#define bfd_h_get_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx32,(ptr))
|
||||
#define bfd_h_get_signed_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
|
||||
|
||||
#define bfd_h_put_64(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
|
||||
#define bfd_h_put_signed_64 \
|
||||
bfd_h_put_64
|
||||
bfd_h_put_64
|
||||
#define bfd_h_get_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx64,(ptr))
|
||||
#define bfd_h_get_signed_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
|
||||
|
||||
typedef struct sec
|
||||
{
|
||||
|
@ -888,7 +892,7 @@ typedef struct sec
|
|||
multiple times, the value of a symbol is the amount of
|
||||
space it requires, and the largest symbol value is the one
|
||||
used). Most targets have exactly one of these (which we
|
||||
translate to bfd_com_section_ptr), but ECOFF has two. */
|
||||
translate to bfd_com_section_ptr), but ECOFF has two. */
|
||||
#define SEC_IS_COMMON 0x8000
|
||||
|
||||
/* The section contains only debugging information. For
|
||||
|
@ -904,76 +908,76 @@ typedef struct sec
|
|||
#define SEC_IN_MEMORY 0x20000
|
||||
|
||||
/* The contents of this section are to be excluded by the
|
||||
linker for executable and shared objects unless those
|
||||
objects are to be further relocated. */
|
||||
linker for executable and shared objects unless those
|
||||
objects are to be further relocated. */
|
||||
#define SEC_EXCLUDE 0x40000
|
||||
|
||||
/* The contents of this section are to be sorted by the
|
||||
based on the address specified in the associated symbol
|
||||
table. */
|
||||
/* The contents of this section are to be sorted by the
|
||||
based on the address specified in the associated symbol
|
||||
table. */
|
||||
#define SEC_SORT_ENTRIES 0x80000
|
||||
|
||||
/* When linking, duplicate sections of the same name should be
|
||||
discarded, rather than being combined into a single section as
|
||||
is usually done. This is similar to how common symbols are
|
||||
handled. See SEC_LINK_DUPLICATES below. */
|
||||
/* When linking, duplicate sections of the same name should be
|
||||
discarded, rather than being combined into a single section as
|
||||
is usually done. This is similar to how common symbols are
|
||||
handled. See SEC_LINK_DUPLICATES below. */
|
||||
#define SEC_LINK_ONCE 0x100000
|
||||
|
||||
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
||||
should handle duplicate sections. */
|
||||
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
||||
should handle duplicate sections. */
|
||||
#define SEC_LINK_DUPLICATES 0x600000
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that duplicate
|
||||
sections with the same name should simply be discarded. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that duplicate
|
||||
sections with the same name should simply be discarded. */
|
||||
#define SEC_LINK_DUPLICATES_DISCARD 0x0
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if there are any duplicate sections, although
|
||||
it should still only link one copy. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if there are any duplicate sections, although
|
||||
it should still only link one copy. */
|
||||
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections are a different size. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections are a different size. */
|
||||
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections contain different
|
||||
contents. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections contain different
|
||||
contents. */
|
||||
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
|
||||
|
||||
/* This section was created by the linker as part of dynamic
|
||||
relocation or other arcane processing. It is skipped when
|
||||
going through the first-pass output, trusting that someone
|
||||
else up the line will take care of it later. */
|
||||
/* This section was created by the linker as part of dynamic
|
||||
relocation or other arcane processing. It is skipped when
|
||||
going through the first-pass output, trusting that someone
|
||||
else up the line will take care of it later. */
|
||||
#define SEC_LINKER_CREATED 0x800000
|
||||
|
||||
/* End of section flags. */
|
||||
/* End of section flags. */
|
||||
|
||||
/* Some internal packed boolean fields. */
|
||||
/* Some internal packed boolean fields. */
|
||||
|
||||
/* See the vma field. */
|
||||
unsigned int user_set_vma : 1;
|
||||
/* See the vma field. */
|
||||
unsigned int user_set_vma : 1;
|
||||
|
||||
/* Whether relocations have been processed. */
|
||||
unsigned int reloc_done : 1;
|
||||
/* Whether relocations have been processed. */
|
||||
unsigned int reloc_done : 1;
|
||||
|
||||
/* A mark flag used by some of the linker backends. */
|
||||
unsigned int linker_mark : 1;
|
||||
/* A mark flag used by some of the linker backends. */
|
||||
unsigned int linker_mark : 1;
|
||||
|
||||
/* End of internal packed boolean fields. */
|
||||
/* End of internal packed boolean fields. */
|
||||
|
||||
/* The virtual memory address of the section - where it will be
|
||||
at run time. The symbols are relocated against this. The
|
||||
user_set_vma flag is maintained by bfd; if it's not set, the
|
||||
backend can assign addresses (for example, in <<a.out>>, where
|
||||
the default address for <<.data>> is dependent on the specific
|
||||
target and various flags). */
|
||||
user_set_vma flag is maintained by bfd; if it's not set, the
|
||||
backend can assign addresses (for example, in <<a.out>>, where
|
||||
the default address for <<.data>> is dependent on the specific
|
||||
target and various flags). */
|
||||
|
||||
bfd_vma vma;
|
||||
|
||||
/* The load address of the section - where it would be in a
|
||||
rom image; really only used for writing section header
|
||||
information. */
|
||||
information. */
|
||||
|
||||
bfd_vma lma;
|
||||
|
||||
|
@ -984,8 +988,8 @@ typedef struct sec
|
|||
bfd_size_type _cooked_size;
|
||||
|
||||
/* The original size on disk of the section, in bytes. Normally this
|
||||
value is the same as the size, but if some relaxing has
|
||||
been done, then this value will be bigger. */
|
||||
value is the same as the size, but if some relaxing has
|
||||
been done, then this value will be bigger. */
|
||||
|
||||
bfd_size_type _raw_size;
|
||||
|
||||
|
@ -1070,7 +1074,7 @@ typedef struct sec
|
|||
|
||||
bfd *owner;
|
||||
|
||||
/* A symbol which points at this section only */
|
||||
/* A symbol which points at this section only */
|
||||
struct symbol_cache_entry *symbol;
|
||||
struct symbol_cache_entry **symbol_ptr_ptr;
|
||||
|
||||
|
@ -1080,7 +1084,7 @@ typedef struct sec
|
|||
|
||||
/* These sections are global, and are managed by BFD. The application
|
||||
and target back end are not permitted to change the values in
|
||||
these sections. New code should use the section_ptr macros rather
|
||||
these sections. New code should use the section_ptr macros rather
|
||||
than referring directly to the const sections. The const sections
|
||||
may eventually vanish. */
|
||||
#define BFD_ABS_SECTION_NAME "*ABS*"
|
||||
|
@ -1155,12 +1159,19 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, ase
|
|||
|
||||
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_section_data, \
|
||||
(ibfd, isection, obfd, osection))
|
||||
(ibfd, isection, obfd, osection))
|
||||
enum bfd_architecture
|
||||
{
|
||||
bfd_arch_unknown, /* File arch not known */
|
||||
bfd_arch_obscure, /* Arch known, not one of these */
|
||||
bfd_arch_m68k, /* Motorola 68xxx */
|
||||
#define bfd_mach_m68000 1
|
||||
#define bfd_mach_m68008 2
|
||||
#define bfd_mach_m68010 3
|
||||
#define bfd_mach_m68020 4
|
||||
#define bfd_mach_m68030 5
|
||||
#define bfd_mach_m68040 6
|
||||
#define bfd_mach_m68060 7
|
||||
bfd_arch_vax, /* DEC Vax */
|
||||
bfd_arch_i960, /* Intel 960 */
|
||||
/* The order of the following is important.
|
||||
|
@ -1177,23 +1188,37 @@ enum bfd_architecture
|
|||
#define bfd_mach_i960_mc 4
|
||||
#define bfd_mach_i960_xa 5
|
||||
#define bfd_mach_i960_ca 6
|
||||
#define bfd_mach_i960_jx 7
|
||||
#define bfd_mach_i960_jx 7
|
||||
#define bfd_mach_i960_hx 8
|
||||
|
||||
bfd_arch_a29k, /* AMD 29000 */
|
||||
bfd_arch_sparc, /* SPARC */
|
||||
#define bfd_mach_sparc 1
|
||||
#define bfd_mach_sparc 1
|
||||
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
|
||||
#define bfd_mach_sparc_sparclet 2
|
||||
#define bfd_mach_sparc_sparclite 3
|
||||
#define bfd_mach_sparc_v8plus 4
|
||||
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v9 6
|
||||
#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_sparclet 2
|
||||
#define bfd_mach_sparc_sparclite 3
|
||||
#define bfd_mach_sparc_v8plus 4
|
||||
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v9 6
|
||||
#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
|
||||
/* Nonzero if MACH has the v9 instruction set. */
|
||||
#define bfd_mach_sparc_v9_p(mach) \
|
||||
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
|
||||
bfd_arch_mips, /* MIPS Rxxxx */
|
||||
#define bfd_mach_mips3000 3000
|
||||
#define bfd_mach_mips3900 3900
|
||||
#define bfd_mach_mips4000 4000
|
||||
#define bfd_mach_mips4010 4010
|
||||
#define bfd_mach_mips4100 4100
|
||||
#define bfd_mach_mips4300 4300
|
||||
#define bfd_mach_mips4400 4400
|
||||
#define bfd_mach_mips4600 4600
|
||||
#define bfd_mach_mips4650 4650
|
||||
#define bfd_mach_mips5000 5000
|
||||
#define bfd_mach_mips6000 6000
|
||||
#define bfd_mach_mips8000 8000
|
||||
#define bfd_mach_mips10000 10000
|
||||
#define bfd_mach_mips16 16
|
||||
bfd_arch_i386, /* Intel 386 */
|
||||
#define bfd_mach_i386_i386 0
|
||||
#define bfd_mach_i386_i8086 1
|
||||
|
@ -1214,15 +1239,31 @@ enum bfd_architecture
|
|||
bfd_arch_hppa, /* HP PA RISC */
|
||||
bfd_arch_d10v, /* Mitsubishi D10V */
|
||||
bfd_arch_z8k, /* Zilog Z8000 */
|
||||
#define bfd_mach_z8001 1
|
||||
#define bfd_mach_z8002 2
|
||||
#define bfd_mach_z8001 1
|
||||
#define bfd_mach_z8002 2
|
||||
bfd_arch_h8500, /* Hitachi H8/500 */
|
||||
bfd_arch_sh, /* Hitachi SH */
|
||||
#define bfd_mach_sh 0
|
||||
#define bfd_mach_sh3 0x30
|
||||
#define bfd_mach_sh3e 0x3e
|
||||
#define bfd_mach_sh4 0x40
|
||||
bfd_arch_alpha, /* Dec Alpha */
|
||||
bfd_arch_arm, /* Advanced Risc Machines ARM */
|
||||
#define bfd_mach_arm_2 1
|
||||
#define bfd_mach_arm_2a 2
|
||||
#define bfd_mach_arm_3 3
|
||||
#define bfd_mach_arm_3M 4
|
||||
#define bfd_mach_arm_4 5
|
||||
#define bfd_mach_arm_4T 6
|
||||
bfd_arch_ns32k, /* National Semiconductors ns32000 */
|
||||
bfd_arch_w65, /* WDC 65816 */
|
||||
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
|
||||
bfd_arch_v850, /* NEC V850 */
|
||||
#define bfd_mach_v850 0
|
||||
bfd_arch_arc, /* Argonaut RISC Core */
|
||||
#define bfd_mach_arc_base 0
|
||||
bfd_arch_m32r, /* Mitsubishi M32R/D */
|
||||
#define bfd_mach_m32r 0 /* backwards compatibility */
|
||||
bfd_arch_mn10200, /* Matsushita MN10200 */
|
||||
bfd_arch_mn10300, /* Matsushita MN10300 */
|
||||
bfd_arch_last
|
||||
|
@ -1239,10 +1280,10 @@ typedef struct bfd_arch_info
|
|||
const char *printable_name;
|
||||
unsigned int section_align_power;
|
||||
/* true if this is the default machine for the architecture */
|
||||
boolean the_default;
|
||||
boolean the_default;
|
||||
const struct bfd_arch_info * (*compatible)
|
||||
PARAMS ((const struct bfd_arch_info *a,
|
||||
const struct bfd_arch_info *b));
|
||||
PARAMS ((const struct bfd_arch_info *a,
|
||||
const struct bfd_arch_info *b));
|
||||
|
||||
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
|
||||
|
||||
|
@ -1254,6 +1295,9 @@ bfd_printable_name PARAMS ((bfd *abfd));
|
|||
const bfd_arch_info_type *
|
||||
bfd_scan_arch PARAMS ((const char *string));
|
||||
|
||||
const char **
|
||||
bfd_arch_list PARAMS ((void));
|
||||
|
||||
const bfd_arch_info_type *
|
||||
bfd_arch_get_compatible PARAMS ((
|
||||
const bfd *abfd,
|
||||
|
@ -1336,19 +1380,19 @@ typedef struct reloc_cache_entry
|
|||
} arelent;
|
||||
enum complain_overflow
|
||||
{
|
||||
/* Do not complain on overflow. */
|
||||
/* Do not complain on overflow. */
|
||||
complain_overflow_dont,
|
||||
|
||||
/* Complain if the bitfield overflows, whether it is considered
|
||||
as signed or unsigned. */
|
||||
/* Complain if the bitfield overflows, whether it is considered
|
||||
as signed or unsigned. */
|
||||
complain_overflow_bitfield,
|
||||
|
||||
/* Complain if the value overflows when considered as signed
|
||||
number. */
|
||||
/* Complain if the value overflows when considered as signed
|
||||
number. */
|
||||
complain_overflow_signed,
|
||||
|
||||
/* Complain if the value overflows when considered as an
|
||||
unsigned number. */
|
||||
/* Complain if the value overflows when considered as an
|
||||
unsigned number. */
|
||||
complain_overflow_unsigned
|
||||
};
|
||||
|
||||
|
@ -1366,13 +1410,13 @@ struct reloc_howto_struct
|
|||
unwanted data from the relocation. */
|
||||
unsigned int rightshift;
|
||||
|
||||
/* The size of the item to be relocated. This is *not* a
|
||||
power-of-two measure. To get the number of bytes operated
|
||||
on by a type of relocation, use bfd_get_reloc_size. */
|
||||
/* The size of the item to be relocated. This is *not* a
|
||||
power-of-two measure. To get the number of bytes operated
|
||||
on by a type of relocation, use bfd_get_reloc_size. */
|
||||
int size;
|
||||
|
||||
/* The number of bits in the item to be relocated. This is used
|
||||
when doing overflow checking. */
|
||||
when doing overflow checking. */
|
||||
unsigned int bitsize;
|
||||
|
||||
/* Notes that the relocation is relative to the location in the
|
||||
|
@ -1381,12 +1425,12 @@ struct reloc_howto_struct
|
|||
being relocated. */
|
||||
boolean pc_relative;
|
||||
|
||||
/* The bit position of the reloc value in the destination.
|
||||
The relocated value is left shifted by this amount. */
|
||||
/* The bit position of the reloc value in the destination.
|
||||
The relocated value is left shifted by this amount. */
|
||||
unsigned int bitpos;
|
||||
|
||||
/* What type of overflow error should be checked for when
|
||||
relocating. */
|
||||
/* What type of overflow error should be checked for when
|
||||
relocating. */
|
||||
enum complain_overflow complain_on_overflow;
|
||||
|
||||
/* If this field is non null, then the supplied function is
|
||||
|
@ -1394,8 +1438,8 @@ struct reloc_howto_struct
|
|||
strange relocation methods to be accomodated (e.g., i960 callj
|
||||
instructions). */
|
||||
bfd_reloc_status_type (*special_function)
|
||||
PARAMS ((bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
PARAMS ((bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
struct symbol_cache_entry *symbol,
|
||||
PTR data,
|
||||
asection *input_section,
|
||||
|
@ -1448,7 +1492,7 @@ struct reloc_howto_struct
|
|||
} \
|
||||
} \
|
||||
}
|
||||
int
|
||||
unsigned int
|
||||
bfd_get_reloc_size PARAMS ((reloc_howto_type *));
|
||||
|
||||
typedef struct relent_chain {
|
||||
|
@ -1457,6 +1501,14 @@ typedef struct relent_chain {
|
|||
} arelent_chain;
|
||||
bfd_reloc_status_type
|
||||
|
||||
bfd_check_overflow
|
||||
PARAMS ((enum complain_overflow how,
|
||||
unsigned int bitsize,
|
||||
unsigned int rightshift,
|
||||
bfd_vma relocation));
|
||||
|
||||
bfd_reloc_status_type
|
||||
|
||||
bfd_perform_relocation
|
||||
PARAMS ((bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
|
@ -1584,7 +1636,7 @@ relocation types already defined. */
|
|||
BFD_RELOC_SPARC_BASE13,
|
||||
BFD_RELOC_SPARC_BASE22,
|
||||
|
||||
/* Some relocations we're using for SPARC V9 -- subject to change. */
|
||||
/* SPARC64 relocations */
|
||||
#define BFD_RELOC_SPARC_64 BFD_RELOC_64
|
||||
BFD_RELOC_SPARC_10,
|
||||
BFD_RELOC_SPARC_11,
|
||||
|
@ -1597,10 +1649,17 @@ relocation types already defined. */
|
|||
BFD_RELOC_SPARC_PC_LM22,
|
||||
BFD_RELOC_SPARC_WDISP16,
|
||||
BFD_RELOC_SPARC_WDISP19,
|
||||
BFD_RELOC_SPARC_GLOB_JMP,
|
||||
BFD_RELOC_SPARC_7,
|
||||
BFD_RELOC_SPARC_6,
|
||||
BFD_RELOC_SPARC_5,
|
||||
#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
|
||||
BFD_RELOC_SPARC_PLT64,
|
||||
BFD_RELOC_SPARC_HIX22,
|
||||
BFD_RELOC_SPARC_LOX10,
|
||||
BFD_RELOC_SPARC_H44,
|
||||
BFD_RELOC_SPARC_M44,
|
||||
BFD_RELOC_SPARC_L44,
|
||||
BFD_RELOC_SPARC_REGISTER,
|
||||
|
||||
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
|
||||
"addend" in some special way.
|
||||
|
@ -1706,6 +1765,7 @@ to compensate for the borrow when the low bits are added. */
|
|||
BFD_RELOC_MIPS_CALL_HI16,
|
||||
BFD_RELOC_MIPS_CALL_LO16,
|
||||
|
||||
|
||||
/* i386/elf relocations */
|
||||
BFD_RELOC_386_GOT32,
|
||||
BFD_RELOC_386_PLT32,
|
||||
|
@ -1810,6 +1870,22 @@ not stored in the instruction. */
|
|||
BFD_RELOC_SH_DATA,
|
||||
BFD_RELOC_SH_LABEL,
|
||||
|
||||
/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
|
||||
be zero and is not stored in the instruction. */
|
||||
BFD_RELOC_THUMB_PCREL_BRANCH9,
|
||||
BFD_RELOC_THUMB_PCREL_BRANCH12,
|
||||
BFD_RELOC_THUMB_PCREL_BRANCH23,
|
||||
|
||||
/* Argonaut RISC Core (ARC) relocs.
|
||||
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
|
||||
not stored in the instruction. The high 20 bits are installed in bits 26
|
||||
through 7 of the instruction. */
|
||||
BFD_RELOC_ARC_B22_PCREL,
|
||||
|
||||
/* ARC 26 bit absolute branch. The lowest two bits must be zero and are not
|
||||
stored in the instruction. The high 24 bits are installed in bits 23
|
||||
through 0. */
|
||||
BFD_RELOC_ARC_B26,
|
||||
|
||||
/* Mitsubishi D10V relocs.
|
||||
This is a 10-bit reloc with the right 2 bits
|
||||
|
@ -1861,6 +1937,40 @@ used when the lower 16 bits are treated as signed. */
|
|||
add3, load, and store instructions. */
|
||||
BFD_RELOC_M32R_SDA16,
|
||||
|
||||
/* This is a 9-bit reloc */
|
||||
BFD_RELOC_V850_9_PCREL,
|
||||
|
||||
/* This is a 22-bit reloc */
|
||||
BFD_RELOC_V850_22_PCREL,
|
||||
|
||||
/* This is a 16 bit offset from the short data area pointer. */
|
||||
BFD_RELOC_V850_SDA_16_16_OFFSET,
|
||||
|
||||
/* This is a 16 bit offset (of which only 15 bits are used) from the
|
||||
short data area pointer. */
|
||||
BFD_RELOC_V850_SDA_15_16_OFFSET,
|
||||
|
||||
/* This is a 16 bit offset from the zero data area pointer. */
|
||||
BFD_RELOC_V850_ZDA_16_16_OFFSET,
|
||||
|
||||
/* This is a 16 bit offset (of which only 15 bits are used) from the
|
||||
zero data area pointer. */
|
||||
BFD_RELOC_V850_ZDA_15_16_OFFSET,
|
||||
|
||||
/* This is an 8 bit offset (of which only 6 bits are used) from the
|
||||
tiny data area pointer. */
|
||||
BFD_RELOC_V850_TDA_6_8_OFFSET,
|
||||
|
||||
/* This is an 8bit offset (of which only 7 bits are used) from the tiny
|
||||
data area pointer. */
|
||||
BFD_RELOC_V850_TDA_7_8_OFFSET,
|
||||
|
||||
/* This is a 7 bit offset from the tiny data area pointer. */
|
||||
BFD_RELOC_V850_TDA_7_7_OFFSET,
|
||||
|
||||
/* This is a 16 bit offset from the tiny data area pointer. */
|
||||
BFD_RELOC_V850_TDA_16_16_OFFSET,
|
||||
|
||||
|
||||
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction. */
|
||||
|
@ -1869,6 +1979,11 @@ instruction. */
|
|||
/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction. */
|
||||
BFD_RELOC_MN10300_16_PCREL,
|
||||
|
||||
/* This is a 8bit DP reloc for the tms320c30, where the most
|
||||
significant 8 bits of a 24 bit word are placed into the least
|
||||
significant 8 bits of the opcode. */
|
||||
BFD_RELOC_TIC30_LDP,
|
||||
BFD_RELOC_UNUSED };
|
||||
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
|
||||
reloc_howto_type *
|
||||
|
@ -1881,114 +1996,114 @@ bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
|
|||
|
||||
typedef struct symbol_cache_entry
|
||||
{
|
||||
/* A pointer to the BFD which owns the symbol. This information
|
||||
is necessary so that a back end can work out what additional
|
||||
information (invisible to the application writer) is carried
|
||||
with the symbol.
|
||||
/* A pointer to the BFD which owns the symbol. This information
|
||||
is necessary so that a back end can work out what additional
|
||||
information (invisible to the application writer) is carried
|
||||
with the symbol.
|
||||
|
||||
This field is *almost* redundant, since you can use section->owner
|
||||
instead, except that some symbols point to the global sections
|
||||
bfd_{abs,com,und}_section. This could be fixed by making
|
||||
these globals be per-bfd (or per-target-flavor). FIXME. */
|
||||
This field is *almost* redundant, since you can use section->owner
|
||||
instead, except that some symbols point to the global sections
|
||||
bfd_{abs,com,und}_section. This could be fixed by making
|
||||
these globals be per-bfd (or per-target-flavor). FIXME. */
|
||||
|
||||
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
|
||||
|
||||
/* The text of the symbol. The name is left alone, and not copied; the
|
||||
application may not alter it. */
|
||||
/* The text of the symbol. The name is left alone, and not copied; the
|
||||
application may not alter it. */
|
||||
CONST char *name;
|
||||
|
||||
/* The value of the symbol. This really should be a union of a
|
||||
/* The value of the symbol. This really should be a union of a
|
||||
numeric value with a pointer, since some flags indicate that
|
||||
a pointer to another symbol is stored here. */
|
||||
symvalue value;
|
||||
|
||||
/* Attributes of a symbol: */
|
||||
/* Attributes of a symbol: */
|
||||
|
||||
#define BSF_NO_FLAGS 0x00
|
||||
|
||||
/* The symbol has local scope; <<static>> in <<C>>. The value
|
||||
is the offset into the section of the data. */
|
||||
#define BSF_LOCAL 0x01
|
||||
/* The symbol has local scope; <<static>> in <<C>>. The value
|
||||
is the offset into the section of the data. */
|
||||
#define BSF_LOCAL 0x01
|
||||
|
||||
/* The symbol has global scope; initialized data in <<C>>. The
|
||||
value is the offset into the section of the data. */
|
||||
#define BSF_GLOBAL 0x02
|
||||
/* The symbol has global scope; initialized data in <<C>>. The
|
||||
value is the offset into the section of the data. */
|
||||
#define BSF_GLOBAL 0x02
|
||||
|
||||
/* The symbol has global scope and is exported. The value is
|
||||
the offset into the section of the data. */
|
||||
#define BSF_EXPORT BSF_GLOBAL /* no real difference */
|
||||
/* The symbol has global scope and is exported. The value is
|
||||
the offset into the section of the data. */
|
||||
#define BSF_EXPORT BSF_GLOBAL /* no real difference */
|
||||
|
||||
/* A normal C symbol would be one of:
|
||||
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
|
||||
<<BSF_GLOBAL>> */
|
||||
/* A normal C symbol would be one of:
|
||||
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
|
||||
<<BSF_GLOBAL>> */
|
||||
|
||||
/* The symbol is a debugging record. The value has an arbitary
|
||||
meaning. */
|
||||
#define BSF_DEBUGGING 0x08
|
||||
/* The symbol is a debugging record. The value has an arbitary
|
||||
meaning. */
|
||||
#define BSF_DEBUGGING 0x08
|
||||
|
||||
/* The symbol denotes a function entry point. Used in ELF,
|
||||
perhaps others someday. */
|
||||
/* The symbol denotes a function entry point. Used in ELF,
|
||||
perhaps others someday. */
|
||||
#define BSF_FUNCTION 0x10
|
||||
|
||||
/* Used by the linker. */
|
||||
/* Used by the linker. */
|
||||
#define BSF_KEEP 0x20
|
||||
#define BSF_KEEP_G 0x40
|
||||
|
||||
/* A weak global symbol, overridable without warnings by
|
||||
a regular global symbol of the same name. */
|
||||
/* A weak global symbol, overridable without warnings by
|
||||
a regular global symbol of the same name. */
|
||||
#define BSF_WEAK 0x80
|
||||
|
||||
/* This symbol was created to point to a section, e.g. ELF's
|
||||
STT_SECTION symbols. */
|
||||
STT_SECTION symbols. */
|
||||
#define BSF_SECTION_SYM 0x100
|
||||
|
||||
/* The symbol used to be a common symbol, but now it is
|
||||
allocated. */
|
||||
/* The symbol used to be a common symbol, but now it is
|
||||
allocated. */
|
||||
#define BSF_OLD_COMMON 0x200
|
||||
|
||||
/* The default value for common data. */
|
||||
/* The default value for common data. */
|
||||
#define BFD_FORT_COMM_DEFAULT_VALUE 0
|
||||
|
||||
/* In some files the type of a symbol sometimes alters its
|
||||
location in an output file - ie in coff a <<ISFCN>> symbol
|
||||
which is also <<C_EXT>> symbol appears where it was
|
||||
declared and not at the end of a section. This bit is set
|
||||
by the target BFD part to convey this information. */
|
||||
/* In some files the type of a symbol sometimes alters its
|
||||
location in an output file - ie in coff a <<ISFCN>> symbol
|
||||
which is also <<C_EXT>> symbol appears where it was
|
||||
declared and not at the end of a section. This bit is set
|
||||
by the target BFD part to convey this information. */
|
||||
|
||||
#define BSF_NOT_AT_END 0x400
|
||||
|
||||
/* Signal that the symbol is the label of constructor section. */
|
||||
/* Signal that the symbol is the label of constructor section. */
|
||||
#define BSF_CONSTRUCTOR 0x800
|
||||
|
||||
/* Signal that the symbol is a warning symbol. The name is a
|
||||
warning. The name of the next symbol is the one to warn about;
|
||||
if a reference is made to a symbol with the same name as the next
|
||||
symbol, a warning is issued by the linker. */
|
||||
/* Signal that the symbol is a warning symbol. The name is a
|
||||
warning. The name of the next symbol is the one to warn about;
|
||||
if a reference is made to a symbol with the same name as the next
|
||||
symbol, a warning is issued by the linker. */
|
||||
#define BSF_WARNING 0x1000
|
||||
|
||||
/* Signal that the symbol is indirect. This symbol is an indirect
|
||||
pointer to the symbol with the same name as the next symbol. */
|
||||
/* Signal that the symbol is indirect. This symbol is an indirect
|
||||
pointer to the symbol with the same name as the next symbol. */
|
||||
#define BSF_INDIRECT 0x2000
|
||||
|
||||
/* BSF_FILE marks symbols that contain a file name. This is used
|
||||
for ELF STT_FILE symbols. */
|
||||
/* BSF_FILE marks symbols that contain a file name. This is used
|
||||
for ELF STT_FILE symbols. */
|
||||
#define BSF_FILE 0x4000
|
||||
|
||||
/* Symbol is from dynamic linking information. */
|
||||
#define BSF_DYNAMIC 0x8000
|
||||
/* Symbol is from dynamic linking information. */
|
||||
#define BSF_DYNAMIC 0x8000
|
||||
|
||||
/* The symbol denotes a data object. Used in ELF, and perhaps
|
||||
others someday. */
|
||||
#define BSF_OBJECT 0x10000
|
||||
#define BSF_OBJECT 0x10000
|
||||
|
||||
flagword flags;
|
||||
|
||||
/* A pointer to the section to which this symbol is
|
||||
relative. This will always be non NULL, there are special
|
||||
/* A pointer to the section to which this symbol is
|
||||
relative. This will always be non NULL, there are special
|
||||
sections for undefined and absolute symbols. */
|
||||
struct sec *section;
|
||||
|
||||
/* Back end special data. */
|
||||
/* Back end special data. */
|
||||
union
|
||||
{
|
||||
PTR p;
|
||||
|
@ -2030,7 +2145,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
|
|||
|
||||
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
|
||||
(ibfd, isymbol, obfd, osymbol))
|
||||
(ibfd, isymbol, obfd, osymbol))
|
||||
struct _bfd
|
||||
{
|
||||
/* The filename the application opened the BFD with. */
|
||||
|
@ -2230,6 +2345,9 @@ bfd_set_error_handler PARAMS ((bfd_error_handler_type));
|
|||
void
|
||||
bfd_set_error_program_name PARAMS ((const char *));
|
||||
|
||||
bfd_error_handler_type
|
||||
bfd_get_error_handler PARAMS ((void));
|
||||
|
||||
long
|
||||
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
|
||||
|
||||
|
@ -2238,7 +2356,7 @@ bfd_canonicalize_reloc
|
|||
PARAMS ((bfd *abfd,
|
||||
asection *sec,
|
||||
arelent **loc,
|
||||
asymbol **syms));
|
||||
asymbol **syms));
|
||||
|
||||
void
|
||||
bfd_set_reloc
|
||||
|
@ -2272,19 +2390,19 @@ bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
|
|||
|
||||
#define bfd_copy_private_bfd_data(ibfd, obfd) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
|
||||
(ibfd, obfd))
|
||||
(ibfd, obfd))
|
||||
boolean
|
||||
bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
|
||||
|
||||
#define bfd_merge_private_bfd_data(ibfd, obfd) \
|
||||
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
|
||||
(ibfd, obfd))
|
||||
(ibfd, obfd))
|
||||
boolean
|
||||
bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
|
||||
|
||||
#define bfd_set_private_flags(abfd, flags) \
|
||||
BFD_SEND (abfd, _bfd_set_private_flags, \
|
||||
(abfd, flags))
|
||||
(abfd, flags))
|
||||
#define bfd_sizeof_headers(abfd, reloc) \
|
||||
BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
|
||||
|
||||
|
@ -2315,36 +2433,36 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
|
|||
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
|
||||
|
||||
#define bfd_link_hash_table_create(abfd) \
|
||||
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
|
||||
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
|
||||
|
||||
#define bfd_link_add_symbols(abfd, info) \
|
||||
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
|
||||
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
|
||||
|
||||
#define bfd_final_link(abfd, info) \
|
||||
BFD_SEND (abfd, _bfd_final_link, (abfd, info))
|
||||
BFD_SEND (abfd, _bfd_final_link, (abfd, info))
|
||||
|
||||
#define bfd_free_cached_info(abfd) \
|
||||
BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
|
||||
|
||||
#define bfd_get_dynamic_symtab_upper_bound(abfd) \
|
||||
BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
|
||||
BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
|
||||
|
||||
#define bfd_print_private_bfd_data(abfd, file)\
|
||||
BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
|
||||
BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
|
||||
|
||||
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
|
||||
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
|
||||
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
|
||||
|
||||
#define bfd_get_dynamic_reloc_upper_bound(abfd) \
|
||||
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
|
||||
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
|
||||
|
||||
#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
|
||||
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
|
||||
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
|
||||
|
||||
extern bfd_byte *bfd_get_relocated_section_contents
|
||||
PARAMS ((bfd *, struct bfd_link_info *,
|
||||
struct bfd_link_order *, bfd_byte *,
|
||||
boolean, asymbol **));
|
||||
PARAMS ((bfd *, struct bfd_link_info *,
|
||||
struct bfd_link_order *, bfd_byte *,
|
||||
boolean, asymbol **));
|
||||
|
||||
symindex
|
||||
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
|
||||
|
@ -2473,10 +2591,10 @@ CAT(NAME,_bfd_set_private_flags),\
|
|||
CAT(NAME,_bfd_print_private_bfd_data)\
|
||||
/* Called to copy BFD general private data from one object file
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
/* Called to merge BFD general private data from one object file
|
||||
to a common output file when linking. */
|
||||
boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
/* Called to copy BFD private section data from one object file
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
|
||||
|
@ -2484,9 +2602,9 @@ CAT(NAME,_bfd_print_private_bfd_data)\
|
|||
/* Called to copy BFD private symbol data from one symbol
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
|
||||
bfd *, asymbol *));
|
||||
bfd *, asymbol *));
|
||||
/* Called to set private backend flags */
|
||||
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
|
||||
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
|
||||
|
||||
/* Called to print private BFD data */
|
||||
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
|
||||
|
@ -2555,7 +2673,7 @@ CAT(NAME,_minisymbol_to_symbol)
|
|||
struct symbol_cache_entry *,
|
||||
symbol_info *));
|
||||
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
|
||||
boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
|
||||
boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
|
||||
|
||||
alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
|
||||
boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Generic BFD library interface and support routines.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
|
@ -508,6 +508,24 @@ bfd_set_error_program_name (name)
|
|||
{
|
||||
_bfd_error_program_name = name;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
FUNCTION
|
||||
bfd_get_error_handler
|
||||
|
||||
SYNOPSIS
|
||||
bfd_error_handler_type bfd_get_error_handler (void);
|
||||
|
||||
DESCRIPTION
|
||||
Return the BFD error handler function.
|
||||
*/
|
||||
|
||||
bfd_error_handler_type
|
||||
bfd_get_error_handler ()
|
||||
{
|
||||
return _bfd_error_handler;
|
||||
}
|
||||
|
||||
/*
|
||||
SECTION
|
||||
|
@ -910,11 +928,11 @@ bfd_scan_vma (string, end, base)
|
|||
|
||||
/* Speed could be improved with a table like hex_value[] in gas. */
|
||||
#define HEX_VALUE(c) \
|
||||
(isxdigit(c) ? \
|
||||
(isdigit(c) ? \
|
||||
(c - '0') : \
|
||||
(10 + c - (islower(c) ? 'a' : 'A'))) : \
|
||||
42)
|
||||
(isxdigit ((unsigned char) c) \
|
||||
? (isdigit ((unsigned char) c) \
|
||||
? (c - '0') \
|
||||
: (10 + c - (islower ((unsigned char) c) ? 'a' : 'A'))) \
|
||||
: 42)
|
||||
|
||||
for (value = 0; (digit = HEX_VALUE(*string)) < base; string++)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back-end for binary objects.
|
||||
Copyright 1994, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -155,7 +155,7 @@ mangle_name (abfd, suffix)
|
|||
|
||||
/* Change any non-alphanumeric characters to underscores. */
|
||||
for (p = buf; *p; p++)
|
||||
if (! isalnum (*p))
|
||||
if (! isalnum ((unsigned char) *p))
|
||||
*p = '_';
|
||||
|
||||
return buf;
|
||||
|
@ -260,6 +260,8 @@ binary_set_section_contents (abfd, sec, data, offset, size)
|
|||
meaningful in the binary format. */
|
||||
if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
|
||||
return true;
|
||||
if ((sec->flags & SEC_NEVER_LOAD) != 0)
|
||||
return true;
|
||||
|
||||
if (! abfd->output_has_begun)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* BFD back-end for Intel 386 COFF files.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -30,6 +31,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#include "coff/pe.h"
|
||||
#endif
|
||||
|
||||
#ifdef COFF_GO32_EXE
|
||||
#include "coff/go32exe.h"
|
||||
#endif
|
||||
|
||||
#include "libcoff.h"
|
||||
|
||||
static bfd_reloc_status_type coff_i386_reloc
|
||||
|
@ -70,9 +75,9 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
|||
if (output_bfd == (bfd *) NULL)
|
||||
return bfd_reloc_continue;
|
||||
|
||||
|
||||
if (bfd_is_com_section (symbol->section))
|
||||
{
|
||||
#ifndef COFF_WITH_PE
|
||||
/* We are relocating a common symbol. The current value in the
|
||||
object file is ORIG + OFFSET, where ORIG is the value of the
|
||||
common symbol as seen by the object file when it was compiled
|
||||
|
@ -85,6 +90,10 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
|||
the common symbol which we are going to put in the final
|
||||
object file. NEW is symbol->value. */
|
||||
diff = symbol->value + reloc_entry->addend;
|
||||
#else
|
||||
/* In PE mode, we do not offset the common symbol. */
|
||||
diff = reloc_entry->addend;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -95,13 +104,10 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
|||
diff = reloc_entry->addend;
|
||||
}
|
||||
|
||||
|
||||
#ifdef COFF_WITH_PE
|
||||
if (reloc_entry->howto->type == 7)
|
||||
{
|
||||
/* diff -= coff_data(output_bfd)->link_info->pe_info.image_base.value;*/
|
||||
exit(1);
|
||||
}
|
||||
/* FIXME: How should this case be handled? */
|
||||
if (reloc_entry->howto->type == R_IMAGEBASE && diff != 0)
|
||||
abort ();
|
||||
#endif
|
||||
|
||||
#define DOIT(x) \
|
||||
|
@ -332,9 +338,51 @@ static reloc_howto_type howto_table[] =
|
|||
cache_ptr->addend += asect->vma; \
|
||||
}
|
||||
|
||||
/* We use the special COFF backend linker. */
|
||||
/* We use the special COFF backend linker. For normal i386 COFF, we
|
||||
can use the generic relocate_section routine. For PE, we need our
|
||||
own routine. */
|
||||
|
||||
#ifndef COFF_WITH_PE
|
||||
|
||||
#define coff_relocate_section _bfd_coff_generic_relocate_section
|
||||
|
||||
#else /* COFF_WITH_PE */
|
||||
|
||||
/* The PE relocate section routine. The only difference between this
|
||||
and the regular routine is that we don't want to do anything for a
|
||||
relocateable link. */
|
||||
|
||||
static boolean coff_pe_i386_relocate_section
|
||||
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
|
||||
struct internal_reloc *, struct internal_syment *, asection **));
|
||||
|
||||
static boolean
|
||||
coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
|
||||
input_section, contents, relocs, syms,
|
||||
sections)
|
||||
bfd *output_bfd;
|
||||
struct bfd_link_info *info;
|
||||
bfd *input_bfd;
|
||||
asection *input_section;
|
||||
bfd_byte *contents;
|
||||
struct internal_reloc *relocs;
|
||||
struct internal_syment *syms;
|
||||
asection **sections;
|
||||
{
|
||||
if (info->relocateable)
|
||||
return true;
|
||||
|
||||
return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
|
||||
input_section, contents,
|
||||
relocs, syms, sections);
|
||||
}
|
||||
|
||||
#define coff_relocate_section coff_pe_i386_relocate_section
|
||||
|
||||
#endif /* COFF_WITH_PE */
|
||||
|
||||
/* Convert an rtype to howto for the COFF backend linker. */
|
||||
|
||||
static reloc_howto_type *
|
||||
coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
|
||||
bfd *abfd;
|
||||
|
@ -366,28 +414,40 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
|
|||
|
||||
BFD_ASSERT (h != NULL);
|
||||
|
||||
|
||||
#ifndef COFF_WITH_PE
|
||||
/* I think we *do* want to bypass this. If we don't, I have seen some data
|
||||
parameters get the wrong relcation address. If I link two versions
|
||||
with and without this section bypassed and then do a binary comparison,
|
||||
the addresses which are different can be looked up in the map. The
|
||||
case in which this section has been bypassed has addresses which correspond
|
||||
to values I can find in the map */
|
||||
/* I think we *do* want to bypass this. If we don't, I have
|
||||
seen some data parameters get the wrong relocation address.
|
||||
If I link two versions with and without this section bypassed
|
||||
and then do a binary comparison, the addresses which are
|
||||
different can be looked up in the map. The case in which
|
||||
this section has been bypassed has addresses which correspond
|
||||
to values I can find in the map. */
|
||||
*addendp -= sym->n_value;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef COFF_WITH_PE
|
||||
/* If the output symbol is common (in which case this must be a
|
||||
relocateable link), we need to add in the final size of the
|
||||
common symbol. */
|
||||
if (h != NULL && h->root.type == bfd_link_hash_common)
|
||||
*addendp += h->root.u.c.size;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef COFF_WITH_PE
|
||||
if (howto->pc_relative)
|
||||
*addendp -= 4;
|
||||
{
|
||||
*addendp -= 4;
|
||||
|
||||
/* If the symbol is defined, then the generic code is going to
|
||||
add back the symbol value in order to cancel out an
|
||||
adjustment it made to the addend. However, we set the addend
|
||||
to 0 at the start of this function. We need to adjust here,
|
||||
to avoid the adjustment the generic code will make. FIXME:
|
||||
This is getting a bit hackish. */
|
||||
if (sym != NULL && sym->n_scnum != 0)
|
||||
*addendp -= sym->n_value;
|
||||
}
|
||||
|
||||
if (rel->r_type == R_IMAGEBASE)
|
||||
{
|
||||
|
@ -421,17 +481,94 @@ coff_i386_reloc_type_lookup (abfd, code)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define coff_rtype_to_howto coff_i386_rtype_to_howto
|
||||
|
||||
#ifdef TARGET_UNDERSCORE
|
||||
|
||||
/* If i386 gcc uses underscores for symbol names, then it does not use
|
||||
a leading dot for local labels, so if TARGET_UNDERSCORE is defined
|
||||
we treat all symbols starting with L as local. */
|
||||
|
||||
static boolean coff_i386_is_local_label_name PARAMS ((bfd *, const char *));
|
||||
|
||||
static boolean
|
||||
coff_i386_is_local_label_name (abfd, name)
|
||||
bfd *abfd;
|
||||
const char *name;
|
||||
{
|
||||
if (name[0] == 'L')
|
||||
return true;
|
||||
|
||||
return _bfd_coff_is_local_label_name (abfd, name);
|
||||
}
|
||||
|
||||
#define coff_bfd_is_local_label_name coff_i386_is_local_label_name
|
||||
|
||||
#endif /* TARGET_UNDERSCORE */
|
||||
|
||||
#include "coffcode.h"
|
||||
|
||||
static const bfd_target *
|
||||
i3coff_object_p(a)
|
||||
bfd *a;
|
||||
i3coff_object_p (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
return coff_object_p(a);
|
||||
#ifdef COFF_IMAGE_WITH_PE
|
||||
/* We need to hack badly to handle a PE image correctly. In PE
|
||||
images created by the GNU linker, the offset to the COFF header
|
||||
is always the size. However, this is not the case in images
|
||||
generated by other PE linkers. The PE format stores a four byte
|
||||
offset to the PE signature just before the COFF header at
|
||||
location 0x3c of the file. We pick up that offset, verify that
|
||||
the PE signature is there, and then set ourselves up to read in
|
||||
the COFF header. */
|
||||
{
|
||||
bfd_byte ext_offset[4];
|
||||
file_ptr offset;
|
||||
bfd_byte ext_signature[4];
|
||||
unsigned long signature;
|
||||
|
||||
if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0
|
||||
|| bfd_read (ext_offset, 1, 4, abfd) != 4)
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
offset = bfd_h_get_32 (abfd, ext_offset);
|
||||
if (bfd_seek (abfd, offset, SEEK_SET) != 0
|
||||
|| bfd_read (ext_signature, 1, 4, abfd) != 4)
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
signature = bfd_h_get_32 (abfd, ext_signature);
|
||||
|
||||
if (signature != 0x4550)
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Here is the hack. coff_object_p wants to read filhsz bytes to
|
||||
pick up the COFF header. We adjust so that that will work. 20
|
||||
is the size of the i386 COFF filehdr. */
|
||||
|
||||
if (bfd_seek (abfd,
|
||||
(bfd_tell (abfd)
|
||||
- bfd_coff_filhsz (abfd)
|
||||
+ 20),
|
||||
SEEK_SET)
|
||||
!= 0)
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return coff_object_p (abfd);
|
||||
}
|
||||
|
||||
const bfd_target
|
||||
|
@ -455,9 +592,11 @@ const bfd_target
|
|||
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
|
||||
|
||||
#ifndef COFF_WITH_PE
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
|
||||
| SEC_CODE | SEC_DATA),
|
||||
#else
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
|
||||
| SEC_CODE | SEC_DATA
|
||||
| SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back-end for Hitachi Super-H COFF binaries.
|
||||
Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
Written by Steve Chamberlain, <sac@cygnus.com>.
|
||||
Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
|
||||
|
@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
static bfd_reloc_status_type sh_reloc
|
||||
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
|
||||
static long get_symbol_value PARAMS ((asymbol *));
|
||||
static boolean sh_merge_private_data PARAMS ((bfd *, bfd *));
|
||||
static boolean sh_relax_section
|
||||
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
|
||||
static boolean sh_relax_delete_bytes
|
||||
|
@ -275,6 +276,20 @@ static reloc_howto_type sh_coff_howtos[] =
|
|||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
HOWTO (R_SH_SWITCH8, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
sh_reloc, /* special_function */
|
||||
"r_switch8", /* name */
|
||||
true, /* partial_inplace */
|
||||
0xff, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
false) /* pcrel_offset */
|
||||
};
|
||||
|
||||
|
@ -347,7 +362,8 @@ get_symbol_value (symbol)
|
|||
cache_ptr->addend = - (ptr->section->vma + ptr->value); \
|
||||
else \
|
||||
cache_ptr->addend = 0; \
|
||||
if ((reloc).r_type == R_SH_SWITCH16 \
|
||||
if ((reloc).r_type == R_SH_SWITCH8 \
|
||||
|| (reloc).r_type == R_SH_SWITCH16 \
|
||||
|| (reloc).r_type == R_SH_SWITCH32 \
|
||||
|| (reloc).r_type == R_SH_USES \
|
||||
|| (reloc).r_type == R_SH_COUNT \
|
||||
|
@ -426,6 +442,32 @@ sh_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
|
|||
return bfd_reloc_ok;
|
||||
}
|
||||
|
||||
/* This routine checks for linking big and little endian objects
|
||||
together. */
|
||||
|
||||
static boolean
|
||||
sh_merge_private_data (ibfd, obfd)
|
||||
bfd *ibfd;
|
||||
bfd *obfd;
|
||||
{
|
||||
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
|
||||
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
|
||||
{
|
||||
(*_bfd_error_handler)
|
||||
("%s: compiled for a %s endian system and target is %s endian",
|
||||
bfd_get_filename (ibfd),
|
||||
bfd_big_endian (ibfd) ? "big" : "little",
|
||||
bfd_big_endian (obfd) ? "big" : "little");
|
||||
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#define coff_bfd_merge_private_bfd_data sh_merge_private_data
|
||||
|
||||
/* We can do relaxing. */
|
||||
#define coff_bfd_relax_section sh_relax_section
|
||||
|
||||
|
@ -557,7 +599,9 @@ sh_relax_section (abfd, sec, link_info, again)
|
|||
the register load. The 4 is because the r_offset field is
|
||||
computed as though it were a jump offset, which are based
|
||||
from 4 bytes after the jump instruction. */
|
||||
laddr = irel->r_vaddr - sec->vma + 4 + irel->r_offset;
|
||||
laddr = irel->r_vaddr - sec->vma + 4;
|
||||
/* Careful to sign extend the 32-bit offset. */
|
||||
laddr += ((irel->r_offset & 0xffffffff) ^ 0x80000000) - 0x80000000;
|
||||
if (laddr >= sec->_raw_size)
|
||||
{
|
||||
(*_bfd_error_handler) ("%s: 0x%lx: warning: bad R_SH_USES offset",
|
||||
|
@ -567,8 +611,7 @@ sh_relax_section (abfd, sec, link_info, again)
|
|||
}
|
||||
insn = bfd_get_16 (abfd, contents + laddr);
|
||||
|
||||
/* If the instruction is not mov.l NN,rN, we don't know what to
|
||||
do. */
|
||||
/* If the instruction is not mov.l NN,rN, we don't know what to do. */
|
||||
if ((insn & 0xf000) != 0xd000)
|
||||
{
|
||||
((*_bfd_error_handler)
|
||||
|
@ -928,11 +971,12 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
|||
/* Adjust all the relocs. */
|
||||
for (irel = coff_section_data (abfd, sec)->relocs; irel < irelend; irel++)
|
||||
{
|
||||
bfd_vma nraddr, start, stop;
|
||||
bfd_vma nraddr, stop;
|
||||
bfd_vma start = 0;
|
||||
int insn = 0;
|
||||
struct internal_syment sym;
|
||||
int off, adjust, oinsn;
|
||||
bfd_signed_vma voff;
|
||||
bfd_signed_vma voff = 0;
|
||||
boolean overflow;
|
||||
|
||||
/* Get the new reloc address. */
|
||||
|
@ -950,7 +994,8 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
|||
&& irel->r_vaddr - sec->vma < addr + count
|
||||
&& irel->r_type != R_SH_ALIGN
|
||||
&& irel->r_type != R_SH_CODE
|
||||
&& irel->r_type != R_SH_DATA)
|
||||
&& irel->r_type != R_SH_DATA
|
||||
&& irel->r_type != R_SH_LABEL)
|
||||
irel->r_type = R_SH_UNUSED;
|
||||
|
||||
/* If this is a PC relative reloc, see if the range it covers
|
||||
|
@ -1034,6 +1079,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
|||
stop = (start &~ (bfd_vma) 3) + 4 + off * 4;
|
||||
break;
|
||||
|
||||
case R_SH_SWITCH8:
|
||||
case R_SH_SWITCH16:
|
||||
case R_SH_SWITCH32:
|
||||
/* These relocs types represent
|
||||
|
@ -1059,6 +1105,8 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
|||
|
||||
if (irel->r_type == R_SH_SWITCH16)
|
||||
voff = bfd_get_signed_16 (abfd, contents + nraddr);
|
||||
else if (irel->r_type == R_SH_SWITCH8)
|
||||
voff = bfd_get_8 (abfd, contents + nraddr);
|
||||
else
|
||||
voff = bfd_get_signed_32 (abfd, contents + nraddr);
|
||||
stop = (bfd_vma) ((bfd_signed_vma) start + voff);
|
||||
|
@ -1123,6 +1171,13 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
|||
bfd_put_16 (abfd, insn, contents + nraddr);
|
||||
break;
|
||||
|
||||
case R_SH_SWITCH8:
|
||||
voff += adjust;
|
||||
if (voff < 0 || voff >= 0xff)
|
||||
overflow = true;
|
||||
bfd_put_8 (abfd, voff, contents + nraddr);
|
||||
break;
|
||||
|
||||
case R_SH_SWITCH16:
|
||||
voff += adjust;
|
||||
if (voff < - 0x8000 || voff >= 0x8000)
|
||||
|
@ -2406,7 +2461,8 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (symndx < 0 || symndx >= obj_raw_syment_count (input_bfd))
|
||||
if (symndx < 0
|
||||
|| (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
|
||||
{
|
||||
(*_bfd_error_handler)
|
||||
("%s: illegal symbol index %ld in relocs",
|
||||
|
@ -2716,3 +2772,173 @@ const bfd_target shlcoff_vec =
|
|||
|
||||
COFF_SWAP_TABLE,
|
||||
};
|
||||
|
||||
/* Some people want versions of the SH COFF target which do not align
|
||||
to 16 byte boundaries. We implement that by adding a couple of new
|
||||
target vectors. These are just like the ones above, but they
|
||||
change the default section alignment. To generate them in the
|
||||
assembler, use -small. To use them in the linker, use -b
|
||||
coff-sh{l}-small and -oformat coff-sh{l}-small.
|
||||
|
||||
Yes, this is a horrible hack. A general solution for setting
|
||||
section alignment in COFF is rather complex. ELF handles this
|
||||
correctly. */
|
||||
|
||||
/* Only recognize the small versions if the target was not defaulted.
|
||||
Otherwise we won't recognize the non default endianness. */
|
||||
|
||||
static const bfd_target *
|
||||
coff_small_object_p (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
if (abfd->target_defaulted)
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
return coff_object_p (abfd);
|
||||
}
|
||||
|
||||
/* Set the section alignment for the small versions. */
|
||||
|
||||
static boolean
|
||||
coff_small_new_section_hook (abfd, section)
|
||||
bfd *abfd;
|
||||
asection *section;
|
||||
{
|
||||
if (! coff_new_section_hook (abfd, section))
|
||||
return false;
|
||||
|
||||
/* We must align to at least a four byte boundary, because longword
|
||||
accesses must be on a four byte boundary. */
|
||||
if (section->alignment_power == COFF_DEFAULT_SECTION_ALIGNMENT_POWER)
|
||||
section->alignment_power = 2;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* This is copied from bfd_coff_std_swap_table so that we can change
|
||||
the default section alignment power. */
|
||||
|
||||
static const bfd_coff_backend_data bfd_coff_small_swap_table =
|
||||
{
|
||||
coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in,
|
||||
coff_swap_aux_out, coff_swap_sym_out,
|
||||
coff_swap_lineno_out, coff_swap_reloc_out,
|
||||
coff_swap_filehdr_out, coff_swap_aouthdr_out,
|
||||
coff_swap_scnhdr_out,
|
||||
FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ,
|
||||
#ifdef COFF_LONG_FILENAMES
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
#ifdef COFF_LONG_SECTION_NAMES
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
2,
|
||||
coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in,
|
||||
coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
|
||||
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
|
||||
coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
|
||||
coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
|
||||
coff_sym_is_global, coff_compute_section_file_positions,
|
||||
coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
|
||||
coff_adjust_symndx, coff_link_add_one_symbol,
|
||||
coff_link_output_has_begun, coff_final_link_postscript
|
||||
};
|
||||
|
||||
#define coff_small_close_and_cleanup \
|
||||
coff_close_and_cleanup
|
||||
#define coff_small_bfd_free_cached_info \
|
||||
coff_bfd_free_cached_info
|
||||
#define coff_small_get_section_contents \
|
||||
coff_get_section_contents
|
||||
#define coff_small_get_section_contents_in_window \
|
||||
coff_get_section_contents_in_window
|
||||
|
||||
const bfd_target shcoff_small_vec =
|
||||
{
|
||||
"coff-sh-small", /* name */
|
||||
bfd_target_coff_flavour,
|
||||
BFD_ENDIAN_BIG, /* data byte order is big */
|
||||
BFD_ENDIAN_BIG, /* header byte order is big */
|
||||
|
||||
(HAS_RELOC | EXEC_P | /* object flags */
|
||||
HAS_LINENO | HAS_DEBUG |
|
||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
|
||||
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
|
||||
'_', /* leading symbol underscore */
|
||||
'/', /* ar_pad_char */
|
||||
15, /* ar_max_namelen */
|
||||
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
|
||||
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
|
||||
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
|
||||
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
|
||||
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
|
||||
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
|
||||
|
||||
{_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
|
||||
bfd_generic_archive_p, _bfd_dummy_target},
|
||||
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
|
||||
bfd_false},
|
||||
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
|
||||
_bfd_write_archive_contents, bfd_false},
|
||||
|
||||
BFD_JUMP_TABLE_GENERIC (coff_small),
|
||||
BFD_JUMP_TABLE_COPY (coff),
|
||||
BFD_JUMP_TABLE_CORE (_bfd_nocore),
|
||||
BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
|
||||
BFD_JUMP_TABLE_SYMBOLS (coff),
|
||||
BFD_JUMP_TABLE_RELOCS (coff),
|
||||
BFD_JUMP_TABLE_WRITE (coff),
|
||||
BFD_JUMP_TABLE_LINK (coff),
|
||||
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
|
||||
|
||||
(PTR) &bfd_coff_small_swap_table
|
||||
};
|
||||
|
||||
const bfd_target shlcoff_small_vec =
|
||||
{
|
||||
"coff-shl-small", /* name */
|
||||
bfd_target_coff_flavour,
|
||||
BFD_ENDIAN_LITTLE, /* data byte order is little */
|
||||
BFD_ENDIAN_LITTLE, /* header byte order is little endian too*/
|
||||
|
||||
(HAS_RELOC | EXEC_P | /* object flags */
|
||||
HAS_LINENO | HAS_DEBUG |
|
||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
|
||||
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
|
||||
'_', /* leading symbol underscore */
|
||||
'/', /* ar_pad_char */
|
||||
15, /* ar_max_namelen */
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
||||
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
||||
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
|
||||
|
||||
{_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
|
||||
bfd_generic_archive_p, _bfd_dummy_target},
|
||||
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
|
||||
bfd_false},
|
||||
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
|
||||
_bfd_write_archive_contents, bfd_false},
|
||||
|
||||
BFD_JUMP_TABLE_GENERIC (coff_small),
|
||||
BFD_JUMP_TABLE_COPY (coff),
|
||||
BFD_JUMP_TABLE_CORE (_bfd_nocore),
|
||||
BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
|
||||
BFD_JUMP_TABLE_SYMBOLS (coff),
|
||||
BFD_JUMP_TABLE_RELOCS (coff),
|
||||
BFD_JUMP_TABLE_WRITE (coff),
|
||||
BFD_JUMP_TABLE_LINK (coff),
|
||||
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
|
||||
|
||||
(PTR) &bfd_coff_small_swap_table
|
||||
};
|
||||
|
|
206
contrib/binutils/bfd/coff-tic30.c
Normal file
206
contrib/binutils/bfd/coff-tic30.c
Normal file
|
@ -0,0 +1,206 @@
|
|||
/* BFD back-end for TMS320C30 coff binaries.
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
|
||||
|
||||
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 "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
#include "bfdlink.h"
|
||||
#include "coff/tic30.h"
|
||||
#include "coff/internal.h"
|
||||
#include "libcoff.h"
|
||||
|
||||
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
|
||||
|
||||
reloc_howto_type tic30_coff_howto_table[] =
|
||||
{
|
||||
HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
|
||||
"16", false, 0x0000FFFF, 0x0000FFFF, false),
|
||||
HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
|
||||
"24", false, 0xFFFFFF00, 0xFFFFFF00, false),
|
||||
HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
|
||||
"LDP", false, 0x00FF0000, 0x000000FF, false),
|
||||
HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
|
||||
"32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
|
||||
HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
|
||||
"PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
|
||||
{-1}
|
||||
};
|
||||
|
||||
#ifndef coff_bfd_reloc_type_lookup
|
||||
#define coff_bfd_reloc_type_lookup tic30_coff_reloc_type_lookup
|
||||
|
||||
/* For the case statement use the code values used in tc_gen_reloc to
|
||||
map to the howto table entries that match those in both the aout
|
||||
and coff implementations. */
|
||||
reloc_howto_type *
|
||||
tic30_coff_reloc_type_lookup (abfd, code)
|
||||
bfd *abfd;
|
||||
bfd_reloc_code_real_type code;
|
||||
{
|
||||
switch (code)
|
||||
{
|
||||
case BFD_RELOC_8:
|
||||
case BFD_RELOC_TIC30_LDP:
|
||||
return &tic30_coff_howto_table[2];
|
||||
case BFD_RELOC_16:
|
||||
return &tic30_coff_howto_table[0];
|
||||
case BFD_RELOC_24:
|
||||
return &tic30_coff_howto_table[1];
|
||||
case BFD_RELOC_16_PCREL:
|
||||
return &tic30_coff_howto_table[4];
|
||||
case BFD_RELOC_32:
|
||||
return &tic30_coff_howto_table[3];
|
||||
default:
|
||||
return (reloc_howto_type *) NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Turn a howto into a reloc number */
|
||||
|
||||
static int
|
||||
coff_tic30_select_reloc (howto)
|
||||
reloc_howto_type *howto;
|
||||
{
|
||||
return howto->type;
|
||||
}
|
||||
|
||||
#define SELECT_RELOC(x,howto) x.r_type = coff_tic30_select_reloc(howto)
|
||||
|
||||
|
||||
#define BADMAG(x) TIC30BADMAG(x)
|
||||
#define TIC30 1 /* Customize coffcode.h */
|
||||
#define __A_MAGIC_SET__
|
||||
|
||||
/* Code to swap in the reloc */
|
||||
#define SWAP_IN_RELOC_OFFSET bfd_h_get_32
|
||||
#define SWAP_OUT_RELOC_OFFSET bfd_h_put_32
|
||||
#define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) dst->r_stuff[0] = 'S'; \
|
||||
dst->r_stuff[1] = 'C';
|
||||
|
||||
/* Code to turn a r_type into a howto ptr, uses the above howto table. */
|
||||
|
||||
static void
|
||||
rtype2howto (internal, dst)
|
||||
arelent *internal;
|
||||
struct internal_reloc *dst;
|
||||
{
|
||||
switch (dst->r_type)
|
||||
{
|
||||
case R_TIC30_ABS16:
|
||||
internal->howto = &tic30_coff_howto_table[0];
|
||||
break;
|
||||
case R_TIC30_ABS24:
|
||||
internal->howto = &tic30_coff_howto_table[1];
|
||||
break;
|
||||
case R_TIC30_ABS32:
|
||||
internal->howto = &tic30_coff_howto_table[3];
|
||||
break;
|
||||
case R_TIC30_LDP:
|
||||
internal->howto = &tic30_coff_howto_table[2];
|
||||
break;
|
||||
case R_TIC30_PC16:
|
||||
internal->howto = &tic30_coff_howto_table[4];
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
|
||||
|
||||
/* Perform any necessary magic to the addend in a reloc entry */
|
||||
|
||||
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
|
||||
cache_ptr->addend = ext_reloc.r_offset;
|
||||
|
||||
|
||||
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
|
||||
reloc_processing(relent, reloc, symbols, abfd, section)
|
||||
|
||||
static void
|
||||
reloc_processing (relent, reloc, symbols, abfd, section)
|
||||
arelent *relent;
|
||||
struct internal_reloc *reloc;
|
||||
asymbol **symbols;
|
||||
bfd *abfd;
|
||||
asection *section;
|
||||
{
|
||||
relent->address = reloc->r_vaddr;
|
||||
rtype2howto (relent, reloc);
|
||||
|
||||
if (reloc->r_symndx > 0)
|
||||
{
|
||||
relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx];
|
||||
}
|
||||
else
|
||||
{
|
||||
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
|
||||
}
|
||||
relent->addend = reloc->r_offset;
|
||||
relent->address -= section->vma;
|
||||
}
|
||||
|
||||
#include "coffcode.h"
|
||||
|
||||
const bfd_target tic30_coff_vec =
|
||||
{
|
||||
"coff-tic30", /* name */
|
||||
bfd_target_coff_flavour,
|
||||
BFD_ENDIAN_BIG, /* data byte order is big */
|
||||
BFD_ENDIAN_LITTLE, /* header byte order is little */
|
||||
|
||||
(HAS_RELOC | EXEC_P | /* object flags */
|
||||
HAS_LINENO | HAS_DEBUG |
|
||||
HAS_SYMS | HAS_LOCALS | WP_TEXT),
|
||||
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||
'_', /* leading symbol underscore */
|
||||
'/', /* ar_pad_char */
|
||||
15, /* ar_max_namelen */
|
||||
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
|
||||
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
|
||||
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
||||
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
|
||||
|
||||
{_bfd_dummy_target, coff_object_p, /* bfd_check_format */
|
||||
bfd_generic_archive_p, _bfd_dummy_target},
|
||||
{bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
|
||||
bfd_false},
|
||||
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
|
||||
_bfd_write_archive_contents, bfd_false},
|
||||
|
||||
BFD_JUMP_TABLE_GENERIC (coff),
|
||||
BFD_JUMP_TABLE_COPY (coff),
|
||||
BFD_JUMP_TABLE_CORE (_bfd_nocore),
|
||||
BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
|
||||
BFD_JUMP_TABLE_SYMBOLS (coff),
|
||||
BFD_JUMP_TABLE_RELOCS (coff),
|
||||
BFD_JUMP_TABLE_WRITE (coff),
|
||||
BFD_JUMP_TABLE_LINK (coff),
|
||||
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
|
||||
|
||||
COFF_SWAP_TABLE
|
||||
};
|
|
@ -1,5 +1,6 @@
|
|||
/* Support for the generic parts of most COFF variants, for BFD.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -503,7 +504,7 @@ styp_to_sec_flags (abfd, hdr, name)
|
|||
section VMA and the file offset match. If we don't know
|
||||
COFF_PAGE_SIZE, we can't ensure the correct correspondence,
|
||||
and demand page loading of the file will fail. */
|
||||
#ifdef COFF_PAGE_SIZE
|
||||
#if defined (COFF_PAGE_SIZE) && !defined (COFF_ALIGN_IN_S_FLAGS)
|
||||
sec_flags |= SEC_DEBUGGING;
|
||||
#endif
|
||||
}
|
||||
|
@ -861,6 +862,12 @@ dependent COFF routines:
|
|||
. boolean collect,
|
||||
. struct bfd_link_hash_entry **hashp));
|
||||
.
|
||||
. boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
|
||||
. bfd * abfd ));
|
||||
. boolean (*_bfd_coff_final_link_postscript) PARAMS ((
|
||||
. bfd * abfd,
|
||||
. struct coff_final_link_info * pfinfo));
|
||||
.
|
||||
.} bfd_coff_backend_data;
|
||||
.
|
||||
.#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
|
||||
|
@ -975,6 +982,11 @@ dependent COFF routines:
|
|||
. ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
|
||||
. (info, abfd, name, flags, section, value, string, cp, coll, hashp))
|
||||
.
|
||||
.#define bfd_coff_link_output_has_begun(a) \
|
||||
. ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
|
||||
.#define bfd_coff_final_link_postscript(a,p) \
|
||||
. ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
|
||||
.
|
||||
*/
|
||||
|
||||
/* See whether the magic number matches. */
|
||||
|
@ -1016,6 +1028,8 @@ coff_new_section_hook (abfd, section)
|
|||
bfd * abfd;
|
||||
asection * section;
|
||||
{
|
||||
combined_entry_type *native;
|
||||
|
||||
section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
|
||||
|
||||
#ifdef RS6000COFF_C
|
||||
|
@ -1032,9 +1046,21 @@ coff_new_section_hook (abfd, section)
|
|||
|
||||
@@ The 10 is a guess at a plausible maximum number of aux entries
|
||||
(but shouldn't be a constant). */
|
||||
coffsymbol (section->symbol)->native =
|
||||
(combined_entry_type *) bfd_zalloc (abfd,
|
||||
sizeof (combined_entry_type) * 10);
|
||||
native = ((combined_entry_type *)
|
||||
bfd_zalloc (abfd, sizeof (combined_entry_type) * 10));
|
||||
if (native == NULL)
|
||||
return false;
|
||||
|
||||
/* We don't need to set up n_name, n_value, or n_scnum in the native
|
||||
symbol information, since they'll be overriden by the BFD symbol
|
||||
anyhow. However, we do need to set the type and storage class,
|
||||
in case this symbol winds up getting written out. The value 0
|
||||
for n_numaux is already correct. */
|
||||
|
||||
native->u.syment.n_type = T_NULL;
|
||||
native->u.syment.n_sclass = C_STAT;
|
||||
|
||||
coffsymbol (section->symbol)->native = native;
|
||||
|
||||
/* The .stab section must be aligned to 2**2 at most, because
|
||||
otherwise there may be gaps in the section which gdb will not
|
||||
|
@ -1056,7 +1082,7 @@ coff_new_section_hook (abfd, section)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef I960
|
||||
#ifdef COFF_ALIGN_IN_SECTION_HEADER
|
||||
|
||||
/* Set the alignment of a BFD section. */
|
||||
|
||||
|
@ -1071,13 +1097,16 @@ coff_set_alignment_hook (abfd, section, scnhdr)
|
|||
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
|
||||
unsigned int i;
|
||||
|
||||
#ifdef I960
|
||||
/* Extract ALIGN from 2**ALIGN stored in section header */
|
||||
for (i = 0; i < 32; i++)
|
||||
if ((1 << i) >= hdr->s_align)
|
||||
break;
|
||||
#endif
|
||||
section->alignment_power = i;
|
||||
}
|
||||
|
||||
#else /* ! I960 */
|
||||
#else /* ! COFF_ALIGN_IN_SECTION_HEADER */
|
||||
#ifdef COFF_WITH_PE
|
||||
|
||||
/* a couple of macros to help setting the alignment power field */
|
||||
|
@ -1222,7 +1251,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
|
|||
|
||||
#endif /* ! RS6000COFF_C */
|
||||
#endif /* ! COFF_WITH_PE */
|
||||
#endif /* ! I960 */
|
||||
#endif /* ! COFF_ALIGN_IN_SECTION_HEADER */
|
||||
|
||||
#ifndef coff_mkobject
|
||||
|
||||
|
@ -1306,6 +1335,12 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef ARM
|
||||
/* Set the flags field from the COFF header read in */
|
||||
if (! coff_arm_bfd_set_private_flags (abfd, internal_f->f_flags))
|
||||
coff->flags = 0;
|
||||
#endif
|
||||
|
||||
return (PTR) coff;
|
||||
}
|
||||
#endif
|
||||
|
@ -1354,7 +1389,16 @@ coff_set_arch_mach_hook (abfd, filehdr)
|
|||
#ifdef ARMMAGIC
|
||||
case ARMMAGIC:
|
||||
arch = bfd_arch_arm;
|
||||
machine =0;
|
||||
switch (internal_f->f_flags & F_ARM_ARCHITECTURE_MASK)
|
||||
{
|
||||
case F_ARM_2: machine = bfd_mach_arm_2; break;
|
||||
case F_ARM_2a: machine = bfd_mach_arm_2a; break;
|
||||
case F_ARM_3: machine = bfd_mach_arm_3; break;
|
||||
default:
|
||||
case F_ARM_3M: machine = bfd_mach_arm_3M; break;
|
||||
case F_ARM_4: machine = bfd_mach_arm_4; break;
|
||||
case F_ARM_4T: machine = bfd_mach_arm_4T; break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef MC68MAGIC
|
||||
|
@ -1370,7 +1414,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
|
|||
case LYNXCOFFMAGIC:
|
||||
#endif
|
||||
arch = bfd_arch_m68k;
|
||||
machine = 68020;
|
||||
machine = bfd_mach_m68020;
|
||||
break;
|
||||
#endif
|
||||
#ifdef MC88MAGIC
|
||||
|
@ -1569,12 +1613,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#ifdef TIC80_ARCH_MAGIC
|
||||
case TIC80_ARCH_MAGIC:
|
||||
arch = bfd_arch_tic80;
|
||||
#ifdef TIC30MAGIC
|
||||
case TIC30MAGIC:
|
||||
arch = bfd_arch_tic30;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
default: /* Unreadable input file type */
|
||||
arch = bfd_arch_obscure;
|
||||
break;
|
||||
|
@ -1945,9 +1990,38 @@ coff_set_flags (abfd, magicp, flagsp)
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef TIC30MAGIC
|
||||
case bfd_arch_tic30:
|
||||
*magicp = TIC30MAGIC;
|
||||
return true;
|
||||
#endif
|
||||
#ifdef ARMMAGIC
|
||||
case bfd_arch_arm:
|
||||
*magicp = ARMMAGIC;
|
||||
* magicp = ARMMAGIC;
|
||||
* flagsp = 0;
|
||||
if (APCS_SET (abfd))
|
||||
{
|
||||
if (APCS_26_FLAG (abfd))
|
||||
* flagsp |= F_APCS26;
|
||||
|
||||
if (APCS_FLOAT_FLAG (abfd))
|
||||
* flagsp |= F_APCS_FLOAT;
|
||||
|
||||
if (PIC_FLAG (abfd))
|
||||
* flagsp |= F_PIC;
|
||||
}
|
||||
if (INTERWORK_SET (abfd) && INTERWORK_FLAG (abfd))
|
||||
* flagsp |= F_INTERWORK;
|
||||
switch (bfd_get_mach (abfd))
|
||||
{
|
||||
case bfd_mach_arm_2: * flagsp |= F_ARM_2; break;
|
||||
case bfd_mach_arm_2a: * flagsp |= F_ARM_2a; break;
|
||||
case bfd_mach_arm_3: * flagsp |= F_ARM_3; break;
|
||||
case bfd_mach_arm_3M: * flagsp |= F_ARM_3M; break;
|
||||
case bfd_mach_arm_4: * flagsp |= F_ARM_4; break;
|
||||
case bfd_mach_arm_4T: * flagsp |= F_ARM_4T; break;
|
||||
}
|
||||
return true;
|
||||
#endif
|
||||
#ifdef PPCMAGIC
|
||||
|
@ -2101,6 +2175,10 @@ coff_set_arch_mach (abfd, arch, machine)
|
|||
|
||||
/* Calculate the file position for each section. */
|
||||
|
||||
#ifndef I960
|
||||
#define ALIGN_SECTIONS_IN_FILE
|
||||
#endif
|
||||
|
||||
static boolean
|
||||
coff_compute_section_file_positions (abfd)
|
||||
bfd * abfd;
|
||||
|
@ -2109,11 +2187,10 @@ coff_compute_section_file_positions (abfd)
|
|||
asection *previous = (asection *) NULL;
|
||||
file_ptr sofar = FILHSZ;
|
||||
boolean align_adjust;
|
||||
|
||||
#ifndef I960
|
||||
unsigned int count;
|
||||
#ifdef ALIGN_SECTIONS_IN_FILE
|
||||
file_ptr old_sofar;
|
||||
#endif
|
||||
unsigned int count;
|
||||
|
||||
#ifdef RS6000COFF_C
|
||||
/* On XCOFF, if we have symbols, set up the .debug section. */
|
||||
|
@ -2199,6 +2276,19 @@ coff_compute_section_file_positions (abfd)
|
|||
current != (asection *) NULL;
|
||||
current = current->next, ++count)
|
||||
{
|
||||
#ifdef COFF_IMAGE_WITH_PE
|
||||
/* The NT loader does not want empty section headers, so we omit
|
||||
them. We don't actually remove the section from the BFD,
|
||||
although we probably should. This matches code in
|
||||
coff_write_object_contents. */
|
||||
if (current->_raw_size == 0)
|
||||
{
|
||||
current->target_index = -1;
|
||||
--count;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
current->target_index = count;
|
||||
|
||||
/* Only deal with sections which have contents */
|
||||
|
@ -2209,7 +2299,7 @@ coff_compute_section_file_positions (abfd)
|
|||
which they are aligned in virtual memory. I960 doesn't
|
||||
do this (FIXME) so we can stay in sync with Intel. 960
|
||||
doesn't yet page from files... */
|
||||
#ifndef I960
|
||||
#ifdef ALIGN_SECTIONS_IN_FILE
|
||||
if ((abfd->flags & EXEC_P) != 0)
|
||||
{
|
||||
/* make sure this section is aligned on the right boundary - by
|
||||
|
@ -2260,7 +2350,7 @@ coff_compute_section_file_positions (abfd)
|
|||
|
||||
sofar += current->_raw_size;
|
||||
|
||||
#ifndef I960
|
||||
#ifdef ALIGN_SECTIONS_IN_FILE
|
||||
/* make sure that this section is of the right size too */
|
||||
if ((abfd->flags & EXEC_P) == 0)
|
||||
{
|
||||
|
@ -2281,6 +2371,14 @@ coff_compute_section_file_positions (abfd)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef COFF_IMAGE_WITH_PE
|
||||
/* For PE we need to make sure we pad out to the aligned
|
||||
_raw_size, in case the caller only writes out data to the
|
||||
unaligned _raw_size. */
|
||||
if (pei_section_data (abfd, current)->virt_size < current->_raw_size)
|
||||
align_adjust = true;
|
||||
#endif
|
||||
|
||||
#ifdef _LIB
|
||||
/* Force .lib sections to start at zero. The vma is then
|
||||
incremented in coff_set_section_contents. This is right for
|
||||
|
@ -2599,7 +2697,6 @@ coff_write_object_contents (abfd)
|
|||
section.s_align = (current->alignment_power
|
||||
? 1 << current->alignment_power
|
||||
: 0);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef COFF_IMAGE_WITH_PE
|
||||
|
@ -2626,13 +2723,22 @@ coff_write_object_contents (abfd)
|
|||
{
|
||||
unsigned int i, count;
|
||||
asymbol **psym;
|
||||
coff_symbol_type *csym;
|
||||
coff_symbol_type *csym = NULL;
|
||||
asymbol **psymsec;
|
||||
|
||||
psymsec = NULL;
|
||||
count = bfd_get_symcount (abfd);
|
||||
for (i = 0, psym = abfd->outsymbols; i < count; i++, psym++)
|
||||
{
|
||||
/* Here *PSYM is the section symbol for CURRENT. */
|
||||
if ((*psym)->section != current)
|
||||
continue;
|
||||
|
||||
/* Remember the location of the first symbol in this
|
||||
section. */
|
||||
if (psymsec == NULL)
|
||||
psymsec = psym;
|
||||
|
||||
/* See if this is the section symbol. */
|
||||
if (strcmp ((*psym)->name, current->name) == 0)
|
||||
{
|
||||
csym = coff_symbol_from (abfd, *psym);
|
||||
|
@ -2642,6 +2748,9 @@ coff_write_object_contents (abfd)
|
|||
|| csym->native->u.syment.n_sclass != C_STAT
|
||||
|| csym->native->u.syment.n_type != T_NULL)
|
||||
continue;
|
||||
|
||||
/* Here *PSYM is the section symbol for CURRENT. */
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2678,6 +2787,24 @@ coff_write_object_contents (abfd)
|
|||
IMAGE_COMDAT_SELECT_EXACT_MATCH;
|
||||
break;
|
||||
}
|
||||
|
||||
/* The COMDAT symbol must be the first symbol from this
|
||||
section in the symbol table. In order to make this
|
||||
work, we move the COMDAT symbol before the first
|
||||
symbol we found in the search above. It's OK to
|
||||
rearrange the symbol table at this point, because
|
||||
coff_renumber_symbols is going to rearrange it
|
||||
further and fix up all the aux entries. */
|
||||
if (psym != psymsec)
|
||||
{
|
||||
asymbol *hold;
|
||||
asymbol **pcopy;
|
||||
|
||||
hold = *psym;
|
||||
for (pcopy = psym; pcopy > psymsec; pcopy--)
|
||||
pcopy[0] = pcopy[-1];
|
||||
*psymsec = hold;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* COFF_WITH_PE */
|
||||
|
@ -2751,6 +2878,7 @@ coff_write_object_contents (abfd)
|
|||
else
|
||||
internal_f.f_flags |= F_AR32W;
|
||||
|
||||
|
||||
/*
|
||||
FIXME, should do something about the other byte orders and
|
||||
architectures.
|
||||
|
@ -2788,10 +2916,6 @@ coff_write_object_contents (abfd)
|
|||
internal_a.magic = NMAGIC; /* Assume separate i/d */
|
||||
#define __A_MAGIC_SET__
|
||||
#endif /* A29K */
|
||||
#ifdef TIC80
|
||||
internal_a.magic = TIC80_ARCH_MAGIC;
|
||||
#define __A_MAGIC_SET__
|
||||
#endif /* TIC80 */
|
||||
#ifdef I860
|
||||
/* FIXME: What are the a.out magic numbers for the i860? */
|
||||
internal_a.magic = 0;
|
||||
|
@ -2832,10 +2956,12 @@ coff_write_object_contents (abfd)
|
|||
#define __A_MAGIC_SET__
|
||||
internal_a.magic = ZMAGIC;
|
||||
#endif
|
||||
|
||||
#if defined(PPC_PE)
|
||||
#define __A_MAGIC_SET__
|
||||
internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
|
||||
#endif
|
||||
|
||||
#if defined(I386)
|
||||
#define __A_MAGIC_SET__
|
||||
#if defined(LYNXOS)
|
||||
|
@ -2852,7 +2978,7 @@ coff_write_object_contents (abfd)
|
|||
#endif /* LYNXOS */
|
||||
#endif /* SPARC */
|
||||
|
||||
#if RS6000COFF_C
|
||||
#ifdef RS6000COFF_C
|
||||
#define __A_MAGIC_SET__
|
||||
internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC :
|
||||
(abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC :
|
||||
|
@ -3228,7 +3354,8 @@ coff_slurp_line_table (abfd, asect)
|
|||
|
||||
warned = false;
|
||||
symndx = dst.l_addr.l_symndx;
|
||||
if (symndx < 0 || symndx >= obj_raw_syment_count (abfd))
|
||||
if (symndx < 0
|
||||
|| (unsigned long) symndx >= obj_raw_syment_count (abfd))
|
||||
{
|
||||
(*_bfd_error_handler)
|
||||
("%s: warning: illegal symbol index %ld in line numbers",
|
||||
|
@ -3336,9 +3463,16 @@ coff_slurp_symbol_table (abfd)
|
|||
#endif
|
||||
|
||||
case C_EXT:
|
||||
#if defined ARM
|
||||
case C_THUMBEXT:
|
||||
case C_THUMBEXTFUNC:
|
||||
#endif
|
||||
#ifdef RS6000COFF_C
|
||||
case C_HIDEXT:
|
||||
#endif
|
||||
#ifdef C_SYSTEM
|
||||
case C_SYSTEM: /* System Wide variable */
|
||||
#endif
|
||||
#ifdef COFF_WITH_PE
|
||||
/* PE uses storage class 0x68 to denote a section symbol */
|
||||
case C_SECTION:
|
||||
|
@ -3364,8 +3498,15 @@ coff_slurp_symbol_table (abfd)
|
|||
section */
|
||||
|
||||
dst->symbol.flags = BSF_EXPORT | BSF_GLOBAL;
|
||||
|
||||
#if defined COFF_WITH_PE
|
||||
/* PE sets the symbol to a value relative to the
|
||||
start of the section. */
|
||||
dst->symbol.value = src->u.syment.n_value;
|
||||
#else
|
||||
dst->symbol.value = (src->u.syment.n_value
|
||||
- dst->symbol.section->vma);
|
||||
#endif
|
||||
|
||||
if (ISFCN ((src->u.syment.n_type)))
|
||||
{
|
||||
|
@ -3394,6 +3535,11 @@ coff_slurp_symbol_table (abfd)
|
|||
case C_STAT: /* static */
|
||||
#ifdef I960
|
||||
case C_LEAFSTAT: /* static leaf procedure */
|
||||
#endif
|
||||
#if defined ARM
|
||||
case C_THUMBSTAT: /* Thumb static */
|
||||
case C_THUMBLABEL: /* Thumb label */
|
||||
case C_THUMBSTATFUNC:/* Thumb static function */
|
||||
#endif
|
||||
case C_LABEL: /* label */
|
||||
if (src->u.syment.n_scnum == -2)
|
||||
|
@ -3404,8 +3550,16 @@ coff_slurp_symbol_table (abfd)
|
|||
/* Base the value as an index from the base of the
|
||||
section, if there is one. */
|
||||
if (dst->symbol.section)
|
||||
dst->symbol.value = (src->u.syment.n_value
|
||||
- dst->symbol.section->vma);
|
||||
{
|
||||
#if defined COFF_WITH_PE
|
||||
/* PE sets the symbol to a value relative to the
|
||||
start of the section. */
|
||||
dst->symbol.value = src->u.syment.n_value;
|
||||
#else
|
||||
dst->symbol.value = (src->u.syment.n_value
|
||||
- dst->symbol.section->vma);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
dst->symbol.value = src->u.syment.n_value;
|
||||
break;
|
||||
|
@ -3501,10 +3655,16 @@ coff_slurp_symbol_table (abfd)
|
|||
case C_FCN: /* ".bf" or ".ef" */
|
||||
case C_EFCN: /* physical end of function */
|
||||
dst->symbol.flags = BSF_LOCAL;
|
||||
#if defined COFF_WITH_PE
|
||||
/* PE sets the symbol to a value relative to the start
|
||||
of the section. */
|
||||
dst->symbol.value = src->u.syment.n_value;
|
||||
#else
|
||||
/* Base the value as an index from the base of the
|
||||
section. */
|
||||
dst->symbol.value = (src->u.syment.n_value
|
||||
- dst->symbol.section->vma);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case C_NULL:
|
||||
|
@ -3570,9 +3730,13 @@ coff_slurp_symbol_table (abfd)
|
|||
#define OTHER_GLOBAL_CLASS C_LEAFEXT
|
||||
#endif
|
||||
|
||||
#ifdef COFFARM
|
||||
#define OTHER_GLOBAL_CLASS C_THUMBEXT || syment->n_sclass == C_THUMBEXTFUNC
|
||||
#else
|
||||
#ifdef COFF_WITH_PE
|
||||
#define OTHER_GLOBAL_CLASS C_SECTION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OTHER_GLOBAL_CLASS
|
||||
|
||||
|
@ -3580,12 +3744,10 @@ static boolean coff_sym_is_global PARAMS ((bfd *, struct internal_syment *));
|
|||
|
||||
static boolean
|
||||
coff_sym_is_global (abfd, syment)
|
||||
bfd *abfd;
|
||||
struct internal_syment *syment;
|
||||
bfd * abfd;
|
||||
struct internal_syment * syment;
|
||||
{
|
||||
if (syment->n_sclass == OTHER_GLOBAL_CLASS)
|
||||
return true;
|
||||
return false;
|
||||
return (syment->n_sclass == OTHER_GLOBAL_CLASS);
|
||||
}
|
||||
|
||||
#undef OTHER_GLOBAL_CLASS
|
||||
|
@ -3906,6 +4068,7 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
|
|||
#endif
|
||||
#define coff_bfd_final_link _bfd_generic_final_link
|
||||
#endif /* ! defined (coff_relocate_section) */
|
||||
|
||||
#define coff_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
#ifndef coff_start_final_link
|
||||
|
@ -3920,13 +4083,79 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
|
|||
#define coff_link_add_one_symbol _bfd_generic_link_add_one_symbol
|
||||
#endif
|
||||
|
||||
#ifndef coff_link_output_has_begun
|
||||
#define coff_link_output_has_begun _coff_link_output_has_begun
|
||||
static boolean
|
||||
_coff_link_output_has_begun (abfd)
|
||||
bfd * abfd;
|
||||
{
|
||||
return abfd->output_has_begun;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef coff_final_link_postscript
|
||||
#define coff_final_link_postscript _coff_final_link_postscript
|
||||
static boolean
|
||||
_coff_final_link_postscript (abfd, pfinfo)
|
||||
bfd * abfd;
|
||||
struct coff_final_link_info * pfinfo;
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef coff_SWAP_aux_in
|
||||
#define coff_SWAP_aux_in coff_swap_aux_in
|
||||
#endif
|
||||
#ifndef coff_SWAP_sym_in
|
||||
#define coff_SWAP_sym_in coff_swap_sym_in
|
||||
#endif
|
||||
#ifndef coff_SWAP_lineno_in
|
||||
#define coff_SWAP_lineno_in coff_swap_lineno_in
|
||||
#endif
|
||||
#ifndef coff_SWAP_aux_out
|
||||
#define coff_SWAP_aux_out coff_swap_aux_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_sym_out
|
||||
#define coff_SWAP_sym_out coff_swap_sym_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_lineno_out
|
||||
#define coff_SWAP_lineno_out coff_swap_lineno_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_reloc_out
|
||||
#define coff_SWAP_reloc_out coff_swap_reloc_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_filehdr_out
|
||||
#define coff_SWAP_filehdr_out coff_swap_filehdr_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_aouthdr_out
|
||||
#define coff_SWAP_aouthdr_out coff_swap_aouthdr_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_scnhdr_out
|
||||
#define coff_SWAP_scnhdr_out coff_swap_scnhdr_out
|
||||
#endif
|
||||
#ifndef coff_SWAP_reloc_in
|
||||
#define coff_SWAP_reloc_in coff_swap_reloc_in
|
||||
#endif
|
||||
#ifndef coff_SWAP_filehdr_in
|
||||
#define coff_SWAP_filehdr_in coff_swap_filehdr_in
|
||||
#endif
|
||||
#ifndef coff_SWAP_aouthdr_in
|
||||
#define coff_SWAP_aouthdr_in coff_swap_aouthdr_in
|
||||
#endif
|
||||
#ifndef coff_SWAP_scnhdr_in
|
||||
#define coff_SWAP_scnhdr_in coff_swap_scnhdr_in
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
|
||||
{
|
||||
coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in,
|
||||
coff_swap_aux_out, coff_swap_sym_out,
|
||||
coff_swap_lineno_out, coff_swap_reloc_out,
|
||||
coff_swap_filehdr_out, coff_swap_aouthdr_out,
|
||||
coff_swap_scnhdr_out,
|
||||
coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
|
||||
coff_SWAP_aux_out, coff_SWAP_sym_out,
|
||||
coff_SWAP_lineno_out, coff_SWAP_reloc_out,
|
||||
coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
|
||||
coff_SWAP_scnhdr_out,
|
||||
FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ,
|
||||
#ifdef COFF_LONG_FILENAMES
|
||||
true,
|
||||
|
@ -3939,22 +4168,31 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
|
|||
false,
|
||||
#endif
|
||||
COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
|
||||
coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in,
|
||||
coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
|
||||
coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
|
||||
coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
|
||||
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
|
||||
coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
|
||||
coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
|
||||
coff_sym_is_global, coff_compute_section_file_positions,
|
||||
coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
|
||||
coff_adjust_symndx, coff_link_add_one_symbol
|
||||
coff_adjust_symndx, coff_link_add_one_symbol,
|
||||
coff_link_output_has_begun, coff_final_link_postscript
|
||||
};
|
||||
|
||||
#define coff_close_and_cleanup _bfd_generic_close_and_cleanup
|
||||
#define coff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
|
||||
#define coff_get_section_contents _bfd_generic_get_section_contents
|
||||
#ifndef coff_close_and_cleanup
|
||||
#define coff_close_and_cleanup _bfd_generic_close_and_cleanup
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_free_cached_info
|
||||
#define coff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
|
||||
#endif
|
||||
|
||||
#ifndef coff_get_section_contents
|
||||
#define coff_get_section_contents _bfd_generic_get_section_contents
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_copy_private_symbol_data
|
||||
#define coff_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
|
||||
#define coff_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_copy_private_section_data
|
||||
|
@ -3962,36 +4200,44 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
|
|||
#endif
|
||||
|
||||
#ifndef coff_bfd_copy_private_bfd_data
|
||||
#define coff_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
|
||||
#define coff_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
|
||||
#endif
|
||||
|
||||
#define coff_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
|
||||
#define coff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
|
||||
#ifndef coff_bfd_merge_private_bfd_data
|
||||
#define coff_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_set_private_flags
|
||||
#define coff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_print_private_bfd_data
|
||||
#define coff_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
|
||||
#define coff_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_is_local_label_name
|
||||
#define coff_bfd_is_local_label_name _bfd_coff_is_local_label_name
|
||||
#define coff_bfd_is_local_label_name _bfd_coff_is_local_label_name
|
||||
#endif
|
||||
|
||||
#ifndef coff_read_minisymbols
|
||||
#define coff_read_minisymbols _bfd_generic_read_minisymbols
|
||||
#define coff_read_minisymbols _bfd_generic_read_minisymbols
|
||||
#endif
|
||||
|
||||
#ifndef coff_minisymbol_to_symbol
|
||||
#define coff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
|
||||
#define coff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
|
||||
#endif
|
||||
|
||||
/* The reloc lookup routine must be supplied by each individual COFF
|
||||
backend. */
|
||||
#ifndef coff_bfd_reloc_type_lookup
|
||||
#define coff_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
|
||||
#define coff_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_get_relocated_section_contents
|
||||
#define coff_bfd_get_relocated_section_contents \
|
||||
bfd_generic_get_relocated_section_contents
|
||||
#endif
|
||||
|
||||
#ifndef coff_bfd_relax_section
|
||||
#define coff_bfd_relax_section bfd_generic_relax_section
|
||||
#define coff_bfd_relax_section bfd_generic_relax_section
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* Support for the generic parts of COFF, for BFD.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -62,7 +63,7 @@ static const bfd_target *coff_real_object_p
|
|||
PARAMS ((bfd *, unsigned, struct internal_filehdr *,
|
||||
struct internal_aouthdr *));
|
||||
static void fixup_symbol_value
|
||||
PARAMS ((coff_symbol_type *, struct internal_syment *));
|
||||
PARAMS ((bfd *, coff_symbol_type *, struct internal_syment *));
|
||||
static char *build_debug_section
|
||||
PARAMS ((bfd *));
|
||||
static char *copy_name
|
||||
|
@ -283,18 +284,14 @@ coff_object_p (abfd)
|
|||
opthdr = bfd_alloc (abfd, aoutsz);
|
||||
if (opthdr == NULL)
|
||||
return 0;;
|
||||
if (bfd_read (opthdr, 1, aoutsz, abfd) != aoutsz)
|
||||
if (bfd_read (opthdr, 1, internal_f.f_opthdr, abfd)
|
||||
!= internal_f.f_opthdr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) & internal_a);
|
||||
bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) &internal_a);
|
||||
}
|
||||
|
||||
/* Seek past the opt hdr stuff */
|
||||
if (bfd_seek (abfd, (file_ptr) (internal_f.f_opthdr + filhsz), SEEK_SET)
|
||||
!= 0)
|
||||
return NULL;
|
||||
|
||||
return coff_real_object_p (abfd, nscns, &internal_f,
|
||||
(internal_f.f_opthdr != 0
|
||||
? &internal_a
|
||||
|
@ -575,7 +572,8 @@ coff_symbol_from (ignore_abfd, symbol)
|
|||
}
|
||||
|
||||
static void
|
||||
fixup_symbol_value (coff_symbol_ptr, syment)
|
||||
fixup_symbol_value (abfd, coff_symbol_ptr, syment)
|
||||
bfd *abfd;
|
||||
coff_symbol_type *coff_symbol_ptr;
|
||||
struct internal_syment *syment;
|
||||
{
|
||||
|
@ -603,10 +601,11 @@ fixup_symbol_value (coff_symbol_ptr, syment)
|
|||
syment->n_scnum =
|
||||
coff_symbol_ptr->symbol.section->output_section->target_index;
|
||||
|
||||
syment->n_value =
|
||||
coff_symbol_ptr->symbol.value +
|
||||
coff_symbol_ptr->symbol.section->output_offset +
|
||||
coff_symbol_ptr->symbol.section->output_section->vma;
|
||||
syment->n_value = (coff_symbol_ptr->symbol.value
|
||||
+ coff_symbol_ptr->symbol.section->output_offset);
|
||||
if (! obj_pe (abfd))
|
||||
syment->n_value +=
|
||||
coff_symbol_ptr->symbol.section->output_section->vma;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -702,7 +701,7 @@ coff_renumber_symbols (bfd_ptr, first_undef)
|
|||
/* Modify the symbol values according to their section and
|
||||
type */
|
||||
|
||||
fixup_symbol_value (coff_symbol_ptr, &(s->u.syment));
|
||||
fixup_symbol_value (bfd_ptr, coff_symbol_ptr, &(s->u.syment));
|
||||
}
|
||||
for (i = 0; i < s->u.syment.n_numaux + 1; i++)
|
||||
s[i].offset = native_index++;
|
||||
|
@ -1017,8 +1016,9 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
|
|||
native->u.syment.n_scnum =
|
||||
symbol->section->output_section->target_index;
|
||||
native->u.syment.n_value = (symbol->value
|
||||
+ symbol->section->output_section->vma
|
||||
+ symbol->section->output_offset);
|
||||
if (! obj_pe (abfd))
|
||||
native->u.syment.n_value += symbol->section->output_section->vma;
|
||||
|
||||
/* Copy the any flags from the the file header into the symbol.
|
||||
FIXME: Why? */
|
||||
|
@ -1417,8 +1417,8 @@ coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent)
|
|||
unsigned int indaux;
|
||||
combined_entry_type *auxent;
|
||||
{
|
||||
int type = symbol->u.syment.n_type;
|
||||
int class = symbol->u.syment.n_sclass;
|
||||
unsigned int type = symbol->u.syment.n_type;
|
||||
unsigned int class = symbol->u.syment.n_sclass;
|
||||
|
||||
if (coff_backend_info (abfd)->_bfd_coff_pointerize_aux_hook)
|
||||
{
|
||||
|
@ -2146,6 +2146,9 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
|
|||
|
||||
/* Find the first C_FILE symbol. */
|
||||
p = cof->raw_syments;
|
||||
if (!p)
|
||||
return false;
|
||||
|
||||
pend = p + cof->raw_syment_count;
|
||||
while (p < pend)
|
||||
{
|
||||
|
@ -2156,9 +2159,11 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
|
|||
|
||||
if (p < pend)
|
||||
{
|
||||
bfd_vma sec_vma;
|
||||
bfd_vma maxdiff;
|
||||
|
||||
/* Look through the C_FILE symbols to find the best one. */
|
||||
sec_vma = bfd_get_section_vma (abfd, section);
|
||||
*filename_ptr = (char *) p->u.syment._n._n_n._n_offset;
|
||||
maxdiff = (bfd_vma) 0 - (bfd_vma) 1;
|
||||
while (1)
|
||||
|
@ -2182,11 +2187,11 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
|
|||
}
|
||||
|
||||
if (p2 < pend
|
||||
&& offset >= (bfd_vma) p2->u.syment.n_value
|
||||
&& offset - (bfd_vma) p2->u.syment.n_value < maxdiff)
|
||||
&& offset + sec_vma >= (bfd_vma) p2->u.syment.n_value
|
||||
&& offset + sec_vma - (bfd_vma) p2->u.syment.n_value < maxdiff)
|
||||
{
|
||||
*filename_ptr = (char *) p->u.syment._n._n_n._n_offset;
|
||||
maxdiff = offset - p2->u.syment.n_value;
|
||||
maxdiff = offset + sec_vma - p2->u.syment.n_value;
|
||||
}
|
||||
|
||||
/* Avoid endless loops on erroneous files by ensuring that
|
||||
|
@ -2253,7 +2258,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (l->u.offset + bfd_get_section_vma (abfd, section) > offset)
|
||||
if (l->u.offset > offset)
|
||||
break;
|
||||
*line_ptr = l->line_number + line_base - 1;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ static char *dores_com PARAMS ((char *, bfd *, int));
|
|||
static char *get_name PARAMS ((char *, char **));
|
||||
static int process_embedded_commands
|
||||
PARAMS ((bfd *, struct bfd_link_info *, bfd *));
|
||||
static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *));
|
||||
|
||||
/* Create an entry in a COFF linker hash table. */
|
||||
|
||||
|
@ -243,6 +244,9 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
|
|||
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
|
||||
|
||||
if ((sym.n_sclass == C_EXT
|
||||
#ifdef C_SYSTEM
|
||||
|| sym.n_sclass == C_SYSTEM
|
||||
#endif
|
||||
|| (sym_is_global && (*sym_is_global) (abfd, &sym)))
|
||||
&& (sym.n_scnum != 0 || sym.n_value != 0))
|
||||
{
|
||||
|
@ -333,6 +337,9 @@ coff_link_add_symbols (abfd, info)
|
|||
bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
|
||||
|
||||
if (sym.n_sclass == C_EXT
|
||||
#ifdef C_SYSTEM
|
||||
|| sym.n_sclass == C_SYSTEM
|
||||
#endif
|
||||
|| (sym_is_global && (*sym_is_global) (abfd, &sym)))
|
||||
{
|
||||
const char *name;
|
||||
|
@ -373,7 +380,8 @@ coff_link_add_symbols (abfd, info)
|
|||
{
|
||||
flags = BSF_EXPORT | BSF_GLOBAL;
|
||||
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
|
||||
value -= section->vma;
|
||||
if (! obj_pe (abfd))
|
||||
value -= section->vma;
|
||||
}
|
||||
|
||||
if (! (bfd_coff_link_add_one_symbol
|
||||
|
@ -530,6 +538,7 @@ _bfd_coff_final_link (abfd, info)
|
|||
finfo.contents = NULL;
|
||||
finfo.external_relocs = NULL;
|
||||
finfo.internal_relocs = NULL;
|
||||
finfo.global_to_static = false;
|
||||
debug_merge_allocated = false;
|
||||
|
||||
coff_data (abfd)->link_info = info;
|
||||
|
@ -759,7 +768,7 @@ _bfd_coff_final_link (abfd, info)
|
|||
== bfd_target_coff_flavour))
|
||||
{
|
||||
sub = p->u.indirect.section->owner;
|
||||
if (! sub->output_has_begun)
|
||||
if (! bfd_coff_link_output_has_begun (sub))
|
||||
{
|
||||
if (! _bfd_coff_link_input_bfd (&finfo, sub))
|
||||
goto error_return;
|
||||
|
@ -780,6 +789,9 @@ _bfd_coff_final_link (abfd, info)
|
|||
}
|
||||
}
|
||||
|
||||
if (! bfd_coff_final_link_postscript (abfd, & finfo))
|
||||
goto error_return;
|
||||
|
||||
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
|
||||
|
||||
coff_debug_merge_hash_table_free (&finfo.debug_merge);
|
||||
|
@ -838,6 +850,18 @@ _bfd_coff_final_link (abfd, info)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* If doing task linking (ld --task-link) then make a pass through the
|
||||
global symbols, writing out any that are defined, and making them
|
||||
static. */
|
||||
if (info->task_link)
|
||||
{
|
||||
finfo.failed = false;
|
||||
coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_task_globals,
|
||||
(PTR) &finfo);
|
||||
if (finfo.failed)
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
/* Write out the global symbols. */
|
||||
finfo.failed = false;
|
||||
coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
|
||||
|
@ -1117,6 +1141,60 @@ process_embedded_commands (output_bfd, info, abfd)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Place a marker against all symbols which are used by relocations.
|
||||
This marker can be picked up by the 'do we skip this symbol ?'
|
||||
loop in _bfd_coff_link_input_bfd() and used to prevent skipping
|
||||
that symbol.
|
||||
*/
|
||||
|
||||
static void
|
||||
mark_relocs (finfo, input_bfd)
|
||||
struct coff_final_link_info * finfo;
|
||||
bfd * input_bfd;
|
||||
{
|
||||
asection * a;
|
||||
|
||||
if ((bfd_get_file_flags (input_bfd) & HAS_SYMS) == 0)
|
||||
return;
|
||||
|
||||
for (a = input_bfd->sections; a != (asection *) NULL; a = a->next)
|
||||
{
|
||||
struct internal_reloc * internal_relocs;
|
||||
struct internal_reloc * irel;
|
||||
struct internal_reloc * irelend;
|
||||
|
||||
|
||||
if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1)
|
||||
continue;
|
||||
|
||||
/* Read in the relocs. */
|
||||
internal_relocs = _bfd_coff_read_internal_relocs
|
||||
(input_bfd, a, false,
|
||||
finfo->external_relocs,
|
||||
finfo->info->relocateable,
|
||||
(finfo->info->relocateable
|
||||
? (finfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
|
||||
: finfo->internal_relocs)
|
||||
);
|
||||
|
||||
if (internal_relocs == NULL)
|
||||
continue;
|
||||
|
||||
irel = internal_relocs;
|
||||
irelend = irel + a->reloc_count;
|
||||
|
||||
/* Place a mark in the sym_indices array (whose entries have
|
||||
been initialised to 0) for all of the symbols that are used
|
||||
in the relocation table. This will then be picked up in the
|
||||
skip/don't pass */
|
||||
|
||||
for (; irel < irelend; irel++)
|
||||
{
|
||||
finfo->sym_indices[ irel->r_symndx ] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Link an input file into the linker output file. This function
|
||||
handles all the sections and relocations of the input file at once. */
|
||||
|
||||
|
@ -1190,11 +1268,25 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* If we are going to perform relocations and also strip/discard some symbols
|
||||
then we must make sure that we do not strip/discard those symbols that are
|
||||
going to be involved in the relocations */
|
||||
if (( finfo->info->strip != strip_none
|
||||
|| finfo->info->discard != discard_none)
|
||||
&& finfo->info->relocateable)
|
||||
{
|
||||
/* mark the symbol array as 'not-used' */
|
||||
memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
|
||||
|
||||
mark_relocs (finfo, input_bfd);
|
||||
}
|
||||
|
||||
while (esym < esym_end)
|
||||
{
|
||||
struct internal_syment isym;
|
||||
boolean skip;
|
||||
boolean global;
|
||||
boolean dont_skip_symbol;
|
||||
int add;
|
||||
|
||||
bfd_coff_swap_sym_in (input_bfd, (PTR) esym, (PTR) isymp);
|
||||
|
@ -1215,6 +1307,15 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
*secpp = bfd_com_section_ptr;
|
||||
}
|
||||
|
||||
/* Extract the flag indicating if this symbol is used by a
|
||||
relocation. */
|
||||
if ((finfo->info->strip != strip_none
|
||||
|| finfo->info->discard != discard_none)
|
||||
&& finfo->info->relocateable)
|
||||
dont_skip_symbol = *indexp;
|
||||
else
|
||||
dont_skip_symbol = false;
|
||||
|
||||
*indexp = -1;
|
||||
|
||||
skip = false;
|
||||
|
@ -1222,12 +1323,15 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
add = 1 + isym.n_numaux;
|
||||
|
||||
/* If we are stripping all symbols, we want to skip this one. */
|
||||
if (finfo->info->strip == strip_all)
|
||||
if (finfo->info->strip == strip_all && ! dont_skip_symbol)
|
||||
skip = true;
|
||||
|
||||
if (! skip)
|
||||
{
|
||||
if (isym.n_sclass == C_EXT
|
||||
#ifdef C_SYSTEM
|
||||
|| isym.n_sclass == C_SYSTEM
|
||||
#endif
|
||||
|| (sym_is_global && (*sym_is_global) (input_bfd, &isym)))
|
||||
{
|
||||
/* This is a global symbol. Global symbols come at the
|
||||
|
@ -1242,16 +1346,29 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
{
|
||||
/* This is a local symbol. Skip it if we are discarding
|
||||
local symbols. */
|
||||
if (finfo->info->discard == discard_all)
|
||||
if (finfo->info->discard == discard_all && ! dont_skip_symbol)
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we stripping debugging symbols, and this is a debugging
|
||||
symbol, then skip it. */
|
||||
symbol, then skip it. FIXME: gas sets the section to N_ABS
|
||||
for some types of debugging symbols; I don't know if this is
|
||||
a bug or not. In any case, we handle it here. */
|
||||
if (! skip
|
||||
&& finfo->info->strip == strip_debugger
|
||||
&& isym.n_scnum == N_DEBUG)
|
||||
&& ! dont_skip_symbol
|
||||
&& (isym.n_scnum == N_DEBUG
|
||||
|| (isym.n_scnum == N_ABS
|
||||
&& (isym.n_sclass == C_AUTO
|
||||
|| isym.n_sclass == C_REG
|
||||
|| isym.n_sclass == C_MOS
|
||||
|| isym.n_sclass == C_MOE
|
||||
|| isym.n_sclass == C_MOU
|
||||
|| isym.n_sclass == C_ARG
|
||||
|| isym.n_sclass == C_REGPARM
|
||||
|| isym.n_sclass == C_FIELD
|
||||
|| isym.n_sclass == C_EOS))))
|
||||
skip = true;
|
||||
|
||||
/* If some symbols are stripped based on the name, work out the
|
||||
|
@ -1267,12 +1384,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
if (name == NULL)
|
||||
return false;
|
||||
|
||||
if ((finfo->info->strip == strip_some
|
||||
&& (bfd_hash_lookup (finfo->info->keep_hash, name, false,
|
||||
if (! dont_skip_symbol
|
||||
&& ((finfo->info->strip == strip_some
|
||||
&& (bfd_hash_lookup (finfo->info->keep_hash, name, false,
|
||||
false) == NULL))
|
||||
|| (! global
|
||||
&& finfo->info->discard == discard_l
|
||||
&& bfd_is_local_label_name (input_bfd, name)))
|
||||
|| (! global
|
||||
&& finfo->info->discard == discard_l
|
||||
&& bfd_is_local_label_name (input_bfd, name))))
|
||||
skip = true;
|
||||
}
|
||||
|
||||
|
@ -1472,9 +1590,11 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
if (isym.n_scnum > 0)
|
||||
{
|
||||
isym.n_scnum = (*secpp)->output_section->target_index;
|
||||
isym.n_value += ((*secpp)->output_section->vma
|
||||
+ (*secpp)->output_offset
|
||||
- (*secpp)->vma);
|
||||
isym.n_value += (*secpp)->output_offset;
|
||||
if (! obj_pe (input_bfd))
|
||||
isym.n_value -= (*secpp)->vma;
|
||||
if (! obj_pe (finfo->output_bfd))
|
||||
isym.n_value += (*secpp)->output_section->vma;
|
||||
}
|
||||
|
||||
/* The value of a C_FILE symbol is the symbol index of the
|
||||
|
@ -1525,6 +1645,12 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
finfo->last_file = isym;
|
||||
}
|
||||
|
||||
/* If doing task linking, convert normal global function symbols to
|
||||
static functions. */
|
||||
|
||||
if (finfo->info->task_link && isym.n_sclass == C_EXT)
|
||||
isym.n_sclass = C_STAT;
|
||||
|
||||
/* Output the symbol. */
|
||||
|
||||
bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) outsym);
|
||||
|
@ -2066,9 +2192,10 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
|
|||
char buf[SYMNMLEN + 1];
|
||||
|
||||
/* This reloc is against a symbol we are
|
||||
stripping. It would be possible to
|
||||
handle this case, but I don't think it's
|
||||
worth it. */
|
||||
stripping. This should have been handled
|
||||
by the 'dont_skip_symbol' code in the while
|
||||
loop at the top of this function. */
|
||||
|
||||
is = finfo->internal_syms + irel->r_symndx;
|
||||
|
||||
name = (_bfd_coff_internal_syment_name
|
||||
|
@ -2166,8 +2293,9 @@ _bfd_coff_write_global_sym (h, data)
|
|||
else
|
||||
isym.n_scnum = sec->target_index;
|
||||
isym.n_value = (h->root.u.def.value
|
||||
+ sec->vma
|
||||
+ h->root.u.def.section->output_offset);
|
||||
if (! obj_pe (finfo->output_bfd))
|
||||
isym.n_value += sec->vma;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2209,6 +2337,18 @@ _bfd_coff_write_global_sym (h, data)
|
|||
if (isym.n_sclass == C_NULL)
|
||||
isym.n_sclass = C_EXT;
|
||||
|
||||
/* If doing task linking and this is the pass where we convert defined globals to
|
||||
statics, then do that conversion now. If the symbol is not being converted,
|
||||
just ignore it and it will be output during a later pass. */
|
||||
if (finfo->global_to_static)
|
||||
{
|
||||
if (isym.n_sclass != C_EXT)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
isym.n_sclass = C_STAT;
|
||||
}
|
||||
|
||||
isym.n_numaux = h->numaux;
|
||||
|
||||
bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) finfo->outsyms);
|
||||
|
@ -2247,6 +2387,37 @@ _bfd_coff_write_global_sym (h, data)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* Write out task global symbols, converting them to statics. Called
|
||||
via coff_link_hash_traverse. Calls bfd_coff_write_global_sym to do
|
||||
the dirty work, if the symbol we are processing needs conversion. */
|
||||
|
||||
boolean
|
||||
_bfd_coff_write_task_globals (h, data)
|
||||
struct coff_link_hash_entry *h;
|
||||
PTR data;
|
||||
{
|
||||
struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
|
||||
boolean rtnval = true;
|
||||
boolean save_global_to_static;
|
||||
|
||||
if (h->indx < 0)
|
||||
{
|
||||
switch (h->root.type)
|
||||
{
|
||||
case bfd_link_hash_defined:
|
||||
case bfd_link_hash_defweak:
|
||||
save_global_to_static = finfo->global_to_static;
|
||||
finfo->global_to_static = true;
|
||||
rtnval = _bfd_coff_write_global_sym (h, data);
|
||||
finfo->global_to_static = save_global_to_static;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (rtnval);
|
||||
}
|
||||
|
||||
/* Handle a link order which is supposed to generate a reloc. */
|
||||
|
||||
boolean
|
||||
|
@ -2465,8 +2636,9 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
|
|||
sec = sections[symndx];
|
||||
val = (sec->output_section->vma
|
||||
+ sec->output_offset
|
||||
+ sym->n_value
|
||||
- sec->vma);
|
||||
+ sym->n_value);
|
||||
if (! obj_pe (input_bfd))
|
||||
val -= sec->vma;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2494,19 +2666,26 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
|
|||
if (info->base_file)
|
||||
{
|
||||
/* Emit a reloc if the backend thinks it needs it. */
|
||||
if (sym && pe_data(output_bfd)->in_reloc_p(output_bfd, howto))
|
||||
if (sym && pe_data (output_bfd)->in_reloc_p (output_bfd, howto))
|
||||
{
|
||||
/* relocation to a symbol in a section which
|
||||
isn't absolute - we output the address here
|
||||
to a file */
|
||||
bfd_vma addr = rel->r_vaddr
|
||||
- input_section->vma
|
||||
+ input_section->output_offset
|
||||
+ input_section->output_section->vma;
|
||||
if (coff_data(output_bfd)->pe)
|
||||
/* Relocation to a symbol in a section which isn't
|
||||
absolute. We output the address here to a file.
|
||||
This file is then read by dlltool when generating the
|
||||
reloc section. Note that the base file is not
|
||||
portable between systems. We write out a long here,
|
||||
and dlltool reads in a long. */
|
||||
long addr = (rel->r_vaddr
|
||||
- input_section->vma
|
||||
+ input_section->output_offset
|
||||
+ input_section->output_section->vma);
|
||||
if (coff_data (output_bfd)->pe)
|
||||
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
|
||||
/* FIXME: Shouldn't 4 be sizeof (addr)? */
|
||||
fwrite (&addr, 1,4, (FILE *) info->base_file);
|
||||
if (fwrite (&addr, 1, sizeof (long), (FILE *) info->base_file)
|
||||
!= sizeof (long))
|
||||
{
|
||||
bfd_set_error (bfd_error_system_call);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Generic COFF swapping routines, for BFD.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -168,6 +168,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#ifndef PUT_SCNHDR_LNNOPTR
|
||||
#define PUT_SCNHDR_LNNOPTR bfd_h_put_32
|
||||
#endif
|
||||
#ifndef GET_SCNHDR_NRELOC
|
||||
#define GET_SCNHDR_NRELOC bfd_h_get_16
|
||||
#endif
|
||||
#ifndef PUT_SCNHDR_NRELOC
|
||||
#define PUT_SCNHDR_NRELOC bfd_h_put_16
|
||||
#endif
|
||||
#ifndef GET_SCNHDR_NLNNO
|
||||
#define GET_SCNHDR_NLNNO bfd_h_get_16
|
||||
#endif
|
||||
#ifndef PUT_SCNHDR_NLNNO
|
||||
#define PUT_SCNHDR_NLNNO bfd_h_put_16
|
||||
#endif
|
||||
#ifndef GET_SCNHDR_FLAGS
|
||||
#define GET_SCNHDR_FLAGS bfd_h_get_32
|
||||
#endif
|
||||
#ifndef PUT_SCNHDR_FLAGS
|
||||
#define PUT_SCNHDR_FLAGS bfd_h_put_32
|
||||
#endif
|
||||
|
||||
|
||||
static void coff_swap_aouthdr_in PARAMS ((bfd *, PTR, PTR));
|
||||
static unsigned int coff_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
|
||||
|
@ -258,6 +277,9 @@ coff_swap_filehdr_in (abfd, src, dst)
|
|||
{
|
||||
FILHDR *filehdr_src = (FILHDR *) src;
|
||||
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
|
||||
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
|
||||
COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
|
||||
#endif
|
||||
filehdr_dst->f_magic = bfd_h_get_16(abfd, (bfd_byte *) filehdr_src->f_magic);
|
||||
filehdr_dst->f_nscns = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_nscns);
|
||||
filehdr_dst->f_timdat = bfd_h_get_32(abfd, (bfd_byte *)filehdr_src-> f_timdat);
|
||||
|
@ -266,6 +288,10 @@ coff_swap_filehdr_in (abfd, src, dst)
|
|||
filehdr_dst->f_nsyms = bfd_h_get_32(abfd, (bfd_byte *)filehdr_src-> f_nsyms);
|
||||
filehdr_dst->f_opthdr = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_opthdr);
|
||||
filehdr_dst->f_flags = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_flags);
|
||||
|
||||
#ifdef COFF_ADJUST_FILEHDR_IN_POST
|
||||
COFF_ADJUST_FILEHDR_IN_POST (abfd, src, dst);
|
||||
#endif
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
@ -277,6 +303,9 @@ coff_swap_filehdr_out (abfd, in, out)
|
|||
struct internal_filehdr *filehdr_in = (struct internal_filehdr *)in;
|
||||
FILHDR *filehdr_out = (FILHDR *)out;
|
||||
|
||||
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
|
||||
COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
|
||||
#endif
|
||||
bfd_h_put_16(abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic);
|
||||
bfd_h_put_16(abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns);
|
||||
bfd_h_put_32(abfd, filehdr_in->f_timdat, (bfd_byte *) filehdr_out->f_timdat);
|
||||
|
@ -286,6 +315,9 @@ coff_swap_filehdr_out (abfd, in, out)
|
|||
bfd_h_put_16(abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr);
|
||||
bfd_h_put_16(abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags);
|
||||
|
||||
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
|
||||
COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out);
|
||||
#endif
|
||||
return FILHSZ;
|
||||
}
|
||||
|
||||
|
@ -371,6 +403,9 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
|
|||
AUXENT *ext = (AUXENT *)ext1;
|
||||
union internal_auxent *in = (union internal_auxent *)in1;
|
||||
|
||||
#ifdef COFF_ADJUST_AUX_IN_PRE
|
||||
COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
|
||||
#endif
|
||||
switch (class) {
|
||||
case C_FILE:
|
||||
if (ext->x_file.x_fname[0] == 0) {
|
||||
|
@ -384,7 +419,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
|
|||
memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
goto end;
|
||||
|
||||
/* RS/6000 "csect" auxents */
|
||||
#ifdef RS6000COFF_C
|
||||
|
@ -403,7 +438,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
|
|||
in->x_csect.x_smclas = bfd_h_get_8 (abfd, ext->x_csect.x_smclas);
|
||||
in->x_csect.x_stab = bfd_h_get_32 (abfd, ext->x_csect.x_stab);
|
||||
in->x_csect.x_snstab = bfd_h_get_16 (abfd, ext->x_csect.x_snstab);
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -424,7 +459,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
|
|||
in->x_scn.x_associated = 0;
|
||||
in->x_scn.x_comdat = 0;
|
||||
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -461,6 +496,14 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
|
|||
in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO(abfd, ext);
|
||||
in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE(abfd, ext);
|
||||
}
|
||||
|
||||
end: ;
|
||||
/* the semicolon is because MSVC doesn't like labels at
|
||||
end of block. */
|
||||
|
||||
#ifdef COFF_ADJUST_AUX_IN_POST
|
||||
COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
|
||||
#endif
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
@ -476,6 +519,9 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
|
|||
union internal_auxent *in = (union internal_auxent *)inp;
|
||||
AUXENT *ext = (AUXENT *)extp;
|
||||
|
||||
#ifdef COFF_ADJUST_AUX_OUT_PRE
|
||||
COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
|
||||
#endif
|
||||
memset((PTR)ext, 0, AUXESZ);
|
||||
switch (class) {
|
||||
case C_FILE:
|
||||
|
@ -492,7 +538,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
|
|||
memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
|
||||
#endif
|
||||
}
|
||||
return AUXESZ;
|
||||
goto end;
|
||||
|
||||
#ifdef RS6000COFF_C
|
||||
/* RS/6000 "csect" auxents */
|
||||
|
@ -510,7 +556,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
|
|||
PUTBYTE (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas);
|
||||
PUTWORD (abfd, in->x_csect.x_stab, ext->x_csect.x_stab);
|
||||
PUTHALF (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab);
|
||||
return AUXESZ;
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -524,7 +570,7 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
|
|||
PUT_SCN_SCNLEN(abfd, in->x_scn.x_scnlen, ext);
|
||||
PUT_SCN_NRELOC(abfd, in->x_scn.x_nreloc, ext);
|
||||
PUT_SCN_NLINNO(abfd, in->x_scn.x_nlinno, ext);
|
||||
return AUXESZ;
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -563,6 +609,10 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
|
|||
PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
|
||||
}
|
||||
|
||||
end:
|
||||
#ifdef COFF_ADJUST_AUX_OUT_POST
|
||||
COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp);
|
||||
#endif
|
||||
return AUXESZ;
|
||||
}
|
||||
|
||||
|
@ -743,6 +793,9 @@ coff_swap_scnhdr_in (abfd, ext, in)
|
|||
SCNHDR *scnhdr_ext = (SCNHDR *) ext;
|
||||
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
|
||||
|
||||
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
|
||||
COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
|
||||
#endif
|
||||
memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof(scnhdr_int->s_name));
|
||||
scnhdr_int->s_vaddr =
|
||||
GET_SCNHDR_VADDR (abfd, (bfd_byte *) scnhdr_ext->s_vaddr);
|
||||
|
@ -757,16 +810,18 @@ coff_swap_scnhdr_in (abfd, ext, in)
|
|||
GET_SCNHDR_RELPTR (abfd, (bfd_byte *) scnhdr_ext->s_relptr);
|
||||
scnhdr_int->s_lnnoptr =
|
||||
GET_SCNHDR_LNNOPTR (abfd, (bfd_byte *) scnhdr_ext->s_lnnoptr);
|
||||
scnhdr_int->s_flags = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_flags);
|
||||
#if defined(M88)
|
||||
scnhdr_int->s_nreloc = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
|
||||
scnhdr_int->s_nlnno = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
|
||||
#else
|
||||
scnhdr_int->s_nreloc = bfd_h_get_16(abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
|
||||
scnhdr_int->s_nlnno = bfd_h_get_16(abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
|
||||
#endif
|
||||
scnhdr_int->s_flags =
|
||||
GET_SCNHDR_FLAGS (abfd, (bfd_byte *) scnhdr_ext->s_flags);
|
||||
scnhdr_int->s_nreloc =
|
||||
GET_SCNHDR_NRELOC (abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
|
||||
scnhdr_int->s_nlnno =
|
||||
GET_SCNHDR_NLNNO (abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
|
||||
#ifdef I960
|
||||
scnhdr_int->s_align = bfd_h_get_32(abfd, (bfd_byte *) scnhdr_ext->s_align);
|
||||
scnhdr_int->s_align =
|
||||
GET_SCNHDR_ALIGN (abfd, (bfd_byte *) scnhdr_ext->s_align);
|
||||
#endif
|
||||
#ifdef COFF_ADJUST_SCNHDR_IN_POST
|
||||
COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -780,6 +835,9 @@ coff_swap_scnhdr_out (abfd, in, out)
|
|||
SCNHDR *scnhdr_ext = (SCNHDR *)out;
|
||||
unsigned int ret = SCNHSZ;
|
||||
|
||||
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
|
||||
COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
|
||||
#endif
|
||||
memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof(scnhdr_int->s_name));
|
||||
|
||||
PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr,
|
||||
|
@ -797,7 +855,8 @@ coff_swap_scnhdr_out (abfd, in, out)
|
|||
(bfd_byte *) scnhdr_ext->s_relptr);
|
||||
PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr,
|
||||
(bfd_byte *) scnhdr_ext->s_lnnoptr);
|
||||
PUTWORD(abfd, scnhdr_int->s_flags, (bfd_byte *) scnhdr_ext->s_flags);
|
||||
PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags,
|
||||
(bfd_byte *) scnhdr_ext->s_flags);
|
||||
#if defined(M88)
|
||||
PUTWORD(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno);
|
||||
PUTWORD(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc);
|
||||
|
@ -833,8 +892,11 @@ coff_swap_scnhdr_out (abfd, in, out)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(I960)
|
||||
PUTWORD(abfd, scnhdr_int->s_align, (bfd_byte *) scnhdr_ext->s_align);
|
||||
#ifdef I960
|
||||
PUT_SCNHDR_ALIGN (abfd, scnhdr_int->s_align, (bfd_byte *) scnhdr_ext->s_align);
|
||||
#endif
|
||||
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
|
||||
COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,10 @@ targ_underscore=no
|
|||
|
||||
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 ;;
|
||||
thumb*) targ_archs=bfd_arm_arch ;;
|
||||
hppa*) targ_archs=bfd_hppa_arch ;;
|
||||
i[3456]86) targ_archs=bfd_i386_arch ;;
|
||||
m68*) targ_archs=bfd_m68k_arch ;;
|
||||
|
@ -37,10 +40,12 @@ mips*) targ_archs=bfd_mips_arch ;;
|
|||
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
|
||||
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
|
||||
sparc*) targ_archs=bfd_sparc_arch ;;
|
||||
v850*) targ_archs=bfd_v850_arch ;;
|
||||
z8k*) targ_archs=bfd_z8k_arch ;;
|
||||
*) targ_archs=bfd_${targ_cpu}_arch ;;
|
||||
esac
|
||||
|
||||
|
||||
# WHEN ADDING ENTRIES TO THIS MATRIX:
|
||||
# Make sure that the left side always has two dashes. Otherwise you
|
||||
# can get spurious matches. Even for unambiguous cases, do this as a
|
||||
|
@ -49,26 +54,35 @@ esac
|
|||
case "${targ}" in
|
||||
# START OF targmatch.h
|
||||
#ifdef BFD64
|
||||
alpha-*-netware*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=nlm32_alpha_vec
|
||||
;;
|
||||
alpha-*-linuxecoff*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=bfd_elf64_alpha_vec
|
||||
;;
|
||||
alpha-*-linux* | alpha-*-elf*)
|
||||
alpha*-*-netbsd*)
|
||||
targ_defvec=bfd_elf64_alpha_vec
|
||||
targ_selvecs=ecoffalpha_little_vec
|
||||
;;
|
||||
alpha-*-*vms*)
|
||||
alpha*-*-netware*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=nlm32_alpha_vec
|
||||
;;
|
||||
alpha*-*-linuxecoff*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=bfd_elf64_alpha_vec
|
||||
;;
|
||||
alpha*-*-linux-gnu* | alpha*-*-elf*)
|
||||
targ_defvec=bfd_elf64_alpha_vec
|
||||
targ_selvecs=ecoffalpha_little_vec
|
||||
;;
|
||||
alpha*-*-*vms*)
|
||||
targ_defvec=evax_alpha_vec
|
||||
;;
|
||||
alpha-*-*)
|
||||
alpha*-*-*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
;;
|
||||
#endif /* BFD64 */
|
||||
|
||||
arc-*-elf*)
|
||||
targ_defvec=bfd_elf32_littlearc_vec
|
||||
targ_selvecs=bfd_elf32_bigarc_vec
|
||||
;;
|
||||
|
||||
arm-*-riscix*)
|
||||
targ_defvec=riscix_vec
|
||||
;;
|
||||
|
@ -90,7 +104,16 @@ case "${targ}" in
|
|||
targ_selvecs=armcoff_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
thumb-*-coff)
|
||||
targ_defvec=armcoff_little_vec
|
||||
targ_selvecs=armcoff_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
thumb-*-pe*)
|
||||
targ_defvec=armpe_little_vec
|
||||
targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
a29k-*-ebmon* | a29k-*-udi* | a29k-*-coff* | a29k-*-sym1* | \
|
||||
a29k-*-vxworks* | a29k-*-sysv*)
|
||||
targ_defvec=a29kcoff_big_vec
|
||||
|
@ -102,11 +125,19 @@ case "${targ}" in
|
|||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
c30-*-*aout* | tic30-*-*aout*)
|
||||
targ_defvec=tic30_aout_vec
|
||||
;;
|
||||
c30-*-*coff* | tic30-*-*coff*)
|
||||
targ_defvec=tic30_coff_vec
|
||||
;;
|
||||
|
||||
d10v-*-*)
|
||||
targ_defvec=bfd_elf32_d10v_vec
|
||||
;;
|
||||
|
||||
|
||||
|
||||
h8300*-*-*)
|
||||
targ_defvec=h8300coff_vec
|
||||
targ_underscore=yes
|
||||
|
@ -134,14 +165,21 @@ case "${targ}" in
|
|||
;;
|
||||
#endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */
|
||||
|
||||
i[3456]86-*-sco3.2v5*coff)
|
||||
targ_defvec=i386coff_vec
|
||||
;;
|
||||
i[3456]86-*-sysv4* | i[3456]86-*-unixware | i[3456]86-*-solaris2* | \
|
||||
i[3456]86-*-elf | i[3456]86-*-sco*elf* | i[3456]86-*-freebsdelf* | \
|
||||
i[3456]86-*-elf | i[3456]86-*-sco3.2v5* | i[3456]86-*-freebsdelf* | \
|
||||
i[3456]86-*-dgux*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs=i386coff_vec
|
||||
;;
|
||||
i[3456]86-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* )
|
||||
targ_defvec=go32coff_vec
|
||||
targ_selvecs="go32stubbedcoff_vec i386aout_vec"
|
||||
;;
|
||||
i[3456]86-*-sysv* | i[3456]86-*-isc* | i[3456]86-*-sco* | i[3456]86-*-coff | \
|
||||
i[3456]86-*-aix* | i[3456]86-*-go32* | i[3456]86*-*-rtems*)
|
||||
i[3456]86-*-aix* | i[3456]86*-*-rtems*)
|
||||
targ_defvec=i386coff_vec
|
||||
;;
|
||||
i[3456]86-sequent-bsd*)
|
||||
|
@ -171,7 +209,7 @@ case "${targ}" in
|
|||
targ_selvecs=bfd_elf32_i386_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
i[3456]86-*-linux*)
|
||||
i[3456]86-*-linux-gnu*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs=i386linux_vec
|
||||
;;
|
||||
|
@ -181,8 +219,6 @@ case "${targ}" in
|
|||
;;
|
||||
i[3456]86-*-gnu*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs=i386mach3_vec
|
||||
targ_cflags=-DSTAT_FOR_EXEC
|
||||
;;
|
||||
i[3456]86-*-mach* | i[3456]86-*-osf1mk*)
|
||||
targ_defvec=i386mach3_vec
|
||||
|
@ -200,7 +236,7 @@ case "${targ}" in
|
|||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs="i386msdos_vec i386aout_vec"
|
||||
;;
|
||||
i[3456]86-*-cygwin32 | i[3456]86-*-winnt | i[3456]86-*-pe)
|
||||
i[3456]86-*-mingw32* | i[3456]86-*-cygwin32* | i[3456]86-*-winnt | i[3456]86-*-pe)
|
||||
targ_defvec=i386pe_vec
|
||||
targ_selvecs="i386pe_vec i386pei_vec"
|
||||
;;
|
||||
|
@ -277,7 +313,7 @@ case "${targ}" in
|
|||
targ_selvecs=bfd_elf32_m68k_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
m68*-*-linux*)
|
||||
m68*-*-linux-gnu*)
|
||||
targ_defvec=bfd_elf32_m68k_vec
|
||||
targ_selvecs=m68klinux_vec
|
||||
;;
|
||||
|
@ -335,9 +371,13 @@ case "${targ}" in
|
|||
targ_defvec=ecoff_big_vec
|
||||
targ_selvecs=ecoff_little_vec
|
||||
;;
|
||||
mips-dec-netbsd*)
|
||||
mips-dec-netbsd* | mips*el*-*-netbsd*)
|
||||
targ_defvec=bfd_elf32_littlemips_vec
|
||||
targ_selvecs=bfd_elf32_bigmips_vec
|
||||
targ_selvecs="bfd_elf32_bigmips_vec ecoff_little_vec ecoff_big_vec"
|
||||
;;
|
||||
mips*-*-netbsd*)
|
||||
targ_defvec=bfd_elf32_bigmips_vec
|
||||
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
|
||||
;;
|
||||
mips*-dec-bsd*)
|
||||
targ_defvec=aout_mips_little_vec
|
||||
|
@ -395,11 +435,11 @@ case "${targ}" in
|
|||
targ_defvec=bfd_elf32_bigmips_vec
|
||||
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
|
||||
;;
|
||||
mips*el*-*-linux* | mips*el*-*-openbsd*)
|
||||
mips*el*-*-linux-gnu* | 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"
|
||||
;;
|
||||
mips*-*-linux* | mips*-*-openbsd*)
|
||||
mips*-*-linux-gnu* | mips*-*-openbsd*)
|
||||
targ_defvec=bfd_elf32_bigmips_vec
|
||||
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
|
||||
;;
|
||||
|
@ -425,7 +465,7 @@ case "${targ}" in
|
|||
targ_defvec=rs6000coff_vec
|
||||
;;
|
||||
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
|
||||
powerpc-*-solaris2* | powerpc-*-linux* | powerpc-*-rtems*)
|
||||
powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems*)
|
||||
targ_defvec=bfd_elf32_powerpc_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec ppcboot_vec"
|
||||
;;
|
||||
|
@ -437,12 +477,12 @@ case "${targ}" in
|
|||
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
|
||||
;;
|
||||
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
|
||||
powerpcle-*-solaris2* | powerpcle-*-linux*)
|
||||
powerpcle-*-solaris2* | powerpcle-*-linux-gnu*)
|
||||
targ_defvec=bfd_elf32_powerpcle_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec ppcboot_vec"
|
||||
;;
|
||||
|
||||
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin32)
|
||||
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin32*)
|
||||
targ_defvec=bfd_powerpcle_pe_vec
|
||||
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
|
||||
;;
|
||||
|
@ -453,12 +493,12 @@ case "${targ}" in
|
|||
|
||||
sh-*-elf*)
|
||||
targ_defvec=bfd_elf32_sh_vec
|
||||
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec"
|
||||
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
sh-*-*)
|
||||
sh-*-* | sh-*-rtems*)
|
||||
targ_defvec=shcoff_vec
|
||||
targ_selvecs="shcoff_vec shlcoff_vec"
|
||||
targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
|
@ -467,12 +507,15 @@ case "${targ}" in
|
|||
targ_selvecs=sparcle_aout_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
sparclite-*-elf*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
;;
|
||||
sparc-*-linux*aout*)
|
||||
targ_defvec=sparclinux_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
sparc-*-linux*)
|
||||
sparc-*-linux-gnu*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="sparclinux_vec sunos_big_vec"
|
||||
;;
|
||||
|
@ -491,20 +534,24 @@ case "${targ}" in
|
|||
sparc-*-sysv4*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
;;
|
||||
sparc-*-netware*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="nlm32_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
#ifdef BFD64
|
||||
sparc64-*-aout*)
|
||||
targ_defvec=sunos_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
#ifdef BFD64
|
||||
sparc64-*-linux-gnu*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
|
||||
;;
|
||||
sparc64-*-elf*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs=bfd_elf32_sparc_vec
|
||||
;;
|
||||
#endif /* BFD64 */
|
||||
sparc-*-netware*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="nlm32_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
sparc*-*-coff*)
|
||||
targ_defvec=sparccoff_vec
|
||||
;;
|
||||
|
@ -520,6 +567,9 @@ case "${targ}" in
|
|||
;;
|
||||
#endif
|
||||
|
||||
v850-*-*)
|
||||
targ_defvec=bfd_elf32_v850_vec
|
||||
;;
|
||||
#if HAVE_host_aout_vec
|
||||
vax-*-bsd* | vax-*-ultrix*)
|
||||
targ_defvec=host_aout_vec
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
/* config.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Name of package. */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version of package. */
|
||||
#undef VERSION
|
||||
|
||||
/* Whether strstr must be declared even if <string.h> is included. */
|
||||
#undef NEED_DECLARATION_STRSTR
|
||||
|
||||
|
@ -39,6 +45,9 @@
|
|||
/* Define if you have the fcntl function. */
|
||||
#undef HAVE_FCNTL
|
||||
|
||||
/* Define if you have the fdopen function. */
|
||||
#undef HAVE_FDOPEN
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
|
|
1706
contrib/binutils/bfd/configure
vendored
1706
contrib/binutils/bfd/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -11,24 +11,15 @@
|
|||
# host64 set to true if 64 bit types are as fast as 32 bit
|
||||
# HOST_64BIT_TYPE host 64 bit type
|
||||
# HOST_U_64BIT_TYPE unsigned 64 bit type (not needed if 64BIT_TYPE is long)
|
||||
# SHLIB_CC compiler to use when building shared library
|
||||
# SHLIB_CFLAGS flags to use when building shared library
|
||||
# SHLIB_LIBS libraries to use when building shared library
|
||||
# PICFLAG may be set to flag to use to compile PIC
|
||||
# SHLINK may be set to the name to link the shared library to
|
||||
# ALLLIBS may be set to libraries to build
|
||||
# HLDFLAGS LDFLAGS specific to the host
|
||||
# HLDENV environment variable to set when linking for the host
|
||||
# RPATH_ENVVAR environment variable used to find shared libraries
|
||||
# INSTALL_SHLIB install a shared library
|
||||
|
||||
HDEFINES=
|
||||
host64=false
|
||||
HOST_64BIT_TYPE=
|
||||
HOST_U_64BIT_TYPE=
|
||||
|
||||
case "${host}" in
|
||||
|
||||
alpha-*-*) host64=true; HOST_64BIT_TYPE=long ;;
|
||||
alpha*-*-*) host64=true; HOST_64BIT_TYPE=long ;;
|
||||
|
||||
hppa*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX ;;
|
||||
hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
|
||||
|
@ -76,96 +67,3 @@ m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
|
|||
ac_cv_header_unistd_h=no
|
||||
;;
|
||||
esac
|
||||
|
||||
# If we are configuring with --enable-shared, adjust the shared
|
||||
# library support based on the host. This support must work for both
|
||||
# the BFD and the opcodes libraries.
|
||||
HLDFLAGS=
|
||||
HLDENV=
|
||||
RPATH_ENVVAR=LD_LIBRARY_PATH
|
||||
SHLIB_CC='$(CC)'
|
||||
SHLIB_CFLAGS='-shared'
|
||||
SHLIB_LIBS=
|
||||
INSTALL_SHLIB='$(INSTALL_PROGRAM) $$f $(libdir)/$$tf;'
|
||||
if [ "${shared}" = "true" ]; then
|
||||
case "${host}" in
|
||||
hppa*-*-*) picfrag=${srcdir}/../config/mh-papic ;;
|
||||
i[34566]86-*-*) picfrag=${srcdir}/../config/mh-x86pic ;;
|
||||
*-*-*) picfrag=${srcdir}/../config/mh-${host_cpu}pic ;;
|
||||
esac
|
||||
if [ -f "${picfrag}" ]; then
|
||||
pic=`sed -n -e 's/^PICFLAG[ ]*=[ ]*\(.*\)$/\1/p' ${picfrag}`
|
||||
if [ -n "${pic}" ]; then
|
||||
PICFLAG=${pic}
|
||||
fi
|
||||
fi
|
||||
|
||||
case "${host}" in
|
||||
*-dec-osf*)
|
||||
# -fpic is not needed on the Alpha.
|
||||
PICFLAG=
|
||||
HLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
|
||||
;;
|
||||
*-*-hpux*)
|
||||
# HP/UX uses .sl for shared libraries.
|
||||
SHLINK=`echo ${SHLINK} | sed -e 's/so$/sl/'`
|
||||
SHLIB_CFLAGS='-shared $(PICFLAG)'
|
||||
HLDFLAGS='-Wl,+s,+b,$(libdir)'
|
||||
RPATH_ENVVAR=SHLIB_PATH
|
||||
INSTALL_SHLIB='$(INSTALL_PROGRAM) $$f $(libdir)/$$tf; chmod -w $(libdir)/$$tf;'
|
||||
;;
|
||||
*-*-irix[56]*)
|
||||
# -fpic is not needed on Irix 5 or 6.
|
||||
PICFLAG=
|
||||
SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
|
||||
HLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
;;
|
||||
*-*-linux*aout*)
|
||||
;;
|
||||
*-*-linux*)
|
||||
SHLIB_CFLAGS='-shared -Wl,-soname,$(SONAME)'
|
||||
case "${libdir}" in
|
||||
/lib | /usr/lib) ;;
|
||||
*) HLDFLAGS='-Wl,-rpath,$(libdir)' ;;
|
||||
esac
|
||||
# On Linux, apparently, linking against -lc lets ldconfig figure
|
||||
# out which version of libc should be used.
|
||||
SHLIB_LIBS=-lc
|
||||
;;
|
||||
*-*-solaris*)
|
||||
SHLIB_CFLAGS='-shared -h $(SONAME)'
|
||||
HLDFLAGS='-R $(libdir)'
|
||||
;;
|
||||
*-*-sysv4*)
|
||||
SHLIB_CFLAGS='-shared -h $(SONAME)'
|
||||
HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
|
||||
;;
|
||||
*-*-sunos*)
|
||||
# Build a libTARGET-bfd.so.VERSION symlink in the object directory.
|
||||
ALLLIBS=`echo ${ALLLIBS} | sed -e 's/\$(SHLINK)/stamp-tshlink/'`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# On SunOS, if the linker supports the -rpath option, use it to
|
||||
# prevent ../bfd and ../opcodes from being included in the run time
|
||||
# search path.
|
||||
case "${host}" in
|
||||
*-*-sunos*)
|
||||
echo 'main () { }' > conftest.c
|
||||
${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
|
||||
if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
|
||||
:
|
||||
elif grep 'No such file' conftest.t >/dev/null 2>&1; then
|
||||
:
|
||||
elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
|
||||
:
|
||||
elif [ "${shared}" = "true" ]; then
|
||||
HLDFLAGS='-Wl,-rpath=$(libdir)'
|
||||
else
|
||||
HLDFLAGS='-Wl,-rpath='
|
||||
fi
|
||||
rm -f conftest.t conftest.c conftest
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,8 +1,25 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(libbfd.c)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_ISC_POSIX
|
||||
|
||||
AM_INIT_AUTOMAKE(bfd, 2.9.1)
|
||||
|
||||
dnl These must be called before AM_PROG_LIBTOOL, because it may want
|
||||
dnl to call AC_CHECK_PROG.
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
dnl Default to a non shared library. This may be overridden by the
|
||||
dnl configure option --enable-shared.
|
||||
AM_DISABLE_SHARED
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_ARG_ENABLE(64-bit-bfd,
|
||||
[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
|
||||
[case "${enableval}" in
|
||||
|
@ -18,14 +35,6 @@ AC_ARG_ENABLE(targets,
|
|||
no) enable_targets= ;;
|
||||
*) enable_targets=$enableval ;;
|
||||
esac])dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
[ --enable-shared build shared BFD library],
|
||||
[case "${enableval}" in
|
||||
yes) shared=true ;;
|
||||
no) shared=false ;;
|
||||
*bfd*) shared=true ;;
|
||||
*) shared=false ;;
|
||||
esac])dnl
|
||||
AC_ARG_ENABLE(commonbfdlib,
|
||||
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
|
||||
[case "${enableval}" in
|
||||
|
@ -41,79 +50,29 @@ AC_ARG_WITH(mmap,
|
|||
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
|
||||
esac],[want_mmap=false])dnl
|
||||
|
||||
AC_CONFIG_HEADER(config.h:config.in)
|
||||
AM_CONFIG_HEADER(config.h:config.in)
|
||||
|
||||
AC_CONFIG_AUX_DIR(`cd $srcdir/..;pwd`)
|
||||
AC_CANONICAL_SYSTEM
|
||||
if test -z "$target" ; then
|
||||
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
|
||||
fi
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AM_CYGWIN32
|
||||
AM_EXEEXT
|
||||
|
||||
host64=false
|
||||
target64=false
|
||||
|
||||
# host stuff:
|
||||
|
||||
ALLLIBS='$(TARGETLIB)'
|
||||
PICFLAG=
|
||||
SHLIB=unused-shlib
|
||||
SHLINK=unused-shlink
|
||||
if test "${shared}" = "true"; then
|
||||
PICFLAG=-fpic
|
||||
if test "${commonbfdlib}" = "true"; then
|
||||
ALLLIBS='$(TARGETLIB)'
|
||||
else
|
||||
ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
|
||||
changequote(,)dnl
|
||||
SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION`
|
||||
changequote([,])dnl
|
||||
SHLINK=libbfd.so
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
AC_ISC_POSIX
|
||||
|
||||
# Permit host specific settings.
|
||||
. ${srcdir}/configure.host
|
||||
|
||||
AC_SUBST(HDEFINES)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
AC_PROG_INSTALL
|
||||
|
||||
if test "${shared}" = "true"; then
|
||||
if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
|
||||
AC_MSG_WARN([BFD --enable-shared only supported when using gcc])
|
||||
shared=false
|
||||
ALLLIBS='$(TARGETLIB)'
|
||||
PICFLAG=
|
||||
SHLIB=unused-shlib
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ALLLIBS)
|
||||
AC_SUBST(PICFLAG)
|
||||
AC_SUBST(SHLIB)
|
||||
AC_SUBST(SHLIB_CC)
|
||||
AC_SUBST(SHLIB_CFLAGS)
|
||||
AC_SUBST(SHLIB_LIBS)
|
||||
if test "${commonbfdlib}" = "true"; then
|
||||
COMMON_SHLIB=yes
|
||||
PICLIST=piclist
|
||||
else
|
||||
COMMON_SHLIB=
|
||||
PICLIST=
|
||||
fi
|
||||
AC_SUBST(COMMON_SHLIB)
|
||||
AC_SUBST(PICLIST)
|
||||
AC_SUBST(SHLINK)
|
||||
AC_SUBST(INSTALL_SHLIB)
|
||||
|
||||
VERSION=`cat ${srcdir}/VERSION`
|
||||
AC_SUBST(VERSION)
|
||||
AM_PROG_INSTALL
|
||||
|
||||
BFD_HOST_64BIT_LONG=0
|
||||
BFD_HOST_64_BIT_DEFINED=0
|
||||
|
@ -136,7 +95,7 @@ BFD_CC_FOR_BUILD
|
|||
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
|
||||
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf)
|
||||
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen)
|
||||
|
||||
BFD_BINARY_FOPEN
|
||||
|
||||
|
@ -151,182 +110,185 @@ COREFILE=
|
|||
COREFLAG=
|
||||
if test "${target}" = "${host}"; then
|
||||
case "${host}" in
|
||||
alpha*-*-linux*)
|
||||
COREFILE=trad-core.o
|
||||
alpha*-*-linux-gnu*)
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/alphalinux.h")
|
||||
;;
|
||||
alpha*-*-*) COREFILE=osf-core.o ;;
|
||||
arm-*-riscix) COREFILE=trad-core.o ;;
|
||||
hppa*-*-hpux*) COREFILE=hpux-core.o ;;
|
||||
hppa*-*-hiux*) COREFILE=hpux-core.o ;;
|
||||
hppa*-*-bsd*) COREFILE="hpux-core.o hppabsd-core.o"
|
||||
alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
|
||||
alpha*-*-*) COREFILE=osf-core.lo ;;
|
||||
arm-*-riscix) COREFILE=trad-core.lo ;;
|
||||
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
|
||||
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
|
||||
hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
|
||||
COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-sequent-bsd*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o;
|
||||
COREFILE=trad-core.lo;
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-sequent-sysv4*) ;;
|
||||
i[3456]86-sequent-sysv*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/i386bsd.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
|
||||
changequote([,])dnl
|
||||
COREFILE=netbsd-core.o
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-esix-sysv3*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/esix.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-*-sco* | i[3456]86-*-isc*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/i386sco.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-*-mach3*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/i386mach3.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-*-linux*)
|
||||
i[3456]86-*-linux-gnu*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/i386linux.h")
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3456]86-*-isc*) COREFILE=trad-core.o ;;
|
||||
i[3456]86-*-aix*) COREFILE=aix386-core.o ;;
|
||||
i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
|
||||
i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
|
||||
changequote([,])dnl
|
||||
i860-*-mach3* | i860-*-osf1*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/i860mach3.h")
|
||||
;;
|
||||
mips-dec-bsd*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/mipsbsd.h")
|
||||
;;
|
||||
mips-dec-mach3*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
|
||||
;;
|
||||
mips-*-netbsd* | mips*-*-openbsd*)
|
||||
COREFILE=netbsd-core.o
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
mips-dec-*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/decstation.h")
|
||||
;;
|
||||
mips-sgi-irix4*) COREFILE=irix-core.o ;;
|
||||
mips-sgi-irix5*) COREFILE=irix-core.o ;;
|
||||
mips-sgi-irix6*) COREFILE=irix-core.o ;;
|
||||
mips-sgi-irix4*) COREFILE=irix-core.lo ;;
|
||||
mips-sgi-irix5*) COREFILE=irix-core.lo ;;
|
||||
mips-sgi-irix6*) COREFILE=irix-core.lo ;;
|
||||
mips-*-mach3*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
|
||||
;;
|
||||
mips-*-sysv4*) ;;
|
||||
mips-*-sysv* | mips-*-riscos*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/riscos.h")
|
||||
;;
|
||||
mips-sony-bsd*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/news-mips.h")
|
||||
;;
|
||||
m68*-bull*-sysv*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/dpx2.h")
|
||||
;;
|
||||
m68*-hp-hpux*) COREFILE=hpux-core.o ;;
|
||||
m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
|
||||
m68*-hp-bsd*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/hp300bsd.h")
|
||||
;;
|
||||
m68*-*-linux*)
|
||||
COREFILE=trad-core.o
|
||||
m68*-*-linux-gnu*)
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/m68klinux.h")
|
||||
;;
|
||||
m68*-motorola-sysv*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER, "hosts/delta68.h")
|
||||
;;
|
||||
m68*-sony-*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/news.h")
|
||||
;;
|
||||
m68*-*-netbsd* | m68*-*-openbsd*)
|
||||
COREFILE=netbsd-core.o
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
m68*-apple-aux*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/m68kaux.h")
|
||||
;;
|
||||
m88*-*-sysv4*) ;;
|
||||
m88*-motorola-sysv*) COREFILE=ptrace-core.o ;;
|
||||
m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
|
||||
m88*-*-mach3*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/m88kmach3.h")
|
||||
;;
|
||||
ns32k-pc532-mach)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/pc532mach.h")
|
||||
;;
|
||||
ns32k-*-netbsd* | ns32k-*-openbsd*)
|
||||
COREFILE=netbsd-core.o
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
rs6000-*-lynx*) COREFILE=lynx-core.o ;;
|
||||
rs6000-*-aix4*) COREFILE=rs6000-core.o ;;
|
||||
rs6000-*-*) COREFILE=rs6000-core.o ;;
|
||||
powerpc-*-*bsd*) COREFILE=netbsd-core.o ;;
|
||||
powerpc-*-aix4*) COREFILE=rs6000-core.o ;;
|
||||
powerpc-*-aix*) COREFILE=rs6000-core.o ;;
|
||||
rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
|
||||
rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
|
||||
rs6000-*-*) COREFILE=rs6000-core.lo ;;
|
||||
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
|
||||
powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
|
||||
powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
|
||||
powerpc-*-beos*) ;;
|
||||
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
|
||||
sparc-*-netbsd* | sparc-*-openbsd*)
|
||||
COREFILE=netbsd-core.o
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
tahoe-*-*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/tahoe.h")
|
||||
;;
|
||||
vax-*-ultrix2*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
|
||||
;;
|
||||
vax-*-ultrix*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
|
||||
;;
|
||||
vax-*-*)
|
||||
COREFILE=trad-core.o
|
||||
COREFILE=trad-core.lo
|
||||
AC_DEFINE(TRAD_HEADER,"hosts/vaxbsd.h")
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$COREFILE" in
|
||||
aix386-core.o) COREFLAG=-DAIX386_CORE ;;
|
||||
hppabsd-core.o) COREFLAG=-DHPPABSD_CORE ;;
|
||||
hpux-core.o) COREFLAG=-DHPUX_CORE ;;
|
||||
irix-core.o) COREFLAG=-DIRIX_CORE ;;
|
||||
lynx-core.o) COREFLAG=-DLYNX_CORE ;;
|
||||
osf-core.o) COREFLAG=-DOSF_CORE ;;
|
||||
ptrace-core.o) COREFLAG=-DPTRACE_CORE ;;
|
||||
rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;;
|
||||
trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
|
||||
aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
|
||||
hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
|
||||
hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
|
||||
irix-core.lo) COREFLAG=-DIRIX_CORE ;;
|
||||
lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
|
||||
netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
|
||||
osf-core.lo) COREFLAG=-DOSF_CORE ;;
|
||||
ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
|
||||
rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
|
||||
trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
|
||||
esac
|
||||
|
||||
# The ELF code uses the native <sys/procfs.h> to handle core files.
|
||||
|
@ -400,6 +362,7 @@ for i in $selvecs ; do
|
|||
done
|
||||
selvecs="$f"
|
||||
|
||||
|
||||
# uniq the architectures in all the configured targets.
|
||||
f=""
|
||||
for i in $selarchs ; do
|
||||
|
@ -413,135 +376,144 @@ selarchs="$f"
|
|||
# Target backend .o files.
|
||||
tb=
|
||||
|
||||
elf="elf.o elflink.o"
|
||||
elf="elf.lo elflink.lo dwarf2.lo"
|
||||
|
||||
for vec in $selvecs
|
||||
do
|
||||
case "$vec" in
|
||||
# This list is alphabetized to make it easy to compare
|
||||
# with the two vector lists in targets.c.
|
||||
a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;;
|
||||
a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o" ;;
|
||||
armcoff_little_vec) tb="$tb coff-arm.o cofflink.o " ;;
|
||||
armcoff_big_vec) tb="$tb coff-arm.o cofflink.o " ;;
|
||||
armpe_little_vec) tb="$tb pe-arm.o cofflink.o " ;;
|
||||
armpe_big_vec) tb="$tb pe-arm.o cofflink.o " ;;
|
||||
armpei_little_vec) tb="$tb pei-arm.o cofflink.o " ;;
|
||||
armpei_big_vec) tb="$tb pei-arm.o cofflink.o " ;;
|
||||
aout0_big_vec) tb="$tb aout0.o aout32.o" ;;
|
||||
aout_arm_big_vec) tb="$tb aout-arm.o aout32.o" ;;
|
||||
aout_arm_little_vec) tb="$tb aout-arm.o aout32.o" ;;
|
||||
aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o" ;;
|
||||
aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o" ;;
|
||||
apollocoff_vec) tb="$tb coff-apollo.o" ;;
|
||||
b_out_vec_big_host) tb="$tb bout.o aout32.o" ;;
|
||||
b_out_vec_little_host) tb="$tb bout.o aout32.o" ;;
|
||||
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.o elf64.o $elf"
|
||||
a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
|
||||
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
|
||||
armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
|
||||
armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
|
||||
armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
|
||||
armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;;
|
||||
armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
|
||||
armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
|
||||
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
|
||||
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
|
||||
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
|
||||
aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
|
||||
aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
|
||||
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
|
||||
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
|
||||
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
|
||||
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
|
||||
target64=true ;;
|
||||
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
|
||||
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
|
||||
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
|
||||
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
|
||||
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
|
||||
target64=true ;;
|
||||
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.o elf32.o $elf" ;;
|
||||
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o $elf" ;;
|
||||
bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o $elf" ;;
|
||||
bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o $elf" ;;
|
||||
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
|
||||
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
|
||||
bfd_elf64_littlemips_vec) tb="$tb elf64-mips.o elf64.o elf32-mips.o elf32.o $elf ecofflink.o"
|
||||
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
|
||||
bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
|
||||
target64=true ;;
|
||||
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.o elf32.o $elf" ;;
|
||||
bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;;
|
||||
bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;;
|
||||
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.o elf32.o $elf" ;;
|
||||
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.o elf32.o $elf" ;;
|
||||
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
|
||||
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
|
||||
bfd_elf32_sh_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;;
|
||||
bfd_elf32_shl_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;;
|
||||
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o $elf" ;;
|
||||
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
|
||||
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
|
||||
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
|
||||
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
|
||||
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
|
||||
target64=true ;;
|
||||
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
|
||||
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
|
||||
target64=true ;;
|
||||
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf"
|
||||
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
|
||||
target64=true ;;
|
||||
cisco_core_vec) tb="$tb cisco-core.o" ;;
|
||||
demo_64_vec) tb="$tb demo64.o aout64.o"
|
||||
cisco_core_vec) tb="$tb cisco-core.lo" ;;
|
||||
demo_64_vec) tb="$tb demo64.lo aout64.lo"
|
||||
target64=true ;;
|
||||
ecoff_big_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
|
||||
ecoff_little_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
|
||||
ecoff_biglittle_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
|
||||
ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o"
|
||||
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
|
||||
ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
|
||||
ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
|
||||
ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
|
||||
target64=true ;;
|
||||
evax_alpha_vec) tb="$tb evax-alpha.o evax-emh.o evax-egsd.o evax-etir.o evax-misc.o"
|
||||
go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
|
||||
go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
|
||||
evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
|
||||
target64=true ;;
|
||||
h8300coff_vec) tb="$tb coff-h8300.o reloc16.o" ;;
|
||||
h8500coff_vec) tb="$tb coff-h8500.o reloc16.o" ;;
|
||||
host_aout_vec) tb="$tb host-aout.o aout32.o" ;;
|
||||
hp300bsd_vec) tb="$tb hp300bsd.o aout32.o" ;;
|
||||
hp300hpux_vec) tb="$tb hp300hpux.o aout32.o" ;;
|
||||
i386aout_vec) tb="$tb i386aout.o aout32.o" ;;
|
||||
i386bsd_vec) tb="$tb i386bsd.o aout32.o" ;;
|
||||
i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;;
|
||||
i386dynix_vec) tb="$tb i386dynix.o aout32.o" ;;
|
||||
i386freebsd_vec) tb="$tb i386freebsd.o aout32.o" ;;
|
||||
i386msdos_vec) tb="$tb i386msdos.o" ;;
|
||||
i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;;
|
||||
i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;;
|
||||
i386linux_vec) tb="$tb i386linux.o aout32.o" ;;
|
||||
i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o" ;;
|
||||
i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o" ;;
|
||||
i386mach3_vec) tb="$tb i386mach3.o aout32.o" ;;
|
||||
i386netbsd_vec) tb="$tb i386netbsd.o aout32.o" ;;
|
||||
i386os9k_vec) tb="$tb i386os9k.o aout32.o" ;;
|
||||
i860coff_vec) tb="$tb coff-i860.o cofflink.o" ;;
|
||||
icoff_big_vec) tb="$tb coff-i960.o cofflink.o" ;;
|
||||
icoff_little_vec) tb="$tb coff-i960.o cofflink.o" ;;
|
||||
ieee_vec) tb="$tb ieee.o" ;;
|
||||
m68kcoff_vec) tb="$tb coff-m68k.o cofflink.o" ;;
|
||||
m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
|
||||
m68klinux_vec) tb="$tb m68klinux.o aout32.o" ;;
|
||||
m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o" ;;
|
||||
m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o" ;;
|
||||
m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o" ;;
|
||||
m68k4knetbsd_vec) tb="$tb m68k4knetbsd.o aout32.o" ;;
|
||||
m68kaux_coff_vec) tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
|
||||
m68ksysvcoff_vec) tb="$tb coff-svm68k.o cofflink.o" ;;
|
||||
m88kbcs_vec) tb="$tb coff-m88k.o" ;;
|
||||
newsos3_vec) tb="$tb newsos3.o aout32.o" ;;
|
||||
nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
|
||||
nlm32_sparc_vec) tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
|
||||
nlm32_alpha_vec) tb="$tb nlm32-alpha.o nlm32.o nlm.o"
|
||||
h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
|
||||
h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
|
||||
host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
|
||||
hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
|
||||
hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
|
||||
i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
|
||||
i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
|
||||
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
|
||||
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
|
||||
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
|
||||
i386msdos_vec) tb="$tb i386msdos.lo" ;;
|
||||
i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
|
||||
i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
|
||||
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
|
||||
i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
|
||||
i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
|
||||
i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
|
||||
i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
|
||||
i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
|
||||
i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
|
||||
icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
|
||||
icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
|
||||
ieee_vec) tb="$tb ieee.lo" ;;
|
||||
m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
|
||||
m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
|
||||
m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
|
||||
m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
|
||||
m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
|
||||
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
|
||||
m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
|
||||
m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
|
||||
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
|
||||
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
|
||||
newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
|
||||
nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
|
||||
nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
|
||||
nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
|
||||
target64=true ;;
|
||||
riscix_vec) tb="$tb aout32.o riscix.o" ;;
|
||||
nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
|
||||
pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o" ;;
|
||||
pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o" ;;
|
||||
pmac_xcoff_vec) tb="$tb coff-pmac.o xcofflink.o" ;;
|
||||
rs6000coff_vec) tb="$tb coff-rs6000.o xcofflink.o" ;;
|
||||
bfd_powerpc_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
|
||||
bfd_powerpcle_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
|
||||
bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
|
||||
bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
|
||||
ppcboot_vec) tb="$tb ppcboot.o" ;;
|
||||
shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
|
||||
shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
|
||||
som_vec) tb="$tb som.o" ;;
|
||||
sparcle_aout_vec) tb="$tb aout-sparcle.o aout32.o" ;;
|
||||
sparclinux_vec) tb="$tb sparclinux.o aout32.o stab-syms.o" ;;
|
||||
sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o" ;;
|
||||
sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o" ;;
|
||||
sparcnetbsd_vec) tb="$tb sparcnetbsd.o aout32.o" ;;
|
||||
sparccoff_vec) tb="$tb coff-sparc.o" ;;
|
||||
srec_vec) tb="$tb srec.o" ;;
|
||||
sunos_big_vec) tb="$tb sunos.o aout32.o" ;;
|
||||
symbolsrec_vec) tb="$tb srec.o" ;;
|
||||
tekhex_vec) tb="$tb tekhex.o" ;;
|
||||
we32kcoff_vec) tb="$tb coff-we32k.o" ;;
|
||||
z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;;
|
||||
w65_vec) tb="$tb coff-w65.o reloc16.o" ;;
|
||||
versados_vec) tb="$tb versados.o" ;;
|
||||
riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
|
||||
nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
|
||||
pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
|
||||
pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
|
||||
pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
|
||||
rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
|
||||
bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
|
||||
bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
|
||||
bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
|
||||
bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
|
||||
ppcboot_vec) tb="$tb ppcboot.lo" ;;
|
||||
shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
|
||||
shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
|
||||
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
|
||||
shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
|
||||
som_vec) tb="$tb som.lo" ;;
|
||||
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
|
||||
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
|
||||
sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
|
||||
sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
|
||||
sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
|
||||
sparccoff_vec) tb="$tb coff-sparc.lo" ;;
|
||||
srec_vec) tb="$tb srec.lo" ;;
|
||||
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
|
||||
symbolsrec_vec) tb="$tb srec.lo" ;;
|
||||
tekhex_vec) tb="$tb tekhex.lo" ;;
|
||||
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
|
||||
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
|
||||
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
|
||||
z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
|
||||
w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
|
||||
versados_vec) tb="$tb versados.lo" ;;
|
||||
|
||||
"") ;;
|
||||
*) AC_MSG_ERROR(*** unknown target vector $vec) ;;
|
||||
|
@ -551,7 +523,7 @@ done
|
|||
# Target architecture .o files.
|
||||
# A couple of CPUs use shorter file names to avoid problems on DOS
|
||||
# filesystems.
|
||||
ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
|
||||
ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
|
||||
|
||||
# Weed out duplicate .o files.
|
||||
f=""
|
||||
|
@ -627,5 +599,4 @@ 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,
|
||||
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
|
||||
AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h)
|
||||
|
|
70
contrib/binutils/bfd/cpu-arc.c
Normal file
70
contrib/binutils/bfd/cpu-arc.c
Normal file
|
@ -0,0 +1,70 @@
|
|||
/* BFD support for the ARC processor
|
||||
Copyright 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Doug Evans (dje@cygnus.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#define ARC(mach, print_name, default_p, next) \
|
||||
{ \
|
||||
32, /* 32 bits in a word */ \
|
||||
32, /* 32 bits in an address */ \
|
||||
8, /* 8 bits in a byte */ \
|
||||
bfd_arch_arc, \
|
||||
mach, \
|
||||
"arc", \
|
||||
print_name, \
|
||||
4, /* section alignment power */ \
|
||||
default_p, \
|
||||
bfd_default_compatible, \
|
||||
bfd_default_scan, \
|
||||
next, \
|
||||
}
|
||||
|
||||
#if 0 /* ??? Not currently needed, but keep in for future reference. */
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
ARC (bfd_mach_arc_foo, "arc-foo", false, &arch_info_struct[1]),
|
||||
ARC (bfd_mach_arc_bar, "arc-bar", false, 0),
|
||||
};
|
||||
#endif
|
||||
|
||||
const bfd_arch_info_type bfd_arc_arch =
|
||||
ARC (bfd_mach_arc_base, "arc-base", true, 0 /*&arch_info_struct[0]*/);
|
||||
|
||||
/* Utility routines. */
|
||||
|
||||
/* Given cpu type NAME, return its bfd_mach_arc_xxx value.
|
||||
Returns -1 if not found. */
|
||||
|
||||
int
|
||||
arc_get_mach (name)
|
||||
char *name;
|
||||
{
|
||||
const bfd_arch_info_type *p;
|
||||
|
||||
for (p = &bfd_arc_arch; p != NULL; p = p->next)
|
||||
{
|
||||
/* +4: skip over "arc-" */
|
||||
if (strcmp (name, p->printable_name + 4) == 0)
|
||||
return p->mach;
|
||||
}
|
||||
return -1;
|
||||
}
|
|
@ -23,15 +23,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#include "libbfd.h"
|
||||
|
||||
|
||||
int bfd_default_scan_num_mach();
|
||||
|
||||
static boolean
|
||||
scan_mach (info, string)
|
||||
const struct bfd_arch_info *info;
|
||||
const char *string;
|
||||
{
|
||||
if (strcmp(string,"sh") == 0) return true;
|
||||
if (strcmp(string,"SH") == 0) return true;
|
||||
if (strcasecmp (info->printable_name, string) == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -51,18 +49,69 @@ compatible (a,b)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define SH_NEXT &arch_info_struct[0]
|
||||
#define SH3_NEXT &arch_info_struct[1]
|
||||
#define SH3E_NEXT &arch_info_struct[2]
|
||||
#define SH4_NEXT NULL
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_sh,
|
||||
bfd_mach_sh3,
|
||||
"sh", /* arch_name */
|
||||
"sh3", /* printable name */
|
||||
1,
|
||||
false, /* not the default */
|
||||
bfd_default_compatible,
|
||||
scan_mach,
|
||||
SH3_NEXT
|
||||
},
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_sh,
|
||||
bfd_mach_sh3e,
|
||||
"sh", /* arch_name */
|
||||
"sh3e", /* printable name */
|
||||
1,
|
||||
false, /* not the default */
|
||||
bfd_default_compatible,
|
||||
scan_mach,
|
||||
SH3E_NEXT
|
||||
},
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_sh,
|
||||
bfd_mach_sh4,
|
||||
"sh", /* arch_name */
|
||||
"sh4", /* printable name */
|
||||
1,
|
||||
false, /* not the default */
|
||||
bfd_default_compatible,
|
||||
scan_mach,
|
||||
SH4_NEXT
|
||||
},
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_sh_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_sh,
|
||||
0, /* only 1 machine */
|
||||
bfd_mach_sh,
|
||||
"sh", /* arch_name */
|
||||
"sh", /* printable name */
|
||||
1,
|
||||
true, /* the default machine */
|
||||
bfd_default_compatible,
|
||||
scan_mach,
|
||||
0,
|
||||
SH_NEXT
|
||||
};
|
||||
|
|
39
contrib/binutils/bfd/cpu-tic30.c
Normal file
39
contrib/binutils/bfd/cpu-tic30.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* BFD support for the Texas Instruments TMS320C30 architecture.
|
||||
Copyright 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
const bfd_arch_info_type bfd_tic30_arch =
|
||||
{
|
||||
32, /* 32 bits in a word */
|
||||
32, /* 32 bits in an address */
|
||||
8, /* 8 bits in a byte */
|
||||
bfd_arch_tic30,
|
||||
0, /* only 1 machine */
|
||||
"tic30",
|
||||
"tms320c30",
|
||||
2,
|
||||
true, /* the one and only */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
0,
|
||||
};
|
94
contrib/binutils/bfd/cpu-v850.c
Normal file
94
contrib/binutils/bfd/cpu-v850.c
Normal file
|
@ -0,0 +1,94 @@
|
|||
/* BFD support for the NEC V850 processor
|
||||
Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
static boolean
|
||||
scan (info, string)
|
||||
const struct bfd_arch_info * info;
|
||||
const char * string;
|
||||
{
|
||||
const char *ptr_src;
|
||||
const char *ptr_tst;
|
||||
unsigned long number;
|
||||
enum bfd_architecture arch;
|
||||
|
||||
/* First test for an exact match */
|
||||
if (strcasecmp (string, info->printable_name) == 0)
|
||||
return true;
|
||||
|
||||
/* See how much of the supplied string matches with the
|
||||
architecture, eg the string m68k:68020 would match the m68k entry
|
||||
up to the :, then we get left with the machine number */
|
||||
|
||||
for (ptr_src = string, ptr_tst = info->arch_name;
|
||||
*ptr_src && *ptr_tst;
|
||||
ptr_src++, ptr_tst++)
|
||||
{
|
||||
if (*ptr_src != *ptr_tst) break;
|
||||
}
|
||||
|
||||
/* Chewed up as much of the architecture as will match, skip any
|
||||
colons */
|
||||
if (*ptr_src == ':')
|
||||
ptr_src++;
|
||||
|
||||
if (*ptr_src == 0)
|
||||
{
|
||||
/* nothing more, then only keep this one if it is the default
|
||||
machine for this architecture */
|
||||
return info->the_default;
|
||||
}
|
||||
|
||||
number = 0;
|
||||
while (isdigit ((unsigned char) *ptr_src))
|
||||
{
|
||||
number = number * 10 + * ptr_src - '0';
|
||||
ptr_src++;
|
||||
}
|
||||
|
||||
switch (number)
|
||||
{
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arch != info->arch)
|
||||
return false;
|
||||
|
||||
if (number != info->mach)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#define N(number, print, default, next) \
|
||||
{ 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, \
|
||||
bfd_default_compatible, scan, next }
|
||||
|
||||
#define NEXT NULL
|
||||
|
||||
|
||||
const bfd_arch_info_type bfd_v850_arch =
|
||||
N (bfd_mach_v850, "v850", true, NEXT);
|
|
@ -3,6 +3,7 @@
|
|||
s/\\\n */ /g
|
||||
t loop
|
||||
|
||||
s!\.o:!.lo:!
|
||||
s! @BFD_H@!!g
|
||||
s!@INCDIR@!$(INCDIR)!g
|
||||
s!@SRCDIR@/!!g
|
||||
|
|
|
@ -1,3 +1,78 @@
|
|||
Mon Apr 6 14:06:55 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (STAGESTUFF): Remove variable.
|
||||
(CLEANFILES): Don't remove $(STAGESTUFF).
|
||||
(DISTCLEANFILES, MAINTAINERCLEANFILES): New variables.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fri Mar 27 16:25:25 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* chew.c (skip_white_and_starts): Remove unused declaration.
|
||||
(skip_white_and_stars): Add casts to avoid warnings.
|
||||
(skip_trailing_newlines, paramstuff, courierize): Likewise.
|
||||
(bulletize, do_fancy_stuff, iscommand): Likewise.
|
||||
(kill_bogus_lines, nextword, main): Likewise.
|
||||
(manglecomments): Comment out.
|
||||
(outputdots, kill_bogus_lines): Remove unused local variables.
|
||||
(perform, compile): Likewise.
|
||||
(courierize): Fully parenthesize expression.
|
||||
(copy_past_newline): Declare return value.
|
||||
(print): Change printf format string.
|
||||
(main): Call usage for an unrecognized option.
|
||||
|
||||
Fri Feb 13 14:37:14 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (AUTOMAKE_OPTIONS): Define.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Mon Jan 26 15:38:36 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* doc.str (bodytext): Don't output @* at the end.
|
||||
* chew.c (kill_bogus_lines): Make sure that a period at the
|
||||
beginning is recognized.
|
||||
(indent): Don't put indentation at the end.
|
||||
(copy_past_newline): Expand tabs.
|
||||
* Makefile.am (s-reloc, s-syms): Depend on doc.str.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Wed Oct 1 14:41:28 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (libbfd.h): Don't use cpu-h8300.c, cpu-i960.c, or
|
||||
elfcode.h as input files; they don't contribute anything.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fri Aug 15 04:55:15 1997 Doug Evans <dje@canuck.cygnus.com>
|
||||
|
||||
* Makefile.am (libbfd.h, libcoff.h): Invoke $(MKDOC) as ./$(MKDOC).
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fri Aug 1 12:59:58 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (CC_FOR_BUILD): Don't set explicitly.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Thu Jul 31 20:00:12 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am: New file, based on old Makefile.in.
|
||||
* Makefile.in: Now built with automake.
|
||||
|
||||
Tue Jul 22 14:44:00 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
|
||||
|
||||
* Makefile.in: Change stamp-* files to s-* files. Use bfdt.texi
|
||||
rather than bfd.texi.
|
||||
(DOCFILES): Change bfd.texi to bfdt.texi.
|
||||
* bfd.texinfo: Include bfdt.texi, not bfd.texi.
|
||||
|
||||
Mon Jun 16 15:33:15 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (CC, CFLAGS): Substitute from configure script.
|
||||
From Jeff Makey <jeff@cts.com>.
|
||||
|
||||
Tue Apr 15 12:37:41 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (install-info): Use mkinstalldirs to build
|
||||
$(infodir).
|
||||
|
||||
Tue Apr 8 12:49:46 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (install-info): Permit info files to be in srcdir.
|
||||
|
|
248
contrib/binutils/bfd/doc/Makefile.am
Normal file
248
contrib/binutils/bfd/doc/Makefile.am
Normal file
|
@ -0,0 +1,248 @@
|
|||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
DOCFILES = aoutx.texi archive.texi archures.texi \
|
||||
bfdt.texi cache.texi coffcode.texi \
|
||||
core.texi elf.texi elfcode.texi format.texi libbfd.texi \
|
||||
opncls.texi reloc.texi section.texi \
|
||||
syms.texi targets.texi init.texi hash.texi linker.texi
|
||||
|
||||
PROTOS = archive.p archures.p bfd.p \
|
||||
core.p format.p \
|
||||
libbfd.p opncls.p reloc.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
|
||||
# between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
|
||||
# you don't need these three:
|
||||
SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
|
||||
$(srcdir)/../archures.c $(srcdir)/../bfd.c \
|
||||
$(srcdir)/../cache.c $(srcdir)/../coffcode.h \
|
||||
$(srcdir)/../corefile.c $(srcdir)/../elf.c \
|
||||
$(srcdir)/../elfcode.h $(srcdir)/../format.c \
|
||||
$(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
|
||||
$(srcdir)/../reloc.c $(srcdir)/../section.c \
|
||||
$(srcdir)/../syms.c $(srcdir)/../targets.c \
|
||||
$(srcdir)/../hash.c $(srcdir)/../linker.c
|
||||
|
||||
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
|
||||
$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
|
||||
$(srcdir)/../format.c $(srcdir)/../libbfd.c \
|
||||
$(srcdir)/../opncls.c $(srcdir)/../reloc.c \
|
||||
$(srcdir)/../section.c $(srcdir)/../syms.c \
|
||||
$(srcdir)/../targets.c $(srcdir)/../init.c
|
||||
|
||||
SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.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)
|
||||
|
||||
$(MKDOC): chew.o
|
||||
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
|
||||
|
||||
chew.o: chew.c
|
||||
$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
|
||||
|
||||
protos: libbfd.h libcoff.h bfd.h
|
||||
|
||||
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.
|
||||
|
||||
s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
|
||||
$(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
|
||||
touch s-aoutx
|
||||
aoutx.texi: s-aoutx
|
||||
|
||||
s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
|
||||
$(srcdir)/../../move-if-change archive.tmp archive.texi
|
||||
touch s-archive
|
||||
archive.texi: s-archive
|
||||
|
||||
s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
|
||||
$(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
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
|
||||
$(srcdir)/../../move-if-change bfd.tmp bfdt.texi
|
||||
touch s-bfd
|
||||
bfdt.texi: s-bfd
|
||||
|
||||
s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
|
||||
$(srcdir)/../../move-if-change cache.tmp cache.texi
|
||||
touch s-cache
|
||||
cache.texi: s-cache
|
||||
|
||||
s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
|
||||
$(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
|
||||
touch s-coffcode
|
||||
coffcode.texi: s-coffcode
|
||||
|
||||
s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
|
||||
$(srcdir)/../../move-if-change core.tmp core.texi
|
||||
touch s-core
|
||||
core.texi: s-core
|
||||
|
||||
s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
|
||||
$(srcdir)/../../move-if-change elf.tmp elf.texi
|
||||
touch s-elf
|
||||
elf.texi: s-elf
|
||||
|
||||
s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
|
||||
$(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
|
||||
touch s-elfcode
|
||||
elfcode.texi: s-elfcode
|
||||
|
||||
s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
|
||||
$(srcdir)/../../move-if-change format.tmp format.texi
|
||||
touch s-format
|
||||
format.texi: s-format
|
||||
|
||||
s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
|
||||
$(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
|
||||
touch s-libbfd
|
||||
libbfd.texi: s-libbfd
|
||||
|
||||
s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
|
||||
$(srcdir)/../../move-if-change opncls.tmp opncls.texi
|
||||
touch s-opncls
|
||||
opncls.texi: s-opncls
|
||||
|
||||
s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
|
||||
$(srcdir)/../../move-if-change reloc.tmp reloc.texi
|
||||
touch s-reloc
|
||||
reloc.texi: s-reloc
|
||||
|
||||
s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
|
||||
$(srcdir)/../../move-if-change section.tmp section.texi
|
||||
touch s-section
|
||||
section.texi: s-section
|
||||
|
||||
s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
|
||||
$(srcdir)/../../move-if-change syms.tmp syms.texi
|
||||
touch s-syms
|
||||
syms.texi: s-syms
|
||||
|
||||
s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
|
||||
$(srcdir)/../../move-if-change targets.tmp targets.texi
|
||||
touch s-targets
|
||||
targets.texi: s-targets
|
||||
|
||||
s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
|
||||
$(srcdir)/../../move-if-change init.tmp init.texi
|
||||
touch s-init
|
||||
init.texi: s-init
|
||||
|
||||
s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
|
||||
$(srcdir)/../../move-if-change hash.tmp hash.texi
|
||||
touch s-hash
|
||||
hash.texi: s-hash
|
||||
|
||||
s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
|
||||
$(srcdir)/../../move-if-change linker.tmp linker.texi
|
||||
touch s-linker
|
||||
linker.texi: s-linker
|
||||
|
||||
libbfd.h: $(srcdir)/../libbfd-in.h \
|
||||
$(srcdir)/../init.c \
|
||||
$(srcdir)/../libbfd.c \
|
||||
$(srcdir)/../cache.c \
|
||||
$(srcdir)/../reloc.c \
|
||||
$(srcdir)/../archures.c \
|
||||
$(srcdir)/proto.str \
|
||||
$(MKDOC)
|
||||
cat $(srcdir)/../libbfd-in.h >libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
|
||||
|
||||
libcoff.h: $(srcdir)/../libcoff-in.h \
|
||||
$(srcdir)/../coffcode.h \
|
||||
$(srcdir)/proto.str \
|
||||
$(MKDOC)
|
||||
cat $(srcdir)/../libcoff-in.h >libcoff.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
|
||||
|
||||
bfd.h: $(srcdir)/../bfd-in.h \
|
||||
$(srcdir)/../init.c \
|
||||
$(srcdir)/../opncls.c \
|
||||
$(srcdir)/../libbfd.c \
|
||||
$(srcdir)/../section.c \
|
||||
$(srcdir)/../archures.c \
|
||||
$(srcdir)/../reloc.c \
|
||||
$(srcdir)/../syms.c \
|
||||
$(srcdir)/../bfd.c \
|
||||
$(srcdir)/../archive.c \
|
||||
$(srcdir)/../corefile.c \
|
||||
$(srcdir)/../targets.c \
|
||||
$(srcdir)/../format.c \
|
||||
$(srcdir)/proto.str \
|
||||
$(MKDOC)
|
||||
cat $(srcdir)/../bfd-in.h >bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
|
||||
echo "#ifdef __cplusplus" >>bfd.h
|
||||
echo "}" >>bfd.h
|
||||
echo "#endif" >>bfd.h
|
||||
echo "#endif" >>bfd.h
|
||||
|
||||
MOSTLYCLEANFILES = $(MKDOC) *.o
|
||||
|
||||
CLEANFILES = s-* *.p *.ip
|
||||
|
||||
DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
|
||||
|
||||
MAINTAINERCLEANFILES = $(DOCFILES)
|
|
@ -1,66 +1,98 @@
|
|||
#
|
||||
# Makefile
|
||||
# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation
|
||||
#
|
||||
# This file 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.
|
||||
#
|
||||
# Makefile.in generated automatically by automake 1.2e from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
|
||||
|
||||
# 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. */
|
||||
#
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
mandir = @mandir@
|
||||
man1dir = $(mandir)/man1
|
||||
man2dir = $(mandir)/man2
|
||||
man3dir = $(mandir)/man3
|
||||
man4dir = $(mandir)/man4
|
||||
man5dir = $(mandir)/man5
|
||||
man6dir = $(mandir)/man6
|
||||
man7dir = $(mandir)/man7
|
||||
man8dir = $(mandir)/man8
|
||||
man9dir = $(mandir)/man9
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
MKDOC=./chew
|
||||
SHELL = /bin/sh
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
TEXI2DVI = texi2dvi
|
||||
CFLAGS = -g
|
||||
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@
|
||||
AR = @AR@
|
||||
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@
|
||||
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
|
||||
CC = @CC@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
COREFILE = @COREFILE@
|
||||
COREFLAG = @COREFLAG@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
|
||||
HDEFINES = @HDEFINES@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NM = @NM@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
TDEFINES = @TDEFINES@
|
||||
VERSION = @VERSION@
|
||||
all_backends = @all_backends@
|
||||
bfd_backends = @bfd_backends@
|
||||
bfd_machines = @bfd_machines@
|
||||
tdefaults = @tdefaults@
|
||||
wordsize = @wordsize@
|
||||
|
||||
CC_FOR_BUILD = $(CC)
|
||||
|
||||
#### Host, target, and site specific Makefile fragments come in here.
|
||||
###
|
||||
|
||||
.c.o:
|
||||
$(CC) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $<
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
DOCFILES = aoutx.texi archive.texi archures.texi \
|
||||
bfd.texi cache.texi coffcode.texi \
|
||||
bfdt.texi cache.texi coffcode.texi \
|
||||
core.texi elf.texi elfcode.texi format.texi libbfd.texi \
|
||||
opncls.texi reloc.texi section.texi \
|
||||
syms.texi targets.texi init.texi hash.texi linker.texi
|
||||
|
@ -98,27 +130,213 @@ SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
|
|||
$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
|
||||
$(srcdir)/../init.c
|
||||
|
||||
STAGESTUFF = $(DOCFILES) *.info*
|
||||
|
||||
TEXIDIR = $(srcdir)/../../texinfo/fsf
|
||||
|
||||
all install:
|
||||
info_TEXINFOS = bfd.texinfo
|
||||
|
||||
info: bfd.info
|
||||
MKDOC = chew$(EXEEXT_FOR_BUILD)
|
||||
|
||||
dvi: bfd.dvi
|
||||
MOSTLYCLEANFILES = $(MKDOC) *.o
|
||||
|
||||
install-info: info
|
||||
if [ -r bfd.info ]; then \
|
||||
dir=.; \
|
||||
else \
|
||||
dir=$(srcdir); \
|
||||
fi; \
|
||||
for i in `cd $$dir; echo *.info*`; do \
|
||||
$(INSTALL_DATA) $$dir/$$i $(infodir)/$$i; \
|
||||
CLEANFILES = s-* *.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
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texi .texinfo
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
bfd.info: bfd.texinfo
|
||||
bfd.dvi: bfd.texinfo
|
||||
|
||||
|
||||
DVIPS = dvips
|
||||
|
||||
.texi.info:
|
||||
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
$(MAKEINFO) -I $(srcdir) $<
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.texi:
|
||||
@rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
$(MAKEINFO) -I $(srcdir) $<
|
||||
|
||||
.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) $<
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(infodir)
|
||||
@for file in $(INFO_DEPS); 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 $(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(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 \
|
||||
for file in $(INFO_DEPS); do \
|
||||
echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
|
||||
install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
|
||||
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; \
|
||||
for file in $(INFO_DEPS); do \
|
||||
test -z "$ii" \
|
||||
|| install-info --info-dir=$(infodir) --remove $$file; \
|
||||
done
|
||||
$(NORMAL_UNINSTALL)
|
||||
for file in $(INFO_DEPS); do \
|
||||
(cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
|
||||
done
|
||||
|
||||
docs: $(MKDOC) protos bfd.info bfd.dvi bfd.ps
|
||||
dist-info: $(INFO_DEPS)
|
||||
for base in $(INFO_DEPS); do \
|
||||
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; \
|
||||
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:
|
||||
|
||||
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; \
|
||||
done
|
||||
clean-info: mostlyclean-aminfo
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
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; \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
info: $(INFO_DEPS)
|
||||
dvi: $(DVIS)
|
||||
check:
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-info: install-info-am
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
all: Makefile
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
clean: clean-aminfo clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-aminfo distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
|
||||
distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
|
||||
distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \
|
||||
dvi installcheck install-info install-exec install-data install \
|
||||
uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
|
||||
|
||||
$(MKDOC): chew.o
|
||||
$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
|
||||
|
@ -128,159 +346,156 @@ chew.o: chew.c
|
|||
|
||||
protos: libbfd.h libcoff.h bfd.h
|
||||
|
||||
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 stamp-XXX targets so that we can distribute the info files,
|
||||
# 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.
|
||||
|
||||
stamp-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
|
||||
s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
|
||||
$(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
|
||||
touch stamp-aoutx
|
||||
aoutx.texi: stamp-aoutx
|
||||
touch s-aoutx
|
||||
aoutx.texi: s-aoutx
|
||||
|
||||
stamp-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
|
||||
s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
|
||||
$(srcdir)/../../move-if-change archive.tmp archive.texi
|
||||
touch stamp-archive
|
||||
archive.texi: stamp-archive
|
||||
touch s-archive
|
||||
archive.texi: s-archive
|
||||
|
||||
stamp-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
|
||||
s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
|
||||
$(srcdir)/../../move-if-change archures.tmp archures.texi
|
||||
touch stamp-archures
|
||||
archures.texi: stamp-archures
|
||||
touch s-archures
|
||||
archures.texi: s-archures
|
||||
|
||||
stamp-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
|
||||
$(srcdir)/../../move-if-change bfd.tmp bfd.texi
|
||||
touch stamp-bfd
|
||||
bfd.texi: stamp-bfd
|
||||
# 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
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
|
||||
$(srcdir)/../../move-if-change bfd.tmp bfdt.texi
|
||||
touch s-bfd
|
||||
bfdt.texi: s-bfd
|
||||
|
||||
stamp-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
|
||||
s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
|
||||
$(srcdir)/../../move-if-change cache.tmp cache.texi
|
||||
touch stamp-cache
|
||||
cache.texi: stamp-cache
|
||||
touch s-cache
|
||||
cache.texi: s-cache
|
||||
|
||||
stamp-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
|
||||
s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
|
||||
$(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
|
||||
touch stamp-coffcode
|
||||
coffcode.texi: stamp-coffcode
|
||||
touch s-coffcode
|
||||
coffcode.texi: s-coffcode
|
||||
|
||||
stamp-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
|
||||
s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
|
||||
$(srcdir)/../../move-if-change core.tmp core.texi
|
||||
touch stamp-core
|
||||
core.texi: stamp-core
|
||||
touch s-core
|
||||
core.texi: s-core
|
||||
|
||||
stamp-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
|
||||
s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
|
||||
$(srcdir)/../../move-if-change elf.tmp elf.texi
|
||||
touch stamp-elf
|
||||
elf.texi: stamp-elf
|
||||
touch s-elf
|
||||
elf.texi: s-elf
|
||||
|
||||
stamp-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
|
||||
s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
|
||||
$(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
|
||||
touch stamp-elfcode
|
||||
elfcode.texi: stamp-elfcode
|
||||
touch s-elfcode
|
||||
elfcode.texi: s-elfcode
|
||||
|
||||
stamp-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
|
||||
s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
|
||||
$(srcdir)/../../move-if-change format.tmp format.texi
|
||||
touch stamp-format
|
||||
format.texi: stamp-format
|
||||
touch s-format
|
||||
format.texi: s-format
|
||||
|
||||
stamp-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
|
||||
s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
|
||||
$(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
|
||||
touch stamp-libbfd
|
||||
libbfd.texi: stamp-libbfd
|
||||
touch s-libbfd
|
||||
libbfd.texi: s-libbfd
|
||||
|
||||
stamp-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
|
||||
s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
|
||||
$(srcdir)/../../move-if-change opncls.tmp opncls.texi
|
||||
touch stamp-opncls
|
||||
opncls.texi: stamp-opncls
|
||||
touch s-opncls
|
||||
opncls.texi: s-opncls
|
||||
|
||||
stamp-reloc: $(MKDOC) $(srcdir)/../reloc.c
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
|
||||
s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
|
||||
$(srcdir)/../../move-if-change reloc.tmp reloc.texi
|
||||
touch stamp-reloc
|
||||
reloc.texi: stamp-reloc
|
||||
touch s-reloc
|
||||
reloc.texi: s-reloc
|
||||
|
||||
stamp-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
|
||||
s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
|
||||
$(srcdir)/../../move-if-change section.tmp section.texi
|
||||
touch stamp-section
|
||||
section.texi: stamp-section
|
||||
touch s-section
|
||||
section.texi: s-section
|
||||
|
||||
stamp-syms: $(MKDOC) $(srcdir)/../syms.c
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
|
||||
s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
|
||||
$(srcdir)/../../move-if-change syms.tmp syms.texi
|
||||
touch stamp-syms
|
||||
syms.texi: stamp-syms
|
||||
touch s-syms
|
||||
syms.texi: s-syms
|
||||
|
||||
stamp-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
|
||||
s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
|
||||
$(srcdir)/../../move-if-change targets.tmp targets.texi
|
||||
touch stamp-targets
|
||||
targets.texi: stamp-targets
|
||||
touch s-targets
|
||||
targets.texi: s-targets
|
||||
|
||||
stamp-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
|
||||
s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
|
||||
$(srcdir)/../../move-if-change init.tmp init.texi
|
||||
touch stamp-init
|
||||
init.texi: stamp-init
|
||||
touch s-init
|
||||
init.texi: s-init
|
||||
|
||||
stamp-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
|
||||
s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
|
||||
$(srcdir)/../../move-if-change hash.tmp hash.texi
|
||||
touch stamp-hash
|
||||
hash.texi: stamp-hash
|
||||
touch s-hash
|
||||
hash.texi: s-hash
|
||||
|
||||
stamp-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
|
||||
$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
|
||||
s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
|
||||
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
|
||||
$(srcdir)/../../move-if-change linker.tmp linker.texi
|
||||
touch stamp-linker
|
||||
linker.texi: stamp-linker
|
||||
touch s-linker
|
||||
linker.texi: s-linker
|
||||
|
||||
libbfd.h: $(srcdir)/../libbfd-in.h \
|
||||
$(srcdir)/../init.c \
|
||||
$(srcdir)/../libbfd.c \
|
||||
$(srcdir)/../cache.c \
|
||||
$(srcdir)/../reloc.c \
|
||||
$(srcdir)/../cpu-h8300.c \
|
||||
$(srcdir)/../cpu-i960.c \
|
||||
$(srcdir)/../archures.c \
|
||||
$(srcdir)/../elfcode.h \
|
||||
$(srcdir)/proto.str \
|
||||
$(MKDOC)
|
||||
cat $(srcdir)/../libbfd-in.h >libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cpu-h8300.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cpu-i960.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elfcode.h >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
|
||||
|
||||
libcoff.h: $(srcdir)/../libcoff-in.h \
|
||||
$(srcdir)/../coffcode.h \
|
||||
$(srcdir)/proto.str \
|
||||
$(MKDOC)
|
||||
cat $(srcdir)/../libcoff-in.h >libcoff.h
|
||||
$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
|
||||
./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
|
||||
|
||||
bfd.h: $(srcdir)/../bfd-in.h \
|
||||
$(srcdir)/../init.c \
|
||||
|
@ -298,84 +513,23 @@ bfd.h: $(srcdir)/../bfd-in.h \
|
|||
$(srcdir)/proto.str \
|
||||
$(MKDOC)
|
||||
cat $(srcdir)/../bfd-in.h >bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
|
||||
$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
|
||||
./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
|
||||
echo "#ifdef __cplusplus" >>bfd.h
|
||||
echo "}" >>bfd.h
|
||||
echo "#endif" >>bfd.h
|
||||
echo "#endif" >>bfd.h
|
||||
|
||||
|
||||
clean-info: clean
|
||||
|
||||
mostlyclean:
|
||||
rm -rf *.log *.ps *~* *.dvi *# $(MKDOC) *.o
|
||||
|
||||
clean: mostlyclean
|
||||
rm -rf $(STAGESTUFF) stamp-*
|
||||
rm -f *.p *.ip bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
|
||||
|
||||
distclean: mostlyclean
|
||||
rm -f *.p *.ip bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
|
||||
rm -f stamp-*
|
||||
rm -f Makefile config.status
|
||||
|
||||
maintainer-clean realclean: clean
|
||||
rm -f Makefile config.status
|
||||
|
||||
bfd.info: $(DOCFILES) bfdsumm.texi bfd.texinfo
|
||||
$(MAKEINFO) -I$(srcdir) -o bfd.info $(srcdir)/bfd.texinfo
|
||||
|
||||
bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
|
||||
$(TEXI2DVI) $(srcdir)/bfd.texinfo
|
||||
|
||||
bfd.ps: bfd.dvi
|
||||
dvips bfd -o
|
||||
|
||||
quickdoc: $(DOCFILES) bfdsumm.texi bfd.texinfo
|
||||
TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex bfd.texinfo
|
||||
|
||||
stage1: force
|
||||
- mkdir stage1
|
||||
- mv -f $(STAGESTUFF) stage1
|
||||
|
||||
stage2: force
|
||||
- mkdir stage2
|
||||
- mv -f $(STAGESTUFF) stage2
|
||||
|
||||
stage3: force
|
||||
- mkdir stage3
|
||||
- mv -f $(STAGESTUFF) stage3
|
||||
|
||||
against=stage2
|
||||
|
||||
comparison: force
|
||||
for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i || exit 1 ; done
|
||||
|
||||
de-stage1: force
|
||||
- (cd stage1 ; mv -f $(STAGESTUFF) ..)
|
||||
- rmdir stage1
|
||||
|
||||
de-stage2: force
|
||||
- (cd stage2 ; mv -f $(STAGESTUFF) ..)
|
||||
- rmdir stage2
|
||||
|
||||
de-stage3: force
|
||||
- (cd stage3 ; mv -f $(STAGESTUFF) ..)
|
||||
- rmdir stage3
|
||||
|
||||
force:
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in
|
||||
cd .. && CONFIG_FILES=doc/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
# 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:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@section a.out backends
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
BFD supports a number of different flavours of a.out format,
|
||||
though the major differences are only the sizes of the
|
||||
|
@ -29,33 +29,33 @@ As an example, this is what goes on to make the back end for a
|
|||
sun4, from @file{aout32.c}:
|
||||
|
||||
@example
|
||||
#define ARCH_SIZE 32
|
||||
#include "aoutx.h"
|
||||
#define ARCH_SIZE 32
|
||||
#include "aoutx.h"
|
||||
@end example
|
||||
|
||||
Which exports names:
|
||||
|
||||
@example
|
||||
...
|
||||
aout_32_canonicalize_reloc
|
||||
aout_32_find_nearest_line
|
||||
aout_32_get_lineno
|
||||
aout_32_get_reloc_upper_bound
|
||||
...
|
||||
...
|
||||
aout_32_canonicalize_reloc
|
||||
aout_32_find_nearest_line
|
||||
aout_32_get_lineno
|
||||
aout_32_get_reloc_upper_bound
|
||||
...
|
||||
@end example
|
||||
|
||||
from @file{sunos.c}:
|
||||
|
||||
@example
|
||||
#define TARGET_NAME "a.out-sunos-big"
|
||||
#define VECNAME sunos_big_vec
|
||||
#include "aoutf1.h"
|
||||
#define TARGET_NAME "a.out-sunos-big"
|
||||
#define VECNAME sunos_big_vec
|
||||
#include "aoutf1.h"
|
||||
@end example
|
||||
|
||||
requires all the names from @file{aout32.c}, and produces the jump vector
|
||||
|
||||
@example
|
||||
sunos_big_vec
|
||||
sunos_big_vec
|
||||
@end example
|
||||
|
||||
The file @file{host-aout.c} is a special case. It is for a large set
|
||||
|
@ -86,18 +86,18 @@ ordinary a.out files on your host. To configure a new machine
|
|||
to use @file{host-aout.c}, specify:
|
||||
|
||||
@example
|
||||
TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
|
||||
TDEPFILES= host-aout.o trad-core.o
|
||||
TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
|
||||
TDEPFILES= host-aout.o trad-core.o
|
||||
@end example
|
||||
|
||||
in the @file{config/@var{XXX}.mt} file, and modify @file{configure.in}
|
||||
to use the
|
||||
@file{@var{XXX}.mt} file (by setting "@code{bfd_target=XXX}") when your
|
||||
configuration is selected.
|
||||
@*
|
||||
|
||||
@subsection Relocations
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
The file @file{aoutx.h} provides for both the @emph{standard}
|
||||
and @emph{extended} forms of a.out relocation records.
|
||||
|
@ -106,15 +106,15 @@ The standard records contain only an
|
|||
address, a symbol index, and a type field. The extended records
|
||||
(used on 29ks and sparcs) also have a full integer for an
|
||||
addend.
|
||||
@*
|
||||
|
||||
@subsection Internal entry points
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
@file{aoutx.h} exports several routines for accessing the
|
||||
contents of an a.out file, which are gathered and exported in
|
||||
turn by various format specific files (eg sunos.c).
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_swap_exec_header_in
|
||||
@subsubsection @code{aout_@var{size}_swap_exec_header_in}
|
||||
@strong{Synopsis}
|
||||
|
@ -128,7 +128,7 @@ void aout_@var{size}_swap_exec_header_in,
|
|||
Swap the information in an executable header @var{raw_bytes} taken
|
||||
from a raw byte stream memory image into the internal exec header
|
||||
structure @var{execp}.
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_swap_exec_header_out
|
||||
@subsubsection @code{aout_@var{size}_swap_exec_header_out}
|
||||
@strong{Synopsis}
|
||||
|
@ -141,7 +141,7 @@ void aout_@var{size}_swap_exec_header_out
|
|||
@strong{Description}@*
|
||||
Swap the information in an internal exec header structure
|
||||
@var{execp} into the buffer @var{raw_bytes} ready for writing to disk.
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_some_aout_object_p
|
||||
@subsubsection @code{aout_@var{size}_some_aout_object_p}
|
||||
@strong{Synopsis}
|
||||
|
@ -156,7 +156,7 @@ checking is an a.out file. Do some more checking, and set up
|
|||
for access if it really is. Call back to the calling
|
||||
environment's "finish up" function just before returning, to
|
||||
handle any last-minute setup.
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_mkobject
|
||||
@subsubsection @code{aout_@var{size}_mkobject}
|
||||
@strong{Synopsis}
|
||||
|
@ -165,7 +165,7 @@ boolean aout_@var{size}_mkobject, (bfd *abfd);
|
|||
@end example
|
||||
@strong{Description}@*
|
||||
Initialize BFD @var{abfd} for use with a.out files.
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_machine_type
|
||||
@subsubsection @code{aout_@var{size}_machine_type}
|
||||
@strong{Synopsis}
|
||||
|
@ -173,7 +173,7 @@ Initialize BFD @var{abfd} for use with a.out files.
|
|||
enum machine_type aout_@var{size}_machine_type
|
||||
(enum bfd_architecture arch,
|
||||
unsigned long machine));
|
||||
@end example
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Keep track of machine architecture and machine type for
|
||||
a.out's. Return the @code{machine_type} for a particular
|
||||
|
@ -182,7 +182,7 @@ and machine can't be represented in a.out format.
|
|||
|
||||
If the architecture is understood, machine type 0 (default)
|
||||
is always understood.
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_set_arch_mach
|
||||
@subsubsection @code{aout_@var{size}_set_arch_mach}
|
||||
@strong{Synopsis}
|
||||
|
@ -191,12 +191,12 @@ boolean aout_@var{size}_set_arch_mach,
|
|||
(bfd *,
|
||||
enum bfd_architecture arch,
|
||||
unsigned long machine));
|
||||
@end example
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the architecture and the machine of the BFD @var{abfd} to the
|
||||
values @var{arch} and @var{machine}. Verify that @var{abfd}'s format
|
||||
can support the architecture required.
|
||||
@*
|
||||
|
||||
@findex aout_@var{size}_new_section_hook
|
||||
@subsubsection @code{aout_@var{size}_new_section_hook}
|
||||
@strong{Synopsis}
|
||||
|
@ -204,8 +204,8 @@ can support the architecture required.
|
|||
boolean aout_@var{size}_new_section_hook,
|
||||
(bfd *abfd,
|
||||
asection *newsect));
|
||||
@end example
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Called by the BFD in response to a @code{bfd_make_section}
|
||||
request.
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@section Archives
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
An archive (or library) is just another BFD. It has a symbol
|
||||
table, although there's not much a user program will do with it.
|
||||
|
@ -49,7 +49,7 @@ spaces and such in filenames anyway, so this shouldn't be much
|
|||
of a restriction.
|
||||
|
||||
Archives are supported in BFD in @code{archive.c}.
|
||||
@*
|
||||
|
||||
@findex bfd_get_next_mapent
|
||||
@subsubsection @code{bfd_get_next_mapent}
|
||||
@strong{Synopsis}
|
||||
|
@ -68,7 +68,7 @@ got the last one.
|
|||
|
||||
A @code{carsym} is a canonical archive symbol. The only
|
||||
user-visible element is its name, a null-terminated string.
|
||||
@*
|
||||
|
||||
@findex bfd_set_archive_head
|
||||
@subsubsection @code{bfd_set_archive_head}
|
||||
@strong{Synopsis}
|
||||
|
@ -78,7 +78,7 @@ boolean bfd_set_archive_head(bfd *output, bfd *new_head);
|
|||
@strong{Description}@*
|
||||
Set the head of the chain of
|
||||
BFDs contained in the archive @var{output} to @var{new_head}.
|
||||
@*
|
||||
|
||||
@findex bfd_openr_next_archived_file
|
||||
@subsubsection @code{bfd_openr_next_archived_file}
|
||||
@strong{Synopsis}
|
||||
|
@ -92,4 +92,4 @@ Subsequent calls should pass
|
|||
the archive and the previous return value to return a created
|
||||
BFD to the next contained element. NULL is returned when there
|
||||
are no more.
|
||||
@*
|
||||
|
||||
|
|
|
@ -19,11 +19,11 @@ insert as many items into the list of architectures as it wants to;
|
|||
generally this would be one for each machine and one for the
|
||||
default case (an item with a machine field of 0).
|
||||
|
||||
BFD's idea of an architecture is implemented in @file{archures.c}.
|
||||
@*
|
||||
BFD's idea of an architecture is implemented in @file{archures.c}.
|
||||
|
||||
@subsection bfd_architecture
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
This enum gives the object file's CPU architecture, in a
|
||||
global sense---i.e., what processor family does it belong to?
|
||||
|
@ -38,6 +38,13 @@ enum bfd_architecture
|
|||
bfd_arch_unknown, /* File arch not known */
|
||||
bfd_arch_obscure, /* Arch known, not one of these */
|
||||
bfd_arch_m68k, /* Motorola 68xxx */
|
||||
#define bfd_mach_m68000 1
|
||||
#define bfd_mach_m68008 2
|
||||
#define bfd_mach_m68010 3
|
||||
#define bfd_mach_m68020 4
|
||||
#define bfd_mach_m68030 5
|
||||
#define bfd_mach_m68040 6
|
||||
#define bfd_mach_m68060 7
|
||||
bfd_arch_vax, /* DEC Vax */
|
||||
bfd_arch_i960, /* Intel 960 */
|
||||
/* The order of the following is important.
|
||||
|
@ -54,23 +61,37 @@ enum bfd_architecture
|
|||
#define bfd_mach_i960_mc 4
|
||||
#define bfd_mach_i960_xa 5
|
||||
#define bfd_mach_i960_ca 6
|
||||
#define bfd_mach_i960_jx 7
|
||||
#define bfd_mach_i960_jx 7
|
||||
#define bfd_mach_i960_hx 8
|
||||
|
||||
bfd_arch_a29k, /* AMD 29000 */
|
||||
bfd_arch_sparc, /* SPARC */
|
||||
#define bfd_mach_sparc 1
|
||||
#define bfd_mach_sparc 1
|
||||
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
|
||||
#define bfd_mach_sparc_sparclet 2
|
||||
#define bfd_mach_sparc_sparclite 3
|
||||
#define bfd_mach_sparc_v8plus 4
|
||||
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v9 6
|
||||
#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_sparclet 2
|
||||
#define bfd_mach_sparc_sparclite 3
|
||||
#define bfd_mach_sparc_v8plus 4
|
||||
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v9 6
|
||||
#define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */
|
||||
/* Nonzero if MACH has the v9 instruction set. */
|
||||
#define bfd_mach_sparc_v9_p(mach) \
|
||||
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
|
||||
bfd_arch_mips, /* MIPS Rxxxx */
|
||||
#define bfd_mach_mips3000 3000
|
||||
#define bfd_mach_mips3900 3900
|
||||
#define bfd_mach_mips4000 4000
|
||||
#define bfd_mach_mips4010 4010
|
||||
#define bfd_mach_mips4100 4100
|
||||
#define bfd_mach_mips4300 4300
|
||||
#define bfd_mach_mips4400 4400
|
||||
#define bfd_mach_mips4600 4600
|
||||
#define bfd_mach_mips4650 4650
|
||||
#define bfd_mach_mips5000 5000
|
||||
#define bfd_mach_mips6000 6000
|
||||
#define bfd_mach_mips8000 8000
|
||||
#define bfd_mach_mips10000 10000
|
||||
#define bfd_mach_mips16 16
|
||||
bfd_arch_i386, /* Intel 386 */
|
||||
#define bfd_mach_i386_i386 0
|
||||
#define bfd_mach_i386_i8086 1
|
||||
|
@ -91,24 +112,40 @@ enum bfd_architecture
|
|||
bfd_arch_hppa, /* HP PA RISC */
|
||||
bfd_arch_d10v, /* Mitsubishi D10V */
|
||||
bfd_arch_z8k, /* Zilog Z8000 */
|
||||
#define bfd_mach_z8001 1
|
||||
#define bfd_mach_z8002 2
|
||||
#define bfd_mach_z8001 1
|
||||
#define bfd_mach_z8002 2
|
||||
bfd_arch_h8500, /* Hitachi H8/500 */
|
||||
bfd_arch_sh, /* Hitachi SH */
|
||||
#define bfd_mach_sh 0
|
||||
#define bfd_mach_sh3 0x30
|
||||
#define bfd_mach_sh3e 0x3e
|
||||
#define bfd_mach_sh4 0x40
|
||||
bfd_arch_alpha, /* Dec Alpha */
|
||||
bfd_arch_arm, /* Advanced Risc Machines ARM */
|
||||
#define bfd_mach_arm_2 1
|
||||
#define bfd_mach_arm_2a 2
|
||||
#define bfd_mach_arm_3 3
|
||||
#define bfd_mach_arm_3M 4
|
||||
#define bfd_mach_arm_4 5
|
||||
#define bfd_mach_arm_4T 6
|
||||
bfd_arch_ns32k, /* National Semiconductors ns32000 */
|
||||
bfd_arch_w65, /* WDC 65816 */
|
||||
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
|
||||
bfd_arch_v850, /* NEC V850 */
|
||||
#define bfd_mach_v850 0
|
||||
bfd_arch_arc, /* Argonaut RISC Core */
|
||||
#define bfd_mach_arc_base 0
|
||||
bfd_arch_m32r, /* Mitsubishi M32R/D */
|
||||
#define bfd_mach_m32r 0 /* backwards compatibility */
|
||||
bfd_arch_mn10200, /* Matsushita MN10200 */
|
||||
bfd_arch_mn10300, /* Matsushita MN10300 */
|
||||
bfd_arch_last
|
||||
@};
|
||||
@end example
|
||||
@*
|
||||
|
||||
@subsection bfd_arch_info
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
This structure contains information on architectures for use
|
||||
within BFD.
|
||||
|
@ -125,17 +162,17 @@ typedef struct bfd_arch_info
|
|||
const char *printable_name;
|
||||
unsigned int section_align_power;
|
||||
/* true if this is the default machine for the architecture */
|
||||
boolean the_default;
|
||||
boolean the_default;
|
||||
const struct bfd_arch_info * (*compatible)
|
||||
PARAMS ((const struct bfd_arch_info *a,
|
||||
const struct bfd_arch_info *b));
|
||||
PARAMS ((const struct bfd_arch_info *a,
|
||||
const struct bfd_arch_info *b));
|
||||
|
||||
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
|
||||
|
||||
const struct bfd_arch_info *next;
|
||||
@} bfd_arch_info_type;
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_printable_name
|
||||
@subsubsection @code{bfd_printable_name}
|
||||
@strong{Synopsis}
|
||||
|
@ -145,7 +182,7 @@ const char *bfd_printable_name(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Return a printable string representing the architecture and machine
|
||||
from the pointer to the architecture info structure.
|
||||
@*
|
||||
|
||||
@findex bfd_scan_arch
|
||||
@subsubsection @code{bfd_scan_arch}
|
||||
@strong{Synopsis}
|
||||
|
@ -156,7 +193,17 @@ const bfd_arch_info_type *bfd_scan_arch(const char *string);
|
|||
Figure out if BFD supports any cpu which could be described with
|
||||
the name @var{string}. Return a pointer to an @code{arch_info}
|
||||
structure if a machine is found, otherwise NULL.
|
||||
@*
|
||||
|
||||
@findex bfd_arch_list
|
||||
@subsubsection @code{bfd_arch_list}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
const char **bfd_arch_list(void);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return a freshly malloced NULL-terminated vector of the names
|
||||
of all the valid BFD architectures. Do not modify the names.
|
||||
|
||||
@findex bfd_arch_get_compatible
|
||||
@subsubsection @code{bfd_arch_get_compatible}
|
||||
@strong{Synopsis}
|
||||
|
@ -171,7 +218,7 @@ architectures and machine types are compatible. Calculates
|
|||
the lowest common denominator between the two architectures
|
||||
and machine types implied by the BFDs and returns a pointer to
|
||||
an @code{arch_info} structure describing the compatible machine.
|
||||
@*
|
||||
|
||||
@findex bfd_default_arch_struct
|
||||
@subsubsection @code{bfd_default_arch_struct}
|
||||
@strong{Description}@*
|
||||
|
@ -183,7 +230,7 @@ architecture of the file.
|
|||
@example
|
||||
extern const bfd_arch_info_type bfd_default_arch_struct;
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_set_arch_info
|
||||
@subsubsection @code{bfd_set_arch_info}
|
||||
@strong{Synopsis}
|
||||
|
@ -192,7 +239,7 @@ void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg);
|
|||
@end example
|
||||
@strong{Description}@*
|
||||
Set the architecture info of @var{abfd} to @var{arg}.
|
||||
@*
|
||||
|
||||
@findex bfd_default_set_arch_mach
|
||||
@subsubsection @code{bfd_default_set_arch_mach}
|
||||
@strong{Synopsis}
|
||||
|
@ -206,7 +253,7 @@ Set the architecture and machine type in BFD @var{abfd}
|
|||
to @var{arch} and @var{mach}. Find the correct
|
||||
pointer to a structure and insert it into the @code{arch_info}
|
||||
pointer.
|
||||
@*
|
||||
|
||||
@findex bfd_get_arch
|
||||
@subsubsection @code{bfd_get_arch}
|
||||
@strong{Synopsis}
|
||||
|
@ -216,7 +263,7 @@ enum bfd_architecture bfd_get_arch(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Return the enumerated type which describes the BFD @var{abfd}'s
|
||||
architecture.
|
||||
@*
|
||||
|
||||
@findex bfd_get_mach
|
||||
@subsubsection @code{bfd_get_mach}
|
||||
@strong{Synopsis}
|
||||
|
@ -226,7 +273,7 @@ unsigned long bfd_get_mach(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Return the long type which describes the BFD @var{abfd}'s
|
||||
machine.
|
||||
@*
|
||||
|
||||
@findex bfd_arch_bits_per_byte
|
||||
@subsubsection @code{bfd_arch_bits_per_byte}
|
||||
@strong{Synopsis}
|
||||
|
@ -236,7 +283,7 @@ unsigned int bfd_arch_bits_per_byte(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Return the number of bits in one of the BFD @var{abfd}'s
|
||||
architecture's bytes.
|
||||
@*
|
||||
|
||||
@findex bfd_arch_bits_per_address
|
||||
@subsubsection @code{bfd_arch_bits_per_address}
|
||||
@strong{Synopsis}
|
||||
|
@ -246,7 +293,7 @@ unsigned int bfd_arch_bits_per_address(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Return the number of bits in one of the BFD @var{abfd}'s
|
||||
architecture's addresses.
|
||||
@*
|
||||
|
||||
@findex bfd_default_compatible
|
||||
@subsubsection @code{bfd_default_compatible}
|
||||
@strong{Synopsis}
|
||||
|
@ -257,7 +304,7 @@ const bfd_arch_info_type *bfd_default_compatible
|
|||
@end example
|
||||
@strong{Description}@*
|
||||
The default function for testing for compatibility.
|
||||
@*
|
||||
|
||||
@findex bfd_default_scan
|
||||
@subsubsection @code{bfd_default_scan}
|
||||
@strong{Synopsis}
|
||||
|
@ -267,7 +314,7 @@ boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
|
|||
@strong{Description}@*
|
||||
The default function for working out whether this is an
|
||||
architecture hit and a machine hit.
|
||||
@*
|
||||
|
||||
@findex bfd_get_arch_info
|
||||
@subsubsection @code{bfd_get_arch_info}
|
||||
@strong{Synopsis}
|
||||
|
@ -276,7 +323,7 @@ const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd);
|
|||
@end example
|
||||
@strong{Description}@*
|
||||
Return the architecture info struct in @var{abfd}.
|
||||
@*
|
||||
|
||||
@findex bfd_lookup_arch
|
||||
@subsubsection @code{bfd_lookup_arch}
|
||||
@strong{Synopsis}
|
||||
|
@ -291,7 +338,7 @@ Look for the architecure info structure which matches the
|
|||
arguments @var{arch} and @var{machine}. A machine of 0 matches the
|
||||
machine/architecture structure which marks itself as the
|
||||
default.
|
||||
@*
|
||||
|
||||
@findex bfd_printable_arch_mach
|
||||
@subsubsection @code{bfd_printable_arch_mach}
|
||||
@strong{Synopsis}
|
||||
|
@ -304,4 +351,4 @@ Return a printable string representing the architecture and
|
|||
machine type.
|
||||
|
||||
This routine is depreciated.
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
\input texinfo.tex
|
||||
@setfilename bfd.info
|
||||
@c $Id: bfd.texinfo,v 1.28 1995/11/10 20:04:12 victoria Exp $
|
||||
@c $Id: bfd.texinfo,v 1.29 1997/07/22 18:47:29 ian Exp $
|
||||
@tex
|
||||
% NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE
|
||||
\global\long\def\example{%
|
||||
|
@ -67,7 +67,7 @@ into another language, under the above conditions for modified versions.
|
|||
|
||||
@tex
|
||||
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
|
||||
\xdef\manvers{\$Revision: 1.28 $} % For use in headers, footers too
|
||||
\xdef\manvers{\$Revision: 1.29 $} % For use in headers, footers too
|
||||
{\parskip=0pt
|
||||
\hfill Cygnus Support\par
|
||||
\hfill sac\@cygnus.com\par
|
||||
|
@ -213,7 +213,7 @@ IEEE-695.
|
|||
|
||||
@node BFD front end, BFD back ends, Overview, Top
|
||||
@chapter BFD front end
|
||||
@include bfd.texi
|
||||
@include bfdt.texi
|
||||
|
||||
@menu
|
||||
* Memory Usage::
|
||||
|
|
597
contrib/binutils/bfd/doc/bfdt.texi
Normal file
597
contrib/binutils/bfd/doc/bfdt.texi
Normal file
|
@ -0,0 +1,597 @@
|
|||
@section @code{typedef bfd}
|
||||
A BFD has type @code{bfd}; objects of this type are the
|
||||
cornerstone of any application using BFD. Using BFD
|
||||
consists of making references though the BFD and to data in the BFD.
|
||||
|
||||
Here is the structure that defines the type @code{bfd}. It
|
||||
contains the major data about the file and pointers
|
||||
to the rest of the data.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
struct _bfd
|
||||
@{
|
||||
/* The filename the application opened the BFD with. */
|
||||
CONST char *filename;
|
||||
|
||||
/* A pointer to the target jump table. */
|
||||
const struct bfd_target *xvec;
|
||||
|
||||
/* To avoid dragging too many header files into every file that
|
||||
includes `@code{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. */
|
||||
PTR iostream;
|
||||
|
||||
/* Is the file descriptor being cached? That is, can it be closed as
|
||||
needed, and re-opened when accessed later? */
|
||||
|
||||
boolean cacheable;
|
||||
|
||||
/* Marks whether there was a default target specified when the
|
||||
BFD was opened. This is used to select which matching algorithm
|
||||
to use to choose the back end. */
|
||||
|
||||
boolean target_defaulted;
|
||||
|
||||
/* The caching routines use these to maintain a
|
||||
least-recently-used list of BFDs */
|
||||
|
||||
struct _bfd *lru_prev, *lru_next;
|
||||
|
||||
/* When a file is closed by the caching routines, BFD retains
|
||||
state information on the file here: */
|
||||
|
||||
file_ptr where;
|
||||
|
||||
/* and here: (``once'' means at least once) */
|
||||
|
||||
boolean opened_once;
|
||||
|
||||
/* Set if we have a locally maintained mtime value, rather than
|
||||
getting it from the file each time: */
|
||||
|
||||
boolean mtime_set;
|
||||
|
||||
/* File modified time, if mtime_set is true: */
|
||||
|
||||
long mtime;
|
||||
|
||||
/* Reserved for an unimplemented file locking extension.*/
|
||||
|
||||
int ifd;
|
||||
|
||||
/* The format which belongs to the BFD. (object, core, etc.) */
|
||||
|
||||
bfd_format format;
|
||||
|
||||
/* The direction the BFD was opened with*/
|
||||
|
||||
enum bfd_direction @{no_direction = 0,
|
||||
read_direction = 1,
|
||||
write_direction = 2,
|
||||
both_direction = 3@} direction;
|
||||
|
||||
/* Format_specific flags*/
|
||||
|
||||
flagword flags;
|
||||
|
||||
/* Currently my_archive is tested before adding origin to
|
||||
anything. I believe that this can become always an add of
|
||||
origin, with origin set to 0 for non archive files. */
|
||||
|
||||
file_ptr origin;
|
||||
|
||||
/* Remember when output has begun, to stop strange things
|
||||
from happening. */
|
||||
boolean output_has_begun;
|
||||
|
||||
/* Pointer to linked list of sections*/
|
||||
struct sec *sections;
|
||||
|
||||
/* The number of sections */
|
||||
unsigned int section_count;
|
||||
|
||||
/* Stuff only useful for object files:
|
||||
The start address. */
|
||||
bfd_vma start_address;
|
||||
|
||||
/* Used for input and output*/
|
||||
unsigned int symcount;
|
||||
|
||||
/* Symbol table for output BFD (with symcount entries) */
|
||||
struct symbol_cache_entry **outsymbols;
|
||||
|
||||
/* Pointer to structure which contains architecture information*/
|
||||
const struct bfd_arch_info *arch_info;
|
||||
|
||||
/* Stuff only useful for archives:*/
|
||||
PTR arelt_data;
|
||||
struct _bfd *my_archive; /* The containing archive BFD. */
|
||||
struct _bfd *next; /* The next BFD in the archive. */
|
||||
struct _bfd *archive_head; /* The first BFD in the archive. */
|
||||
boolean has_armap;
|
||||
|
||||
/* A chain of BFD structures involved in a link. */
|
||||
struct _bfd *link_next;
|
||||
|
||||
/* A field used by _bfd_generic_link_add_archive_symbols. This will
|
||||
be used only for archive elements. */
|
||||
int archive_pass;
|
||||
|
||||
/* Used by the back end to hold private data. */
|
||||
|
||||
union
|
||||
@{
|
||||
struct aout_data_struct *aout_data;
|
||||
struct artdata *aout_ar_data;
|
||||
struct _oasys_data *oasys_obj_data;
|
||||
struct _oasys_ar_data *oasys_ar_data;
|
||||
struct coff_tdata *coff_obj_data;
|
||||
struct pe_tdata *pe_obj_data;
|
||||
struct xcoff_tdata *xcoff_obj_data;
|
||||
struct ecoff_tdata *ecoff_obj_data;
|
||||
struct ieee_data_struct *ieee_data;
|
||||
struct ieee_ar_data_struct *ieee_ar_data;
|
||||
struct srec_data_struct *srec_data;
|
||||
struct ihex_data_struct *ihex_data;
|
||||
struct tekhex_data_struct *tekhex_data;
|
||||
struct elf_obj_tdata *elf_obj_data;
|
||||
struct nlm_obj_tdata *nlm_obj_data;
|
||||
struct bout_data_struct *bout_data;
|
||||
struct sun_core_struct *sun_core_data;
|
||||
struct trad_core_struct *trad_core_data;
|
||||
struct som_data_struct *som_data;
|
||||
struct hpux_core_struct *hpux_core_data;
|
||||
struct hppabsd_core_struct *hppabsd_core_data;
|
||||
struct sgi_core_struct *sgi_core_data;
|
||||
struct lynx_core_struct *lynx_core_data;
|
||||
struct osf_core_struct *osf_core_data;
|
||||
struct cisco_core_struct *cisco_core_data;
|
||||
struct versados_data_struct *versados_data;
|
||||
struct netbsd_core_struct *netbsd_core_data;
|
||||
PTR any;
|
||||
@} tdata;
|
||||
|
||||
/* Used by the application to hold private data*/
|
||||
PTR usrdata;
|
||||
|
||||
/* Where all the allocated stuff under this BFD goes. This is a
|
||||
struct objalloc *, but we use PTR to avoid requiring the inclusion of
|
||||
objalloc.h. */
|
||||
PTR memory;
|
||||
@};
|
||||
|
||||
@end example
|
||||
@section Error reporting
|
||||
Most BFD functions return nonzero on success (check their
|
||||
individual documentation for precise semantics). On an error,
|
||||
they call @code{bfd_set_error} to set an error condition that callers
|
||||
can check by calling @code{bfd_get_error}.
|
||||
If that returns @code{bfd_error_system_call}, then check
|
||||
@code{errno}.
|
||||
|
||||
The easiest way to report a BFD error to the user is to
|
||||
use @code{bfd_perror}.
|
||||
|
||||
@subsection Type @code{bfd_error_type}
|
||||
The values returned by @code{bfd_get_error} are defined by the
|
||||
enumerated type @code{bfd_error_type}.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
typedef enum bfd_error
|
||||
@{
|
||||
bfd_error_no_error = 0,
|
||||
bfd_error_system_call,
|
||||
bfd_error_invalid_target,
|
||||
bfd_error_wrong_format,
|
||||
bfd_error_invalid_operation,
|
||||
bfd_error_no_memory,
|
||||
bfd_error_no_symbols,
|
||||
bfd_error_no_armap,
|
||||
bfd_error_no_more_archived_files,
|
||||
bfd_error_malformed_archive,
|
||||
bfd_error_file_not_recognized,
|
||||
bfd_error_file_ambiguously_recognized,
|
||||
bfd_error_no_contents,
|
||||
bfd_error_nonrepresentable_section,
|
||||
bfd_error_no_debug_section,
|
||||
bfd_error_bad_value,
|
||||
bfd_error_file_truncated,
|
||||
bfd_error_file_too_big,
|
||||
bfd_error_invalid_error_code
|
||||
@} bfd_error_type;
|
||||
|
||||
@end example
|
||||
@findex bfd_get_error
|
||||
@subsubsection @code{bfd_get_error}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
bfd_error_type bfd_get_error (void);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return the current BFD error condition.
|
||||
|
||||
@findex bfd_set_error
|
||||
@subsubsection @code{bfd_set_error}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
void bfd_set_error (bfd_error_type error_tag);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the BFD error condition to be @var{error_tag}.
|
||||
|
||||
@findex bfd_errmsg
|
||||
@subsubsection @code{bfd_errmsg}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
CONST char *bfd_errmsg (bfd_error_type error_tag);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return a string describing the error @var{error_tag}, or
|
||||
the system error if @var{error_tag} is @code{bfd_error_system_call}.
|
||||
|
||||
@findex bfd_perror
|
||||
@subsubsection @code{bfd_perror}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
void bfd_perror (CONST char *message);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Print to the standard error stream a string describing the
|
||||
last BFD error that occurred, or the last system error if
|
||||
the last BFD error was a system call failure. If @var{message}
|
||||
is non-NULL and non-empty, the error string printed is preceded
|
||||
by @var{message}, a colon, and a space. It is followed by a newline.
|
||||
|
||||
@subsection BFD error handler
|
||||
Some BFD functions want to print messages describing the
|
||||
problem. They call a BFD error handler function. This
|
||||
function may be overriden by the program.
|
||||
|
||||
The BFD error handler acts like printf.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
|
||||
|
||||
@end example
|
||||
@findex bfd_set_error_handler
|
||||
@subsubsection @code{bfd_set_error_handler}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the BFD error handler function. Returns the previous
|
||||
function.
|
||||
|
||||
@findex bfd_set_error_program_name
|
||||
@subsubsection @code{bfd_set_error_program_name}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
void bfd_set_error_program_name (const char *);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the program name to use when printing a BFD error. This
|
||||
is printed before the error message followed by a colon and
|
||||
space. The string must not be changed after it is passed to
|
||||
this function.
|
||||
|
||||
@findex bfd_get_error_handler
|
||||
@subsubsection @code{bfd_get_error_handler}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
bfd_error_handler_type bfd_get_error_handler (void);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return the BFD error handler function.
|
||||
|
||||
@section Symbols
|
||||
|
||||
|
||||
@findex bfd_get_reloc_upper_bound
|
||||
@subsubsection @code{bfd_get_reloc_upper_bound}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
long bfd_get_reloc_upper_bound(bfd *abfd, asection *sect);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return the number of bytes required to store the
|
||||
relocation information associated with section @var{sect}
|
||||
attached to bfd @var{abfd}. If an error occurs, return -1.
|
||||
|
||||
@findex bfd_canonicalize_reloc
|
||||
@subsubsection @code{bfd_canonicalize_reloc}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
long bfd_canonicalize_reloc
|
||||
(bfd *abfd,
|
||||
asection *sec,
|
||||
arelent **loc,
|
||||
asymbol **syms);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Call the back end associated with the open BFD
|
||||
@var{abfd} and translate the external form of the relocation
|
||||
information attached to @var{sec} into the internal canonical
|
||||
form. Place the table into memory at @var{loc}, which has
|
||||
been preallocated, usually by a call to
|
||||
@code{bfd_get_reloc_upper_bound}. Returns the number of relocs, or
|
||||
-1 on error.
|
||||
|
||||
The @var{syms} table is also needed for horrible internal magic
|
||||
reasons.
|
||||
|
||||
@findex bfd_set_reloc
|
||||
@subsubsection @code{bfd_set_reloc}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
void bfd_set_reloc
|
||||
(bfd *abfd, asection *sec, arelent **rel, unsigned int count)
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the relocation pointer and count within
|
||||
section @var{sec} to the values @var{rel} and @var{count}.
|
||||
The argument @var{abfd} is ignored.
|
||||
|
||||
@findex bfd_set_file_flags
|
||||
@subsubsection @code{bfd_set_file_flags}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
boolean bfd_set_file_flags(bfd *abfd, flagword flags);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the flag word in the BFD @var{abfd} to the value @var{flags}.
|
||||
|
||||
Possible errors are:
|
||||
@itemize @bullet
|
||||
|
||||
@item
|
||||
@code{bfd_error_wrong_format} - The target bfd was not of object format.
|
||||
@item
|
||||
@code{bfd_error_invalid_operation} - The target bfd was open for reading.
|
||||
@item
|
||||
@code{bfd_error_invalid_operation} -
|
||||
The flag word contained a bit which was not applicable to the
|
||||
type of file. E.g., an attempt was made to set the @code{D_PAGED} bit
|
||||
on a BFD format which does not support demand paging.
|
||||
@end itemize
|
||||
|
||||
@findex bfd_set_start_address
|
||||
@subsubsection @code{bfd_set_start_address}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
boolean bfd_set_start_address(bfd *abfd, bfd_vma vma);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Make @var{vma} the entry point of output BFD @var{abfd}.
|
||||
|
||||
@strong{Returns}@*
|
||||
Returns @code{true} on success, @code{false} otherwise.
|
||||
|
||||
@findex bfd_get_mtime
|
||||
@subsubsection @code{bfd_get_mtime}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
long bfd_get_mtime(bfd *abfd);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return the file modification time (as read from the file system, or
|
||||
from the archive header for archive members).
|
||||
|
||||
@findex bfd_get_size
|
||||
@subsubsection @code{bfd_get_size}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
long bfd_get_size(bfd *abfd);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return the file size (as read from file system) for the file
|
||||
associated with BFD @var{abfd}.
|
||||
|
||||
The initial motivation for, and use of, this routine is not
|
||||
so we can get the exact size of the object the BFD applies to, since
|
||||
that might not be generally possible (archive members for example).
|
||||
It would be ideal if someone could eventually modify
|
||||
it so that such results were guaranteed.
|
||||
|
||||
Instead, we want to ask questions like "is this NNN byte sized
|
||||
object I'm about to try read from file offset YYY reasonable?"
|
||||
As as example of where we might do this, some object formats
|
||||
use string tables for which the first @code{sizeof(long)} bytes of the
|
||||
table contain the size of the table itself, including the size bytes.
|
||||
If an application tries to read what it thinks is one of these
|
||||
string tables, without some way to validate the size, and for
|
||||
some reason the size is wrong (byte swapping error, wrong location
|
||||
for the string table, etc.), the only clue is likely to be a read
|
||||
error when it tries to read the table, or a "virtual memory
|
||||
exhausted" error when it tries to allocate 15 bazillon bytes
|
||||
of space for the 15 bazillon byte table it is about to read.
|
||||
This function at least allows us to answer the quesion, "is the
|
||||
size reasonable?".
|
||||
|
||||
@findex bfd_get_gp_size
|
||||
@subsubsection @code{bfd_get_gp_size}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
int bfd_get_gp_size(bfd *abfd);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Return the maximum size of objects to be optimized using the GP
|
||||
register under MIPS ECOFF. This is typically set by the @code{-G}
|
||||
argument to the compiler, assembler or linker.
|
||||
|
||||
@findex bfd_set_gp_size
|
||||
@subsubsection @code{bfd_set_gp_size}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
void bfd_set_gp_size(bfd *abfd, int i);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set the maximum size of objects to be optimized using the GP
|
||||
register under ECOFF or MIPS ELF. This is typically set by
|
||||
the @code{-G} argument to the compiler, assembler or linker.
|
||||
|
||||
@findex bfd_scan_vma
|
||||
@subsubsection @code{bfd_scan_vma}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Convert, like @code{strtoul}, a numerical expression
|
||||
@var{string} into a @code{bfd_vma} integer, and return that integer.
|
||||
(Though without as many bells and whistles as @code{strtoul}.)
|
||||
The expression is assumed to be unsigned (i.e., positive).
|
||||
If given a @var{base}, it is used as the base for conversion.
|
||||
A base of 0 causes the function to interpret the string
|
||||
in hex if a leading "0x" or "0X" is found, otherwise
|
||||
in octal if a leading zero is found, otherwise in decimal.
|
||||
|
||||
Overflow is not detected.
|
||||
|
||||
@findex bfd_copy_private_bfd_data
|
||||
@subsubsection @code{bfd_copy_private_bfd_data}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Copy private BFD information from the BFD @var{ibfd} to the
|
||||
the BFD @var{obfd}. Return @code{true} on success, @code{false} on error.
|
||||
Possible error returns are:
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item
|
||||
@code{bfd_error_no_memory} -
|
||||
Not enough memory exists to create private data for @var{obfd}.
|
||||
@end itemize
|
||||
@example
|
||||
#define bfd_copy_private_bfd_data(ibfd, obfd) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
|
||||
(ibfd, obfd))
|
||||
@end example
|
||||
|
||||
@findex bfd_merge_private_bfd_data
|
||||
@subsubsection @code{bfd_merge_private_bfd_data}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Merge private BFD information from the BFD @var{ibfd} to the
|
||||
the output file BFD @var{obfd} when linking. Return @code{true}
|
||||
on success, @code{false} on error. Possible error returns are:
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item
|
||||
@code{bfd_error_no_memory} -
|
||||
Not enough memory exists to create private data for @var{obfd}.
|
||||
@end itemize
|
||||
@example
|
||||
#define bfd_merge_private_bfd_data(ibfd, obfd) \
|
||||
BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
|
||||
(ibfd, obfd))
|
||||
@end example
|
||||
|
||||
@findex bfd_set_private_flags
|
||||
@subsubsection @code{bfd_set_private_flags}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
boolean bfd_set_private_flags(bfd *abfd, flagword flags);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Set private BFD flag information in the BFD @var{abfd}.
|
||||
Return @code{true} on success, @code{false} on error. Possible error
|
||||
returns are:
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item
|
||||
@code{bfd_error_no_memory} -
|
||||
Not enough memory exists to create private data for @var{obfd}.
|
||||
@end itemize
|
||||
@example
|
||||
#define bfd_set_private_flags(abfd, flags) \
|
||||
BFD_SEND (abfd, _bfd_set_private_flags, \
|
||||
(abfd, flags))
|
||||
@end example
|
||||
|
||||
@findex stuff
|
||||
@subsubsection @code{stuff}
|
||||
@strong{Description}@*
|
||||
Stuff which should be documented:
|
||||
@example
|
||||
#define bfd_sizeof_headers(abfd, reloc) \
|
||||
BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
|
||||
|
||||
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
|
||||
BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line))
|
||||
|
||||
/* Do these three do anything useful at all, for any back end? */
|
||||
#define bfd_debug_info_start(abfd) \
|
||||
BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
|
||||
|
||||
#define bfd_debug_info_end(abfd) \
|
||||
BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
|
||||
|
||||
#define bfd_debug_info_accumulate(abfd, section) \
|
||||
BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
|
||||
|
||||
|
||||
#define bfd_stat_arch_elt(abfd, stat) \
|
||||
BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
|
||||
|
||||
#define bfd_update_armap_timestamp(abfd) \
|
||||
BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
|
||||
|
||||
#define bfd_set_arch_mach(abfd, arch, mach)\
|
||||
BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
|
||||
|
||||
#define bfd_relax_section(abfd, section, link_info, again) \
|
||||
BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
|
||||
|
||||
#define bfd_link_hash_table_create(abfd) \
|
||||
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
|
||||
|
||||
#define bfd_link_add_symbols(abfd, info) \
|
||||
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
|
||||
|
||||
#define bfd_final_link(abfd, info) \
|
||||
BFD_SEND (abfd, _bfd_final_link, (abfd, info))
|
||||
|
||||
#define bfd_free_cached_info(abfd) \
|
||||
BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
|
||||
|
||||
#define bfd_get_dynamic_symtab_upper_bound(abfd) \
|
||||
BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
|
||||
|
||||
#define bfd_print_private_bfd_data(abfd, file)\
|
||||
BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
|
||||
|
||||
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
|
||||
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
|
||||
|
||||
#define bfd_get_dynamic_reloc_upper_bound(abfd) \
|
||||
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
|
||||
|
||||
#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
|
||||
BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
|
||||
|
||||
extern bfd_byte *bfd_get_relocated_section_contents
|
||||
PARAMS ((bfd *, struct bfd_link_info *,
|
||||
struct bfd_link_order *, bfd_byte *,
|
||||
boolean, asymbol **));
|
||||
|
||||
@end example
|
||||
|
|
@ -9,7 +9,7 @@ limit (often as low as 20 open files). The module in
|
|||
the required BFD is open. If not, then it chooses a file to
|
||||
close, closes it and opens the one wanted, returning its file
|
||||
handle.
|
||||
@*
|
||||
|
||||
@findex BFD_CACHE_MAX_OPEN macro
|
||||
@subsubsection @code{BFD_CACHE_MAX_OPEN macro}
|
||||
@strong{Description}@*
|
||||
|
@ -18,7 +18,7 @@ one time.
|
|||
@example
|
||||
#define BFD_CACHE_MAX_OPEN 10
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_last_cache
|
||||
@subsubsection @code{bfd_last_cache}
|
||||
@strong{Synopsis}
|
||||
|
@ -29,7 +29,7 @@ extern bfd *bfd_last_cache;
|
|||
Zero, or a pointer to the topmost BFD on the chain. This is
|
||||
used by the @code{bfd_cache_lookup} macro in @file{libbfd.h} to
|
||||
determine when it can avoid a function call.
|
||||
@*
|
||||
|
||||
@findex bfd_cache_lookup
|
||||
@subsubsection @code{bfd_cache_lookup}
|
||||
@strong{Description}@*
|
||||
|
@ -43,7 +43,7 @@ otherwise, it has to perform the complicated lookup function.
|
|||
(FILE*)(bfd_last_cache->iostream): \
|
||||
bfd_cache_lookup_worker(x))
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_cache_init
|
||||
@subsubsection @code{bfd_cache_init}
|
||||
@strong{Synopsis}
|
||||
|
@ -52,7 +52,7 @@ boolean bfd_cache_init (bfd *abfd);
|
|||
@end example
|
||||
@strong{Description}@*
|
||||
Add a newly opened BFD to the cache.
|
||||
@*
|
||||
|
||||
@findex bfd_cache_close
|
||||
@subsubsection @code{bfd_cache_close}
|
||||
@strong{Synopsis}
|
||||
|
@ -62,11 +62,11 @@ boolean bfd_cache_close (bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Remove the BFD @var{abfd} from the cache. If the attached file is open,
|
||||
then close it too.
|
||||
@*
|
||||
|
||||
@strong{Returns}@*
|
||||
@code{false} is returned if closing the file fails, @code{true} is
|
||||
returned if all is well.
|
||||
@*
|
||||
|
||||
@findex bfd_open_file
|
||||
@subsubsection @code{bfd_open_file}
|
||||
@strong{Synopsis}
|
||||
|
@ -79,7 +79,7 @@ Call the OS to open a file for @var{abfd}. Return the @code{FILE *}
|
|||
BFD so that future accesses know the file is open. If the @code{FILE *}
|
||||
returned is @code{NULL}, then it won't have been put in the
|
||||
cache, so it won't have to be removed from it.
|
||||
@*
|
||||
|
||||
@findex bfd_cache_lookup_worker
|
||||
@subsubsection @code{bfd_cache_lookup_worker}
|
||||
@strong{Synopsis}
|
||||
|
@ -92,4 +92,4 @@ quick answer. Find a file descriptor for @var{abfd}. If
|
|||
necessary, it open it. If there are already more than
|
||||
@code{BFD_CACHE_MAX_OPEN} files open, it tries to close one first, to
|
||||
avoid running out of file descriptors.
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* chew
|
||||
Copyright (C) 1990-1991 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by steve chamberlain @cygnus
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -118,7 +119,6 @@ static void overwrite_string (string_type *, string_type *);
|
|||
static void catbuf (string_type *, char *, unsigned int);
|
||||
static void cattext (string_type *, char *);
|
||||
static void catstr (string_type *, string_type *);
|
||||
static unsigned int skip_white_and_starts (string_type *, unsigned int);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -248,7 +248,7 @@ DEFUN(skip_white_and_stars,(src, idx),
|
|||
{
|
||||
char c;
|
||||
while ((c = at(src,idx)),
|
||||
isspace (c)
|
||||
isspace ((unsigned char) c)
|
||||
|| (c == '*'
|
||||
/* Don't skip past end-of-comment or star as first
|
||||
character on its line. */
|
||||
|
@ -323,7 +323,7 @@ static void remchar (void), strip_trailing_newlines (void), push_number (void);
|
|||
static void push_text (void);
|
||||
static void remove_noncomments (string_type *, string_type *);
|
||||
static void print_stack_level (void);
|
||||
static void paramstuff (void), translatecomments (void), manglecomments (void);
|
||||
static void paramstuff (void), translatecomments (void);
|
||||
static void outputdots (void), courierize (void), bulletize (void);
|
||||
static void do_fancy_stuff (void);
|
||||
static int iscommand (string_type *, unsigned int);
|
||||
|
@ -379,7 +379,7 @@ WORD(remchar)
|
|||
static void
|
||||
strip_trailing_newlines ()
|
||||
{
|
||||
while ((isspace (at (tos, tos->write_idx - 1))
|
||||
while ((isspace ((unsigned char) at (tos, tos->write_idx - 1))
|
||||
|| at (tos, tos->write_idx - 1) == '\n')
|
||||
&& tos->write_idx > 0)
|
||||
tos->write_idx--;
|
||||
|
@ -503,9 +503,11 @@ DEFUN_VOID(paramstuff)
|
|||
fname = openp;
|
||||
/* Step back to the fname */
|
||||
fname--;
|
||||
while (fname && isspace(at(tos, fname)))
|
||||
while (fname && isspace((unsigned char) at(tos, fname)))
|
||||
fname --;
|
||||
while (fname && !isspace(at(tos,fname)) && at(tos,fname) != '*')
|
||||
while (fname
|
||||
&& !isspace((unsigned char) at(tos,fname))
|
||||
&& at(tos,fname) != '*')
|
||||
fname--;
|
||||
|
||||
fname++;
|
||||
|
@ -573,6 +575,10 @@ WORD(translatecomments)
|
|||
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
/* This is not currently used. */
|
||||
|
||||
/* turn everything not starting with a . into a comment */
|
||||
|
||||
WORD(manglecomments)
|
||||
|
@ -607,6 +613,8 @@ WORD(manglecomments)
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Mod tos so that only lines with leading dots remain */
|
||||
static void
|
||||
DEFUN_VOID(outputdots)
|
||||
|
@ -619,7 +627,7 @@ DEFUN_VOID(outputdots)
|
|||
{
|
||||
if (at(tos, idx) == '\n' && at(tos, idx+1) == '.')
|
||||
{
|
||||
char c, c2;
|
||||
char c;
|
||||
idx += 2;
|
||||
|
||||
while ((c = at(tos, idx)) && c != '\n')
|
||||
|
@ -699,7 +707,8 @@ WORD(courierize)
|
|||
{
|
||||
if (at(tos,idx) == '@')
|
||||
command = 1;
|
||||
else if (isspace(at(tos,idx)) || at(tos,idx) == '}')
|
||||
else if (isspace((unsigned char) at(tos,idx))
|
||||
|| at(tos,idx) == '}')
|
||||
command = 0;
|
||||
catchar(&out, at(tos, idx));
|
||||
idx++;
|
||||
|
@ -709,8 +718,9 @@ WORD(courierize)
|
|||
catchar(&out,'\n');
|
||||
}
|
||||
while (at(tos, idx) == '\n'
|
||||
&& (at(tos, idx+1) == '.')
|
||||
|| (at(tos,idx+1) == '|'));
|
||||
&& ((at(tos, idx+1) == '.')
|
||||
|| (at(tos,idx+1) == '|')))
|
||||
;
|
||||
cattext(&out,"@end example");
|
||||
}
|
||||
else
|
||||
|
@ -746,10 +756,10 @@ WORD(bulletize)
|
|||
idx+=2;
|
||||
}
|
||||
|
||||
else
|
||||
else
|
||||
if (at(tos, idx) == '\n' &&
|
||||
at(tos, idx+1) == 'o' &&
|
||||
isspace(at(tos, idx +2)))
|
||||
isspace((unsigned char) at(tos, idx +2)))
|
||||
{
|
||||
if (!on)
|
||||
{
|
||||
|
@ -797,7 +807,7 @@ WORD(do_fancy_stuff)
|
|||
{
|
||||
if (at(tos, idx) == '<'
|
||||
&& at(tos, idx+1) == '<'
|
||||
&& !isspace(at(tos,idx + 2)))
|
||||
&& !isspace((unsigned char) at(tos,idx + 2)))
|
||||
{
|
||||
/* This qualifies as a << startup */
|
||||
idx +=2;
|
||||
|
@ -831,7 +841,7 @@ DEFUN( iscommand,(ptr, idx),
|
|||
{
|
||||
unsigned int len = 0;
|
||||
while (at(ptr,idx)) {
|
||||
if (isupper(at(ptr,idx)) || at(ptr,idx) == ' ' ||
|
||||
if (isupper((unsigned char) at(ptr,idx)) || at(ptr,idx) == ' ' ||
|
||||
at(ptr,idx) == '_')
|
||||
{
|
||||
len++;
|
||||
|
@ -849,14 +859,29 @@ DEFUN( iscommand,(ptr, idx),
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
DEFUN(copy_past_newline,(ptr, idx, dst),
|
||||
string_type *ptr AND
|
||||
unsigned int idx AND
|
||||
string_type *dst)
|
||||
{
|
||||
int column = 0;
|
||||
|
||||
while (at(ptr, idx) && at(ptr, idx) != '\n')
|
||||
{
|
||||
catchar(dst, at(ptr, idx));
|
||||
if (at (ptr, idx) == '\t')
|
||||
{
|
||||
/* Expand tabs. Neither makeinfo nor TeX can cope well with
|
||||
them. */
|
||||
do
|
||||
catchar (dst, ' ');
|
||||
while (++column & 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
catchar(dst, at(ptr, idx));
|
||||
column++;
|
||||
}
|
||||
idx++;
|
||||
|
||||
}
|
||||
|
@ -883,7 +908,6 @@ WORD(kill_bogus_lines)
|
|||
{
|
||||
int sl ;
|
||||
|
||||
int nl = 0;
|
||||
int idx = 0;
|
||||
int c;
|
||||
int dot = 0 ;
|
||||
|
@ -897,6 +921,11 @@ WORD(kill_bogus_lines)
|
|||
}
|
||||
c = idx;
|
||||
|
||||
/* If the first char is a '.' prepend a newline so that it is
|
||||
recognized properly later. */
|
||||
if (at (tos, idx) == '.')
|
||||
catchar (&out, '\n');
|
||||
|
||||
/* Find the last char */
|
||||
while (at(tos,idx))
|
||||
{
|
||||
|
@ -906,7 +935,7 @@ WORD(kill_bogus_lines)
|
|||
/* find the last non white before the nl */
|
||||
idx--;
|
||||
|
||||
while (idx && isspace(at(tos,idx)))
|
||||
while (idx && isspace((unsigned char) at(tos,idx)))
|
||||
idx--;
|
||||
idx++;
|
||||
|
||||
|
@ -972,7 +1001,7 @@ WORD(indent)
|
|||
case '\n':
|
||||
cattext(&out,"\n");
|
||||
idx++;
|
||||
if (tab)
|
||||
if (tab && at(tos,idx))
|
||||
{
|
||||
cattext(&out," ");
|
||||
}
|
||||
|
@ -1107,7 +1136,7 @@ DEFUN(nextword,(string, word),
|
|||
|
||||
int length = 0;
|
||||
|
||||
while (isspace(*string) || *string == '-') {
|
||||
while (isspace((unsigned char) *string) || *string == '-') {
|
||||
if (*string == '-')
|
||||
{
|
||||
while (*string && *string != '\n')
|
||||
|
@ -1137,7 +1166,7 @@ DEFUN(nextword,(string, word),
|
|||
}
|
||||
else
|
||||
{
|
||||
while (!isspace(*string))
|
||||
while (!isspace((unsigned char) *string))
|
||||
{
|
||||
string++;
|
||||
length++;
|
||||
|
@ -1210,9 +1239,6 @@ static void DEFUN_VOID(perform)
|
|||
/* It's worth looking through the command list */
|
||||
if (iscommand(ptr, idx))
|
||||
{
|
||||
unsigned int i;
|
||||
int found = 0;
|
||||
|
||||
char *next;
|
||||
dict_type *word ;
|
||||
|
||||
|
@ -1305,8 +1331,6 @@ void
|
|||
DEFUN(compile, (string),
|
||||
char *string)
|
||||
{
|
||||
int jstack[STACK];
|
||||
int *jptr = jstack;
|
||||
/* add words to the dictionary */
|
||||
char *word;
|
||||
string = nextword(string, &word);
|
||||
|
@ -1416,7 +1440,7 @@ WORD(print)
|
|||
else if (*isp == 2)
|
||||
write_buffer (tos, stderr);
|
||||
else
|
||||
fprintf (stderr, "print: illegal print destination `%d'\n", *isp);
|
||||
fprintf (stderr, "print: illegal print destination `%ld'\n", *isp);
|
||||
isp--;
|
||||
tos--;
|
||||
icheck_range ();
|
||||
|
@ -1512,7 +1536,7 @@ char *av[])
|
|||
|
||||
read_in(&buffer, stdin);
|
||||
remove_noncomments(&buffer, ptr);
|
||||
for (i= 1; i < ac; i++)
|
||||
for (i= 1; i < (unsigned int) ac; i++)
|
||||
{
|
||||
if (av[i][0] == '-')
|
||||
{
|
||||
|
@ -1541,6 +1565,8 @@ char *av[])
|
|||
{
|
||||
warning = 1;
|
||||
}
|
||||
else
|
||||
usage ();
|
||||
}
|
||||
}
|
||||
write_buffer(stack+0, stdout);
|
||||
|
|
|
@ -18,7 +18,7 @@ The Intel i960 processor version of coff is implemented in
|
|||
@file{coff-i960.c}. This file has the same structure as
|
||||
@file{coff-m88k.c}, except that it includes @file{coff/i960.h}
|
||||
rather than @file{coff-m88k.h}.
|
||||
@*
|
||||
|
||||
@subsection Porting to a new version of coff
|
||||
The recommended method is to select from the existing
|
||||
implementations the version of coff which is most like the one
|
||||
|
@ -41,10 +41,10 @@ dump utility, usually called @code{att-dump} or just
|
|||
@code{dump}) are the same. Then clean up your code, and send
|
||||
what you've done to Cygnus. Then your stuff will be in the
|
||||
next release, and you won't have to keep integrating it.
|
||||
@*
|
||||
|
||||
@subsection How the coff backend works
|
||||
|
||||
@*
|
||||
|
||||
@subsubsection File layout
|
||||
The Coff backend is split into generic routines that are
|
||||
applicable to any Coff target and routines that are specific
|
||||
|
@ -75,7 +75,7 @@ types, @file{coff-i960.c} also includes some code to
|
|||
manipulate the i960 relocs. This code is not in
|
||||
@file{coffcode.h} because it would not be used by any other
|
||||
target.
|
||||
@*
|
||||
|
||||
@subsubsection Bit twiddling
|
||||
Each flavour of coff supported in BFD has its own header file
|
||||
describing the external layout of the structures. There is also
|
||||
|
@ -108,7 +108,7 @@ saving the internal BFD overhead, but uses BFD to swap things
|
|||
on the way out, making cross ports much safer. Doing so also
|
||||
allows BFD (and thus the linker) to use the same header files
|
||||
as @code{gas}, which makes one avenue to disaster disappear.
|
||||
@*
|
||||
|
||||
@subsubsection Symbol reading
|
||||
The simple canonical form for symbols used by BFD is not rich
|
||||
enough to keep all the information available in a coff symbol
|
||||
|
@ -135,7 +135,7 @@ rather than the normal text associated with the symbol
|
|||
At this time the symbol names are moved around. Coff stores
|
||||
all symbols less than nine characters long physically
|
||||
within the symbol table; longer strings are kept at the end of
|
||||
the file in the string table. This pass moves all strings
|
||||
the file in the string table. This pass moves all strings
|
||||
into memory and replaces them with pointers to the strings.
|
||||
|
||||
The symbol table is massaged once again, this time to create
|
||||
|
@ -147,7 +147,7 @@ shares strings with the hidden internal symbol table.
|
|||
|
||||
Any linenumbers are read from the coff file too, and attached
|
||||
to the symbols which own the functions the linenumbers belong to.
|
||||
@*
|
||||
|
||||
@subsubsection Symbol writing
|
||||
Writing a symbol to a coff file which didn't come from a coff
|
||||
file will lose any debugging information. The @code{asymbol}
|
||||
|
@ -199,15 +199,16 @@ to a symbol into the index into the symbol table of the asymbol.
|
|||
This routine runs through the symbol table and patches up the
|
||||
symbols from their internal form into the coff way, calls the
|
||||
bit twiddlers, and writes out the table to the file.
|
||||
@*
|
||||
|
||||
@findex coff_symbol_type
|
||||
@subsubsection @code{coff_symbol_type}
|
||||
@strong{Description}@*
|
||||
The hidden information for an @code{asymbol} is described in a
|
||||
@code{combined_entry_type}:
|
||||
@*
|
||||
.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
typedef struct coff_ptr_struct
|
||||
@{
|
||||
|
||||
|
@ -292,43 +293,43 @@ typedef struct
|
|||
Special entry points for gas to swap out coff parts:
|
||||
@example
|
||||
unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
int type,
|
||||
int class,
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
int type,
|
||||
int class,
|
||||
int indaux,
|
||||
int numaux,
|
||||
PTR ext));
|
||||
PTR ext));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR ext));
|
||||
PTR in,
|
||||
PTR ext));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR ext));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR ext));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR src,
|
||||
PTR dst));
|
||||
bfd *abfd,
|
||||
PTR src,
|
||||
PTR dst));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
|
||||
@end example
|
||||
Special entry points for generic COFF routines to call target
|
||||
|
@ -453,6 +454,12 @@ dependent COFF routines:
|
|||
boolean collect,
|
||||
struct bfd_link_hash_entry **hashp));
|
||||
|
||||
boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
|
||||
bfd * abfd ));
|
||||
boolean (*_bfd_coff_final_link_postscript) PARAMS ((
|
||||
bfd * abfd,
|
||||
struct coff_final_link_info * pfinfo));
|
||||
|
||||
@} bfd_coff_backend_data;
|
||||
|
||||
#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
|
||||
|
@ -498,7 +505,7 @@ dependent COFF routines:
|
|||
#define bfd_coff_long_section_names(abfd) \
|
||||
(coff_backend_info (abfd)->_bfd_coff_long_section_names)
|
||||
#define bfd_coff_default_section_alignment_power(abfd) \
|
||||
(coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
|
||||
(coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
|
||||
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
|
||||
((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
|
||||
|
||||
|
@ -567,6 +574,11 @@ dependent COFF routines:
|
|||
((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
|
||||
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
|
||||
|
||||
#define bfd_coff_link_output_has_begun(a) \
|
||||
((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
|
||||
#define bfd_coff_final_link_postscript(a,p) \
|
||||
((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
|
||||
|
||||
@end example
|
||||
@subsubsection Writing relocations
|
||||
To write relocations, the back end steps though the
|
||||
|
@ -578,7 +590,7 @@ address and the relocation offset; the type is dug directly
|
|||
from the howto field. Then the @code{internal_reloc} is
|
||||
swapped into the shape of an @code{external_reloc} and written
|
||||
out to disk.
|
||||
@*
|
||||
|
||||
@subsubsection Reading linenumbers
|
||||
Creating the linenumber table is done by reading in the entire
|
||||
coff linenumber table, and creating another table for internal use.
|
||||
|
@ -594,7 +606,7 @@ table, and each symbol which marks a function is marked by
|
|||
pointing its...
|
||||
|
||||
How does this work ?
|
||||
@*
|
||||
|
||||
@subsubsection Reading relocations
|
||||
Coff relocations are easily transformed into the internal BFD form
|
||||
(@code{arelent}).
|
||||
|
@ -624,4 +636,4 @@ and 960 use the @code{r_type} to directly produce an index
|
|||
into a howto table vector; the 88k subtracts a number from the
|
||||
@code{r_type} field and creates an addend field.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
@section Core files
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
These are functions pertaining to core files.
|
||||
@*
|
||||
|
||||
@findex bfd_core_file_failing_command
|
||||
@subsubsection @code{bfd_core_file_failing_command}
|
||||
@strong{Synopsis}
|
||||
|
@ -13,7 +13,7 @@ CONST char *bfd_core_file_failing_command(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Return a read-only string explaining which program was running
|
||||
when it failed and produced the core file @var{abfd}.
|
||||
@*
|
||||
|
||||
@findex bfd_core_file_failing_signal
|
||||
@subsubsection @code{bfd_core_file_failing_signal}
|
||||
@strong{Synopsis}
|
||||
|
@ -23,7 +23,7 @@ int bfd_core_file_failing_signal(bfd *abfd);
|
|||
@strong{Description}@*
|
||||
Returns the signal number which caused the core dump which
|
||||
generated the file the BFD @var{abfd} is attached to.
|
||||
@*
|
||||
|
||||
@findex core_file_matches_executable_p
|
||||
@subsubsection @code{core_file_matches_executable_p}
|
||||
@strong{Synopsis}
|
||||
|
@ -35,4 +35,4 @@ boolean core_file_matches_executable_p
|
|||
Return @code{true} if the core file attached to @var{core_bfd}
|
||||
was generated by a run of the executable file attached to
|
||||
@var{exec_bfd}, @code{false} otherwise.
|
||||
@*
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
do_fancy_stuff
|
||||
courierize
|
||||
catstr
|
||||
"@*\n" catstr
|
||||
"\n" catstr
|
||||
;
|
||||
|
||||
: asection
|
||||
|
|
|
@ -6,7 +6,7 @@ Currently, the best supported back ends are for sparc and i386
|
|||
Documentation of the internals of the support code still needs
|
||||
to be written. The code is changing quickly enough that we
|
||||
haven't bothered yet.
|
||||
@*
|
||||
|
||||
@findex bfd_elf_find_section
|
||||
@subsubsection @code{bfd_elf_find_section}
|
||||
@strong{Synopsis}
|
||||
|
@ -19,4 +19,4 @@ Since BFD hides string tables from callers, GDB needs to use an
|
|||
internal hook to find them. Sun's .stabstr, in particular,
|
||||
isn't even pointed to by the .stab section, so ordinary
|
||||
mechanisms wouldn't work to find it, even if we had some.
|
||||
@*
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ The BFD contains other BFDs and an optional index.
|
|||
@code{bfd_core}
|
||||
@end itemize
|
||||
The BFD contains the result of an executable core dump.
|
||||
@*
|
||||
|
||||
@findex bfd_check_format
|
||||
@subsubsection @code{bfd_check_format}
|
||||
@strong{Synopsis}
|
||||
|
@ -65,7 +65,7 @@ none of the backends recognised the file format.
|
|||
@code{bfd_error_file_ambiguously_recognized} -
|
||||
more than one backend recognised the file format.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
@findex bfd_check_format_matches
|
||||
@subsubsection @code{bfd_check_format_matches}
|
||||
@strong{Synopsis}
|
||||
|
@ -82,7 +82,7 @@ Then the user may choose a format and try again.
|
|||
|
||||
When done with the list that @var{matching} points to, the caller
|
||||
should free it.
|
||||
@*
|
||||
|
||||
@findex bfd_set_format
|
||||
@subsubsection @code{bfd_set_format}
|
||||
@strong{Synopsis}
|
||||
|
@ -94,7 +94,7 @@ This function sets the file format of the BFD @var{abfd} to the
|
|||
format @var{format}. If the target set in the BFD does not
|
||||
support the format requested, the format is invalid, or the BFD
|
||||
is not open for writing, then an error occurs.
|
||||
@*
|
||||
|
||||
@findex bfd_format_string
|
||||
@subsubsection @code{bfd_format_string}
|
||||
@strong{Synopsis}
|
||||
|
@ -105,4 +105,4 @@ CONST char *bfd_format_string(bfd_format format);
|
|||
Return a pointer to a const string
|
||||
@code{invalid}, @code{object}, @code{archive}, @code{core}, or @code{unknown},
|
||||
depending upon the value of @var{format}.
|
||||
@*
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ The basic hash table code is in @code{hash.c}.
|
|||
* Traversing a Hash Table::
|
||||
* Deriving a New Hash Table Type::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Creating and Freeing a Hash Table, Looking Up or Entering a String, Hash Tables, Hash Tables
|
||||
@subsection Creating and freeing a hash table
|
||||
@findex bfd_hash_table_init
|
||||
|
@ -54,7 +54,7 @@ objalloc using @code{bfd_hash_allocate}.
|
|||
Use @code{bfd_hash_table_free} to free up all the memory that has
|
||||
been allocated for a hash table. This will not free up the
|
||||
@code{struct bfd_hash_table} itself, which you must provide.
|
||||
@*
|
||||
|
||||
@node Looking Up or Entering a String, Traversing a Hash Table, Creating and Freeing a Hash Table, Hash Tables
|
||||
@subsection Looking up or entering a string
|
||||
@findex bfd_hash_lookup
|
||||
|
@ -81,7 +81,7 @@ copy the string onto the hash table objalloc or not. If
|
|||
@var{copy} is passed as @code{false}, you must be careful not to
|
||||
deallocate or modify the string as long as the hash table
|
||||
exists.
|
||||
@*
|
||||
|
||||
@node Traversing a Hash Table, Deriving a New Hash Table Type, Looking Up or Entering a String, Hash Tables
|
||||
@subsection Traversing a hash table
|
||||
@findex bfd_hash_traverse
|
||||
|
@ -97,7 +97,7 @@ must return a @code{boolean} value, which indicates whether to
|
|||
continue traversing the hash table. If the function returns
|
||||
@code{false}, @code{bfd_hash_traverse} will stop the traversal and
|
||||
return immediately.
|
||||
@*
|
||||
|
||||
@node Deriving a New Hash Table Type, , Traversing a Hash Table, Hash Tables
|
||||
@subsection Deriving a new hash table type
|
||||
Many uses of hash tables want to store additional information
|
||||
|
@ -123,7 +123,7 @@ table derived from the linker hash table.
|
|||
* Write the Derived Creation Routine::
|
||||
* Write Other Derived Routines::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Define the Derived Structures, Write the Derived Creation Routine, Deriving a New Hash Table Type, Deriving a New Hash Table Type
|
||||
@subsubsection Define the derived structures
|
||||
You must define a structure for an entry in the hash table,
|
||||
|
@ -143,7 +143,7 @@ bfd_link_hash_entry} (in @code{bfdlink.h}). The first field,
|
|||
@code{root}, is of type @code{struct bfd_hash_entry}. Similarly,
|
||||
the first field in @code{struct bfd_link_hash_table}, @code{table},
|
||||
is of type @code{struct bfd_hash_table}.
|
||||
@*
|
||||
|
||||
@node Write the Derived Creation Routine, Write Other Derived Routines, Define the Derived Structures, Deriving a New Hash Table Type
|
||||
@subsubsection Write the derived creation routine
|
||||
You must write a routine which will create and initialize an
|
||||
|
@ -174,9 +174,10 @@ Here is a boilerplate example of a creation routine.
|
|||
are creating. @var{base_newfunc} is the name of the creation
|
||||
routine of the hash table type your hash table is derived
|
||||
from.
|
||||
@*
|
||||
.struct bfd_hash_entry *
|
||||
|
||||
|
||||
@example
|
||||
struct bfd_hash_entry *
|
||||
@var{function_name} (entry, table, string)
|
||||
struct bfd_hash_entry *entry;
|
||||
struct bfd_hash_table *table;
|
||||
|
@ -189,14 +190,14 @@ from.
|
|||
if (ret == (@var{entry_type} *) NULL)
|
||||
@{
|
||||
ret = ((@var{entry_type} *)
|
||||
bfd_hash_allocate (table, sizeof (@var{entry_type})));
|
||||
bfd_hash_allocate (table, sizeof (@var{entry_type})));
|
||||
if (ret == (@var{entry_type} *) NULL)
|
||||
return NULL;
|
||||
@}
|
||||
|
||||
/* Call the allocation method of the base class. */
|
||||
ret = ((@var{entry_type} *)
|
||||
@var{base_newfunc} ((struct bfd_hash_entry *) ret, table, string));
|
||||
@var{base_newfunc} ((struct bfd_hash_entry *) ret, table, string));
|
||||
|
||||
/* Initialize the local fields here. */
|
||||
|
||||
|
@ -214,7 +215,7 @@ routine for a basic hash table.
|
|||
@code{_bfd_link_hash_newfunc} also initializes the local fields
|
||||
in a linker hash table entry: @code{type}, @code{written} and
|
||||
@code{next}.
|
||||
@*
|
||||
|
||||
@node Write Other Derived Routines, , Write the Derived Creation Routine, Deriving a New Hash Table Type
|
||||
@subsubsection Write other derived routines
|
||||
You will want to write other routines for your new hash table,
|
||||
|
@ -241,4 +242,4 @@ the a.out backend linker hash table, which is derived from the
|
|||
linker hash table, uses macros for the lookup and traversal
|
||||
routines. These are @code{aout_link_hash_lookup} and
|
||||
@code{aout_link_hash_traverse} in aoutx.h.
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@section Initialization
|
||||
These are the functions that handle initializing a BFD.
|
||||
@*
|
||||
|
||||
@findex bfd_init
|
||||
@subsubsection @code{bfd_init}
|
||||
@strong{Synopsis}
|
||||
|
@ -10,4 +10,4 @@ void bfd_init(void);
|
|||
@strong{Description}@*
|
||||
This routine must be called before any other BFD function to
|
||||
initialize magical internal data structures.
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@section Internal functions
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
These routines are used within BFD.
|
||||
They are not intended for export, but are documented here for
|
||||
completeness.
|
||||
@*
|
||||
|
||||
@findex bfd_write_bigendian_4byte_int
|
||||
@subsubsection @code{bfd_write_bigendian_4byte_int}
|
||||
@strong{Synopsis}
|
||||
|
@ -16,7 +16,7 @@ void bfd_write_bigendian_4byte_int(bfd *abfd, int i);
|
|||
Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
|
||||
endian order regardless of what else is going on. This is useful in
|
||||
archives.
|
||||
@*
|
||||
|
||||
@findex bfd_put_size
|
||||
@subsubsection @code{bfd_put_size}
|
||||
@findex bfd_get_size
|
||||
|
@ -45,41 +45,41 @@ To detect calling these with less than a @code{bfd_vma}, use
|
|||
#define bfd_put_8(abfd, val, ptr) \
|
||||
(*((unsigned char *)(ptr)) = (unsigned char)(val))
|
||||
#define bfd_put_signed_8 \
|
||||
bfd_put_8
|
||||
bfd_put_8
|
||||
#define bfd_get_8(abfd, ptr) \
|
||||
(*(unsigned char *)(ptr))
|
||||
#define bfd_get_signed_8(abfd, ptr) \
|
||||
((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
|
||||
((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
|
||||
|
||||
#define bfd_put_16(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
|
||||
#define bfd_put_signed_16 \
|
||||
bfd_put_16
|
||||
bfd_put_16
|
||||
#define bfd_get_16(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx16, (ptr))
|
||||
#define bfd_get_signed_16(abfd, ptr) \
|
||||
BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
|
||||
BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
|
||||
|
||||
#define bfd_put_32(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
|
||||
#define bfd_put_signed_32 \
|
||||
bfd_put_32
|
||||
bfd_put_32
|
||||
#define bfd_get_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx32, (ptr))
|
||||
#define bfd_get_signed_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
|
||||
BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
|
||||
|
||||
#define bfd_put_64(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
|
||||
#define bfd_put_signed_64 \
|
||||
bfd_put_64
|
||||
bfd_put_64
|
||||
#define bfd_get_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx64, (ptr))
|
||||
#define bfd_get_signed_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
||||
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
||||
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_h_put_size
|
||||
@subsubsection @code{bfd_h_put_size}
|
||||
@strong{Description}@*
|
||||
|
@ -93,43 +93,43 @@ order and their data in little endian order.
|
|||
/* Byte swapping macros for file header data. */
|
||||
|
||||
#define bfd_h_put_8(abfd, val, ptr) \
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
#define bfd_h_put_signed_8(abfd, val, ptr) \
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
bfd_put_8 (abfd, val, ptr)
|
||||
#define bfd_h_get_8(abfd, ptr) \
|
||||
bfd_get_8 (abfd, ptr)
|
||||
bfd_get_8 (abfd, ptr)
|
||||
#define bfd_h_get_signed_8(abfd, ptr) \
|
||||
bfd_get_signed_8 (abfd, ptr)
|
||||
bfd_get_signed_8 (abfd, ptr)
|
||||
|
||||
#define bfd_h_put_16(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
|
||||
#define bfd_h_put_signed_16 \
|
||||
bfd_h_put_16
|
||||
bfd_h_put_16
|
||||
#define bfd_h_get_16(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx16,(ptr))
|
||||
#define bfd_h_get_signed_16(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
|
||||
|
||||
#define bfd_h_put_32(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
|
||||
#define bfd_h_put_signed_32 \
|
||||
bfd_h_put_32
|
||||
bfd_h_put_32
|
||||
#define bfd_h_get_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx32,(ptr))
|
||||
#define bfd_h_get_signed_32(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
|
||||
|
||||
#define bfd_h_put_64(abfd, val, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
|
||||
#define bfd_h_put_signed_64 \
|
||||
bfd_h_put_64
|
||||
bfd_h_put_64
|
||||
#define bfd_h_get_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx64,(ptr))
|
||||
#define bfd_h_get_signed_64(abfd, ptr) \
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
|
||||
BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
|
||||
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_log2
|
||||
@subsubsection @code{bfd_log2}
|
||||
@strong{Synopsis}
|
||||
|
@ -139,4 +139,4 @@ unsigned int bfd_log2(bfd_vma x);
|
|||
@strong{Description}@*
|
||||
Return the log base 2 of the value supplied, rounded up. E.g., an
|
||||
@var{x} of 1025 returns 11.
|
||||
@*
|
||||
|
||||
|
|
|
@ -30,12 +30,12 @@ ends which have implemented versions of these routines are
|
|||
a.out (in @code{aoutx.h}) and ECOFF (in @code{ecoff.c}). The a.out
|
||||
routines are used as examples throughout this section.
|
||||
|
||||
@menu
|
||||
@menu
|
||||
* Creating a Linker Hash Table::
|
||||
* Adding Symbols to the Hash Table::
|
||||
* Performing the Final Link::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Creating a Linker Hash Table, Adding Symbols to the Hash Table, Linker Functions, Linker Functions
|
||||
@subsection Creating a linker hash table
|
||||
@cindex _bfd_link_hash_table_create in target vector
|
||||
|
@ -70,7 +70,7 @@ generally not know exactly which fields will be required until
|
|||
you have finished. You should simply create a new hash table
|
||||
which defines no additional fields, and then simply add fields
|
||||
as they become necessary.
|
||||
@*
|
||||
|
||||
@node Adding Symbols to the Hash Table, Performing the Final Link, Creating a Linker Hash Table, Linker Functions
|
||||
@subsection Adding symbols to the hash table
|
||||
@cindex _bfd_link_add_symbols in target vector
|
||||
|
@ -93,7 +93,7 @@ The a.out version of this entry point is
|
|||
* Adding symbols from an object file::
|
||||
* Adding symbols from an archive::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Differing file formats, Adding symbols from an object file, Adding Symbols to the Hash Table, Adding Symbols to the Hash Table
|
||||
@subsubsection Differing file formats
|
||||
Normally all the files involved in a link will be of the same
|
||||
|
@ -127,7 +127,7 @@ See @code{ecoff_link_add_externals} for an example of how to
|
|||
check the @code{creator} field before saving information (in this
|
||||
case, the ECOFF external symbol debugging information) in a
|
||||
hash table entry.
|
||||
@*
|
||||
|
||||
@node Adding symbols from an object file, Adding symbols from an archive, Differing file formats, Adding Symbols to the Hash Table
|
||||
@subsubsection Adding symbols from an object file
|
||||
When the @code{_bfd_link_add_symbols} routine is passed an object
|
||||
|
@ -168,7 +168,7 @@ pointers to the hash tables entries created by
|
|||
@code{_bfd_generic_link_add_one_symbol} indexed by symbol number,
|
||||
so that the @code{_bfd_final_link} routine does not have to call
|
||||
the hash table lookup routine to locate the entry.
|
||||
@*
|
||||
|
||||
@node Adding symbols from an archive, , Adding symbols from an object file, Adding Symbols to the Hash Table
|
||||
@subsubsection Adding symbols from an archive
|
||||
When the @code{_bfd_link_add_symbols} routine is passed an
|
||||
|
@ -217,7 +217,7 @@ call @code{_bfd_generic_link_add_archive_symbols}, because ECOFF
|
|||
archives already contain a hash table of symbols. The ECOFF
|
||||
back end searches the archive itself to avoid the overhead of
|
||||
creating a new hash table.
|
||||
@*
|
||||
|
||||
@node Performing the Final Link, , Adding Symbols to the Hash Table, Linker Functions
|
||||
@subsection Performing the final link
|
||||
@cindex _bfd_link_final_link in target vector
|
||||
|
@ -246,7 +246,7 @@ the specific object file format. The a.out
|
|||
* Relocating the section contents::
|
||||
* Writing the symbol table::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Information provided by the linker, Relocating the section contents, Performing the Final Link, Performing the Final Link
|
||||
@subsubsection Information provided by the linker
|
||||
Before the linker calls the @code{_bfd_final_link} entry point,
|
||||
|
@ -267,7 +267,7 @@ types of information. They also describe relocs that must be
|
|||
created by the BFD backend, but do not correspond to any input
|
||||
file; this is used to support -Ur, which builds constructors
|
||||
while generating a relocateable object file.
|
||||
@*
|
||||
|
||||
@node Relocating the section contents, Writing the symbol table, Information provided by the linker, Performing the Final Link
|
||||
@subsubsection Relocating the section contents
|
||||
The @code{_bfd_final_link} function should look through the
|
||||
|
@ -302,7 +302,7 @@ The a.out function which handles reading, relocating, and
|
|||
writing section contents is @code{aout_link_input_section}. The
|
||||
actual relocation is done in @code{aout_link_input_section_std}
|
||||
and @code{aout_link_input_section_ext}.
|
||||
@*
|
||||
|
||||
@node Writing the symbol table, , Relocating the section contents, Performing the Final Link
|
||||
@subsubsection Writing the symbol table
|
||||
The @code{_bfd_final_link} function must gather all the symbols
|
||||
|
@ -347,7 +347,7 @@ traversing the global hash table with the function
|
|||
@code{aout_link_write_other_symbol}. It builds a string table
|
||||
while writing out the symbols, which is written to the output
|
||||
file at the end of @code{NAME(aout,final_link)}.
|
||||
@*
|
||||
|
||||
@findex bfd_link_split_section
|
||||
@subsubsection @code{bfd_link_split_section}
|
||||
@strong{Synopsis}
|
||||
|
@ -362,4 +362,4 @@ reloceatable or final link.
|
|||
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
|
||||
|
||||
@end example
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@section Opening and closing BFDs
|
||||
|
||||
@*
|
||||
|
||||
@findex bfd_openr
|
||||
@subsubsection @code{bfd_openr}
|
||||
@strong{Synopsis}
|
||||
|
@ -16,7 +16,7 @@ that function.
|
|||
|
||||
If @code{NULL} is returned then an error has occured. Possible errors
|
||||
are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or @code{system_call} error.
|
||||
@*
|
||||
|
||||
@findex bfd_fdopenr
|
||||
@subsubsection @code{bfd_fdopenr}
|
||||
@strong{Synopsis}
|
||||
|
@ -40,7 +40,7 @@ assume no cacheing; the file descriptor will remain open until
|
|||
files.
|
||||
|
||||
Possible errors are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
|
||||
@*
|
||||
|
||||
@findex bfd_openstreamr
|
||||
@subsubsection @code{bfd_openstreamr}
|
||||
@strong{Synopsis}
|
||||
|
@ -50,7 +50,7 @@ bfd *bfd_openstreamr(const char *, const char *, PTR);
|
|||
@strong{Description}@*
|
||||
Open a BFD for read access on an existing stdio stream. When
|
||||
the BFD is passed to @code{bfd_close}, the stream will be closed.
|
||||
@*
|
||||
|
||||
@findex bfd_openw
|
||||
@subsubsection @code{bfd_openw}
|
||||
@strong{Synopsis}
|
||||
|
@ -63,7 +63,7 @@ file format @var{target}, and return a pointer to it.
|
|||
|
||||
Possible errors are @code{bfd_error_system_call}, @code{bfd_error_no_memory},
|
||||
@code{bfd_error_invalid_target}.
|
||||
@*
|
||||
|
||||
@findex bfd_close
|
||||
@subsubsection @code{bfd_close}
|
||||
@strong{Synopsis}
|
||||
|
@ -80,10 +80,10 @@ All memory attached to the BFD is released.
|
|||
|
||||
The file descriptor associated with the BFD is closed (even
|
||||
if it was passed in to BFD by @code{bfd_fdopenr}).
|
||||
@*
|
||||
|
||||
@strong{Returns}@*
|
||||
@code{true} is returned if all is ok, otherwise @code{false}.
|
||||
@*
|
||||
|
||||
@findex bfd_close_all_done
|
||||
@subsubsection @code{bfd_close_all_done}
|
||||
@strong{Synopsis}
|
||||
|
@ -100,10 +100,10 @@ If the created file is executable, then @code{chmod} is called
|
|||
to mark it as such.
|
||||
|
||||
All memory attached to the BFD is released.
|
||||
@*
|
||||
|
||||
@strong{Returns}@*
|
||||
@code{true} is returned if all is ok, otherwise @code{false}.
|
||||
@*
|
||||
|
||||
@findex bfd_create
|
||||
@subsubsection @code{bfd_create}
|
||||
@strong{Synopsis}
|
||||
|
@ -115,7 +115,7 @@ Create a new BFD in the manner of
|
|||
@code{bfd_openw}, but without opening a file. The new BFD
|
||||
takes the target from the target used by @var{template}. The
|
||||
format is always set to @code{bfd_object}.
|
||||
@*
|
||||
|
||||
@findex bfd_alloc
|
||||
@subsubsection @code{bfd_alloc}
|
||||
@strong{Synopsis}
|
||||
|
@ -125,4 +125,4 @@ PTR bfd_alloc (bfd *abfd, size_t wanted);
|
|||
@strong{Description}@*
|
||||
Allocate a block of @var{wanted} bytes of memory attached to
|
||||
@code{abfd} and return a pointer to it.
|
||||
@*
|
||||
|
||||
|
|
|
@ -16,14 +16,15 @@ in a particular section, and fill in the right bits of the structures.
|
|||
* typedef arelent::
|
||||
* howto manager::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
|
||||
@node typedef arelent, howto manager, Relocations, Relocations
|
||||
@subsection typedef arelent
|
||||
This is the structure of a relocation entry:
|
||||
@*
|
||||
.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
typedef enum bfd_reloc_status
|
||||
@{
|
||||
/* No errors detected */
|
||||
|
@ -219,37 +220,39 @@ information in the reloc record and data section. A back end
|
|||
would normally have a relocation instruction set and turn
|
||||
relocations into pointers to the correct structure on input -
|
||||
but it would be possible to create each howto field on demand.
|
||||
@*
|
||||
|
||||
@subsubsection @code{enum complain_overflow}
|
||||
Indicates what sort of overflow checking should be done when
|
||||
performing a relocation.
|
||||
@*
|
||||
.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
enum complain_overflow
|
||||
@{
|
||||
/* Do not complain on overflow. */
|
||||
/* Do not complain on overflow. */
|
||||
complain_overflow_dont,
|
||||
|
||||
/* Complain if the bitfield overflows, whether it is considered
|
||||
as signed or unsigned. */
|
||||
/* Complain if the bitfield overflows, whether it is considered
|
||||
as signed or unsigned. */
|
||||
complain_overflow_bitfield,
|
||||
|
||||
/* Complain if the value overflows when considered as signed
|
||||
number. */
|
||||
/* Complain if the value overflows when considered as signed
|
||||
number. */
|
||||
complain_overflow_signed,
|
||||
|
||||
/* Complain if the value overflows when considered as an
|
||||
unsigned number. */
|
||||
/* Complain if the value overflows when considered as an
|
||||
unsigned number. */
|
||||
complain_overflow_unsigned
|
||||
@};
|
||||
@end example
|
||||
@subsubsection @code{reloc_howto_type}
|
||||
The @code{reloc_howto_type} is a structure which contains all the
|
||||
information that libbfd needs to know to tie up a back end's data.
|
||||
@*
|
||||
.struct symbol_cache_entry; /* Forward declaration */
|
||||
|
||||
|
||||
@example
|
||||
struct symbol_cache_entry; /* Forward declaration */
|
||||
|
||||
struct reloc_howto_struct
|
||||
@{
|
||||
|
@ -265,13 +268,13 @@ struct reloc_howto_struct
|
|||
unwanted data from the relocation. */
|
||||
unsigned int rightshift;
|
||||
|
||||
/* The size of the item to be relocated. This is *not* a
|
||||
power-of-two measure. To get the number of bytes operated
|
||||
on by a type of relocation, use bfd_get_reloc_size. */
|
||||
/* The size of the item to be relocated. This is *not* a
|
||||
power-of-two measure. To get the number of bytes operated
|
||||
on by a type of relocation, use bfd_get_reloc_size. */
|
||||
int size;
|
||||
|
||||
/* The number of bits in the item to be relocated. This is used
|
||||
when doing overflow checking. */
|
||||
when doing overflow checking. */
|
||||
unsigned int bitsize;
|
||||
|
||||
/* Notes that the relocation is relative to the location in the
|
||||
|
@ -280,12 +283,12 @@ struct reloc_howto_struct
|
|||
being relocated. */
|
||||
boolean pc_relative;
|
||||
|
||||
/* The bit position of the reloc value in the destination.
|
||||
The relocated value is left shifted by this amount. */
|
||||
/* The bit position of the reloc value in the destination.
|
||||
The relocated value is left shifted by this amount. */
|
||||
unsigned int bitpos;
|
||||
|
||||
/* What type of overflow error should be checked for when
|
||||
relocating. */
|
||||
/* What type of overflow error should be checked for when
|
||||
relocating. */
|
||||
enum complain_overflow complain_on_overflow;
|
||||
|
||||
/* If this field is non null, then the supplied function is
|
||||
|
@ -293,8 +296,8 @@ struct reloc_howto_struct
|
|||
strange relocation methods to be accomodated (e.g., i960 callj
|
||||
instructions). */
|
||||
bfd_reloc_status_type (*special_function)
|
||||
PARAMS ((bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
PARAMS ((bfd *abfd,
|
||||
arelent *reloc_entry,
|
||||
struct symbol_cache_entry *symbol,
|
||||
PTR data,
|
||||
asection *input_section,
|
||||
|
@ -341,7 +344,7 @@ The HOWTO define is horrible and will go away.
|
|||
#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
|
||||
@{(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC@}
|
||||
@end example
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
And will be replaced with the totally magic way. But for the
|
||||
moment, we are compatible, so do it this way.
|
||||
|
@ -349,7 +352,7 @@ moment, we are compatible, so do it this way.
|
|||
#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
|
||||
|
||||
@end example
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
Helper routine to turn a symbol into a relocation value.
|
||||
@example
|
||||
|
@ -365,17 +368,17 @@ Helper routine to turn a symbol into a relocation value.
|
|||
@} \
|
||||
@}
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_get_reloc_size
|
||||
@subsubsection @code{bfd_get_reloc_size}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
int bfd_get_reloc_size (reloc_howto_type *);
|
||||
unsigned int bfd_get_reloc_size (reloc_howto_type *);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
For a reloc_howto_type that operates on a fixed number of bytes,
|
||||
this returns the number of bytes operated on.
|
||||
@*
|
||||
|
||||
@findex arelent_chain
|
||||
@subsubsection @code{arelent_chain}
|
||||
@strong{Description}@*
|
||||
|
@ -386,7 +389,24 @@ typedef struct relent_chain @{
|
|||
struct relent_chain *next;
|
||||
@} arelent_chain;
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_check_overflow
|
||||
@subsubsection @code{bfd_check_overflow}
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
bfd_reloc_status_type
|
||||
bfd_check_overflow
|
||||
(enum complain_overflow how,
|
||||
unsigned int bitsize,
|
||||
unsigned int rightshift,
|
||||
bfd_vma relocation);
|
||||
@end example
|
||||
@strong{Description}@*
|
||||
Perform overflow checking on @var{relocation} which has @var{bitsize}
|
||||
significant bits and will be shifted right by @var{rightshift} bits.
|
||||
The result is either of @code{bfd_reloc_ok} or
|
||||
@code{bfd_reloc_overflow}.
|
||||
|
||||
@findex bfd_perform_relocation
|
||||
@subsubsection @code{bfd_perform_relocation}
|
||||
@strong{Synopsis}
|
||||
|
@ -415,7 +435,7 @@ slot will always be big enough for the addend. Complex reloc
|
|||
types with addends were invented to solve just this problem.
|
||||
The @var{error_message} argument is set to an error message if
|
||||
this return @code{bfd_reloc_dangerous}.
|
||||
@*
|
||||
|
||||
@findex bfd_install_relocation
|
||||
@subsubsection @code{bfd_install_relocation}
|
||||
@strong{Synopsis}
|
||||
|
@ -436,14 +456,14 @@ a relocation.
|
|||
|
||||
For now, this function should be considered reserved for the
|
||||
assembler.
|
||||
@*
|
||||
|
||||
|
||||
@node howto manager, , typedef arelent, Relocations
|
||||
@section The howto manager
|
||||
When an application wants to create a relocation, but doesn't
|
||||
know what the target machine might call it, it can find out by
|
||||
using this bit of code.
|
||||
@*
|
||||
|
||||
@findex bfd_reloc_code_type
|
||||
@subsubsection @code{bfd_reloc_code_type}
|
||||
@strong{Description}@*
|
||||
|
@ -455,7 +475,7 @@ return a howto pointer.
|
|||
This does mean that the application must determine the correct
|
||||
enumerator value; you can't get a howto pointer from a random set
|
||||
of attributes.
|
||||
@*
|
||||
|
||||
Here are the possible values for @code{enum bfd_reloc_code_real}:
|
||||
|
||||
@deffn {} BFD_RELOC_64
|
||||
|
@ -576,11 +596,18 @@ I think these are specific to SPARC a.out (e.g., Sun 4).
|
|||
@deffnx {} BFD_RELOC_SPARC_PC_LM22
|
||||
@deffnx {} BFD_RELOC_SPARC_WDISP16
|
||||
@deffnx {} BFD_RELOC_SPARC_WDISP19
|
||||
@deffnx {} BFD_RELOC_SPARC_GLOB_JMP
|
||||
@deffnx {} BFD_RELOC_SPARC_7
|
||||
@deffnx {} BFD_RELOC_SPARC_6
|
||||
@deffnx {} BFD_RELOC_SPARC_5
|
||||
Some relocations we're using for SPARC V9 -- subject to change.
|
||||
@deffnx {} BFD_RELOC_SPARC_DISP64
|
||||
@deffnx {} BFD_RELOC_SPARC_PLT64
|
||||
@deffnx {} BFD_RELOC_SPARC_HIX22
|
||||
@deffnx {} BFD_RELOC_SPARC_LOX10
|
||||
@deffnx {} BFD_RELOC_SPARC_H44
|
||||
@deffnx {} BFD_RELOC_SPARC_M44
|
||||
@deffnx {} BFD_RELOC_SPARC_L44
|
||||
@deffnx {} BFD_RELOC_SPARC_REGISTER
|
||||
SPARC64 relocations
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_ALPHA_GPDISP_HI16
|
||||
Alpha ECOFF and ELF relocations. Some of these treat the symbol or
|
||||
|
@ -790,6 +817,23 @@ These relocs are only used within the ARM assembler. They are not
|
|||
@deffnx {} BFD_RELOC_SH_LABEL
|
||||
Hitachi SH relocs. Not all of these appear in object files.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9
|
||||
@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH12
|
||||
@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH23
|
||||
Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
|
||||
be zero and is not stored in the instruction.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_ARC_B22_PCREL
|
||||
Argonaut RISC Core (ARC) relocs.
|
||||
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
|
||||
not stored in the instruction. The high 20 bits are installed in bits 26
|
||||
through 7 of the instruction.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_ARC_B26
|
||||
ARC 26 bit absolute branch. The lowest two bits must be zero and are not
|
||||
stored in the instruction. The high 24 bits are installed in bits 23
|
||||
through 0.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_D10V_10_PCREL_R
|
||||
Mitsubishi D10V relocs.
|
||||
This is a 10-bit reloc with the right 2 bits
|
||||
|
@ -838,6 +882,40 @@ This is a 16-bit reloc containing the lower 16 bits of an address.
|
|||
This is a 16-bit reloc containing the small data area offset for use in
|
||||
add3, load, and store instructions.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_9_PCREL
|
||||
This is a 9-bit reloc
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_22_PCREL
|
||||
This is a 22-bit reloc
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_SDA_16_16_OFFSET
|
||||
This is a 16 bit offset from the short data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_SDA_15_16_OFFSET
|
||||
This is a 16 bit offset (of which only 15 bits are used) from the
|
||||
short data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_ZDA_16_16_OFFSET
|
||||
This is a 16 bit offset from the zero data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_ZDA_15_16_OFFSET
|
||||
This is a 16 bit offset (of which only 15 bits are used) from the
|
||||
zero data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_TDA_6_8_OFFSET
|
||||
This is an 8 bit offset (of which only 6 bits are used) from the
|
||||
tiny data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_TDA_7_8_OFFSET
|
||||
This is an 8bit offset (of which only 7 bits are used) from the tiny
|
||||
data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_TDA_7_7_OFFSET
|
||||
This is a 7 bit offset from the tiny data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_V850_TDA_16_16_OFFSET
|
||||
This is a 16 bit offset from the tiny data area pointer.
|
||||
@end deffn
|
||||
@deffn {} BFD_RELOC_MN10300_32_PCREL
|
||||
This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
|
@ -846,8 +924,14 @@ instruction.
|
|||
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
@end deffn
|
||||
.
|
||||
@deffn {} BFD_RELOC_TIC30_LDP
|
||||
This is a 8bit DP reloc for the tms320c30, where the most
|
||||
significant 8 bits of a 24 bit word are placed into the least
|
||||
significant 8 bits of the opcode.
|
||||
@end deffn
|
||||
|
||||
@example
|
||||
|
||||
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
|
||||
@end example
|
||||
@findex bfd_reloc_type_lookup
|
||||
|
@ -861,7 +945,7 @@ bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
|
|||
Return a pointer to a howto structure which, when
|
||||
invoked, will perform the relocation @var{code} on data from the
|
||||
architecture noted.
|
||||
@*
|
||||
|
||||
@findex bfd_default_reloc_type_lookup
|
||||
@subsubsection @code{bfd_default_reloc_type_lookup}
|
||||
@strong{Synopsis}
|
||||
|
@ -871,7 +955,7 @@ reloc_howto_type *bfd_default_reloc_type_lookup
|
|||
@end example
|
||||
@strong{Description}@*
|
||||
Provides a default relocation lookup routine for any architecture.
|
||||
@*
|
||||
|
||||
@findex bfd_get_reloc_code_name
|
||||
@subsubsection @code{bfd_get_reloc_code_name}
|
||||
@strong{Synopsis}
|
||||
|
@ -881,7 +965,7 @@ const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
|
|||
@strong{Description}@*
|
||||
Provides a printable name for the supplied relocation code.
|
||||
Useful mainly for printing error messages.
|
||||
@*
|
||||
|
||||
@findex bfd_generic_relax_section
|
||||
@subsubsection @code{bfd_generic_relax_section}
|
||||
@strong{Synopsis}
|
||||
|
@ -895,7 +979,7 @@ boolean bfd_generic_relax_section
|
|||
@strong{Description}@*
|
||||
Provides default handling for relaxing for back ends which
|
||||
don't do relaxing -- i.e., does nothing.
|
||||
@*
|
||||
|
||||
@findex bfd_generic_get_relocated_section_contents
|
||||
@subsubsection @code{bfd_generic_get_relocated_section_contents}
|
||||
@strong{Synopsis}
|
||||
|
@ -911,4 +995,4 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
|
|||
@strong{Description}@*
|
||||
Provides default handling of relocation effort for back ends
|
||||
which can't be bothered to do it efficiently.
|
||||
@*
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Sections are supported in BFD in @code{section.c}.
|
|||
* typedef asection::
|
||||
* section prototypes::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Section Input, Section Output, Sections, Sections
|
||||
@subsection Section input
|
||||
When a BFD is opened for reading, the section structures are
|
||||
|
@ -42,7 +42,7 @@ size of the data. An IEEE-695 file doesn't contain raw data in
|
|||
sections, but data and relocation expressions intermixed, so
|
||||
the data area has to be parsed to get out the data and
|
||||
relocations.
|
||||
@*
|
||||
|
||||
@node Section Output, typedef asection, Section Input, Sections
|
||||
@subsection Section output
|
||||
To write a new object style BFD, the various sections to be
|
||||
|
@ -81,7 +81,7 @@ structures would look like:
|
|||
size 0x103 |
|
||||
output_section --------|
|
||||
@end example
|
||||
@*
|
||||
|
||||
@subsection Link orders
|
||||
The data within a section is stored in a @dfn{link_order}.
|
||||
These are much like the fixups in @code{gas}. The link_order
|
||||
|
@ -98,14 +98,15 @@ select whether to relax. Sometimes relaxing takes a lot of
|
|||
time. The linker runs around the relocations to see if any
|
||||
are attached to data which can be shrunk, if so it does it on
|
||||
a link_order by link_order basis.
|
||||
@*
|
||||
|
||||
|
||||
@node typedef asection, section prototypes, Section Output, Sections
|
||||
@subsection typedef asection
|
||||
Here is the section structure:
|
||||
@*
|
||||
.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
typedef struct sec
|
||||
@{
|
||||
/* The name of the section; the name isn't a copy, the pointer is
|
||||
|
@ -201,7 +202,7 @@ typedef struct sec
|
|||
multiple times, the value of a symbol is the amount of
|
||||
space it requires, and the largest symbol value is the one
|
||||
used). Most targets have exactly one of these (which we
|
||||
translate to bfd_com_section_ptr), but ECOFF has two. */
|
||||
translate to bfd_com_section_ptr), but ECOFF has two. */
|
||||
#define SEC_IS_COMMON 0x8000
|
||||
|
||||
/* The section contains only debugging information. For
|
||||
|
@ -217,76 +218,76 @@ typedef struct sec
|
|||
#define SEC_IN_MEMORY 0x20000
|
||||
|
||||
/* The contents of this section are to be excluded by the
|
||||
linker for executable and shared objects unless those
|
||||
objects are to be further relocated. */
|
||||
linker for executable and shared objects unless those
|
||||
objects are to be further relocated. */
|
||||
#define SEC_EXCLUDE 0x40000
|
||||
|
||||
/* The contents of this section are to be sorted by the
|
||||
based on the address specified in the associated symbol
|
||||
table. */
|
||||
/* The contents of this section are to be sorted by the
|
||||
based on the address specified in the associated symbol
|
||||
table. */
|
||||
#define SEC_SORT_ENTRIES 0x80000
|
||||
|
||||
/* When linking, duplicate sections of the same name should be
|
||||
discarded, rather than being combined into a single section as
|
||||
is usually done. This is similar to how common symbols are
|
||||
handled. See SEC_LINK_DUPLICATES below. */
|
||||
/* When linking, duplicate sections of the same name should be
|
||||
discarded, rather than being combined into a single section as
|
||||
is usually done. This is similar to how common symbols are
|
||||
handled. See SEC_LINK_DUPLICATES below. */
|
||||
#define SEC_LINK_ONCE 0x100000
|
||||
|
||||
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
||||
should handle duplicate sections. */
|
||||
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
||||
should handle duplicate sections. */
|
||||
#define SEC_LINK_DUPLICATES 0x600000
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that duplicate
|
||||
sections with the same name should simply be discarded. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that duplicate
|
||||
sections with the same name should simply be discarded. */
|
||||
#define SEC_LINK_DUPLICATES_DISCARD 0x0
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if there are any duplicate sections, although
|
||||
it should still only link one copy. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if there are any duplicate sections, although
|
||||
it should still only link one copy. */
|
||||
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections are a different size. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections are a different size. */
|
||||
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
|
||||
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections contain different
|
||||
contents. */
|
||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||
should warn if any duplicate sections contain different
|
||||
contents. */
|
||||
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
|
||||
|
||||
/* This section was created by the linker as part of dynamic
|
||||
relocation or other arcane processing. It is skipped when
|
||||
going through the first-pass output, trusting that someone
|
||||
else up the line will take care of it later. */
|
||||
/* This section was created by the linker as part of dynamic
|
||||
relocation or other arcane processing. It is skipped when
|
||||
going through the first-pass output, trusting that someone
|
||||
else up the line will take care of it later. */
|
||||
#define SEC_LINKER_CREATED 0x800000
|
||||
|
||||
/* End of section flags. */
|
||||
/* End of section flags. */
|
||||
|
||||
/* Some internal packed boolean fields. */
|
||||
/* Some internal packed boolean fields. */
|
||||
|
||||
/* See the vma field. */
|
||||
unsigned int user_set_vma : 1;
|
||||
/* See the vma field. */
|
||||
unsigned int user_set_vma : 1;
|
||||
|
||||
/* Whether relocations have been processed. */
|
||||
unsigned int reloc_done : 1;
|
||||
/* Whether relocations have been processed. */
|
||||
unsigned int reloc_done : 1;
|
||||
|
||||
/* A mark flag used by some of the linker backends. */
|
||||
unsigned int linker_mark : 1;
|
||||
/* A mark flag used by some of the linker backends. */
|
||||
unsigned int linker_mark : 1;
|
||||
|
||||
/* End of internal packed boolean fields. */
|
||||
/* End of internal packed boolean fields. */
|
||||
|
||||
/* The virtual memory address of the section - where it will be
|
||||
at run time. The symbols are relocated against this. The
|
||||
user_set_vma flag is maintained by bfd; if it's not set, the
|
||||
backend can assign addresses (for example, in @code{a.out}, where
|
||||
the default address for @code{.data} is dependent on the specific
|
||||
target and various flags). */
|
||||
user_set_vma flag is maintained by bfd; if it's not set, the
|
||||
backend can assign addresses (for example, in @code{a.out}, where
|
||||
the default address for @code{.data} is dependent on the specific
|
||||
target and various flags). */
|
||||
|
||||
bfd_vma vma;
|
||||
|
||||
/* The load address of the section - where it would be in a
|
||||
rom image; really only used for writing section header
|
||||
information. */
|
||||
information. */
|
||||
|
||||
bfd_vma lma;
|
||||
|
||||
|
@ -297,8 +298,8 @@ typedef struct sec
|
|||
bfd_size_type _cooked_size;
|
||||
|
||||
/* The original size on disk of the section, in bytes. Normally this
|
||||
value is the same as the size, but if some relaxing has
|
||||
been done, then this value will be bigger. */
|
||||
value is the same as the size, but if some relaxing has
|
||||
been done, then this value will be bigger. */
|
||||
|
||||
bfd_size_type _raw_size;
|
||||
|
||||
|
@ -383,7 +384,7 @@ typedef struct sec
|
|||
|
||||
bfd *owner;
|
||||
|
||||
/* A symbol which points at this section only */
|
||||
/* A symbol which points at this section only */
|
||||
struct symbol_cache_entry *symbol;
|
||||
struct symbol_cache_entry **symbol_ptr_ptr;
|
||||
|
||||
|
@ -393,7 +394,7 @@ typedef struct sec
|
|||
|
||||
/* These sections are global, and are managed by BFD. The application
|
||||
and target back end are not permitted to change the values in
|
||||
these sections. New code should use the section_ptr macros rather
|
||||
these sections. New code should use the section_ptr macros rather
|
||||
than referring directly to the const sections. The const sections
|
||||
may eventually vanish. */
|
||||
#define BFD_ABS_SECTION_NAME "*ABS*"
|
||||
|
@ -430,7 +431,7 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
|
|||
@node section prototypes, , typedef asection, Sections
|
||||
@subsection Section prototypes
|
||||
These are the functions exported by the section handling part of BFD.
|
||||
@*
|
||||
|
||||
@findex bfd_get_section_by_name
|
||||
@subsubsection @code{bfd_get_section_by_name}
|
||||
@strong{Synopsis}
|
||||
|
@ -446,7 +447,7 @@ This should only be used in special cases; the normal way to process
|
|||
all sections of a given name is to use @code{bfd_map_over_sections} and
|
||||
@code{strcmp} on the name (or better yet, base it on the section flags
|
||||
or something else) for each section.
|
||||
@*
|
||||
|
||||
@findex bfd_make_section_old_way
|
||||
@subsubsection @code{bfd_make_section_old_way}
|
||||
@strong{Synopsis}
|
||||
|
@ -473,7 +474,7 @@ If output has already started for this BFD.
|
|||
@code{bfd_error_no_memory} -
|
||||
If memory allocation fails.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
@findex bfd_make_section_anyway
|
||||
@subsubsection @code{bfd_make_section_anyway}
|
||||
@strong{Synopsis}
|
||||
|
@ -493,7 +494,7 @@ Return @code{NULL} and set @code{bfd_error} on error; possible errors are:
|
|||
@item
|
||||
@code{bfd_error_no_memory} - If memory allocation fails.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
@findex bfd_make_section
|
||||
@subsubsection @code{bfd_make_section}
|
||||
@strong{Synopsis}
|
||||
|
@ -505,7 +506,7 @@ Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling
|
|||
bfd_set_error ()) without changing the section chain if there is already a
|
||||
section named @var{name}. If there is an error, return @code{NULL} and set
|
||||
@code{bfd_error}.
|
||||
@*
|
||||
|
||||
@findex bfd_set_section_flags
|
||||
@subsubsection @code{bfd_set_section_flags}
|
||||
@strong{Synopsis}
|
||||
|
@ -525,7 +526,7 @@ The section cannot have one or more of the attributes
|
|||
requested. For example, a .bss section in @code{a.out} may not
|
||||
have the @code{SEC_HAS_CONTENTS} field set.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
@findex bfd_map_over_sections
|
||||
@subsubsection @code{bfd_map_over_sections}
|
||||
@strong{Synopsis}
|
||||
|
@ -542,18 +543,18 @@ attached to the BFD @var{abfd}, passing @var{obj} as an
|
|||
argument. The function will be called as if by
|
||||
|
||||
@example
|
||||
func(abfd, the_section, obj);
|
||||
func(abfd, the_section, obj);
|
||||
@end example
|
||||
|
||||
This is the prefered method for iterating over sections; an
|
||||
alternative would be to use a loop:
|
||||
|
||||
@example
|
||||
section *p;
|
||||
for (p = abfd->sections; p != NULL; p = p->next)
|
||||
func(abfd, p, ...)
|
||||
section *p;
|
||||
for (p = abfd->sections; p != NULL; p = p->next)
|
||||
func(abfd, p, ...)
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_set_section_size
|
||||
@subsubsection @code{bfd_set_section_size}
|
||||
@strong{Synopsis}
|
||||
|
@ -571,7 +572,7 @@ Possible error returns:
|
|||
@code{bfd_error_invalid_operation} -
|
||||
Writing has started to the BFD, so setting the size is invalid.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
@findex bfd_set_section_contents
|
||||
@subsubsection @code{bfd_set_section_contents}
|
||||
@strong{Synopsis}
|
||||
|
@ -602,7 +603,7 @@ and some more too
|
|||
@end itemize
|
||||
This routine is front end to the back end function
|
||||
@code{_bfd_set_section_contents}.
|
||||
@*
|
||||
|
||||
@findex bfd_get_section_contents
|
||||
@subsubsection @code{bfd_get_section_contents}
|
||||
@strong{Synopsis}
|
||||
|
@ -622,7 +623,7 @@ flag set are requested or if the section does not have the
|
|||
@code{SEC_HAS_CONTENTS} flag set, then the @var{location} is filled
|
||||
with zeroes. If no errors occur, @code{true} is returned, else
|
||||
@code{false}.
|
||||
@*
|
||||
|
||||
@findex bfd_copy_private_section_data
|
||||
@subsubsection @code{bfd_copy_private_section_data}
|
||||
@strong{Synopsis}
|
||||
|
@ -644,6 +645,6 @@ Not enough memory exists to create private data for @var{osec}.
|
|||
@example
|
||||
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_section_data, \
|
||||
(ibfd, isection, obfd, osection))
|
||||
(ibfd, isection, obfd, osection))
|
||||
@end example
|
||||
@*
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ the scenes'' information will be still available.
|
|||
* typedef asymbol::
|
||||
* symbol handling functions::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node Reading Symbols, Writing Symbols, Symbols, Symbols
|
||||
@subsection Reading symbols
|
||||
There are two stages to reading a symbol table from a BFD:
|
||||
|
@ -37,35 +37,35 @@ allocating storage, and the actual reading process. This is an
|
|||
excerpt from an application which reads the symbol table:
|
||||
|
||||
@example
|
||||
long storage_needed;
|
||||
asymbol **symbol_table;
|
||||
long number_of_symbols;
|
||||
long i;
|
||||
long storage_needed;
|
||||
asymbol **symbol_table;
|
||||
long number_of_symbols;
|
||||
long i;
|
||||
|
||||
storage_needed = bfd_get_symtab_upper_bound (abfd);
|
||||
storage_needed = bfd_get_symtab_upper_bound (abfd);
|
||||
|
||||
if (storage_needed < 0)
|
||||
FAIL
|
||||
|
||||
if (storage_needed == 0) @{
|
||||
return ;
|
||||
@}
|
||||
symbol_table = (asymbol **) xmalloc (storage_needed);
|
||||
...
|
||||
number_of_symbols =
|
||||
bfd_canonicalize_symtab (abfd, symbol_table);
|
||||
if (storage_needed == 0) @{
|
||||
return ;
|
||||
@}
|
||||
symbol_table = (asymbol **) xmalloc (storage_needed);
|
||||
...
|
||||
number_of_symbols =
|
||||
bfd_canonicalize_symtab (abfd, symbol_table);
|
||||
|
||||
if (number_of_symbols < 0)
|
||||
FAIL
|
||||
|
||||
for (i = 0; i < number_of_symbols; i++) @{
|
||||
process_symbol (symbol_table[i]);
|
||||
@}
|
||||
for (i = 0; i < number_of_symbols; i++) @{
|
||||
process_symbol (symbol_table[i]);
|
||||
@}
|
||||
@end example
|
||||
|
||||
All storage for the symbols themselves is in an objalloc
|
||||
connected to the BFD; it is freed when the BFD is closed.
|
||||
@*
|
||||
|
||||
@node Writing Symbols, Mini Symbols, Reading Symbols, Symbols
|
||||
@subsection Writing symbols
|
||||
Writing of a symbol table is automatic when a BFD open for
|
||||
|
@ -79,31 +79,31 @@ which has been created using @code{bfd_make_empty_symbol}. Here is an
|
|||
example showing the creation of a symbol table with only one element:
|
||||
|
||||
@example
|
||||
#include "bfd.h"
|
||||
main()
|
||||
@{
|
||||
bfd *abfd;
|
||||
asymbol *ptrs[2];
|
||||
asymbol *new;
|
||||
#include "bfd.h"
|
||||
main()
|
||||
@{
|
||||
bfd *abfd;
|
||||
asymbol *ptrs[2];
|
||||
asymbol *new;
|
||||
|
||||
abfd = bfd_openw("foo","a.out-sunos-big");
|
||||
bfd_set_format(abfd, bfd_object);
|
||||
new = bfd_make_empty_symbol(abfd);
|
||||
new->name = "dummy_symbol";
|
||||
new->section = bfd_make_section_old_way(abfd, ".text");
|
||||
new->flags = BSF_GLOBAL;
|
||||
new->value = 0x12345;
|
||||
abfd = bfd_openw("foo","a.out-sunos-big");
|
||||
bfd_set_format(abfd, bfd_object);
|
||||
new = bfd_make_empty_symbol(abfd);
|
||||
new->name = "dummy_symbol";
|
||||
new->section = bfd_make_section_old_way(abfd, ".text");
|
||||
new->flags = BSF_GLOBAL;
|
||||
new->value = 0x12345;
|
||||
|
||||
ptrs[0] = new;
|
||||
ptrs[1] = (asymbol *)0;
|
||||
ptrs[0] = new;
|
||||
ptrs[1] = (asymbol *)0;
|
||||
|
||||
bfd_set_symtab(abfd, ptrs, 1);
|
||||
bfd_close(abfd);
|
||||
@}
|
||||
bfd_set_symtab(abfd, ptrs, 1);
|
||||
bfd_close(abfd);
|
||||
@}
|
||||
|
||||
./makesym
|
||||
nm foo
|
||||
00012345 A dummy_symbol
|
||||
./makesym
|
||||
nm foo
|
||||
00012345 A dummy_symbol
|
||||
@end example
|
||||
|
||||
Many formats cannot represent arbitary symbol information; for
|
||||
|
@ -111,7 +111,7 @@ instance, the @code{a.out} object format does not allow an
|
|||
arbitary number of sections. A symbol pointing to a section
|
||||
which is not one of @code{.text}, @code{.data} or @code{.bss} cannot
|
||||
be described.
|
||||
@*
|
||||
|
||||
@node Mini Symbols, typedef asymbol, Writing Symbols, Symbols
|
||||
@subsection Mini Symbols
|
||||
Mini symbols provide read-only access to the symbol table.
|
||||
|
@ -130,124 +130,125 @@ to a minisymbol, and a pointer to a structure returned by
|
|||
@code{bfd_make_empty_symbol}, and return a @code{asymbol} structure.
|
||||
The return value may or may not be the same as the value from
|
||||
@code{bfd_make_empty_symbol} which was passed in.
|
||||
@*
|
||||
|
||||
|
||||
@node typedef asymbol, symbol handling functions, Mini Symbols, Symbols
|
||||
@subsection typedef asymbol
|
||||
An @code{asymbol} has the form:
|
||||
@*
|
||||
.
|
||||
|
||||
|
||||
@example
|
||||
|
||||
typedef struct symbol_cache_entry
|
||||
@{
|
||||
/* A pointer to the BFD which owns the symbol. This information
|
||||
is necessary so that a back end can work out what additional
|
||||
information (invisible to the application writer) is carried
|
||||
with the symbol.
|
||||
/* A pointer to the BFD which owns the symbol. This information
|
||||
is necessary so that a back end can work out what additional
|
||||
information (invisible to the application writer) is carried
|
||||
with the symbol.
|
||||
|
||||
This field is *almost* redundant, since you can use section->owner
|
||||
instead, except that some symbols point to the global sections
|
||||
bfd_@{abs,com,und@}_section. This could be fixed by making
|
||||
these globals be per-bfd (or per-target-flavor). FIXME. */
|
||||
This field is *almost* redundant, since you can use section->owner
|
||||
instead, except that some symbols point to the global sections
|
||||
bfd_@{abs,com,und@}_section. This could be fixed by making
|
||||
these globals be per-bfd (or per-target-flavor). FIXME. */
|
||||
|
||||
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
|
||||
|
||||
/* The text of the symbol. The name is left alone, and not copied; the
|
||||
application may not alter it. */
|
||||
/* The text of the symbol. The name is left alone, and not copied; the
|
||||
application may not alter it. */
|
||||
CONST char *name;
|
||||
|
||||
/* The value of the symbol. This really should be a union of a
|
||||
/* The value of the symbol. This really should be a union of a
|
||||
numeric value with a pointer, since some flags indicate that
|
||||
a pointer to another symbol is stored here. */
|
||||
symvalue value;
|
||||
|
||||
/* Attributes of a symbol: */
|
||||
/* Attributes of a symbol: */
|
||||
|
||||
#define BSF_NO_FLAGS 0x00
|
||||
|
||||
/* The symbol has local scope; @code{static} in @code{C}. The value
|
||||
is the offset into the section of the data. */
|
||||
#define BSF_LOCAL 0x01
|
||||
/* The symbol has local scope; @code{static} in @code{C}. The value
|
||||
is the offset into the section of the data. */
|
||||
#define BSF_LOCAL 0x01
|
||||
|
||||
/* The symbol has global scope; initialized data in @code{C}. The
|
||||
value is the offset into the section of the data. */
|
||||
#define BSF_GLOBAL 0x02
|
||||
/* The symbol has global scope; initialized data in @code{C}. The
|
||||
value is the offset into the section of the data. */
|
||||
#define BSF_GLOBAL 0x02
|
||||
|
||||
/* The symbol has global scope and is exported. The value is
|
||||
the offset into the section of the data. */
|
||||
#define BSF_EXPORT BSF_GLOBAL /* no real difference */
|
||||
/* The symbol has global scope and is exported. The value is
|
||||
the offset into the section of the data. */
|
||||
#define BSF_EXPORT BSF_GLOBAL /* no real difference */
|
||||
|
||||
/* A normal C symbol would be one of:
|
||||
@code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
|
||||
@code{BSF_GLOBAL} */
|
||||
/* A normal C symbol would be one of:
|
||||
@code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
|
||||
@code{BSF_GLOBAL} */
|
||||
|
||||
/* The symbol is a debugging record. The value has an arbitary
|
||||
meaning. */
|
||||
#define BSF_DEBUGGING 0x08
|
||||
/* The symbol is a debugging record. The value has an arbitary
|
||||
meaning. */
|
||||
#define BSF_DEBUGGING 0x08
|
||||
|
||||
/* The symbol denotes a function entry point. Used in ELF,
|
||||
perhaps others someday. */
|
||||
/* The symbol denotes a function entry point. Used in ELF,
|
||||
perhaps others someday. */
|
||||
#define BSF_FUNCTION 0x10
|
||||
|
||||
/* Used by the linker. */
|
||||
/* Used by the linker. */
|
||||
#define BSF_KEEP 0x20
|
||||
#define BSF_KEEP_G 0x40
|
||||
|
||||
/* A weak global symbol, overridable without warnings by
|
||||
a regular global symbol of the same name. */
|
||||
/* A weak global symbol, overridable without warnings by
|
||||
a regular global symbol of the same name. */
|
||||
#define BSF_WEAK 0x80
|
||||
|
||||
/* This symbol was created to point to a section, e.g. ELF's
|
||||
STT_SECTION symbols. */
|
||||
STT_SECTION symbols. */
|
||||
#define BSF_SECTION_SYM 0x100
|
||||
|
||||
/* The symbol used to be a common symbol, but now it is
|
||||
allocated. */
|
||||
/* The symbol used to be a common symbol, but now it is
|
||||
allocated. */
|
||||
#define BSF_OLD_COMMON 0x200
|
||||
|
||||
/* The default value for common data. */
|
||||
/* The default value for common data. */
|
||||
#define BFD_FORT_COMM_DEFAULT_VALUE 0
|
||||
|
||||
/* In some files the type of a symbol sometimes alters its
|
||||
location in an output file - ie in coff a @code{ISFCN} symbol
|
||||
which is also @code{C_EXT} symbol appears where it was
|
||||
declared and not at the end of a section. This bit is set
|
||||
by the target BFD part to convey this information. */
|
||||
/* In some files the type of a symbol sometimes alters its
|
||||
location in an output file - ie in coff a @code{ISFCN} symbol
|
||||
which is also @code{C_EXT} symbol appears where it was
|
||||
declared and not at the end of a section. This bit is set
|
||||
by the target BFD part to convey this information. */
|
||||
|
||||
#define BSF_NOT_AT_END 0x400
|
||||
|
||||
/* Signal that the symbol is the label of constructor section. */
|
||||
/* Signal that the symbol is the label of constructor section. */
|
||||
#define BSF_CONSTRUCTOR 0x800
|
||||
|
||||
/* Signal that the symbol is a warning symbol. The name is a
|
||||
warning. The name of the next symbol is the one to warn about;
|
||||
if a reference is made to a symbol with the same name as the next
|
||||
symbol, a warning is issued by the linker. */
|
||||
/* Signal that the symbol is a warning symbol. The name is a
|
||||
warning. The name of the next symbol is the one to warn about;
|
||||
if a reference is made to a symbol with the same name as the next
|
||||
symbol, a warning is issued by the linker. */
|
||||
#define BSF_WARNING 0x1000
|
||||
|
||||
/* Signal that the symbol is indirect. This symbol is an indirect
|
||||
pointer to the symbol with the same name as the next symbol. */
|
||||
/* Signal that the symbol is indirect. This symbol is an indirect
|
||||
pointer to the symbol with the same name as the next symbol. */
|
||||
#define BSF_INDIRECT 0x2000
|
||||
|
||||
/* BSF_FILE marks symbols that contain a file name. This is used
|
||||
for ELF STT_FILE symbols. */
|
||||
/* BSF_FILE marks symbols that contain a file name. This is used
|
||||
for ELF STT_FILE symbols. */
|
||||
#define BSF_FILE 0x4000
|
||||
|
||||
/* Symbol is from dynamic linking information. */
|
||||
#define BSF_DYNAMIC 0x8000
|
||||
/* Symbol is from dynamic linking information. */
|
||||
#define BSF_DYNAMIC 0x8000
|
||||
|
||||
/* The symbol denotes a data object. Used in ELF, and perhaps
|
||||
others someday. */
|
||||
#define BSF_OBJECT 0x10000
|
||||
#define BSF_OBJECT 0x10000
|
||||
|
||||
flagword flags;
|
||||
|
||||
/* A pointer to the section to which this symbol is
|
||||
relative. This will always be non NULL, there are special
|
||||
/* A pointer to the section to which this symbol is
|
||||
relative. This will always be non NULL, there are special
|
||||
sections for undefined and absolute symbols. */
|
||||
struct sec *section;
|
||||
|
||||
/* Back end special data. */
|
||||
/* Back end special data. */
|
||||
union
|
||||
@{
|
||||
PTR p;
|
||||
|
@ -260,7 +261,7 @@ typedef struct symbol_cache_entry
|
|||
@node symbol handling functions, , typedef asymbol, Symbols
|
||||
@subsection Symbol handling functions
|
||||
|
||||
@*
|
||||
|
||||
@findex bfd_get_symtab_upper_bound
|
||||
@subsubsection @code{bfd_get_symtab_upper_bound}
|
||||
@strong{Description}@*
|
||||
|
@ -272,7 +273,7 @@ the BFD, then return 0. If an error occurs, return -1.
|
|||
#define bfd_get_symtab_upper_bound(abfd) \
|
||||
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_is_local_label
|
||||
@subsubsection @code{bfd_is_local_label}
|
||||
@strong{Synopsis}
|
||||
|
@ -282,7 +283,7 @@ boolean bfd_is_local_label(bfd *abfd, asymbol *sym);
|
|||
@strong{Description}@*
|
||||
Return true if the given symbol @var{sym} in the BFD @var{abfd} is
|
||||
a compiler generated local label, else return false.
|
||||
@*
|
||||
|
||||
@findex bfd_is_local_label_name
|
||||
@subsubsection @code{bfd_is_local_label_name}
|
||||
@strong{Synopsis}
|
||||
|
@ -298,7 +299,7 @@ local label.
|
|||
#define bfd_is_local_label_name(abfd, name) \
|
||||
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_canonicalize_symtab
|
||||
@subsubsection @code{bfd_canonicalize_symtab}
|
||||
@strong{Description}@*
|
||||
|
@ -312,7 +313,7 @@ including the NULL.
|
|||
BFD_SEND (abfd, _bfd_canonicalize_symtab,\
|
||||
(abfd, location))
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_set_symtab
|
||||
@subsubsection @code{bfd_set_symtab}
|
||||
@strong{Synopsis}
|
||||
|
@ -323,7 +324,7 @@ boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
|
|||
Arrange that when the output BFD @var{abfd} is closed,
|
||||
the table @var{location} of @var{count} pointers to symbols
|
||||
will be written.
|
||||
@*
|
||||
|
||||
@findex bfd_print_symbol_vandf
|
||||
@subsubsection @code{bfd_print_symbol_vandf}
|
||||
@strong{Synopsis}
|
||||
|
@ -333,7 +334,7 @@ void bfd_print_symbol_vandf(PTR file, asymbol *symbol);
|
|||
@strong{Description}@*
|
||||
Print the value and flags of the @var{symbol} supplied to the
|
||||
stream @var{file}.
|
||||
@*
|
||||
|
||||
@findex bfd_make_empty_symbol
|
||||
@subsubsection @code{bfd_make_empty_symbol}
|
||||
@strong{Description}@*
|
||||
|
@ -348,7 +349,7 @@ information, and will cause problems later on.
|
|||
#define bfd_make_empty_symbol(abfd) \
|
||||
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_make_debug_symbol
|
||||
@subsubsection @code{bfd_make_debug_symbol}
|
||||
@strong{Description}@*
|
||||
|
@ -359,13 +360,13 @@ yet to be worked out.
|
|||
#define bfd_make_debug_symbol(abfd,ptr,size) \
|
||||
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_decode_symclass
|
||||
@subsubsection @code{bfd_decode_symclass}
|
||||
@strong{Description}@*
|
||||
Return a character corresponding to the symbol
|
||||
class of @var{symbol}, or '?' for an unknown class.
|
||||
@*
|
||||
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
int bfd_decode_symclass(asymbol *symbol);
|
||||
|
@ -376,7 +377,7 @@ int bfd_decode_symclass(asymbol *symbol);
|
|||
Fill in the basic info about symbol that nm needs.
|
||||
Additional info may be added by the back-ends after
|
||||
calling this function.
|
||||
@*
|
||||
|
||||
@strong{Synopsis}
|
||||
@example
|
||||
void bfd_symbol_info(asymbol *symbol, symbol_info *ret);
|
||||
|
@ -402,6 +403,6 @@ Not enough memory exists to create private data for @var{osec}.
|
|||
@example
|
||||
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
|
||||
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
|
||||
(ibfd, isymbol, obfd, osymbol))
|
||||
(ibfd, isymbol, obfd, osymbol))
|
||||
@end example
|
||||
@*
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@section Targets
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
Each port of BFD to a different machine requries the creation
|
||||
of a target back end. All the back end provides to the root
|
||||
|
@ -54,12 +54,12 @@ type is tried to see if it recognizes the specified format.
|
|||
@menu
|
||||
* bfd_target::
|
||||
@end menu
|
||||
@*
|
||||
|
||||
@node bfd_target, , Targets, Targets
|
||||
|
||||
@subsection bfd_target
|
||||
|
||||
@*
|
||||
|
||||
@strong{Description}@*
|
||||
This structure contains everything that BFD knows about a
|
||||
target. It includes things like its byte order, name, and which
|
||||
|
@ -253,10 +253,10 @@ CAT(NAME,_bfd_set_private_flags),\
|
|||
CAT(NAME,_bfd_print_private_bfd_data)\
|
||||
/* Called to copy BFD general private data from one object file
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
/* Called to merge BFD general private data from one object file
|
||||
to a common output file when linking. */
|
||||
boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
/* Called to copy BFD private section data from one object file
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
|
||||
|
@ -264,9 +264,9 @@ CAT(NAME,_bfd_print_private_bfd_data)\
|
|||
/* Called to copy BFD private symbol data from one symbol
|
||||
to another. */
|
||||
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
|
||||
bfd *, asymbol *));
|
||||
bfd *, asymbol *));
|
||||
/* Called to set private backend flags */
|
||||
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
|
||||
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
|
||||
|
||||
/* Called to print private BFD data */
|
||||
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
|
||||
|
@ -335,7 +335,7 @@ CAT(NAME,_minisymbol_to_symbol)
|
|||
struct symbol_cache_entry *,
|
||||
symbol_info *));
|
||||
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
|
||||
boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
|
||||
boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
|
||||
|
||||
alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
|
||||
boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
|
||||
|
@ -436,7 +436,7 @@ in this structure.
|
|||
PTR backend_data;
|
||||
@} bfd_target;
|
||||
@end example
|
||||
@*
|
||||
|
||||
@findex bfd_set_default_target
|
||||
@subsubsection @code{bfd_set_default_target}
|
||||
@strong{Synopsis}
|
||||
|
@ -447,7 +447,7 @@ boolean bfd_set_default_target (const char *name);
|
|||
Set the default target vector to use when recognizing a BFD.
|
||||
This takes the name of the target, which may be a BFD target
|
||||
name or a configuration triplet.
|
||||
@*
|
||||
|
||||
@findex bfd_find_target
|
||||
@subsubsection @code{bfd_find_target}
|
||||
@strong{Synopsis}
|
||||
|
@ -464,7 +464,7 @@ variable to "default" will cause the first entry in the target
|
|||
list to be returned, and "target_defaulted" will be set in the
|
||||
BFD. This causes @code{bfd_check_format} to loop over all the
|
||||
targets to find the one that matches the file being read.
|
||||
@*
|
||||
|
||||
@findex bfd_target_list
|
||||
@subsubsection @code{bfd_target_list}
|
||||
@strong{Synopsis}
|
||||
|
@ -475,4 +475,4 @@ const char **bfd_target_list(void);
|
|||
Return a freshly malloced NULL-terminated
|
||||
vector of the names of all the valid BFD targets. Do not
|
||||
modify the names.
|
||||
@*
|
||||
|
||||
|
|
1457
contrib/binutils/bfd/dwarf2.c
Normal file
1457
contrib/binutils/bfd/dwarf2.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
|||
/* Generic ECOFF (Extended-COFF) routines.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Original version by Per Bothner.
|
||||
Full support added by Ian Lance Taylor, ian@cygnus.com.
|
||||
|
||||
|
@ -3141,7 +3142,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
|
|||
|
||||
/* Ultrix appears to use as a hash table size the least power of two
|
||||
greater than twice the number of entries. */
|
||||
for (hashlog = 0; (1 << hashlog) <= 2 * orl_count; hashlog++)
|
||||
for (hashlog = 0; ((unsigned int) 1 << hashlog) <= 2 * orl_count; hashlog++)
|
||||
;
|
||||
hashsize = 1 << hashlog;
|
||||
|
||||
|
|
|
@ -706,17 +706,18 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
|
|||
struct string_hash_entry *fh;
|
||||
|
||||
/* We look up a string formed from the file name and the
|
||||
number of symbols. Sometimes an include file will
|
||||
conditionally define a typedef or something based on the
|
||||
order of include files. Using the number of symbols as a
|
||||
hash reduces the chance that we will merge symbol
|
||||
information that should not be merged. */
|
||||
number of symbols and aux entries. Sometimes an include
|
||||
file will conditionally define a typedef or something
|
||||
based on the order of include files. Using the number of
|
||||
symbols and aux entries as a hash reduces the chance that
|
||||
we will merge symbol information that should not be
|
||||
merged. */
|
||||
name = input_debug->ss + fdr.issBase + fdr.rss;
|
||||
|
||||
lookup = (char *) bfd_malloc (strlen (name) + 20);
|
||||
if (lookup == NULL)
|
||||
return false;
|
||||
sprintf (lookup, "%s %lx", name, fdr.csym);
|
||||
sprintf (lookup, "%s %lx %lx", name, fdr.csym, fdr.caux);
|
||||
|
||||
fh = string_hash_lookup (&ainfo->fdr_hash, lookup, true, true);
|
||||
free (lookup);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back-end data structures for ELF files.
|
||||
Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -483,9 +483,15 @@ struct elf_backend_data
|
|||
|
||||
const struct elf_size_info *s;
|
||||
|
||||
/* offset of the _GLOBAL_OFFSET_TABLE_ symbol from the start of the
|
||||
.got section */
|
||||
bfd_vma got_symbol_offset;
|
||||
|
||||
unsigned want_got_plt : 1;
|
||||
unsigned plt_readonly : 1;
|
||||
unsigned want_plt_sym : 1;
|
||||
unsigned plt_not_loaded : 1;
|
||||
unsigned plt_alignment : 4;
|
||||
};
|
||||
|
||||
/* Information stored for each BFD section in an ELF file. This
|
||||
|
@ -559,7 +565,7 @@ typedef struct elf_linker_section
|
|||
bfd_vma max_hole_offset; /* maximum offset for the hole */
|
||||
elf_linker_section_enum_t which; /* which section this is */
|
||||
boolean hole_written_p; /* whether the hole has been initialized */
|
||||
int alignment; /* alignment for the section */
|
||||
unsigned int alignment; /* alignment for the section */
|
||||
flagword flags; /* flags to use to create the section */
|
||||
} elf_linker_section_t;
|
||||
|
||||
|
@ -651,6 +657,9 @@ struct elf_obj_tdata
|
|||
find_nearest_line. */
|
||||
struct mips_elf_find_line *find_line_info;
|
||||
|
||||
/* A place to stash dwarf2 info for this bfd. */
|
||||
struct dwarf2_debug *dwarf2_find_line_info;
|
||||
|
||||
/* An array of stub sections indexed by symbol number, used by the
|
||||
MIPS ELF linker. FIXME: We should figure out some way to only
|
||||
include this field for a MIPS ELF target. */
|
||||
|
@ -660,10 +669,10 @@ struct elf_obj_tdata
|
|||
boolean flags_init;
|
||||
|
||||
/* Number of symbol version definitions we are about to emit. */
|
||||
int cverdefs;
|
||||
unsigned int cverdefs;
|
||||
|
||||
/* Number of symbol version references we are about to emit. */
|
||||
int cverrefs;
|
||||
unsigned int cverrefs;
|
||||
|
||||
/* Symbol version definitions in external objects. */
|
||||
Elf_Internal_Verdef *verdef;
|
||||
|
@ -964,6 +973,8 @@ extern Elf_Internal_Rela *_bfd_elf64_link_read_relocs
|
|||
#define bfd_elf32_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
|
||||
#define bfd_elf64_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
|
||||
|
||||
extern boolean _bfd_elf_close_and_cleanup PARAMS ((bfd *));
|
||||
|
||||
/* MIPS ELF specific routines. */
|
||||
|
||||
extern boolean _bfd_mips_elf_object_p PARAMS ((bfd *));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* ELF executable support for BFD.
|
||||
Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
@ -305,6 +305,18 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex)
|
|||
&& bfd_elf_get_str_section (abfd, shindex) == NULL)
|
||||
return NULL;
|
||||
|
||||
if (strindex >= hdr->sh_size)
|
||||
{
|
||||
(*_bfd_error_handler)
|
||||
("%s: invalid string offset %u >= %lu for section `%s'",
|
||||
bfd_get_filename (abfd), strindex, (unsigned long) hdr->sh_size,
|
||||
((shindex == elf_elfheader(abfd)->e_shstrndx
|
||||
&& strindex == hdr->sh_name)
|
||||
? ".shstrtab"
|
||||
: elf_string_from_elf_strtab (abfd, hdr->sh_name)));
|
||||
return "";
|
||||
}
|
||||
|
||||
return ((char *) hdr->contents) + strindex;
|
||||
}
|
||||
|
||||
|
@ -389,7 +401,7 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
|
|||
&& phdr->p_vaddr <= hdr->sh_addr
|
||||
&& phdr->p_vaddr + phdr->p_memsz >= hdr->sh_addr + hdr->sh_size
|
||||
&& ((flags & SEC_LOAD) == 0
|
||||
|| (phdr->p_offset <= hdr->sh_offset
|
||||
|| (phdr->p_offset <= (bfd_vma) hdr->sh_offset
|
||||
&& (phdr->p_offset + phdr->p_filesz
|
||||
>= hdr->sh_offset + hdr->sh_size))))
|
||||
{
|
||||
|
@ -929,6 +941,91 @@ bfd_elf_get_dt_soname (abfd)
|
|||
return elf_dt_name (abfd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get the list of DT_NEEDED entries from a BFD. This is a hook for
|
||||
the ELF linker emulation code. */
|
||||
|
||||
boolean
|
||||
bfd_elf_get_bfd_needed_list (abfd, pneeded)
|
||||
bfd *abfd;
|
||||
struct bfd_link_needed_list **pneeded;
|
||||
{
|
||||
asection *s;
|
||||
bfd_byte *dynbuf = NULL;
|
||||
int elfsec;
|
||||
unsigned long link;
|
||||
bfd_byte *extdyn, *extdynend;
|
||||
size_t extdynsize;
|
||||
void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
|
||||
|
||||
*pneeded = NULL;
|
||||
|
||||
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour
|
||||
|| bfd_get_format (abfd) != bfd_object)
|
||||
return true;
|
||||
|
||||
s = bfd_get_section_by_name (abfd, ".dynamic");
|
||||
if (s == NULL || s->_raw_size == 0)
|
||||
return true;
|
||||
|
||||
dynbuf = (bfd_byte *) bfd_malloc (s->_raw_size);
|
||||
if (dynbuf == NULL)
|
||||
goto error_return;
|
||||
|
||||
if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf, (file_ptr) 0,
|
||||
s->_raw_size))
|
||||
goto error_return;
|
||||
|
||||
elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
|
||||
if (elfsec == -1)
|
||||
goto error_return;
|
||||
|
||||
link = elf_elfsections (abfd)[elfsec]->sh_link;
|
||||
|
||||
extdynsize = get_elf_backend_data (abfd)->s->sizeof_dyn;
|
||||
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
|
||||
|
||||
extdyn = dynbuf;
|
||||
extdynend = extdyn + s->_raw_size;
|
||||
for (; extdyn < extdynend; extdyn += extdynsize)
|
||||
{
|
||||
Elf_Internal_Dyn dyn;
|
||||
|
||||
(*swap_dyn_in) (abfd, (PTR) extdyn, &dyn);
|
||||
|
||||
if (dyn.d_tag == DT_NULL)
|
||||
break;
|
||||
|
||||
if (dyn.d_tag == DT_NEEDED)
|
||||
{
|
||||
const char *string;
|
||||
struct bfd_link_needed_list *l;
|
||||
|
||||
string = bfd_elf_string_from_elf_section (abfd, link,
|
||||
dyn.d_un.d_val);
|
||||
if (string == NULL)
|
||||
goto error_return;
|
||||
|
||||
l = (struct bfd_link_needed_list *) bfd_alloc (abfd, sizeof *l);
|
||||
if (l == NULL)
|
||||
goto error_return;
|
||||
|
||||
l->by = abfd;
|
||||
l->name = string;
|
||||
l->next = *pneeded;
|
||||
*pneeded = l;
|
||||
}
|
||||
}
|
||||
|
||||
free (dynbuf);
|
||||
|
||||
return true;
|
||||
|
||||
error_return:
|
||||
if (dynbuf != NULL)
|
||||
free (dynbuf);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Allocate an ELF string table--force the first byte to be zero. */
|
||||
|
||||
|
@ -2106,12 +2203,19 @@ map_sections_to_segments (abfd)
|
|||
new_segment = true;
|
||||
}
|
||||
else if (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize)
|
||||
< hdr->lma)
|
||||
< BFD_ALIGN (hdr->lma, maxpagesize))
|
||||
{
|
||||
/* If putting this section in this segment would force us to
|
||||
skip a page in the segment, then we need a new segment. */
|
||||
new_segment = true;
|
||||
}
|
||||
else if ((last_hdr->flags & SEC_LOAD) == 0
|
||||
&& (hdr->flags & SEC_LOAD) != 0)
|
||||
{
|
||||
/* We don't want to put a loadable section after a
|
||||
nonloadable section in the same segment. */
|
||||
new_segment = true;
|
||||
}
|
||||
else if ((abfd->flags & D_PAGED) == 0)
|
||||
{
|
||||
/* If the file is not demand paged, which means that we
|
||||
|
@ -2119,13 +2223,6 @@ map_sections_to_segments (abfd)
|
|||
file, then there is no other reason for a new segment. */
|
||||
new_segment = false;
|
||||
}
|
||||
else if ((last_hdr->flags & SEC_LOAD) == 0
|
||||
&& (hdr->flags & SEC_LOAD) != 0)
|
||||
{
|
||||
/* We don't want to put a loadable section after a
|
||||
nonloadable section in the same segment. */
|
||||
new_segment = true;
|
||||
}
|
||||
else if (! writable
|
||||
&& (hdr->flags & SEC_READONLY) == 0
|
||||
&& (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize)
|
||||
|
@ -2264,10 +2361,12 @@ elf_sort_sections (arg1, arg2)
|
|||
#define TOEND(x) (((x)->flags & SEC_LOAD) == 0)
|
||||
|
||||
if (TOEND (sec1))
|
||||
if (TOEND (sec2))
|
||||
return sec1->target_index - sec2->target_index;
|
||||
else
|
||||
return 1;
|
||||
{
|
||||
if (TOEND (sec2))
|
||||
return sec1->target_index - sec2->target_index;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (TOEND (sec2))
|
||||
return -1;
|
||||
|
@ -2419,6 +2518,15 @@ assign_file_positions_for_segments (abfd)
|
|||
if (m->count > 0)
|
||||
{
|
||||
BFD_ASSERT (p->p_type == PT_LOAD);
|
||||
|
||||
if (p->p_vaddr < (bfd_vma) off)
|
||||
{
|
||||
_bfd_error_handler ("%s: Not enough room for program headers, try linking with -N",
|
||||
bfd_get_filename (abfd));
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return false;
|
||||
}
|
||||
|
||||
p->p_vaddr -= off;
|
||||
if (! m->p_paddr_valid)
|
||||
p->p_paddr -= off;
|
||||
|
@ -2491,29 +2599,42 @@ assign_file_positions_for_segments (abfd)
|
|||
{
|
||||
bfd_vma adjust;
|
||||
|
||||
/* The section VMA must equal the file position modulo
|
||||
the page size. */
|
||||
if ((flags & SEC_ALLOC) != 0)
|
||||
if ((flags & SEC_LOAD) != 0)
|
||||
adjust = sec->lma - (p->p_paddr + p->p_memsz);
|
||||
else if ((flags & SEC_ALLOC) != 0)
|
||||
{
|
||||
/* The section VMA must equal the file position
|
||||
modulo the page size. FIXME: I'm not sure if
|
||||
this adjustment is really necessary. We used to
|
||||
not have the SEC_LOAD case just above, and then
|
||||
this was necessary, but now I'm not sure. */
|
||||
if ((abfd->flags & D_PAGED) != 0)
|
||||
adjust = (sec->vma - voff) % bed->maxpagesize;
|
||||
else
|
||||
adjust = (sec->vma - voff) % align;
|
||||
if (adjust != 0)
|
||||
{
|
||||
if (i == 0)
|
||||
abort ();
|
||||
p->p_memsz += adjust;
|
||||
off += adjust;
|
||||
voff += adjust;
|
||||
if ((flags & SEC_LOAD) != 0)
|
||||
p->p_filesz += adjust;
|
||||
}
|
||||
}
|
||||
else
|
||||
adjust = 0;
|
||||
|
||||
if (adjust != 0)
|
||||
{
|
||||
if (i == 0)
|
||||
abort ();
|
||||
p->p_memsz += adjust;
|
||||
off += adjust;
|
||||
voff += adjust;
|
||||
if ((flags & SEC_LOAD) != 0)
|
||||
p->p_filesz += adjust;
|
||||
}
|
||||
|
||||
sec->filepos = off;
|
||||
|
||||
if ((flags & SEC_LOAD) != 0)
|
||||
/* We check SEC_HAS_CONTENTS here because if NOLOAD is
|
||||
used in a linker script we may have a section with
|
||||
SEC_LOAD clear but which is supposed to have
|
||||
contents. */
|
||||
if ((flags & SEC_LOAD) != 0
|
||||
|| (flags & SEC_HAS_CONTENTS) != 0)
|
||||
off += sec->_raw_size;
|
||||
if ((flags & SEC_ALLOC) != 0)
|
||||
voff += sec->_raw_size;
|
||||
|
@ -2853,6 +2974,16 @@ prep_headers (abfd)
|
|||
case bfd_arch_d10v:
|
||||
i_ehdrp->e_machine = EM_CYGNUS_D10V;
|
||||
break;
|
||||
case bfd_arch_v850:
|
||||
switch (bfd_get_mach (abfd))
|
||||
{
|
||||
default:
|
||||
case 0: i_ehdrp->e_machine = EM_CYGNUS_V850; break;
|
||||
}
|
||||
break;
|
||||
case bfd_arch_arc:
|
||||
i_ehdrp->e_machine = EM_CYGNUS_ARC;
|
||||
break;
|
||||
case bfd_arch_m32r:
|
||||
i_ehdrp->e_machine = EM_CYGNUS_M32R;
|
||||
break;
|
||||
|
@ -3102,6 +3233,7 @@ copy_private_bfd_data (ibfd, obfd)
|
|||
Elf_Internal_Ehdr *iehdr;
|
||||
struct elf_segment_map *mfirst;
|
||||
struct elf_segment_map **pm;
|
||||
struct elf_segment_map *m;
|
||||
Elf_Internal_Phdr *p;
|
||||
unsigned int i, c;
|
||||
|
||||
|
@ -3122,7 +3254,6 @@ copy_private_bfd_data (ibfd, obfd)
|
|||
{
|
||||
unsigned int csecs;
|
||||
asection *s;
|
||||
struct elf_segment_map *m;
|
||||
unsigned int isec;
|
||||
|
||||
csecs = 0;
|
||||
|
@ -3192,6 +3323,19 @@ copy_private_bfd_data (ibfd, obfd)
|
|||
pm = &m->next;
|
||||
}
|
||||
|
||||
/* The Solaris linker creates program headers in which all the
|
||||
p_paddr fields are zero. When we try to objcopy or strip such a
|
||||
file, we get confused. Check for this case, and if we find it
|
||||
reset the p_paddr_valid fields. */
|
||||
for (m = mfirst; m != NULL; m = m->next)
|
||||
if (m->p_paddr != 0)
|
||||
break;
|
||||
if (m == NULL)
|
||||
{
|
||||
for (m = mfirst; m != NULL; m = m->next)
|
||||
m->p_paddr_valid = 0;
|
||||
}
|
||||
|
||||
elf_tdata (obfd)->segment_map = mfirst;
|
||||
|
||||
return true;
|
||||
|
@ -3223,10 +3367,12 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
|
|||
{
|
||||
asection *s;
|
||||
|
||||
/* Only set up the segments when all the sections have been set
|
||||
up. */
|
||||
for (s = ibfd->sections; s != NULL; s = s->next)
|
||||
if (s->output_section == NULL)
|
||||
/* Only set up the segments if there are no more SEC_ALLOC
|
||||
sections. FIXME: This won't do the right thing if objcopy is
|
||||
used to remove the last SEC_ALLOC section, since objcopy
|
||||
won't call this routine in that case. */
|
||||
for (s = isec->next; s != NULL; s = s->next)
|
||||
if ((s->flags & SEC_ALLOC) != 0)
|
||||
break;
|
||||
if (s == NULL)
|
||||
{
|
||||
|
@ -3967,6 +4113,11 @@ _bfd_elf_find_nearest_line (abfd,
|
|||
bfd_vma low_func;
|
||||
asymbol **p;
|
||||
|
||||
if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
|
||||
filename_ptr, functionname_ptr,
|
||||
line_ptr))
|
||||
return true;
|
||||
|
||||
if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
|
||||
&found, filename_ptr,
|
||||
functionname_ptr, line_ptr,
|
||||
|
@ -4174,3 +4325,16 @@ _bfd_elf_validate_reloc (abfd, areloc)
|
|||
bfd_set_error (bfd_error_bad_value);
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean
|
||||
_bfd_elf_close_and_cleanup (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
if (bfd_get_format (abfd) == bfd_object)
|
||||
{
|
||||
if (elf_shstrtab (abfd) != NULL)
|
||||
_bfd_stringtab_free (elf_shstrtab (abfd));
|
||||
}
|
||||
|
||||
return _bfd_generic_close_and_cleanup (abfd);
|
||||
}
|
||||
|
|
213
contrib/binutils/bfd/elf32-arc.c
Normal file
213
contrib/binutils/bfd/elf32-arc.c
Normal file
|
@ -0,0 +1,213 @@
|
|||
/* ARC-specific support for 32-bit ELF
|
||||
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Doug Evans (dje@cygnus.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
#include "elf-bfd.h"
|
||||
#include "elf/arc.h"
|
||||
|
||||
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
|
||||
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
|
||||
static void arc_info_to_howto_rel
|
||||
PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
|
||||
static boolean arc_elf_object_p PARAMS ((bfd *));
|
||||
static void arc_elf_final_write_processing PARAMS ((bfd *, boolean));
|
||||
|
||||
/* Try to minimize the amount of space occupied by relocation tables
|
||||
on the ROM (not that the ROM won't be swamped by other ELF overhead). */
|
||||
#define USE_REL
|
||||
|
||||
static reloc_howto_type elf_arc_howto_table[] =
|
||||
{
|
||||
/* This reloc does nothing. */
|
||||
HOWTO (R_ARC_NONE, /* 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_ARC_NONE", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A standard 32 bit relocation. */
|
||||
HOWTO (R_ARC_32, /* 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_ARC_32", /* name */
|
||||
false, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 26 bit absolute branch, right shifted by 2. */
|
||||
HOWTO (R_ARC_B26, /* type */
|
||||
2, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
26, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_ARC_B26", /* name */
|
||||
false, /* partial_inplace */
|
||||
0x00ffffff, /* src_mask */
|
||||
0x00ffffff, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A relative 22 bit branch; bits 21-2 are stored in bits 26-7. */
|
||||
HOWTO (R_ARC_B22_PCREL, /* type */
|
||||
2, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
22, /* bitsize */
|
||||
true, /* pc_relative */
|
||||
7, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_ARC_B22_PCREL", /* name */
|
||||
false, /* partial_inplace */
|
||||
0x07ffff80, /* src_mask */
|
||||
0x07ffff80, /* dst_mask */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
};
|
||||
|
||||
/* Map BFD reloc types to ARC ELF reloc types. */
|
||||
|
||||
struct arc_reloc_map
|
||||
{
|
||||
unsigned char bfd_reloc_val;
|
||||
unsigned char elf_reloc_val;
|
||||
};
|
||||
|
||||
static const struct arc_reloc_map arc_reloc_map[] =
|
||||
{
|
||||
{ BFD_RELOC_NONE, R_ARC_NONE, },
|
||||
{ BFD_RELOC_32, R_ARC_32 },
|
||||
{ BFD_RELOC_CTOR, R_ARC_32 },
|
||||
{ BFD_RELOC_ARC_B26, R_ARC_B26 },
|
||||
{ BFD_RELOC_ARC_B22_PCREL, R_ARC_B22_PCREL },
|
||||
};
|
||||
|
||||
static reloc_howto_type *
|
||||
bfd_elf32_bfd_reloc_type_lookup (abfd, code)
|
||||
bfd *abfd;
|
||||
bfd_reloc_code_real_type code;
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof (arc_reloc_map) / sizeof (struct arc_reloc_map);
|
||||
i++)
|
||||
{
|
||||
if (arc_reloc_map[i].bfd_reloc_val == code)
|
||||
return &elf_arc_howto_table[arc_reloc_map[i].elf_reloc_val];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set the howto pointer for an ARC ELF reloc. */
|
||||
|
||||
static void
|
||||
arc_info_to_howto_rel (abfd, cache_ptr, dst)
|
||||
bfd *abfd;
|
||||
arelent *cache_ptr;
|
||||
Elf32_Internal_Rel *dst;
|
||||
{
|
||||
unsigned int r_type;
|
||||
|
||||
r_type = ELF32_R_TYPE (dst->r_info);
|
||||
BFD_ASSERT (r_type < (unsigned int) R_ARC_max);
|
||||
cache_ptr->howto = &elf_arc_howto_table[r_type];
|
||||
}
|
||||
|
||||
/* Set the right machine number for an ARC ELF file. */
|
||||
|
||||
static boolean
|
||||
arc_elf_object_p (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
int mach;
|
||||
unsigned long arch = elf_elfheader (abfd)->e_flags & EF_ARC_MACH;
|
||||
|
||||
switch (arch)
|
||||
{
|
||||
case E_ARC_MACH_BASE:
|
||||
mach = bfd_mach_arc_base;
|
||||
break;
|
||||
default:
|
||||
/* Unknown cpu type. ??? What to do? */
|
||||
return false;
|
||||
}
|
||||
|
||||
(void) bfd_default_set_arch_mach (abfd, bfd_arch_arc, mach);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* The final processing done just before writing out an ARC ELF object file.
|
||||
This gets the ARC architecture right based on the machine number. */
|
||||
|
||||
static void
|
||||
arc_elf_final_write_processing (abfd, linker)
|
||||
bfd *abfd;
|
||||
boolean linker;
|
||||
{
|
||||
int mach;
|
||||
unsigned long val;
|
||||
|
||||
switch (mach = bfd_get_mach (abfd))
|
||||
{
|
||||
case bfd_mach_arc_base:
|
||||
val = E_ARC_MACH_BASE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
elf_elfheader (abfd)->e_flags &=~ EF_ARC_MACH;
|
||||
elf_elfheader (abfd)->e_flags |= val;
|
||||
}
|
||||
|
||||
#define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
|
||||
#define TARGET_LITTLE_NAME "elf32-littlearc"
|
||||
#define TARGET_BIG_SYM bfd_elf32_bigarc_vec
|
||||
#define TARGET_BIG_NAME "elf32-bigarc"
|
||||
#define ELF_ARCH bfd_arch_arc
|
||||
#define ELF_MACHINE_CODE EM_CYGNUS_ARC
|
||||
#define ELF_MAXPAGESIZE 0x1000
|
||||
|
||||
#define elf_info_to_howto 0
|
||||
#define elf_info_to_howto_rel arc_info_to_howto_rel
|
||||
#define elf_backend_object_p arc_elf_object_p
|
||||
#define elf_backend_final_write_processing \
|
||||
arc_elf_final_write_processing
|
||||
|
||||
#include "elf32-target.h"
|
|
@ -1,5 +1,5 @@
|
|||
/* Intel 80386/80486-specific support for 32-bit ELF
|
||||
Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1993-1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
@ -968,7 +968,8 @@ elf_i386_size_dynamic_sections (output_bfd, info)
|
|||
s->output_section);
|
||||
target = bfd_get_section_by_name (output_bfd, outname + 4);
|
||||
if (target != NULL
|
||||
&& (target->flags & SEC_READONLY) != 0)
|
||||
&& (target->flags & SEC_READONLY) != 0
|
||||
&& (target->flags & SEC_ALLOC) != 0)
|
||||
reltext = true;
|
||||
}
|
||||
|
||||
|
@ -1179,15 +1180,16 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
|| (r_type == R_386_GOT32
|
||||
&& elf_hash_table (info)->dynamic_sections_created
|
||||
&& (! info->shared
|
||||
|| ! info->symbolic
|
||||
|| (! info->symbolic && h->dynindx != -1)
|
||||
|| (h->elf_link_hash_flags
|
||||
& ELF_LINK_HASH_DEF_REGULAR) == 0))
|
||||
|| (info->shared
|
||||
&& (! info->symbolic
|
||||
&& ((! info->symbolic && h->dynindx != -1)
|
||||
|| (h->elf_link_hash_flags
|
||||
& ELF_LINK_HASH_DEF_REGULAR) == 0)
|
||||
&& (r_type == R_386_32
|
||||
|| r_type == R_386_PC32)))
|
||||
|| r_type == R_386_PC32)
|
||||
&& (input_section->flags & SEC_ALLOC) != 0))
|
||||
{
|
||||
/* In these cases, we don't need the relocation
|
||||
value. We check specially because in some
|
||||
|
@ -1241,15 +1243,16 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
|
||||
if (! elf_hash_table (info)->dynamic_sections_created
|
||||
|| (info->shared
|
||||
&& info->symbolic
|
||||
&& (info->symbolic || h->dynindx == -1)
|
||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
|
||||
{
|
||||
/* This is actually a static link, or it is a
|
||||
-Bsymbolic link and the symbol is defined
|
||||
locally. We must initialize this entry in the
|
||||
global offset table. Since the offset must
|
||||
always be a multiple of 4, we use the least
|
||||
significant bit to record whether we have
|
||||
locally, or the symbol was forced to be local
|
||||
because of a version file. We must initialize
|
||||
this entry in the global offset table. Since the
|
||||
offset must always be a multiple of 4, we use the
|
||||
least significant bit to record whether we have
|
||||
initialized it already.
|
||||
|
||||
When doing a dynamic link, we create a .rel.got
|
||||
|
@ -1378,6 +1381,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
if (info->shared
|
||||
&& (r_type != R_386_PC32
|
||||
|| (h != NULL
|
||||
&& h->dynindx != -1
|
||||
&& (! info->symbolic
|
||||
|| (h->elf_link_hash_flags
|
||||
& ELF_LINK_HASH_DEF_REGULAR) == 0))))
|
||||
|
@ -1438,7 +1442,10 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
else if (r_type == R_386_PC32)
|
||||
{
|
||||
BFD_ASSERT (h != NULL && h->dynindx != -1);
|
||||
relocate = false;
|
||||
if ((input_section->flags & SEC_ALLOC) != 0)
|
||||
relocate = false;
|
||||
else
|
||||
relocate = true;
|
||||
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_PC32);
|
||||
}
|
||||
else
|
||||
|
@ -1456,7 +1463,10 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
else
|
||||
{
|
||||
BFD_ASSERT (h->dynindx != -1);
|
||||
relocate = false;
|
||||
if ((input_section->flags & SEC_ALLOC) != 0)
|
||||
relocate = false;
|
||||
else
|
||||
relocate = true;
|
||||
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_32);
|
||||
}
|
||||
}
|
||||
|
@ -1623,8 +1633,6 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
|
|||
/* This symbol has an entry in the global offset table. Set it
|
||||
up. */
|
||||
|
||||
BFD_ASSERT (h->dynindx != -1);
|
||||
|
||||
sgot = bfd_get_section_by_name (dynobj, ".got");
|
||||
srel = bfd_get_section_by_name (dynobj, ".rel.got");
|
||||
BFD_ASSERT (sgot != NULL && srel != NULL);
|
||||
|
@ -1634,11 +1642,12 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
|
|||
+ (h->got_offset &~ 1));
|
||||
|
||||
/* If this is a -Bsymbolic link, and the symbol is defined
|
||||
locally, we just want to emit a RELATIVE reloc. The entry in
|
||||
the global offset table will already have been initialized in
|
||||
the relocate_section function. */
|
||||
locally, we just want to emit a RELATIVE reloc. Likewise if
|
||||
the symbol was forced to be local because of a version file.
|
||||
The entry in the global offset table will already have been
|
||||
initialized in the relocate_section function. */
|
||||
if (info->shared
|
||||
&& info->symbolic
|
||||
&& (info->symbolic || h->dynindx == -1)
|
||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
|
||||
rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
|
||||
else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Hitachi SH specific support for 32-bit ELF
|
||||
Copyright 1996 Free Software Foundation, Inc.
|
||||
Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Contributed by Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -694,7 +694,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Read the local symbols. */
|
||||
/* Read this BFD's symbols if we haven't done so already. */
|
||||
if (extsyms == NULL)
|
||||
{
|
||||
if (symtab_hdr->contents != NULL)
|
||||
|
@ -702,15 +702,13 @@ sh_elf_relax_section (abfd, sec, link_info, again)
|
|||
else
|
||||
{
|
||||
extsyms = ((Elf32_External_Sym *)
|
||||
bfd_malloc (symtab_hdr->sh_info
|
||||
* sizeof (Elf32_External_Sym)));
|
||||
bfd_malloc (symtab_hdr->sh_size));
|
||||
if (extsyms == NULL)
|
||||
goto error_return;
|
||||
free_extsyms = extsyms;
|
||||
if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
|
||||
|| (bfd_read (extsyms, sizeof (Elf32_External_Sym),
|
||||
symtab_hdr->sh_info, abfd)
|
||||
!= (symtab_hdr->sh_info * sizeof (Elf32_External_Sym))))
|
||||
|| (bfd_read (extsyms, 1, symtab_hdr->sh_size, abfd)
|
||||
!= symtab_hdr->sh_size))
|
||||
goto error_return;
|
||||
}
|
||||
}
|
||||
|
@ -975,13 +973,13 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
|||
{
|
||||
Elf_Internal_Shdr *symtab_hdr;
|
||||
Elf32_External_Sym *extsyms;
|
||||
int shndx;
|
||||
int shndx, index;
|
||||
bfd_byte *contents;
|
||||
Elf_Internal_Rela *irel, *irelend;
|
||||
Elf_Internal_Rela *irelalign;
|
||||
bfd_vma toaddr;
|
||||
Elf32_External_Sym *esym, *esymend;
|
||||
struct elf_link_hash_entry **sym_hash, **sym_hash_end;
|
||||
struct elf_link_hash_entry *sym_hash;
|
||||
asection *o;
|
||||
|
||||
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
|
||||
|
@ -1029,11 +1027,12 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
|||
/* Adjust all the relocs. */
|
||||
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
|
||||
{
|
||||
bfd_vma nraddr, start, stop;
|
||||
bfd_vma nraddr, stop;
|
||||
bfd_vma start = 0;
|
||||
int insn = 0;
|
||||
Elf_Internal_Sym sym;
|
||||
int off, adjust, oinsn;
|
||||
bfd_signed_vma voff;
|
||||
bfd_signed_vma voff = 0;
|
||||
boolean overflow;
|
||||
|
||||
/* Get the new reloc address. */
|
||||
|
@ -1051,7 +1050,8 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
|||
&& irel->r_offset < addr + count
|
||||
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_ALIGN
|
||||
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_CODE
|
||||
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_DATA)
|
||||
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_DATA
|
||||
&& ELF32_R_TYPE (irel->r_info) != (int) R_SH_LABEL)
|
||||
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
|
||||
(int) R_SH_NONE);
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
|||
}
|
||||
}
|
||||
|
||||
/* Adjust all the symbols. */
|
||||
/* Adjust the local symbols defined in this section. */
|
||||
esym = extsyms;
|
||||
esymend = esym + symtab_hdr->sh_info;
|
||||
for (; esym < esymend; esym++)
|
||||
|
@ -1343,19 +1343,23 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
|||
}
|
||||
}
|
||||
|
||||
sym_hash = elf_sym_hashes (abfd);
|
||||
sym_hash_end = (sym_hash
|
||||
+ (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
|
||||
- symtab_hdr->sh_info));
|
||||
for (; sym_hash < sym_hash_end; sym_hash++)
|
||||
/* Now adjust the global symbols defined in this section. */
|
||||
esym = extsyms + symtab_hdr->sh_info;
|
||||
esymend = extsyms + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym));
|
||||
for (index = 0; esym < esymend; esym++, index++)
|
||||
{
|
||||
if (((*sym_hash)->root.type == bfd_link_hash_defined
|
||||
|| (*sym_hash)->root.type == bfd_link_hash_defweak)
|
||||
&& (*sym_hash)->root.u.def.section == sec
|
||||
&& (*sym_hash)->root.u.def.value > addr
|
||||
&& (*sym_hash)->root.u.def.value < toaddr)
|
||||
Elf_Internal_Sym isym;
|
||||
|
||||
bfd_elf32_swap_symbol_in (abfd, esym, &isym);
|
||||
sym_hash = elf_sym_hashes (abfd)[index];
|
||||
if (isym.st_shndx == shndx
|
||||
&& ((sym_hash)->root.type == bfd_link_hash_defined
|
||||
|| (sym_hash)->root.type == bfd_link_hash_defweak)
|
||||
&& (sym_hash)->root.u.def.section == sec
|
||||
&& (sym_hash)->root.u.def.value > addr
|
||||
&& (sym_hash)->root.u.def.value < toaddr)
|
||||
{
|
||||
(*sym_hash)->root.u.def.value -= count;
|
||||
(sym_hash)->root.u.def.value -= count;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1618,6 +1622,8 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
bfd_vma relocation;
|
||||
bfd_reloc_status_type r;
|
||||
|
||||
r_symndx = ELF32_R_SYM (rel->r_info);
|
||||
|
||||
if (info->relocateable)
|
||||
{
|
||||
/* This is a relocateable link. We don't have to change
|
||||
|
@ -1659,8 +1665,6 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
|
||||
howto = sh_elf_howto_table + r_type;
|
||||
|
||||
r_symndx = ELF32_R_SYM (rel->r_info);
|
||||
|
||||
/* This is a final link. */
|
||||
h = NULL;
|
||||
sym = NULL;
|
||||
|
|
1785
contrib/binutils/bfd/elf32-v850.c
Normal file
1785
contrib/binutils/bfd/elf32-v850.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* Alpha specific support for 64-bit ELF
|
||||
Copyright 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -555,7 +555,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
false), /* pcrel_offset */
|
||||
|
||||
/* Push a value on the reloc evaluation stack. */
|
||||
HOWTO (ALPHA_R_OP_PUSH, /* type */
|
||||
/* Not implemented -- it's dumb. */
|
||||
HOWTO (R_ALPHA_OP_PUSH, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
|
@ -571,7 +572,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
|
||||
/* Store the value from the stack at the given address. Store it in
|
||||
a bitfield of size r_size starting at bit position r_offset. */
|
||||
HOWTO (ALPHA_R_OP_STORE, /* type */
|
||||
/* Not implemented -- it's dumb. */
|
||||
HOWTO (R_ALPHA_OP_STORE, /* type */
|
||||
0, /* rightshift */
|
||||
4, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
64, /* bitsize */
|
||||
|
@ -587,7 +589,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
|
||||
/* Subtract the reloc address from the value on the top of the
|
||||
relocation stack. */
|
||||
HOWTO (ALPHA_R_OP_PSUB, /* type */
|
||||
/* Not implemented -- it's dumb. */
|
||||
HOWTO (R_ALPHA_OP_PSUB, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
|
@ -603,7 +606,8 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
|
||||
/* Shift the value on the top of the relocation stack right by the
|
||||
given value. */
|
||||
HOWTO (ALPHA_R_OP_PRSHIFT, /* type */
|
||||
/* Not implemented -- it's dumb. */
|
||||
HOWTO (R_ALPHA_OP_PRSHIFT, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
|
@ -617,7 +621,146 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Change the value of GP used by +r_addend until the next GPVALUE or the
|
||||
end of the input bfd. */
|
||||
/* Not implemented -- it's dumb. */
|
||||
HOWTO (R_ALPHA_GPVALUE,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"GPVALUE", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The high 16 bits of the displacement from GP to the target. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_GPRELHIGH,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"GPRELHIGH", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The low 16 bits of the displacement from GP to the target. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_GPRELLOW,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"GPRELLOW", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 16-bit displacement from the GP to the target. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_IMMED_GP_16,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"IMMED_GP_16", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The high bits of a 32-bit displacement from the GP to the target; the
|
||||
low bits are supplied in the subsequent R_ALPHA_IMMED_LO32 relocs. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_IMMED_GP_HI32,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"IMMED_GP_HI32", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The high bits of a 32-bit displacement to the starting address of the
|
||||
current section (the relocation target is ignored); the low bits are
|
||||
supplied in the subsequent R_ALPHA_IMMED_LO32 relocs. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_IMMED_SCN_HI32,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"IMMED_SCN_HI32", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The high bits of a 32-bit displacement from the previous br, bsr, jsr
|
||||
or jmp insn (as tagged by a BRADDR or HINT reloc) to the target; the
|
||||
low bits are supplied by subsequent R_ALPHA_IMMED_LO32 relocs. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_IMMED_BR_HI32,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"IMMED_BR_HI32", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The low 16 bits of a displacement calculated in a previous HI32 reloc. */
|
||||
/* XXX: Not implemented. */
|
||||
HOWTO (R_ALPHA_IMMED_LO32,
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
elf64_alpha_reloc_bad, /* special_function */
|
||||
"IMMED_LO32", /* name */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Misc ELF relocations. */
|
||||
|
||||
/* A dynamic relocation to copy the target into our .dynbss section. */
|
||||
/* Not generated, as all Alpha objects use PIC, so it is not needed. It
|
||||
is present because every other ELF has one, but should not be used
|
||||
because .dynbss is an ugly thing. */
|
||||
HOWTO (R_ALPHA_COPY,
|
||||
0,
|
||||
0,
|
||||
|
@ -632,6 +775,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
0,
|
||||
true),
|
||||
|
||||
/* A dynamic relocation for a .got entry. */
|
||||
HOWTO (R_ALPHA_GLOB_DAT,
|
||||
0,
|
||||
0,
|
||||
|
@ -646,6 +790,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
0,
|
||||
true),
|
||||
|
||||
/* A dynamic relocation for a .plt entry. */
|
||||
HOWTO (R_ALPHA_JMP_SLOT,
|
||||
0,
|
||||
0,
|
||||
|
@ -660,6 +805,7 @@ static reloc_howto_type elf64_alpha_howto_table[] =
|
|||
0,
|
||||
true),
|
||||
|
||||
/* A dynamic relocation to add the base of the DSO to a 64-bit field. */
|
||||
HOWTO (R_ALPHA_RELATIVE,
|
||||
0,
|
||||
0,
|
||||
|
@ -866,9 +1012,9 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
|
|||
#define PLT_HEADER_WORD4 0x6b7b0000 /* jmp $27,($27) */
|
||||
|
||||
#define PLT_ENTRY_SIZE 12
|
||||
#define PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */
|
||||
#define PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */
|
||||
#define PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */
|
||||
#define PLT_ENTRY_WORD1 0xc3800000 /* br $28, plt0 */
|
||||
#define PLT_ENTRY_WORD2 0
|
||||
#define PLT_ENTRY_WORD3 0
|
||||
|
||||
#define MAX_GOT_ENTRIES (64*1024 / 8)
|
||||
|
||||
|
@ -1545,6 +1691,11 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
|
|||
else
|
||||
{
|
||||
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
|
||||
|
||||
while (h->root.root.type == bfd_link_hash_indirect
|
||||
|| 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;
|
||||
}
|
||||
r_type = ELF64_R_TYPE (rel->r_info);
|
||||
|
@ -1855,6 +2006,79 @@ elf64_alpha_adjust_dynamic_symbol (info, h)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* Symbol versioning can create new symbols, and make our old symbols
|
||||
indirect to the new ones. Consolidate the got and reloc information
|
||||
in these situations. */
|
||||
|
||||
static boolean
|
||||
elf64_alpha_merge_ind_symbols (hi, dummy)
|
||||
struct alpha_elf_link_hash_entry *hi;
|
||||
PTR dummy;
|
||||
{
|
||||
struct alpha_elf_link_hash_entry *hs;
|
||||
|
||||
if (hi->root.root.type != bfd_link_hash_indirect)
|
||||
return true;
|
||||
hs = hi;
|
||||
do {
|
||||
hs = (struct alpha_elf_link_hash_entry *)hs->root.root.u.i.link;
|
||||
} while (hs->root.root.type == bfd_link_hash_indirect);
|
||||
|
||||
/* Merge the flags. Whee. */
|
||||
|
||||
hs->flags |= hi->flags;
|
||||
|
||||
/* Merge the .got entries. Cannibalize the old symbol's list in
|
||||
doing so, since we don't need it anymore. */
|
||||
|
||||
if (hs->got_entries == NULL)
|
||||
hs->got_entries = hi->got_entries;
|
||||
else
|
||||
{
|
||||
struct alpha_elf_got_entry *gi, *gs, *gin, *gsh;
|
||||
|
||||
gsh = hs->got_entries;
|
||||
for (gi = hi->got_entries; gi ; gi = gin)
|
||||
{
|
||||
gin = gi->next;
|
||||
for (gs = gsh; gs ; gs = gs->next)
|
||||
if (gi->gotobj == gs->gotobj && gi->addend == gs->addend )
|
||||
goto got_found;
|
||||
gi->next = hs->got_entries;
|
||||
hs->got_entries = gi;
|
||||
got_found:;
|
||||
}
|
||||
}
|
||||
hi->got_entries = NULL;
|
||||
|
||||
/* And similar for the reloc entries. */
|
||||
|
||||
if (hs->reloc_entries == NULL)
|
||||
hs->reloc_entries = hi->reloc_entries;
|
||||
else
|
||||
{
|
||||
struct alpha_elf_reloc_entry *ri, *rs, *rin, *rsh;
|
||||
|
||||
rsh = hs->reloc_entries;
|
||||
for (ri = hi->reloc_entries; ri ; ri = rin)
|
||||
{
|
||||
rin = ri->next;
|
||||
for (rs = rsh; rs ; rs = rs->next)
|
||||
if (ri->rtype == rs->rtype)
|
||||
{
|
||||
rs->count += ri->count;
|
||||
goto found_reloc;
|
||||
}
|
||||
ri->next = hs->reloc_entries;
|
||||
hs->reloc_entries = ri;
|
||||
found_reloc:;
|
||||
}
|
||||
}
|
||||
hi->reloc_entries = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Is it possible to merge two object file's .got tables? */
|
||||
|
||||
static boolean
|
||||
|
@ -1883,12 +2107,19 @@ elf64_alpha_can_merge_gots (a, b)
|
|||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
struct alpha_elf_got_entry *ae, *be;
|
||||
for (be = hashes[i]->got_entries; be ; be = be->next)
|
||||
struct alpha_elf_link_hash_entry *h;
|
||||
|
||||
h = hashes[i];
|
||||
while (h->root.root.type == bfd_link_hash_indirect
|
||||
|| h->root.root.type == bfd_link_hash_warning)
|
||||
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
|
||||
|
||||
for (be = h->got_entries; be ; be = be->next)
|
||||
{
|
||||
if (be->gotobj != b)
|
||||
continue;
|
||||
|
||||
for (ae = hashes[i]->got_entries; ae ; ae = ae->next)
|
||||
for (ae = h->got_entries; ae ; ae = ae->next)
|
||||
if (ae->gotobj == a && ae->addend == be->addend)
|
||||
goto global_found;
|
||||
|
||||
|
@ -1945,7 +2176,14 @@ elf64_alpha_merge_gots (a, b)
|
|||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
struct alpha_elf_got_entry *ae, *be, **pbe, **start;
|
||||
start = &hashes[i]->got_entries;
|
||||
struct alpha_elf_link_hash_entry *h;
|
||||
|
||||
h = hashes[i];
|
||||
while (h->root.root.type == bfd_link_hash_indirect
|
||||
|| h->root.root.type == bfd_link_hash_warning)
|
||||
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
|
||||
|
||||
start = &h->got_entries;
|
||||
for (pbe = start, be = *start; be ; pbe = &be->next, be = be->next)
|
||||
{
|
||||
if (be->gotobj != b)
|
||||
|
@ -2061,6 +2299,11 @@ elf64_alpha_always_size_sections (output_bfd, info)
|
|||
if (info->relocateable)
|
||||
return true;
|
||||
|
||||
/* First, take care of the indirect symbols created by versioning. */
|
||||
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
|
||||
elf64_alpha_merge_ind_symbols,
|
||||
NULL);
|
||||
|
||||
ngots = 0;
|
||||
got_list = NULL;
|
||||
cur_got_obj = NULL;
|
||||
|
@ -2162,8 +2405,10 @@ elf64_alpha_calc_dynrel_sizes (h, info)
|
|||
}
|
||||
|
||||
/* If the symbol is dynamic, we'll need all the relocations in their
|
||||
natural form. */
|
||||
if (alpha_elf_dynamic_symbol_p (&h->root, info))
|
||||
natural form. If it has been forced local, we'll need the same
|
||||
number of RELATIVE relocations. */
|
||||
if (alpha_elf_dynamic_symbol_p (&h->root, info)
|
||||
|| (info->shared && h->root.dynindx == -1))
|
||||
{
|
||||
struct alpha_elf_reloc_entry *relent;
|
||||
|
||||
|
@ -2306,7 +2551,8 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
|
|||
s->output_section);
|
||||
target = bfd_get_section_by_name (output_bfd, outname + 5);
|
||||
if (target != NULL
|
||||
&& (target->flags & SEC_READONLY) != 0)
|
||||
&& (target->flags & SEC_READONLY) != 0
|
||||
&& (target->flags & SEC_ALLOC) != 0)
|
||||
reltext = true;
|
||||
|
||||
if (strcmp(name, ".rela.plt") == 0)
|
||||
|
@ -2619,6 +2865,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
if (h != NULL)
|
||||
{
|
||||
gotent = h->got_entries;
|
||||
BFD_ASSERT(gotent != NULL);
|
||||
|
||||
while (gotent->gotobj != gotobj || gotent->addend != addend)
|
||||
gotent = gotent->next;
|
||||
|
||||
|
@ -2628,8 +2876,26 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
bfd_put_64 (output_bfd, relocation+addend,
|
||||
sgot->contents + gotent->got_offset);
|
||||
|
||||
/* The dynamic relocations for the .got entries are
|
||||
done in finish_dynamic_symbol. */
|
||||
/* If the symbol has been forced local, output a
|
||||
RELATIVE reloc, otherwise it will be handled in
|
||||
finish_dynamic_symbol. */
|
||||
if (info->shared && h->root.dynindx == -1)
|
||||
{
|
||||
Elf_Internal_Rela outrel;
|
||||
|
||||
BFD_ASSERT(srelgot != NULL);
|
||||
|
||||
outrel.r_offset = (sgot->output_section->vma
|
||||
+ sgot->output_offset
|
||||
+ gotent->got_offset);
|
||||
outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
|
||||
outrel.r_addend = 0;
|
||||
|
||||
bfd_elf64_swap_reloca_out (output_bfd, &outrel,
|
||||
((Elf64_External_Rela *)
|
||||
srelgot->contents)
|
||||
+ srelgot->reloc_count++);
|
||||
}
|
||||
|
||||
gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
|
||||
}
|
||||
|
@ -2851,16 +3117,10 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym)
|
|||
/* Fill in the entry in the procedure linkage table. */
|
||||
{
|
||||
unsigned insn1, insn2, insn3;
|
||||
long hi, lo;
|
||||
|
||||
/* decompose the reloc offset for the plt for ldah+lda */
|
||||
hi = plt_index * sizeof(Elf64_External_Rela);
|
||||
lo = ((hi & 0xffff) ^ 0x8000) - 0x8000;
|
||||
hi = (hi - lo) >> 16;
|
||||
|
||||
insn1 = PLT_ENTRY_WORD1 | (hi & 0xffff);
|
||||
insn2 = PLT_ENTRY_WORD2 | (lo & 0xffff);
|
||||
insn3 = PLT_ENTRY_WORD3 | ((-(h->plt_offset + 12) >> 2) & 0x1fffff);
|
||||
insn1 = PLT_ENTRY_WORD1 | ((-(h->plt_offset + 4) >> 2) & 0x1fffff);
|
||||
insn2 = PLT_ENTRY_WORD2;
|
||||
insn3 = PLT_ENTRY_WORD3;
|
||||
|
||||
bfd_put_32 (output_bfd, insn1, splt->contents + h->plt_offset);
|
||||
bfd_put_32 (output_bfd, insn2, splt->contents + h->plt_offset + 4);
|
||||
|
@ -3733,7 +3993,7 @@ elf64_alpha_ecoff_debug_swap =
|
|||
#define TARGET_LITTLE_NAME "elf64-alpha"
|
||||
#define ELF_ARCH bfd_arch_alpha
|
||||
#define ELF_MACHINE_CODE EM_ALPHA
|
||||
#define ELF_MAXPAGESIZE 0x100000
|
||||
#define ELF_MAXPAGESIZE 0x10000
|
||||
|
||||
#define bfd_elf64_bfd_link_hash_table_create \
|
||||
elf64_alpha_bfd_link_hash_table_create
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* ELF executable support for BFD.
|
||||
Copyright 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
|
||||
Written by Fred Fish @ Cygnus Support, from information published
|
||||
in "UNIX System V Release 4, Programmers Guide: ANSI C and
|
||||
|
@ -176,11 +176,15 @@ static char *elf_symbol_flags PARAMS ((flagword));
|
|||
can be handled by explicitly specifying 32 bits or "the long type". */
|
||||
#if ARCH_SIZE == 64
|
||||
#define put_word bfd_h_put_64
|
||||
#define put_signed_word bfd_h_put_signed_64
|
||||
#define get_word bfd_h_get_64
|
||||
#define get_signed_word bfd_h_get_signed_64
|
||||
#endif
|
||||
#if ARCH_SIZE == 32
|
||||
#define put_word bfd_h_put_32
|
||||
#define put_signed_word bfd_h_put_signed_32
|
||||
#define get_word bfd_h_get_32
|
||||
#define get_signed_word bfd_h_get_signed_32
|
||||
#endif
|
||||
|
||||
/* Translate an ELF symbol in external format into an ELF symbol in internal
|
||||
|
@ -372,7 +376,7 @@ elf_swap_reloca_in (abfd, src, dst)
|
|||
{
|
||||
dst->r_offset = get_word (abfd, (bfd_byte *) src->r_offset);
|
||||
dst->r_info = get_word (abfd, (bfd_byte *) src->r_info);
|
||||
dst->r_addend = get_word (abfd, (bfd_byte *) src->r_addend);
|
||||
dst->r_addend = get_signed_word (abfd, (bfd_byte *) src->r_addend);
|
||||
}
|
||||
|
||||
/* Translate an ELF reloc from internal format to external format. */
|
||||
|
@ -394,7 +398,7 @@ elf_swap_reloca_out (abfd, src, dst)
|
|||
{
|
||||
put_word (abfd, src->r_offset, dst->r_offset);
|
||||
put_word (abfd, src->r_info, dst->r_info);
|
||||
put_word (abfd, src->r_addend, dst->r_addend);
|
||||
put_signed_word (abfd, src->r_addend, dst->r_addend);
|
||||
}
|
||||
|
||||
INLINE void
|
||||
|
@ -926,7 +930,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
|
|||
{
|
||||
Elf_Internal_Shdr *hdr;
|
||||
Elf_Internal_Shdr *verhdr;
|
||||
long symcount; /* Number of external ELF symbols */
|
||||
unsigned long symcount; /* Number of external ELF symbols */
|
||||
elf_symbol_type *sym; /* Pointer to current bfd symbol */
|
||||
elf_symbol_type *symbase; /* Buffer for generated bfd symbols */
|
||||
Elf_Internal_Sym i_sym;
|
||||
|
@ -974,7 +978,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
|
|||
sym = symbase = NULL;
|
||||
else
|
||||
{
|
||||
long i;
|
||||
unsigned long i;
|
||||
|
||||
if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) == -1)
|
||||
return -1;
|
||||
|
|
|
@ -35,7 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
static boolean bfd_prstatus PARAMS ((bfd *, char *, int, long, int));
|
||||
static boolean bfd_prpsinfo PARAMS ((bfd *, char *, int, long));
|
||||
static boolean bfd_fpregset PARAMS ((bfd *, char *, int, long, int));
|
||||
static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
|
||||
|
||||
#else
|
||||
#define bfd_prstatus(abfd, descdata, descsz, filepos, thread) true
|
||||
|
@ -44,6 +43,8 @@ static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
|
|||
#define get_thread(STATUS) (1)
|
||||
#endif
|
||||
|
||||
static boolean elf_corefile_note PARAMS ((bfd *, Elf_Internal_Phdr *));
|
||||
|
||||
#ifdef HAVE_SYS_PROCFS_H
|
||||
|
||||
static int did_reg;
|
||||
|
@ -77,7 +78,7 @@ bfd_prstatus (abfd, descdata, descsz, filepos, thread)
|
|||
newsect->_raw_size = sizeof (status->pr_reg);
|
||||
newsect->filepos = filepos + (long) &status->pr_reg;
|
||||
newsect->flags = SEC_HAS_CONTENTS;
|
||||
newsect->alignment_power = 2;
|
||||
newsect->alignment_power = LOG_FILE_ALIGN;
|
||||
if ((core_prstatus (abfd) = bfd_alloc (abfd, descsz)) != NULL)
|
||||
{
|
||||
memcpy (core_prstatus (abfd), descdata, descsz);
|
||||
|
|
|
@ -33,18 +33,26 @@ _bfd_elf_create_got_section (abfd, info)
|
|||
register asection *s;
|
||||
struct elf_link_hash_entry *h;
|
||||
struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
int ptralign;
|
||||
|
||||
/* This function may be called more than once. */
|
||||
if (bfd_get_section_by_name (abfd, ".got") != NULL)
|
||||
return true;
|
||||
|
||||
switch (bed->s->arch_size)
|
||||
{
|
||||
case 32: ptralign = 2; break;
|
||||
case 64: ptralign = 3; break;
|
||||
default: abort();
|
||||
}
|
||||
|
||||
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
|
||||
| SEC_LINKER_CREATED);
|
||||
|
||||
s = bfd_make_section (abfd, ".got");
|
||||
if (s == NULL
|
||||
|| !bfd_set_section_flags (abfd, s, flags)
|
||||
|| !bfd_set_section_alignment (abfd, s, 2))
|
||||
|| !bfd_set_section_alignment (abfd, s, ptralign))
|
||||
return false;
|
||||
|
||||
if (bed->want_got_plt)
|
||||
|
@ -52,7 +60,7 @@ _bfd_elf_create_got_section (abfd, info)
|
|||
s = bfd_make_section (abfd, ".got.plt");
|
||||
if (s == NULL
|
||||
|| !bfd_set_section_flags (abfd, s, flags)
|
||||
|| !bfd_set_section_alignment (abfd, s, 2))
|
||||
|| !bfd_set_section_alignment (abfd, s, ptralign))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -62,9 +70,9 @@ _bfd_elf_create_got_section (abfd, info)
|
|||
a global offset table. */
|
||||
h = NULL;
|
||||
if (!(_bfd_generic_link_add_one_symbol
|
||||
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, (bfd_vma) 0,
|
||||
(const char *) NULL, false, get_elf_backend_data (abfd)->collect,
|
||||
(struct bfd_link_hash_entry **) &h)))
|
||||
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
|
||||
bed->got_symbol_offset, (const char *) NULL, false,
|
||||
bed->collect, (struct bfd_link_hash_entry **) &h)))
|
||||
return false;
|
||||
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
|
||||
h->type = STT_OBJECT;
|
||||
|
@ -75,8 +83,9 @@ _bfd_elf_create_got_section (abfd, info)
|
|||
|
||||
elf_hash_table (info)->hgot = h;
|
||||
|
||||
/* The first three global offset table entries are reserved. */
|
||||
s->_raw_size += 3 * 4;
|
||||
/* The first three global offset table entries after
|
||||
'_GLOBAL_OFFSET_TABLE_' are reserved. */
|
||||
s->_raw_size += (3 << ptralign) + bed->got_symbol_offset;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -89,9 +98,17 @@ _bfd_elf_create_dynamic_sections (abfd, info)
|
|||
bfd *abfd;
|
||||
struct bfd_link_info *info;
|
||||
{
|
||||
flagword flags;
|
||||
flagword flags, pltflags;
|
||||
register asection *s;
|
||||
struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
int ptralign;
|
||||
|
||||
switch (bed->s->arch_size)
|
||||
{
|
||||
case 32: ptralign = 2; break;
|
||||
case 64: ptralign = 3; break;
|
||||
default: abort();
|
||||
}
|
||||
|
||||
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
|
||||
.rel[a].bss sections. */
|
||||
|
@ -99,12 +116,17 @@ _bfd_elf_create_dynamic_sections (abfd, info)
|
|||
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
|
||||
| SEC_LINKER_CREATED);
|
||||
|
||||
pltflags = flags;
|
||||
pltflags |= SEC_CODE;
|
||||
if (bed->plt_not_loaded)
|
||||
pltflags &= ~ (SEC_LOAD | SEC_HAS_CONTENTS);
|
||||
if (bed->plt_readonly)
|
||||
pltflags |= SEC_READONLY;
|
||||
|
||||
s = bfd_make_section (abfd, ".plt");
|
||||
if (s == NULL
|
||||
|| ! bfd_set_section_flags (abfd, s,
|
||||
(flags | SEC_CODE
|
||||
| (bed->plt_readonly ? SEC_READONLY : 0)))
|
||||
|| ! bfd_set_section_alignment (abfd, s, 2))
|
||||
|| ! bfd_set_section_flags (abfd, s, pltflags)
|
||||
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
|
||||
return false;
|
||||
|
||||
if (bed->want_plt_sym)
|
||||
|
@ -129,7 +151,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
|
|||
s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.plt" : ".rel.plt");
|
||||
if (s == NULL
|
||||
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|
||||
|| ! bfd_set_section_alignment (abfd, s, 2))
|
||||
|| ! bfd_set_section_alignment (abfd, s, ptralign))
|
||||
return false;
|
||||
|
||||
if (! _bfd_elf_create_got_section (abfd, info))
|
||||
|
@ -162,7 +184,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
|
|||
s = bfd_make_section (abfd, bed->use_rela_p ? ".rela.bss" : ".rel.bss");
|
||||
if (s == NULL
|
||||
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|
||||
|| ! bfd_set_section_alignment (abfd, s, 2))
|
||||
|| ! bfd_set_section_alignment (abfd, s, ptralign))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
There are two such structures here: one for big-endian machines and
|
||||
one for little-endian machines. */
|
||||
|
||||
#define bfd_elfNN_close_and_cleanup _bfd_generic_close_and_cleanup
|
||||
#define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup
|
||||
#define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
|
||||
#ifndef bfd_elfNN_get_section_contents
|
||||
#define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
|
||||
|
@ -61,6 +61,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#define bfd_elfNN_get_section_contents_in_window \
|
||||
_bfd_generic_get_section_contents_in_window
|
||||
|
||||
#ifndef elf_backend_got_symbol_offset
|
||||
#define elf_backend_got_symbol_offset (bfd_vma) 0
|
||||
#endif
|
||||
#ifndef elf_backend_want_got_plt
|
||||
#define elf_backend_want_got_plt 0
|
||||
#endif
|
||||
|
@ -70,6 +73,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#ifndef elf_backend_want_plt_sym
|
||||
#define elf_backend_want_plt_sym 0
|
||||
#endif
|
||||
#ifndef elf_backend_plt_not_loaded
|
||||
#define elf_backend_plt_not_loaded 0
|
||||
#endif
|
||||
#ifndef elf_backend_plt_alignment
|
||||
#define elf_backend_plt_alignment 2
|
||||
#endif
|
||||
|
||||
#define bfd_elfNN_bfd_debug_info_start bfd_void
|
||||
#define bfd_elfNN_bfd_debug_info_end bfd_void
|
||||
|
@ -309,9 +318,12 @@ static CONST struct elf_backend_data elfNN_bed =
|
|||
ELF_MACHINE_ALT1,
|
||||
ELF_MACHINE_ALT2,
|
||||
&elf_backend_size_info,
|
||||
elf_backend_got_symbol_offset,
|
||||
elf_backend_want_got_plt,
|
||||
elf_backend_plt_readonly,
|
||||
elf_backend_want_plt_sym
|
||||
elf_backend_want_plt_sym,
|
||||
elf_backend_plt_not_loaded,
|
||||
elf_backend_plt_alignment
|
||||
};
|
||||
|
||||
#ifdef TARGET_BIG_SYM
|
||||
|
|
|
@ -55,9 +55,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "libbfd.h"
|
||||
#include "libaout.h"
|
||||
|
||||
/* On FreeBSD, the magic number is always in ntohl's "network" (big-endian)
|
||||
/* On FreeBSD, the magic number is always in i386 (little-endian)
|
||||
format. I think. */
|
||||
#define SWAP_MAGIC(ext) bfd_getb32 (ext)
|
||||
#define SWAP_MAGIC(ext) bfd_getl32 (ext)
|
||||
|
||||
|
||||
#define MY_write_object_contents MY(write_object_contents)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back-end for NetBSD/386 a.out-ish binaries.
|
||||
Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#define SEGMENT_SIZE TARGET_PAGE_SIZE
|
||||
|
||||
#define DEFAULT_ARCH bfd_arch_i386
|
||||
#define MACHTYPE_OK(mtype) ((mtype) == M_386_NETBSD || (mtype) == M_UNKNOWN)
|
||||
#define DEFAULT_MID M_386_NETBSD
|
||||
|
||||
#define MY(OP) CAT(i386netbsd_,OP)
|
||||
/* This needs to start with a.out so GDB knows it is an a.out variant. */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back-end for ieee-695 objects.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by Steve Chamberlain of Cygnus Support.
|
||||
|
@ -1646,10 +1646,8 @@ do_one (ieee, current_map, location_ptr, s, iterations)
|
|||
s->flags |= SEC_RELOC;
|
||||
s->owner->flags |= HAS_RELOC;
|
||||
s->reloc_count++;
|
||||
if (r->relent.sym_ptr_ptr == 0)
|
||||
{
|
||||
r->relent.sym_ptr_ptr = section->symbol_ptr_ptr;
|
||||
}
|
||||
if (r->relent.sym_ptr_ptr == NULL && section != NULL)
|
||||
r->relent.sym_ptr_ptr = section->symbol_ptr_ptr;
|
||||
|
||||
if (this_byte (&(ieee->h)) == (int) ieee_comma)
|
||||
{
|
||||
|
@ -1987,8 +1985,9 @@ ieee_canonicalize_reloc (abfd, section, relptr, symbols)
|
|||
symbols + src->symbol.index + ieee->external_reference_base_offset;
|
||||
break;
|
||||
case 0:
|
||||
src->relent.sym_ptr_ptr =
|
||||
src->relent.sym_ptr_ptr[0]->section->symbol_ptr_ptr;
|
||||
if (src->relent.sym_ptr_ptr != NULL)
|
||||
src->relent.sym_ptr_ptr =
|
||||
src->relent.sym_ptr_ptr[0]->section->symbol_ptr_ptr;
|
||||
break;
|
||||
default:
|
||||
|
||||
|
@ -3642,9 +3641,11 @@ ieee_generic_stat_arch_elt (abfd, buf)
|
|||
bfd *abfd;
|
||||
struct stat *buf;
|
||||
{
|
||||
ieee_ar_data_type *ar = abfd->my_archive->tdata.ieee_ar_data;
|
||||
ieee_ar_data_type *ar = (ieee_ar_data_type *) NULL;
|
||||
ieee_data_type *ieee;
|
||||
|
||||
if (abfd->my_archive != NULL)
|
||||
ar = abfd->my_archive->tdata.ieee_ar_data;
|
||||
if (ar == (ieee_ar_data_type *) NULL)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back-end for Intel Hex objects.
|
||||
Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -270,6 +270,7 @@ ihex_scan (abfd)
|
|||
bfd *abfd;
|
||||
{
|
||||
bfd_vma segbase;
|
||||
bfd_vma extbase;
|
||||
asection *sec;
|
||||
int lineno;
|
||||
boolean error;
|
||||
|
@ -283,6 +284,7 @@ ihex_scan (abfd)
|
|||
abfd->start_address = 0;
|
||||
|
||||
segbase = 0;
|
||||
extbase = 0;
|
||||
sec = NULL;
|
||||
lineno = 1;
|
||||
error = false;
|
||||
|
@ -376,7 +378,7 @@ ihex_scan (abfd)
|
|||
case 0:
|
||||
/* This is a data record. */
|
||||
if (sec != NULL
|
||||
&& sec->vma + sec->_raw_size == segbase + addr)
|
||||
&& sec->vma + sec->_raw_size == extbase + segbase + addr)
|
||||
{
|
||||
/* This data goes at the end of the section we are
|
||||
currently building. */
|
||||
|
@ -396,8 +398,8 @@ ihex_scan (abfd)
|
|||
if (sec == NULL)
|
||||
goto error_return;
|
||||
sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
|
||||
sec->vma = segbase + addr;
|
||||
sec->lma = segbase + addr;
|
||||
sec->vma = extbase + segbase + addr;
|
||||
sec->lma = extbase + segbase + addr;
|
||||
sec->_raw_size = len;
|
||||
sec->filepos = pos;
|
||||
}
|
||||
|
@ -456,7 +458,7 @@ ihex_scan (abfd)
|
|||
goto error_return;
|
||||
}
|
||||
|
||||
segbase = HEX4 (buf) << 16;
|
||||
extbase = HEX4 (buf) << 16;
|
||||
|
||||
sec = NULL;
|
||||
|
||||
|
@ -791,9 +793,11 @@ ihex_write_object_contents (abfd)
|
|||
bfd *abfd;
|
||||
{
|
||||
bfd_vma segbase;
|
||||
bfd_vma extbase;
|
||||
struct ihex_data_list *l;
|
||||
|
||||
segbase = 0;
|
||||
extbase = 0;
|
||||
for (l = abfd->tdata.ihex_data->head; l != NULL; l = l->next)
|
||||
{
|
||||
bfd_vma where;
|
||||
|
@ -811,13 +815,16 @@ ihex_write_object_contents (abfd)
|
|||
if (now > CHUNK)
|
||||
now = CHUNK;
|
||||
|
||||
if (where > segbase + 0xffff)
|
||||
if (where > segbase + extbase + 0xffff)
|
||||
{
|
||||
bfd_byte addr[2];
|
||||
|
||||
/* We need a new base address. */
|
||||
if (where <= 0xfffff)
|
||||
{
|
||||
/* The addresses should be sorted. */
|
||||
BFD_ASSERT (extbase == 0);
|
||||
|
||||
segbase = where & 0xf0000;
|
||||
addr[0] = (bfd_byte)(segbase >> 12) & 0xff;
|
||||
addr[1] = (bfd_byte)(segbase >> 4) & 0xff;
|
||||
|
@ -826,8 +833,23 @@ ihex_write_object_contents (abfd)
|
|||
}
|
||||
else
|
||||
{
|
||||
segbase = where & 0xffff0000;
|
||||
if (where > segbase + 0xffff)
|
||||
/* The extended address record and the extended
|
||||
linear address record are combined, at least by
|
||||
some readers. We need an extended linear address
|
||||
record here, so if we've already written out an
|
||||
extended address record, zero it out to avoid
|
||||
confusion. */
|
||||
if (segbase != 0)
|
||||
{
|
||||
addr[0] = 0;
|
||||
addr[1] = 0;
|
||||
if (! ihex_write_record (abfd, 2, 0, 2, addr))
|
||||
return false;
|
||||
segbase = 0;
|
||||
}
|
||||
|
||||
extbase = where & 0xffff0000;
|
||||
if (where > extbase + 0xffff)
|
||||
{
|
||||
char buf[20];
|
||||
|
||||
|
@ -838,14 +860,15 @@ ihex_write_object_contents (abfd)
|
|||
bfd_set_error (bfd_error_bad_value);
|
||||
return false;
|
||||
}
|
||||
addr[0] = (bfd_byte)(segbase >> 24) & 0xff;
|
||||
addr[1] = (bfd_byte)(segbase >> 16) & 0xff;
|
||||
addr[0] = (bfd_byte)(extbase >> 24) & 0xff;
|
||||
addr[1] = (bfd_byte)(extbase >> 16) & 0xff;
|
||||
if (! ihex_write_record (abfd, 2, 0, 4, addr))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (! ihex_write_record (abfd, now, where - segbase, 0, p))
|
||||
if (! ihex_write_record (abfd, now, where - (extbase + segbase),
|
||||
0, p))
|
||||
return false;
|
||||
|
||||
where += now;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* BFD back-end data structures for a.out (and similar) files.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -228,6 +229,9 @@ enum machine_type {
|
|||
M_68K4K_NETBSD = 136, /* NetBSD/m68k4k binary */
|
||||
M_532_NETBSD = 137, /* NetBSD/ns32k binary */
|
||||
M_SPARC_NETBSD = 138, /* NetBSD/sparc binary */
|
||||
M_PMAX_NETBSD = 139, /* NetBSD/pmax (MIPS little-endian) binary */
|
||||
M_VAX_NETBSD = 140, /* NetBSD/vax binary */
|
||||
M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary */
|
||||
M_SPARCLET_1 = 147, /* 0x93, reserved */
|
||||
M_MIPS1 = 151, /* MIPS R2000/R3000 binary */
|
||||
M_MIPS2 = 152, /* MIPS R4000/R6000 binary */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* libbfd.h -- Declarations used by bfd library *implementation*.
|
||||
(This include file is not for users of the library.)
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
|
||||
|
@ -24,9 +24,13 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Align an address upward to a boundary, expressed as a number of bytes.
|
||||
E.g. align to an 8-byte boundary with argument of 8. */
|
||||
#define BFD_ALIGN(this, boundary) \
|
||||
((( (this) + ((boundary) -1)) & (~((boundary)-1))))
|
||||
E.g. align to an 8-byte boundary with argument of 8. Take care never
|
||||
to wrap around if the address is within boundary-1 of the end of the
|
||||
address space. */
|
||||
#define BFD_ALIGN(this, boundary) \
|
||||
((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
|
||||
? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
|
||||
: ~ (bfd_vma) 0)
|
||||
|
||||
/* If you want to read and write large blocks, you might want to do it
|
||||
in quanta of this amount */
|
||||
|
@ -348,6 +352,11 @@ extern boolean _bfd_stab_section_find_nearest_line
|
|||
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
|
||||
const char **, unsigned int *, PTR *));
|
||||
|
||||
/* Find the nearest line using DWARF 2 debugging information. */
|
||||
extern boolean _bfd_dwarf2_find_nearest_line
|
||||
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
|
||||
const char **, unsigned int *));
|
||||
|
||||
/* A routine to create entries for a bfd_link_hash_table. */
|
||||
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
|
||||
PARAMS ((struct bfd_hash_entry *entry,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* Assorted BFD support routines, only used internally.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -687,9 +688,20 @@ bfd_seek (abfd, position, direction)
|
|||
|
||||
if (result != 0)
|
||||
{
|
||||
int hold_errno = errno;
|
||||
|
||||
/* Force redetermination of `where' field. */
|
||||
bfd_tell (abfd);
|
||||
bfd_set_error (bfd_error_system_call);
|
||||
|
||||
/* An EINVAL error probably means that the file offset was
|
||||
absurd. */
|
||||
if (hold_errno == EINVAL)
|
||||
bfd_set_error (bfd_error_file_truncated);
|
||||
else
|
||||
{
|
||||
bfd_set_error (bfd_error_system_call);
|
||||
errno = hold_errno;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* libbfd.h -- Declarations used by bfd library *implementation*.
|
||||
(This include file is not for users of the library.)
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
|
||||
|
@ -24,9 +24,13 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Align an address upward to a boundary, expressed as a number of bytes.
|
||||
E.g. align to an 8-byte boundary with argument of 8. */
|
||||
#define BFD_ALIGN(this, boundary) \
|
||||
((( (this) + ((boundary) -1)) & (~((boundary)-1))))
|
||||
E.g. align to an 8-byte boundary with argument of 8. Take care never
|
||||
to wrap around if the address is within boundary-1 of the end of the
|
||||
address space. */
|
||||
#define BFD_ALIGN(this, boundary) \
|
||||
((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
|
||||
? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
|
||||
: ~ (bfd_vma) 0)
|
||||
|
||||
/* If you want to read and write large blocks, you might want to do it
|
||||
in quanta of this amount */
|
||||
|
@ -348,6 +352,11 @@ extern boolean _bfd_stab_section_find_nearest_line
|
|||
PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
|
||||
const char **, unsigned int *, PTR *));
|
||||
|
||||
/* Find the nearest line using DWARF 2 debugging information. */
|
||||
extern boolean _bfd_dwarf2_find_nearest_line
|
||||
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
|
||||
const char **, unsigned int *));
|
||||
|
||||
/* A routine to create entries for a bfd_link_hash_table. */
|
||||
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
|
||||
PARAMS ((struct bfd_hash_entry *entry,
|
||||
|
@ -626,10 +635,16 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_SPARC_PC_LM22",
|
||||
"BFD_RELOC_SPARC_WDISP16",
|
||||
"BFD_RELOC_SPARC_WDISP19",
|
||||
"BFD_RELOC_SPARC_GLOB_JMP",
|
||||
"BFD_RELOC_SPARC_7",
|
||||
"BFD_RELOC_SPARC_6",
|
||||
"BFD_RELOC_SPARC_5",
|
||||
"BFD_RELOC_SPARC_PLT64",
|
||||
"BFD_RELOC_SPARC_HIX22",
|
||||
"BFD_RELOC_SPARC_LOX10",
|
||||
"BFD_RELOC_SPARC_H44",
|
||||
"BFD_RELOC_SPARC_M44",
|
||||
"BFD_RELOC_SPARC_L44",
|
||||
"BFD_RELOC_SPARC_REGISTER",
|
||||
"BFD_RELOC_ALPHA_GPDISP_HI16",
|
||||
"BFD_RELOC_ALPHA_GPDISP_LO16",
|
||||
"BFD_RELOC_ALPHA_GPDISP",
|
||||
|
@ -654,6 +669,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_MIPS_GOT_LO16",
|
||||
"BFD_RELOC_MIPS_CALL_HI16",
|
||||
"BFD_RELOC_MIPS_CALL_LO16",
|
||||
|
||||
"BFD_RELOC_386_GOT32",
|
||||
"BFD_RELOC_386_PLT32",
|
||||
"BFD_RELOC_386_COPY",
|
||||
|
@ -740,7 +756,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_SH_CODE",
|
||||
"BFD_RELOC_SH_DATA",
|
||||
"BFD_RELOC_SH_LABEL",
|
||||
|
||||
"BFD_RELOC_THUMB_PCREL_BRANCH9",
|
||||
"BFD_RELOC_THUMB_PCREL_BRANCH12",
|
||||
"BFD_RELOC_THUMB_PCREL_BRANCH23",
|
||||
"BFD_RELOC_ARC_B22_PCREL",
|
||||
"BFD_RELOC_ARC_B26",
|
||||
"BFD_RELOC_D10V_10_PCREL_R",
|
||||
"BFD_RELOC_D10V_10_PCREL_L",
|
||||
"BFD_RELOC_D10V_18",
|
||||
|
@ -755,9 +775,20 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_M32R_HI16_SLO",
|
||||
"BFD_RELOC_M32R_LO16",
|
||||
"BFD_RELOC_M32R_SDA16",
|
||||
"BFD_RELOC_V850_9_PCREL",
|
||||
"BFD_RELOC_V850_22_PCREL",
|
||||
"BFD_RELOC_V850_SDA_16_16_OFFSET",
|
||||
"BFD_RELOC_V850_SDA_15_16_OFFSET",
|
||||
"BFD_RELOC_V850_ZDA_16_16_OFFSET",
|
||||
"BFD_RELOC_V850_ZDA_15_16_OFFSET",
|
||||
"BFD_RELOC_V850_TDA_6_8_OFFSET",
|
||||
"BFD_RELOC_V850_TDA_7_8_OFFSET",
|
||||
"BFD_RELOC_V850_TDA_7_7_OFFSET",
|
||||
"BFD_RELOC_V850_TDA_16_16_OFFSET",
|
||||
|
||||
"BFD_RELOC_MN10300_32_PCREL",
|
||||
"BFD_RELOC_MN10300_16_PCREL",
|
||||
"BFD_RELOC_TIC30_LDP",
|
||||
"@@overflow: BFD_RELOC_UNUSED@@",
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD COFF object file private structure.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
|
@ -96,6 +96,11 @@ typedef struct coff_tdata
|
|||
|
||||
/* Used by coff_find_nearest_line. */
|
||||
PTR line_info;
|
||||
|
||||
/* Copy of some of the f_flags bits in the COFF filehdr structure,
|
||||
used by ARM code. */
|
||||
flagword flags;
|
||||
|
||||
} coff_data_type;
|
||||
|
||||
/* Tdata for pe image files. */
|
||||
|
@ -417,6 +422,10 @@ struct coff_final_link_info
|
|||
bfd *output_bfd;
|
||||
/* Used to indicate failure in traversal routine. */
|
||||
boolean failed;
|
||||
/* If doing "task linking" set only during the time when we want the
|
||||
global symbol writer to convert the storage class of defined global
|
||||
symbols from global to static. */
|
||||
boolean global_to_static;
|
||||
/* Hash table for long symbol names. */
|
||||
struct bfd_strtab_hash *strtab;
|
||||
/* When doing a relocateable link, an array of information kept for
|
||||
|
@ -479,6 +488,8 @@ extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
|
|||
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
|
||||
extern boolean _bfd_coff_write_global_sym
|
||||
PARAMS ((struct coff_link_hash_entry *, PTR));
|
||||
extern boolean _bfd_coff_write_task_globals
|
||||
PARAMS ((struct coff_link_hash_entry *, PTR));
|
||||
extern boolean _bfd_coff_link_input_bfd
|
||||
PARAMS ((struct coff_final_link_info *, bfd *));
|
||||
extern boolean _bfd_coff_reloc_link_order
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD COFF object file private structure.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
|
@ -96,6 +96,11 @@ typedef struct coff_tdata
|
|||
|
||||
/* Used by coff_find_nearest_line. */
|
||||
PTR line_info;
|
||||
|
||||
/* Copy of some of the f_flags bits in the COFF filehdr structure,
|
||||
used by ARM code. */
|
||||
flagword flags;
|
||||
|
||||
} coff_data_type;
|
||||
|
||||
/* Tdata for pe image files. */
|
||||
|
@ -417,6 +422,10 @@ struct coff_final_link_info
|
|||
bfd *output_bfd;
|
||||
/* Used to indicate failure in traversal routine. */
|
||||
boolean failed;
|
||||
/* If doing "task linking" set only during the time when we want the
|
||||
global symbol writer to convert the storage class of defined global
|
||||
symbols from global to static. */
|
||||
boolean global_to_static;
|
||||
/* Hash table for long symbol names. */
|
||||
struct bfd_strtab_hash *strtab;
|
||||
/* When doing a relocateable link, an array of information kept for
|
||||
|
@ -479,6 +488,8 @@ extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc
|
|||
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
|
||||
extern boolean _bfd_coff_write_global_sym
|
||||
PARAMS ((struct coff_link_hash_entry *, PTR));
|
||||
extern boolean _bfd_coff_write_task_globals
|
||||
PARAMS ((struct coff_link_hash_entry *, PTR));
|
||||
extern boolean _bfd_coff_link_input_bfd
|
||||
PARAMS ((struct coff_final_link_info *, bfd *));
|
||||
extern boolean _bfd_coff_reloc_link_order
|
||||
|
@ -592,43 +603,43 @@ typedef struct
|
|||
PTR in));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
int type,
|
||||
int class,
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
int type,
|
||||
int class,
|
||||
int indaux,
|
||||
int numaux,
|
||||
PTR ext));
|
||||
PTR ext));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR ext));
|
||||
PTR in,
|
||||
PTR ext));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR ext));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR ext));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR src,
|
||||
PTR dst));
|
||||
bfd *abfd,
|
||||
PTR src,
|
||||
PTR dst));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
|
||||
unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
bfd *abfd,
|
||||
PTR in,
|
||||
PTR out));
|
||||
|
||||
unsigned int _bfd_filhsz;
|
||||
unsigned int _bfd_aoutsz;
|
||||
|
@ -749,6 +760,12 @@ typedef struct
|
|||
boolean collect,
|
||||
struct bfd_link_hash_entry **hashp));
|
||||
|
||||
boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
|
||||
bfd * abfd ));
|
||||
boolean (*_bfd_coff_final_link_postscript) PARAMS ((
|
||||
bfd * abfd,
|
||||
struct coff_final_link_info * pfinfo));
|
||||
|
||||
} bfd_coff_backend_data;
|
||||
|
||||
#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
|
||||
|
@ -794,7 +811,7 @@ typedef struct
|
|||
#define bfd_coff_long_section_names(abfd) \
|
||||
(coff_backend_info (abfd)->_bfd_coff_long_section_names)
|
||||
#define bfd_coff_default_section_alignment_power(abfd) \
|
||||
(coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
|
||||
(coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
|
||||
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
|
||||
((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
|
||||
|
||||
|
@ -863,3 +880,8 @@ typedef struct
|
|||
((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
|
||||
(info, abfd, name, flags, section, value, string, cp, coll, hashp))
|
||||
|
||||
#define bfd_coff_link_output_has_begun(a) \
|
||||
((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a))
|
||||
#define bfd_coff_final_link_postscript(a,p) \
|
||||
((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
|
||||
|
||||
|
|
|
@ -1319,14 +1319,14 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
|
|||
if (bfd_is_com_section (bfd_get_section (p)))
|
||||
p->flags |= BSF_OLD_COMMON;
|
||||
}
|
||||
|
||||
/* Store a back pointer from the symbol to the hash
|
||||
table entry for the benefit of relaxation code until
|
||||
it gets rewritten to not use asymbol structures.
|
||||
Setting this is also used to check whether these
|
||||
symbols were set up by the generic linker. */
|
||||
p->udata.p = (PTR) h;
|
||||
}
|
||||
|
||||
/* Store a back pointer from the symbol to the hash
|
||||
table entry for the benefit of relaxation code until
|
||||
it gets rewritten to not use asymbol structures.
|
||||
Setting this is also used to check whether these
|
||||
symbols were set up by the generic linker. */
|
||||
p->udata.p = (PTR) h;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1394,7 +1394,7 @@ static const enum link_action link_action[8][8] =
|
|||
/* UNDEFW_ROW */ {WEAK, NOACT, NOACT, REF, REF, NOACT, REFC, WARNC },
|
||||
/* DEF_ROW */ {DEF, DEF, DEF, MDEF, DEF, CDEF, MDEF, CYCLE },
|
||||
/* DEFW_ROW */ {DEFW, DEFW, DEFW, NOACT, NOACT, NOACT, NOACT, CYCLE },
|
||||
/* COMMON_ROW */ {COM, COM, COM, CREF, CREF, BIG, CREF, WARNC },
|
||||
/* COMMON_ROW */ {COM, COM, COM, CREF, CREF, BIG, REFC, WARNC },
|
||||
/* INDR_ROW */ {IND, IND, IND, MDEF, IND, CIND, MIND, CYCLE },
|
||||
/* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, MWARN },
|
||||
/* SET_ROW */ {SET, SET, SET, SET, SET, SET, CYCLE, CYCLE }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD back end for NetBSD style core files
|
||||
Copyright 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
||||
Copyright 1988, 89, 91, 92, 93, 96, 1998 Free Software Foundation, Inc.
|
||||
Written by Paul Kranenburg, EUR
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -41,10 +41,10 @@ struct netbsd_core_struct {
|
|||
|
||||
/* forward declarations */
|
||||
|
||||
static const bfd_target * netbsd_core_core_file_p PARAMS ((bfd *abfd));
|
||||
static char * netbsd_core_core_file_failing_command PARAMS ((bfd *abfd));
|
||||
static int netbsd_core_core_file_failing_signal PARAMS ((bfd *abfd));
|
||||
static boolean netbsd_core_core_file_matches_executable_p
|
||||
static const bfd_target * netbsd_core_file_p PARAMS ((bfd *abfd));
|
||||
static char * netbsd_core_file_failing_command PARAMS ((bfd *abfd));
|
||||
static int netbsd_core_file_failing_signal PARAMS ((bfd *abfd));
|
||||
static boolean netbsd_core_file_matches_executable_p
|
||||
PARAMS ((bfd *core_bfd, bfd *exec_bfd));
|
||||
static void swap_abort PARAMS ((void));
|
||||
|
||||
|
@ -52,7 +52,7 @@ static void swap_abort PARAMS ((void));
|
|||
|
||||
/* ARGSUSED */
|
||||
static const bfd_target *
|
||||
netbsd_core_core_file_p (abfd)
|
||||
netbsd_core_file_p (abfd)
|
||||
bfd *abfd;
|
||||
|
||||
{
|
||||
|
@ -104,6 +104,7 @@ netbsd_core_core_file_p (abfd)
|
|||
asect = (asection *) bfd_zalloc (abfd, sizeof(asection));
|
||||
if (asect == NULL) {
|
||||
bfd_set_error(bfd_error_no_memory);
|
||||
goto punt;
|
||||
}
|
||||
|
||||
asect->_raw_size = coreseg.c_size;
|
||||
|
@ -169,7 +170,7 @@ punt: {
|
|||
}
|
||||
|
||||
static char*
|
||||
netbsd_core_core_file_failing_command (abfd)
|
||||
netbsd_core_file_failing_command (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
/*return core_command (abfd);*/
|
||||
|
@ -178,7 +179,7 @@ netbsd_core_core_file_failing_command (abfd)
|
|||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
netbsd_core_core_file_failing_signal (abfd)
|
||||
netbsd_core_file_failing_signal (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
/*return core_signal (abfd);*/
|
||||
|
@ -187,69 +188,12 @@ netbsd_core_core_file_failing_signal (abfd)
|
|||
|
||||
/* ARGSUSED */
|
||||
static boolean
|
||||
netbsd_core_core_file_matches_executable_p (core_bfd, exec_bfd)
|
||||
netbsd_core_file_matches_executable_p (core_bfd, exec_bfd)
|
||||
bfd *core_bfd, *exec_bfd;
|
||||
{
|
||||
return true; /* FIXME, We have no way of telling at this point */
|
||||
return true; /* FIXME, We have no way of telling at this point */
|
||||
}
|
||||
|
||||
/* No archive file support via this BFD */
|
||||
#define netbsd_openr_next_archived_file bfd_generic_openr_next_archived_file
|
||||
#define netbsd_generic_stat_arch_elt bfd_generic_stat_arch_elt
|
||||
#define netbsd_slurp_armap bfd_false
|
||||
#define netbsd_slurp_extended_name_table bfd_true
|
||||
#define netbsd_write_armap (boolean (*) PARAMS \
|
||||
((bfd *arch, unsigned int elength, struct orl *map, \
|
||||
unsigned int orl_count, int stridx))) bfd_false
|
||||
#define netbsd_truncate_arname bfd_dont_truncate_arname
|
||||
#define aout_32_openr_next_archived_file bfd_generic_openr_next_archived_file
|
||||
|
||||
#define netbsd_close_and_cleanup bfd_generic_close_and_cleanup
|
||||
#define netbsd_set_section_contents (boolean (*) PARAMS \
|
||||
((bfd *abfd, asection *section, PTR data, file_ptr offset, \
|
||||
bfd_size_type count))) bfd_false
|
||||
#define netbsd_get_section_contents bfd_generic_get_section_contents
|
||||
#define netbsd_new_section_hook (boolean (*) PARAMS \
|
||||
((bfd *, sec_ptr))) bfd_true
|
||||
#define netbsd_get_symtab_upper_bound bfd_0u
|
||||
#define netbsd_get_symtab (unsigned int (*) PARAMS \
|
||||
((bfd *, struct symbol_cache_entry **))) bfd_0u
|
||||
#define netbsd_get_reloc_upper_bound (unsigned int (*) PARAMS \
|
||||
((bfd *, sec_ptr))) bfd_0u
|
||||
#define netbsd_canonicalize_reloc (unsigned int (*) PARAMS \
|
||||
((bfd *, sec_ptr, arelent **, struct symbol_cache_entry**))) bfd_0u
|
||||
#define netbsd_make_empty_symbol (struct symbol_cache_entry * \
|
||||
(*) PARAMS ((bfd *))) bfd_false
|
||||
#define netbsd_print_symbol (void (*) PARAMS \
|
||||
((bfd *, PTR, struct symbol_cache_entry *, \
|
||||
bfd_print_symbol_type))) bfd_false
|
||||
#define netbsd_get_symbol_info (void (*) PARAMS \
|
||||
((bfd *, struct symbol_cache_entry *, \
|
||||
symbol_info *))) bfd_false
|
||||
#define netbsd_get_lineno (alent * (*) PARAMS \
|
||||
((bfd *, struct symbol_cache_entry *))) bfd_nullvoidptr
|
||||
#define netbsd_set_arch_mach (boolean (*) PARAMS \
|
||||
((bfd *, enum bfd_architecture, unsigned long))) bfd_false
|
||||
#define netbsd_find_nearest_line (boolean (*) PARAMS \
|
||||
((bfd *abfd, struct sec *section, \
|
||||
struct symbol_cache_entry **symbols,bfd_vma offset, \
|
||||
CONST char **file, CONST char **func, unsigned int *line))) bfd_false
|
||||
#define netbsd_sizeof_headers (int (*) PARAMS \
|
||||
((bfd *, boolean))) bfd_0
|
||||
|
||||
#define netbsd_bfd_debug_info_start bfd_void
|
||||
#define netbsd_bfd_debug_info_end bfd_void
|
||||
#define netbsd_bfd_debug_info_accumulate (void (*) PARAMS \
|
||||
((bfd *, struct sec *))) bfd_void
|
||||
#define netbsd_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
|
||||
#define netbsd_bfd_relax_section bfd_generic_relax_section
|
||||
#define netbsd_bfd_seclet_link \
|
||||
((boolean (*) PARAMS ((bfd *, PTR, boolean))) bfd_false)
|
||||
#define netbsd_bfd_reloc_type_lookup \
|
||||
((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
|
||||
#define netbsd_bfd_make_debug_symbol \
|
||||
((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
|
||||
|
||||
/* If somebody calls any byte-swapping routines, shoot them. */
|
||||
static void
|
||||
swap_abort()
|
||||
|
@ -259,17 +203,17 @@ swap_abort()
|
|||
#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
|
||||
#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
|
||||
#define NO_SIGNED_GET \
|
||||
((bfd_signed_vma (*) PARAMS (( const bfd_byte *))) swap_abort )
|
||||
((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort )
|
||||
|
||||
const bfd_target netbsd_core_vec =
|
||||
{
|
||||
"netbsd-core",
|
||||
bfd_target_unknown_flavour,
|
||||
true, /* target byte order */
|
||||
true, /* target headers byte order */
|
||||
BFD_ENDIAN_UNKNOWN, /* target byte order */
|
||||
BFD_ENDIAN_UNKNOWN, /* target headers byte order */
|
||||
(HAS_RELOC | EXEC_P | /* object flags */
|
||||
HAS_LINENO | HAS_DEBUG |
|
||||
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
|
||||
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
|
||||
0, /* symbol prefix */
|
||||
' ', /* ar_pad_char */
|
||||
|
@ -285,7 +229,7 @@ const bfd_target netbsd_core_vec =
|
|||
_bfd_dummy_target, /* unknown format */
|
||||
_bfd_dummy_target, /* object file */
|
||||
_bfd_dummy_target, /* archive */
|
||||
netbsd_core_core_file_p /* a core file */
|
||||
netbsd_core_file_p /* a core file */
|
||||
},
|
||||
{ /* bfd_set_format */
|
||||
bfd_false, bfd_false,
|
||||
|
@ -298,7 +242,7 @@ const bfd_target netbsd_core_vec =
|
|||
|
||||
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
|
||||
BFD_JUMP_TABLE_COPY (_bfd_generic),
|
||||
BFD_JUMP_TABLE_CORE (netbsd_core),
|
||||
BFD_JUMP_TABLE_CORE (netbsd),
|
||||
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
|
||||
BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
|
||||
BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* BFD back-end definitions used by all NetBSD targets.
|
||||
Copyright (C) 1990, 91, 92, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 91, 92, 94, 95, 96, 97 1998
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
|
@ -15,8 +16,13 @@ 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.
|
||||
*/
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Check for our machine type (part of magic number). */
|
||||
#ifndef MACHTYPE_OK
|
||||
#define MACHTYPE_OK(m) ((m) == DEFAULT_MID || (m) == M_UNKNOWN)
|
||||
#endif
|
||||
|
||||
/* This is the normal load address for executables. */
|
||||
#define TEXT_START_ADDR TARGET_PAGE_SIZE
|
||||
|
@ -93,20 +99,8 @@ MY(write_object_contents) (abfd)
|
|||
|
||||
/* Magic number, maestro, please! */
|
||||
switch (bfd_get_arch(abfd)) {
|
||||
case bfd_arch_m68k:
|
||||
if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
|
||||
N_SET_MACHTYPE(*execp, M_68K4K_NETBSD);
|
||||
else
|
||||
N_SET_MACHTYPE(*execp, M_68K_NETBSD);
|
||||
break;
|
||||
case bfd_arch_sparc:
|
||||
N_SET_MACHTYPE(*execp, M_SPARC_NETBSD);
|
||||
break;
|
||||
case bfd_arch_i386:
|
||||
N_SET_MACHTYPE(*execp, M_386_NETBSD);
|
||||
break;
|
||||
case bfd_arch_ns32k:
|
||||
N_SET_MACHTYPE(*execp, M_532_NETBSD);
|
||||
case DEFAULT_ARCH:
|
||||
N_SET_MACHTYPE(*execp, DEFAULT_MID);
|
||||
break;
|
||||
default:
|
||||
N_SET_MACHTYPE(*execp, M_UNKNOWN);
|
||||
|
|
|
@ -220,16 +220,17 @@ bfd_fdopenr (filename, target, fd)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(VMS) || defined(__GO32__)
|
||||
nbfd->iostream = (PTR)fopen(filename, FOPEN_RB);
|
||||
#ifndef HAVE_FDOPEN
|
||||
nbfd->iostream = (PTR) fopen (filename, FOPEN_RB);
|
||||
#else
|
||||
/* (O_ACCMODE) parens are to avoid Ultrix header file bug */
|
||||
switch (fdflags & (O_ACCMODE)) {
|
||||
case O_RDONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RB); break;
|
||||
case O_WRONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
|
||||
case O_RDWR: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
|
||||
default: abort ();
|
||||
}
|
||||
switch (fdflags & (O_ACCMODE))
|
||||
{
|
||||
case O_RDONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RB); break;
|
||||
case O_WRONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
|
||||
case O_RDWR: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB); break;
|
||||
default: abort ();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (nbfd->iostream == NULL)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* BFD support for handling relocation entries.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
|
@ -411,14 +411,14 @@ FUNCTION
|
|||
bfd_get_reloc_size
|
||||
|
||||
SYNOPSIS
|
||||
int bfd_get_reloc_size (reloc_howto_type *);
|
||||
unsigned int bfd_get_reloc_size (reloc_howto_type *);
|
||||
|
||||
DESCRIPTION
|
||||
For a reloc_howto_type that operates on a fixed number of bytes,
|
||||
this returns the number of bytes operated on.
|
||||
*/
|
||||
|
||||
int
|
||||
unsigned int
|
||||
bfd_get_reloc_size (howto)
|
||||
reloc_howto_type *howto;
|
||||
{
|
||||
|
@ -451,6 +451,110 @@ DESCRIPTION
|
|||
*/
|
||||
|
||||
|
||||
/*
|
||||
FUNCTION
|
||||
bfd_check_overflow
|
||||
|
||||
SYNOPSIS
|
||||
bfd_reloc_status_type
|
||||
bfd_check_overflow
|
||||
(enum complain_overflow how,
|
||||
unsigned int bitsize,
|
||||
unsigned int rightshift,
|
||||
bfd_vma relocation);
|
||||
|
||||
DESCRIPTION
|
||||
Perform overflow checking on @var{relocation} which has @var{bitsize}
|
||||
significant bits and will be shifted right by @var{rightshift} bits.
|
||||
The result is either of @code{bfd_reloc_ok} or
|
||||
@code{bfd_reloc_overflow}.
|
||||
|
||||
*/
|
||||
|
||||
bfd_reloc_status_type
|
||||
bfd_check_overflow (how, bitsize, rightshift, relocation)
|
||||
enum complain_overflow how;
|
||||
unsigned int bitsize, rightshift;
|
||||
bfd_vma relocation;
|
||||
{
|
||||
bfd_vma check;
|
||||
bfd_reloc_status_type flag = bfd_reloc_ok;
|
||||
|
||||
/* Get the value that will be used for the relocation, but
|
||||
starting at bit position zero. */
|
||||
check = relocation >> rightshift;
|
||||
|
||||
switch (how)
|
||||
{
|
||||
case complain_overflow_dont:
|
||||
break;
|
||||
|
||||
case complain_overflow_signed:
|
||||
{
|
||||
/* Assumes two's complement. */
|
||||
bfd_signed_vma reloc_signed_max = (1 << (bitsize - 1)) - 1;
|
||||
bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
|
||||
|
||||
/* The above right shift is incorrect for a signed value.
|
||||
Fix it up by forcing on the upper bits. */
|
||||
if (rightshift > 0
|
||||
&& (bfd_signed_vma) relocation < 0)
|
||||
check |= ((bfd_vma) - 1
|
||||
& ~((bfd_vma) - 1
|
||||
>> rightshift));
|
||||
if ((bfd_signed_vma) check > reloc_signed_max
|
||||
|| (bfd_signed_vma) check < reloc_signed_min)
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
break;
|
||||
|
||||
case complain_overflow_unsigned:
|
||||
{
|
||||
/* Assumes two's complement. This expression avoids
|
||||
overflow if `bitsize' is the number of bits in
|
||||
bfd_vma. */
|
||||
bfd_vma reloc_unsigned_max = (((1 << (bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if ((bfd_vma) check > reloc_unsigned_max)
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
break;
|
||||
|
||||
case complain_overflow_bitfield:
|
||||
{
|
||||
/* Assumes two's complement. This expression avoids
|
||||
overflow if `bitsize' is the number of bits in
|
||||
bfd_vma. */
|
||||
bfd_vma reloc_bits = (((1 << (bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if (((bfd_vma) check & ~reloc_bits) != 0
|
||||
&& ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
|
||||
{
|
||||
/* The above right shift is incorrect for a signed
|
||||
value. See if turning on the upper bits fixes the
|
||||
overflow. */
|
||||
if (rightshift > 0
|
||||
&& (bfd_signed_vma) relocation < 0)
|
||||
{
|
||||
check |= ((bfd_vma) - 1
|
||||
& ~((bfd_vma) - 1
|
||||
>> rightshift));
|
||||
if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
else
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
FUNCTION
|
||||
|
@ -721,75 +825,8 @@ space consuming. For each target:
|
|||
adding in the value contained in the object file. */
|
||||
if (howto->complain_on_overflow != complain_overflow_dont
|
||||
&& flag == bfd_reloc_ok)
|
||||
{
|
||||
bfd_vma check;
|
||||
|
||||
/* Get the value that will be used for the relocation, but
|
||||
starting at bit position zero. */
|
||||
check = relocation >> howto->rightshift;
|
||||
switch (howto->complain_on_overflow)
|
||||
{
|
||||
case complain_overflow_signed:
|
||||
{
|
||||
/* Assumes two's complement. */
|
||||
bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
|
||||
bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
|
||||
|
||||
/* The above right shift is incorrect for a signed value.
|
||||
Fix it up by forcing on the upper bits. */
|
||||
if (howto->rightshift > 0
|
||||
&& (bfd_signed_vma) relocation < 0)
|
||||
check |= ((bfd_vma) - 1
|
||||
& ~((bfd_vma) - 1
|
||||
>> howto->rightshift));
|
||||
if ((bfd_signed_vma) check > reloc_signed_max
|
||||
|| (bfd_signed_vma) check < reloc_signed_min)
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
break;
|
||||
case complain_overflow_unsigned:
|
||||
{
|
||||
/* Assumes two's complement. This expression avoids
|
||||
overflow if howto->bitsize is the number of bits in
|
||||
bfd_vma. */
|
||||
bfd_vma reloc_unsigned_max =
|
||||
(((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if ((bfd_vma) check > reloc_unsigned_max)
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
break;
|
||||
case complain_overflow_bitfield:
|
||||
{
|
||||
/* Assumes two's complement. This expression avoids
|
||||
overflow if howto->bitsize is the number of bits in
|
||||
bfd_vma. */
|
||||
bfd_vma reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if (((bfd_vma) check & ~reloc_bits) != 0
|
||||
&& ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
|
||||
{
|
||||
/* The above right shift is incorrect for a signed
|
||||
value. See if turning on the upper bits fixes the
|
||||
overflow. */
|
||||
if (howto->rightshift > 0
|
||||
&& (bfd_signed_vma) relocation < 0)
|
||||
{
|
||||
check |= ((bfd_vma) - 1
|
||||
& ~((bfd_vma) - 1
|
||||
>> howto->rightshift));
|
||||
if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
else
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
flag = bfd_check_overflow (howto->complain_on_overflow, howto->bitsize,
|
||||
howto->rightshift, relocation);
|
||||
|
||||
/*
|
||||
Either we are relocating all the way, or we don't want to apply
|
||||
|
@ -983,6 +1020,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
|
|||
if (howto->special_function)
|
||||
{
|
||||
bfd_reloc_status_type cont;
|
||||
|
||||
/* XXX - The special_function calls haven't been fixed up to deal
|
||||
with creating new relocations and section contents. */
|
||||
cont = howto->special_function (abfd, reloc_entry, symbol,
|
||||
|
@ -1007,7 +1045,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
|
|||
else
|
||||
relocation = symbol->value;
|
||||
|
||||
|
||||
reloc_target_output_section = symbol->section->output_section;
|
||||
|
||||
/* Convert input-section-relative symbol value to absolute. */
|
||||
|
@ -1172,79 +1209,11 @@ space consuming. For each target:
|
|||
need to compute the value in a size larger than bitsize, but we
|
||||
can't reasonably do that for a reloc the same size as a host
|
||||
machine word.
|
||||
|
||||
FIXME: We should also do overflow checking on the result after
|
||||
adding in the value contained in the object file. */
|
||||
if (howto->complain_on_overflow != complain_overflow_dont)
|
||||
{
|
||||
bfd_vma check;
|
||||
|
||||
/* Get the value that will be used for the relocation, but
|
||||
starting at bit position zero. */
|
||||
check = relocation >> howto->rightshift;
|
||||
switch (howto->complain_on_overflow)
|
||||
{
|
||||
case complain_overflow_signed:
|
||||
{
|
||||
/* Assumes two's complement. */
|
||||
bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
|
||||
bfd_signed_vma reloc_signed_min = ~reloc_signed_max;
|
||||
|
||||
/* The above right shift is incorrect for a signed value.
|
||||
Fix it up by forcing on the upper bits. */
|
||||
if (howto->rightshift > 0
|
||||
&& (bfd_signed_vma) relocation < 0)
|
||||
check |= ((bfd_vma) - 1
|
||||
& ~((bfd_vma) - 1
|
||||
>> howto->rightshift));
|
||||
if ((bfd_signed_vma) check > reloc_signed_max
|
||||
|| (bfd_signed_vma) check < reloc_signed_min)
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
break;
|
||||
case complain_overflow_unsigned:
|
||||
{
|
||||
/* Assumes two's complement. This expression avoids
|
||||
overflow if howto->bitsize is the number of bits in
|
||||
bfd_vma. */
|
||||
bfd_vma reloc_unsigned_max =
|
||||
(((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if ((bfd_vma) check > reloc_unsigned_max)
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
break;
|
||||
case complain_overflow_bitfield:
|
||||
{
|
||||
/* Assumes two's complement. This expression avoids
|
||||
overflow if howto->bitsize is the number of bits in
|
||||
bfd_vma. */
|
||||
bfd_vma reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if (((bfd_vma) check & ~reloc_bits) != 0
|
||||
&& ((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
|
||||
{
|
||||
/* The above right shift is incorrect for a signed
|
||||
value. See if turning on the upper bits fixes the
|
||||
overflow. */
|
||||
if (howto->rightshift > 0
|
||||
&& (bfd_signed_vma) relocation < 0)
|
||||
{
|
||||
check |= ((bfd_vma) - 1
|
||||
& ~((bfd_vma) - 1
|
||||
>> howto->rightshift));
|
||||
if (((bfd_vma) check & ~reloc_bits) != (-1 & ~reloc_bits))
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
else
|
||||
flag = bfd_reloc_overflow;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
flag = bfd_check_overflow (howto->complain_on_overflow, howto->bitsize,
|
||||
howto->rightshift, relocation);
|
||||
|
||||
/*
|
||||
Either we are relocating all the way, or we don't want to apply
|
||||
|
@ -1376,8 +1345,9 @@ space consuming. For each target:
|
|||
bfd_perform_relocation is so hacked up it is easier to write a new
|
||||
function than to try to deal with it.
|
||||
|
||||
This routine does a final relocation. It should not be used when
|
||||
generating relocateable output.
|
||||
This routine does a final relocation. Whether it is useful for a
|
||||
relocateable link depends upon how the object format defines
|
||||
relocations.
|
||||
|
||||
FIXME: This routine ignores any special_function in the HOWTO,
|
||||
since the existing special_function values have been written for
|
||||
|
@ -1869,16 +1839,31 @@ ENUMX
|
|||
BFD_RELOC_SPARC_WDISP16
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_WDISP19
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_GLOB_JMP
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_7
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_6
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_5
|
||||
ENUMEQX
|
||||
BFD_RELOC_SPARC_DISP64
|
||||
BFD_RELOC_64_PCREL
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_PLT64
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_HIX22
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_LOX10
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_H44
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_M44
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_L44
|
||||
ENUMX
|
||||
BFD_RELOC_SPARC_REGISTER
|
||||
ENUMDOC
|
||||
Some relocations we're using for SPARC V9 -- subject to change.
|
||||
SPARC64 relocations
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_ALPHA_GPDISP_HI16
|
||||
|
@ -2022,9 +2007,12 @@ ENUMX
|
|||
BFD_RELOC_MIPS_CALL_HI16
|
||||
ENUMX
|
||||
BFD_RELOC_MIPS_CALL_LO16
|
||||
COMMENT
|
||||
ENUMDOC
|
||||
MIPS ELF relocations.
|
||||
|
||||
COMMENT
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_386_GOT32
|
||||
ENUMX
|
||||
|
@ -2221,7 +2209,29 @@ ENUMX
|
|||
ENUMDOC
|
||||
Hitachi SH relocs. Not all of these appear in object files.
|
||||
|
||||
COMMENT
|
||||
ENUM
|
||||
BFD_RELOC_THUMB_PCREL_BRANCH9
|
||||
ENUMX
|
||||
BFD_RELOC_THUMB_PCREL_BRANCH12
|
||||
ENUMX
|
||||
BFD_RELOC_THUMB_PCREL_BRANCH23
|
||||
ENUMDOC
|
||||
Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
|
||||
be zero and is not stored in the instruction.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_ARC_B22_PCREL
|
||||
ENUMDOC
|
||||
Argonaut RISC Core (ARC) relocs.
|
||||
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
|
||||
not stored in the instruction. The high 20 bits are installed in bits 26
|
||||
through 7 of the instruction.
|
||||
ENUM
|
||||
BFD_RELOC_ARC_B26
|
||||
ENUMDOC
|
||||
ARC 26 bit absolute branch. The lowest two bits must be zero and are not
|
||||
stored in the instruction. The high 24 bits are installed in bits 23
|
||||
through 0.
|
||||
|
||||
COMMENT
|
||||
ENUM
|
||||
|
@ -2289,6 +2299,51 @@ ENUMDOC
|
|||
This is a 16-bit reloc containing the small data area offset for use in
|
||||
add3, load, and store instructions.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_V850_9_PCREL
|
||||
ENUMDOC
|
||||
This is a 9-bit reloc
|
||||
ENUM
|
||||
BFD_RELOC_V850_22_PCREL
|
||||
ENUMDOC
|
||||
This is a 22-bit reloc
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_V850_SDA_16_16_OFFSET
|
||||
ENUMDOC
|
||||
This is a 16 bit offset from the short data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_SDA_15_16_OFFSET
|
||||
ENUMDOC
|
||||
This is a 16 bit offset (of which only 15 bits are used) from the
|
||||
short data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_ZDA_16_16_OFFSET
|
||||
ENUMDOC
|
||||
This is a 16 bit offset from the zero data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_ZDA_15_16_OFFSET
|
||||
ENUMDOC
|
||||
This is a 16 bit offset (of which only 15 bits are used) from the
|
||||
zero data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_TDA_6_8_OFFSET
|
||||
ENUMDOC
|
||||
This is an 8 bit offset (of which only 6 bits are used) from the
|
||||
tiny data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_TDA_7_8_OFFSET
|
||||
ENUMDOC
|
||||
This is an 8bit offset (of which only 7 bits are used) from the tiny
|
||||
data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_TDA_7_7_OFFSET
|
||||
ENUMDOC
|
||||
This is a 7 bit offset from the tiny data area pointer.
|
||||
ENUM
|
||||
BFD_RELOC_V850_TDA_16_16_OFFSET
|
||||
ENUMDOC
|
||||
This is a 16 bit offset from the tiny data area pointer.
|
||||
COMMENT
|
||||
|
||||
ENUM
|
||||
|
@ -2301,6 +2356,14 @@ ENUM
|
|||
ENUMDOC
|
||||
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
|
||||
instruction.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_TIC30_LDP
|
||||
ENUMDOC
|
||||
This is a 8bit DP reloc for the tms320c30, where the most
|
||||
significant 8 bits of a 24 bit word are placed into the least
|
||||
significant 8 bits of the opcode.
|
||||
|
||||
ENDSENUM
|
||||
BFD_RELOC_UNUSED
|
||||
CODE_FRAGMENT
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 8 and 16 bit COFF relocation functions, for BFD.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -147,7 +148,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
|
|||
/* Get enough memory to hold the stuff */
|
||||
bfd *input_bfd = i->owner;
|
||||
asection *input_section = i;
|
||||
unsigned *shrinks;
|
||||
int *shrinks;
|
||||
int shrink = 0;
|
||||
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
|
||||
arelent **reloc_vector = NULL;
|
||||
|
@ -194,13 +195,14 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
|
|||
int another_pass = 0;
|
||||
|
||||
/* Allocate and initialize the shrinks array for this section. */
|
||||
shrinks = (unsigned *)bfd_malloc (reloc_count * sizeof (unsigned));
|
||||
memset (shrinks, 0, reloc_count * sizeof (unsigned));
|
||||
shrinks = (int *) bfd_malloc (reloc_count * sizeof (int));
|
||||
memset (shrinks, 0, reloc_count * sizeof (int));
|
||||
|
||||
/* Loop until nothing changes in this section. */
|
||||
do {
|
||||
arelent **parent;
|
||||
unsigned int i, j;
|
||||
unsigned int i;
|
||||
long j;
|
||||
|
||||
another_pass = 0;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* BFD back-end for s-record objects.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -406,7 +407,7 @@ srec_scan (abfd)
|
|||
while ((c = srec_get_byte (abfd, &error)) != EOF
|
||||
&& ! isspace (c))
|
||||
{
|
||||
if (p - symbuf >= alc)
|
||||
if ((unsigned int) (p - symbuf) >= alc)
|
||||
{
|
||||
char *n;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Stabs in sections linking support.
|
||||
Copyright 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -566,7 +566,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
|
|||
}
|
||||
}
|
||||
|
||||
BFD_ASSERT (tosym - contents == stabsec->_cooked_size);
|
||||
BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->_cooked_size);
|
||||
|
||||
return bfd_set_section_contents (output_bfd, stabsec->output_section,
|
||||
contents, stabsec->output_offset,
|
||||
|
|
1
contrib/binutils/bfd/stamp-h.in
Normal file
1
contrib/binutils/bfd/stamp-h.in
Normal file
|
@ -0,0 +1 @@
|
|||
timestamp
|
|
@ -1,5 +1,5 @@
|
|||
/* Generic symbol-table support for the BFD library.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
|
@ -715,6 +715,42 @@ _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
|
|||
placed in *pinfo should be saved with the BFD, and passed back each
|
||||
time this function is called. */
|
||||
|
||||
/* We use a cache by default. */
|
||||
|
||||
#define ENABLE_CACHING
|
||||
|
||||
/* We keep an array of indexentry structures to record where in the
|
||||
stabs section we should look to find line number information for a
|
||||
particular address. */
|
||||
|
||||
struct indexentry
|
||||
{
|
||||
bfd_vma val;
|
||||
bfd_byte *stab;
|
||||
bfd_byte *str;
|
||||
char *directory_name;
|
||||
char *file_name;
|
||||
char *function_name;
|
||||
};
|
||||
|
||||
/* Compare two indexentry structures. This is called via qsort. */
|
||||
|
||||
static int
|
||||
cmpindexentry (a, b)
|
||||
const PTR *a;
|
||||
const PTR *b;
|
||||
{
|
||||
const struct indexentry *contestantA = (const struct indexentry *) a;
|
||||
const struct indexentry *contestantB = (const struct indexentry *) b;
|
||||
|
||||
if (contestantA->val < contestantB->val)
|
||||
return -1;
|
||||
else if (contestantA->val > contestantB->val)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* A pointer to this structure is stored in *pinfo. */
|
||||
|
||||
struct stab_find_info
|
||||
|
@ -727,13 +763,22 @@ struct stab_find_info
|
|||
bfd_byte *stabs;
|
||||
/* The contents of the .stabstr section. */
|
||||
bfd_byte *strs;
|
||||
/* An malloc buffer to hold the file name. */
|
||||
char *filename;
|
||||
|
||||
/* A table that indexes stabs by memory address. */
|
||||
struct indexentry *indextable;
|
||||
/* The number of entries in indextable. */
|
||||
int indextablesize;
|
||||
|
||||
#ifdef ENABLE_CACHING
|
||||
/* Cached values to restart quickly. */
|
||||
struct indexentry *cached_indexentry;
|
||||
bfd_vma cached_offset;
|
||||
bfd_byte *cached_stab;
|
||||
bfd_byte *cached_str;
|
||||
bfd_size_type cached_stroff;
|
||||
char *cached_file_name;
|
||||
#endif
|
||||
|
||||
/* Saved ptr to malloc'ed filename. */
|
||||
char *filename;
|
||||
};
|
||||
|
||||
boolean
|
||||
|
@ -751,18 +796,36 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
{
|
||||
struct stab_find_info *info;
|
||||
bfd_size_type stabsize, strsize;
|
||||
bfd_byte *stab, *stabend, *str;
|
||||
bfd_byte *stab, *str;
|
||||
bfd_size_type stroff;
|
||||
bfd_vma fnaddr;
|
||||
char *directory_name, *main_file_name, *current_file_name, *line_file_name;
|
||||
char *fnname;
|
||||
bfd_vma low_func_vma, low_line_vma;
|
||||
struct indexentry *indexentry;
|
||||
char *directory_name, *file_name;
|
||||
|
||||
*pfound = false;
|
||||
*pfilename = bfd_get_filename (abfd);
|
||||
*pfnname = NULL;
|
||||
*pline = 0;
|
||||
|
||||
/* Stabs entries use a 12 byte format:
|
||||
4 byte string table index
|
||||
1 byte stab type
|
||||
1 byte stab other field
|
||||
2 byte stab desc field
|
||||
4 byte stab value
|
||||
FIXME: This will have to change for a 64 bit object format.
|
||||
|
||||
The stabs symbols are divided into compilation units. For the
|
||||
first entry in each unit, the type of 0, the value is the length
|
||||
of the string table for this unit, and the desc field is the
|
||||
number of stabs symbols for this unit. */
|
||||
|
||||
#define STRDXOFF (0)
|
||||
#define TYPEOFF (4)
|
||||
#define OTHEROFF (5)
|
||||
#define DESCOFF (6)
|
||||
#define VALOFF (8)
|
||||
#define STABSIZE (12)
|
||||
|
||||
info = (struct stab_find_info *) *pinfo;
|
||||
if (info != NULL)
|
||||
{
|
||||
|
@ -779,6 +842,12 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
{
|
||||
long reloc_size, reloc_count;
|
||||
arelent **reloc_vector;
|
||||
bfd_vma val;
|
||||
int i;
|
||||
char *name;
|
||||
char *file_name;
|
||||
char *directory_name;
|
||||
char *function_name;
|
||||
|
||||
info = (struct stab_find_info *) bfd_zalloc (abfd, sizeof *info);
|
||||
if (info == NULL)
|
||||
|
@ -868,6 +937,117 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
if (reloc_vector != NULL)
|
||||
free (reloc_vector);
|
||||
|
||||
/* First time through this function, build a table matching
|
||||
function VM addresses to stabs, then sort based on starting
|
||||
VM address. Do this in two passes: once to count how many
|
||||
table entries we'll need, and a second to actually build the
|
||||
table. */
|
||||
|
||||
info->indextablesize = 0;
|
||||
for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE)
|
||||
{
|
||||
if (stab[TYPEOFF] == N_FUN)
|
||||
++info->indextablesize;
|
||||
}
|
||||
|
||||
if (info->indextablesize == 0)
|
||||
return true;
|
||||
++info->indextablesize;
|
||||
|
||||
info->indextable = ((struct indexentry *)
|
||||
bfd_alloc (abfd,
|
||||
(sizeof (struct indexentry)
|
||||
* info->indextablesize)));
|
||||
if (info->indextable == NULL)
|
||||
return false;
|
||||
|
||||
file_name = NULL;
|
||||
directory_name = NULL;
|
||||
|
||||
for (i = 0, stroff = 0, stab = info->stabs, str = info->strs;
|
||||
i < info->indextablesize && stab < info->stabs + stabsize;
|
||||
stab += STABSIZE)
|
||||
{
|
||||
switch (stab[TYPEOFF])
|
||||
{
|
||||
case 0:
|
||||
/* This is the first entry in a compilation unit. */
|
||||
if ((bfd_size_type) ((info->strs + strsize) - str) < stroff)
|
||||
break;
|
||||
str += stroff;
|
||||
stroff = bfd_get_32 (abfd, stab + VALOFF);
|
||||
break;
|
||||
|
||||
case N_SO:
|
||||
/* The main file name. */
|
||||
|
||||
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
|
||||
if (*file_name == '\0')
|
||||
{
|
||||
directory_name = NULL;
|
||||
file_name = NULL;
|
||||
}
|
||||
else if (stab + STABSIZE >= info->stabs + stabsize
|
||||
|| *(stab + STABSIZE + TYPEOFF) != N_SO)
|
||||
{
|
||||
directory_name = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Two consecutive N_SOs are a directory and a file
|
||||
name. */
|
||||
stab += STABSIZE;
|
||||
directory_name = file_name;
|
||||
file_name = ((char *) str
|
||||
+ bfd_get_32 (abfd, stab + STRDXOFF));
|
||||
}
|
||||
break;
|
||||
|
||||
case N_SOL:
|
||||
/* The name of an include file. */
|
||||
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
break;
|
||||
|
||||
case N_FUN:
|
||||
/* A function name. */
|
||||
|
||||
name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
|
||||
if (*name == '\0')
|
||||
name = NULL;
|
||||
|
||||
function_name = name;
|
||||
|
||||
if (name == NULL)
|
||||
continue;
|
||||
|
||||
val = bfd_get_32 (abfd, stab + VALOFF);
|
||||
|
||||
info->indextable[i].val = val;
|
||||
info->indextable[i].stab = stab;
|
||||
info->indextable[i].str = str;
|
||||
info->indextable[i].directory_name = directory_name;
|
||||
info->indextable[i].file_name = file_name;
|
||||
info->indextable[i].function_name = function_name;
|
||||
|
||||
++i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
info->indextable[i].val = (bfd_vma) -1;
|
||||
info->indextable[i].stab = info->stabs + stabsize;
|
||||
info->indextable[i].str = str;
|
||||
info->indextable[i].directory_name = NULL;
|
||||
info->indextable[i].file_name = NULL;
|
||||
info->indextable[i].function_name = NULL;
|
||||
++i;
|
||||
|
||||
info->indextablesize = i;
|
||||
|
||||
qsort (info->indextable, i, sizeof (struct indexentry), cmpindexentry);
|
||||
|
||||
*pinfo = (PTR) info;
|
||||
}
|
||||
|
||||
|
@ -875,133 +1055,71 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
stabs information are absolute. */
|
||||
offset += bfd_get_section_vma (abfd, section);
|
||||
|
||||
/* Stabs entries use a 12 byte format:
|
||||
4 byte string table index
|
||||
1 byte stab type
|
||||
1 byte stab other field
|
||||
2 byte stab desc field
|
||||
4 byte stab value
|
||||
FIXME: This will have to change for a 64 bit object format.
|
||||
|
||||
The stabs symbols are divided into compilation units. For the
|
||||
first entry in each unit, the type of 0, the value is the length
|
||||
of the string table for this unit, and the desc field is the
|
||||
number of stabs symbols for this unit. */
|
||||
|
||||
#define STRDXOFF (0)
|
||||
#define TYPEOFF (4)
|
||||
#define OTHEROFF (5)
|
||||
#define DESCOFF (6)
|
||||
#define VALOFF (8)
|
||||
#define STABSIZE (12)
|
||||
|
||||
/* It would be nice if we could skip ahead to the stabs symbols for
|
||||
the next compilation unit to quickly scan through the compilation
|
||||
units. Unfortunately, since each line number gets a separate
|
||||
stabs entry, it is entirely plausible that a large source file
|
||||
will overflow the 16 bit count of stabs entries. */
|
||||
fnaddr = 0;
|
||||
directory_name = NULL;
|
||||
main_file_name = NULL;
|
||||
current_file_name = NULL;
|
||||
line_file_name = NULL;
|
||||
fnname = NULL;
|
||||
low_func_vma = 0;
|
||||
low_line_vma = 0;
|
||||
|
||||
stabend = info->stabs + stabsize;
|
||||
|
||||
if (info->cached_stab == NULL || offset < info->cached_offset)
|
||||
{
|
||||
stab = info->stabs;
|
||||
str = info->strs;
|
||||
stroff = 0;
|
||||
}
|
||||
else
|
||||
#ifdef ENABLE_CACHING
|
||||
if (info->cached_indexentry != NULL
|
||||
&& offset >= info->cached_offset
|
||||
&& offset < (info->cached_indexentry + 1)->val)
|
||||
{
|
||||
stab = info->cached_stab;
|
||||
str = info->cached_str;
|
||||
stroff = info->cached_stroff;
|
||||
indexentry = info->cached_indexentry;
|
||||
file_name = info->cached_file_name;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Cache non-existant or invalid. Do binary search on
|
||||
indextable. */
|
||||
|
||||
long low, high;
|
||||
long mid = -1;
|
||||
|
||||
indexentry = NULL;
|
||||
|
||||
low = 0;
|
||||
high = info->indextablesize - 1;
|
||||
while (low != high)
|
||||
{
|
||||
mid = (high + low) / 2;
|
||||
if (offset >= info->indextable[mid].val
|
||||
&& offset < info->indextable[mid + 1].val)
|
||||
{
|
||||
indexentry = &info->indextable[mid];
|
||||
break;
|
||||
}
|
||||
|
||||
if (info->indextable[mid].val > offset)
|
||||
high = mid;
|
||||
else
|
||||
low = mid + 1;
|
||||
}
|
||||
|
||||
if (indexentry == NULL)
|
||||
return true;
|
||||
|
||||
stab = indexentry->stab + STABSIZE;
|
||||
file_name = indexentry->file_name;
|
||||
}
|
||||
|
||||
info->cached_offset = offset;
|
||||
directory_name = indexentry->directory_name;
|
||||
str = indexentry->str;
|
||||
|
||||
for (; stab < stabend; stab += STABSIZE)
|
||||
for (; stab < (indexentry+1)->stab; stab += STABSIZE)
|
||||
{
|
||||
boolean done;
|
||||
bfd_vma val;
|
||||
char *name;
|
||||
|
||||
done = false;
|
||||
|
||||
switch (stab[TYPEOFF])
|
||||
{
|
||||
case 0:
|
||||
/* This is the first entry in a compilation unit. */
|
||||
if ((bfd_size_type) ((info->strs + strsize) - str) < stroff)
|
||||
{
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
str += stroff;
|
||||
stroff = bfd_get_32 (abfd, stab + VALOFF);
|
||||
break;
|
||||
|
||||
case N_SO:
|
||||
/* The main file name. */
|
||||
|
||||
val = bfd_get_32 (abfd, stab + VALOFF);
|
||||
if (val > offset)
|
||||
{
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
|
||||
name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
|
||||
/* An empty string indicates the end of the compilation
|
||||
unit. */
|
||||
if (*name == '\0')
|
||||
{
|
||||
/* If there are functions in different sections, they
|
||||
may have addresses larger than val, but we don't want
|
||||
to forget the file name. When there are functions in
|
||||
different cases, there is supposed to be an N_FUN at
|
||||
the end of the function indicating where it ends. */
|
||||
if (low_func_vma < val || fnname == NULL)
|
||||
main_file_name = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
/* We know that we have to get to at least this point in the
|
||||
stabs entries for this offset. */
|
||||
info->cached_stab = stab;
|
||||
info->cached_str = str;
|
||||
info->cached_stroff = stroff;
|
||||
|
||||
current_file_name = name;
|
||||
|
||||
/* Look ahead to the next symbol. Two consecutive N_SO
|
||||
symbols are a directory and a file name. */
|
||||
if (stab + STABSIZE >= stabend
|
||||
|| *(stab + STABSIZE + TYPEOFF) != N_SO)
|
||||
directory_name = NULL;
|
||||
else
|
||||
{
|
||||
stab += STABSIZE;
|
||||
directory_name = current_file_name;
|
||||
current_file_name = ((char *) str
|
||||
+ bfd_get_32 (abfd, stab + STRDXOFF));
|
||||
}
|
||||
|
||||
main_file_name = current_file_name;
|
||||
|
||||
break;
|
||||
|
||||
case N_SOL:
|
||||
/* The name of an include file. */
|
||||
current_file_name = ((char *) str
|
||||
+ bfd_get_32 (abfd, stab + STRDXOFF));
|
||||
val = bfd_get_32 (abfd, stab + VALOFF);
|
||||
if (val <= offset)
|
||||
{
|
||||
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
*pline = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case N_SLINE:
|
||||
|
@ -1009,40 +1127,25 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
case N_BSLINE:
|
||||
/* A line number. The value is relative to the start of the
|
||||
current function. */
|
||||
val = fnaddr + bfd_get_32 (abfd, stab + VALOFF);
|
||||
if (val >= low_line_vma && val <= offset)
|
||||
val = indexentry->val + bfd_get_32 (abfd, stab + VALOFF);
|
||||
if (val <= offset)
|
||||
{
|
||||
*pline = bfd_get_16 (abfd, stab + DESCOFF);
|
||||
low_line_vma = val;
|
||||
line_file_name = current_file_name;
|
||||
|
||||
#ifdef ENABLE_CACHING
|
||||
info->cached_stab = stab;
|
||||
info->cached_offset = val;
|
||||
info->cached_file_name = file_name;
|
||||
info->cached_indexentry = indexentry;
|
||||
#endif
|
||||
}
|
||||
if (val > offset)
|
||||
done = true;
|
||||
break;
|
||||
|
||||
case N_FUN:
|
||||
/* A function name. */
|
||||
val = bfd_get_32 (abfd, stab + VALOFF);
|
||||
name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
|
||||
|
||||
/* An empty string here indicates the end of a function, and
|
||||
the value is relative to fnaddr. */
|
||||
|
||||
if (*name == '\0')
|
||||
{
|
||||
val += fnaddr;
|
||||
if (val >= low_func_vma && val < offset)
|
||||
fnname = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (val >= low_func_vma && val <= offset)
|
||||
{
|
||||
fnname = name;
|
||||
low_func_vma = val;
|
||||
}
|
||||
|
||||
fnaddr = val;
|
||||
}
|
||||
|
||||
case N_SO:
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1050,46 +1153,34 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
break;
|
||||
}
|
||||
|
||||
if (main_file_name == NULL)
|
||||
{
|
||||
/* No information found. */
|
||||
return true;
|
||||
}
|
||||
|
||||
*pfound = true;
|
||||
|
||||
if (*pline != 0)
|
||||
main_file_name = line_file_name;
|
||||
|
||||
if (main_file_name != NULL)
|
||||
if (file_name[0] == '/' || directory_name == NULL)
|
||||
*pfilename = file_name;
|
||||
else
|
||||
{
|
||||
if (main_file_name[0] == '/' || directory_name == NULL)
|
||||
*pfilename = main_file_name;
|
||||
else
|
||||
size_t dirlen;
|
||||
|
||||
dirlen = strlen (directory_name);
|
||||
if (info->filename == NULL
|
||||
|| strncmp (info->filename, directory_name, dirlen) != 0
|
||||
|| strcmp (info->filename + dirlen, file_name) != 0)
|
||||
{
|
||||
size_t dirlen;
|
||||
|
||||
dirlen = strlen (directory_name);
|
||||
if (info->filename == NULL
|
||||
|| strncmp (info->filename, directory_name, dirlen) != 0
|
||||
|| strcmp (info->filename + dirlen, main_file_name) != 0)
|
||||
{
|
||||
if (info->filename != NULL)
|
||||
free (info->filename);
|
||||
info->filename = (char *) bfd_malloc (dirlen +
|
||||
strlen (main_file_name)
|
||||
+ 1);
|
||||
if (info->filename == NULL)
|
||||
return false;
|
||||
strcpy (info->filename, directory_name);
|
||||
strcpy (info->filename + dirlen, main_file_name);
|
||||
}
|
||||
|
||||
*pfilename = info->filename;
|
||||
if (info->filename != NULL)
|
||||
free (info->filename);
|
||||
info->filename = (char *) bfd_malloc (dirlen +
|
||||
strlen (file_name)
|
||||
+ 1);
|
||||
if (info->filename == NULL)
|
||||
return false;
|
||||
strcpy (info->filename, directory_name);
|
||||
strcpy (info->filename + dirlen, file_name);
|
||||
}
|
||||
|
||||
*pfilename = info->filename;
|
||||
}
|
||||
|
||||
if (fnname != NULL)
|
||||
if (indexentry->function_name != NULL)
|
||||
{
|
||||
char *s;
|
||||
|
||||
|
@ -1097,11 +1188,11 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
|
|||
to clobber the colon. It's OK to change the name, since the
|
||||
string is in our own local storage anyhow. */
|
||||
|
||||
s = strchr (fnname, ':');
|
||||
s = strchr (indexentry->function_name, ':');
|
||||
if (s != NULL)
|
||||
*s = '\0';
|
||||
|
||||
*pfnname = fnname;
|
||||
*pfnname = indexentry->function_name;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* Generic target-file-type support for the BFD library.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
@ -483,6 +484,8 @@ extern const bfd_target armpei_big_vec;
|
|||
extern const bfd_target b_out_vec_big_host;
|
||||
extern const bfd_target b_out_vec_little_host;
|
||||
extern const bfd_target bfd_elf64_alpha_vec;
|
||||
extern const bfd_target bfd_elf32_bigarc_vec;
|
||||
extern const bfd_target bfd_elf32_littlearc_vec;
|
||||
extern const bfd_target bfd_elf32_big_generic_vec;
|
||||
extern const bfd_target bfd_elf32_bigmips_vec;
|
||||
extern const bfd_target bfd_elf64_bigmips_vec;
|
||||
|
@ -503,6 +506,7 @@ extern const bfd_target bfd_elf32_powerpcle_vec;
|
|||
extern const bfd_target bfd_elf32_sh_vec;
|
||||
extern const bfd_target bfd_elf32_shl_vec;
|
||||
extern const bfd_target bfd_elf32_sparc_vec;
|
||||
extern const bfd_target bfd_elf32_v850_vec;
|
||||
extern const bfd_target bfd_elf64_big_generic_vec;
|
||||
extern const bfd_target bfd_elf64_little_generic_vec;
|
||||
extern const bfd_target bfd_elf64_sparc_vec;
|
||||
|
@ -531,6 +535,7 @@ extern const bfd_target bfd_powerpcle_pei_vec;
|
|||
extern const bfd_target i386pe_vec;
|
||||
extern const bfd_target i386pei_vec;
|
||||
extern const bfd_target go32coff_vec;
|
||||
extern const bfd_target go32stubbedcoff_vec;
|
||||
extern const bfd_target i386linux_vec;
|
||||
extern const bfd_target i386lynx_aout_vec;
|
||||
extern const bfd_target i386lynx_coff_vec;
|
||||
|
@ -566,6 +571,8 @@ extern const bfd_target pmac_xcoff_vec;
|
|||
extern const bfd_target rs6000coff_vec;
|
||||
extern const bfd_target shcoff_vec;
|
||||
extern const bfd_target shlcoff_vec;
|
||||
extern const bfd_target shcoff_small_vec;
|
||||
extern const bfd_target shlcoff_small_vec;
|
||||
extern const bfd_target sparcle_aout_vec;
|
||||
extern const bfd_target sparclinux_vec;
|
||||
extern const bfd_target sparclynx_aout_vec;
|
||||
|
@ -574,6 +581,9 @@ extern const bfd_target sparcnetbsd_vec;
|
|||
extern const bfd_target sparccoff_vec;
|
||||
extern const bfd_target sunos_big_vec;
|
||||
extern const bfd_target tekhex_vec;
|
||||
extern const bfd_target tic30_aout_vec;
|
||||
extern const bfd_target tic30_coff_vec;
|
||||
extern const bfd_target vaxnetbsd_vec;
|
||||
extern const bfd_target versados_vec;
|
||||
extern const bfd_target we32kcoff_vec;
|
||||
extern const bfd_target w65_vec;
|
||||
|
@ -635,6 +645,7 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
#ifdef BFD64
|
||||
&bfd_elf64_alpha_vec,
|
||||
#endif
|
||||
&bfd_elf32_bigarc_vec,
|
||||
&bfd_elf32_bigmips_vec,
|
||||
#ifdef BFD64
|
||||
&bfd_elf64_bigmips_vec,
|
||||
|
@ -644,6 +655,7 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
&bfd_elf32_i386_vec,
|
||||
&bfd_elf32_i860_vec,
|
||||
&bfd_elf32_little_generic_vec,
|
||||
&bfd_elf32_littlearc_vec,
|
||||
&bfd_elf32_littlemips_vec,
|
||||
#ifdef BFD64
|
||||
&bfd_elf64_littlemips_vec,
|
||||
|
@ -655,6 +667,8 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
&bfd_elf32_m88k_vec,
|
||||
&bfd_elf32_sparc_vec,
|
||||
&bfd_elf32_powerpc_vec,
|
||||
&bfd_elf32_powerpcle_vec,
|
||||
&bfd_elf32_v850_vec,
|
||||
#ifdef BFD64 /* No one seems to use this. */
|
||||
&bfd_elf64_big_generic_vec,
|
||||
&bfd_elf64_little_generic_vec,
|
||||
|
@ -699,6 +713,7 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
&bfd_powerpc_pei_vec,
|
||||
&bfd_powerpcle_pei_vec,
|
||||
&go32coff_vec,
|
||||
&go32stubbedcoff_vec,
|
||||
#if 0
|
||||
/* Since a.out files lack decent magic numbers, no way to recognize
|
||||
which kind of a.out file it is. */
|
||||
|
@ -767,6 +782,8 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
&ppcboot_vec,
|
||||
&shcoff_vec,
|
||||
&shlcoff_vec,
|
||||
&shcoff_small_vec,
|
||||
&shlcoff_small_vec,
|
||||
&sparcle_aout_vec,
|
||||
&sparclinux_vec,
|
||||
&sparclynx_aout_vec,
|
||||
|
@ -775,8 +792,11 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
&sunos_big_vec,
|
||||
&aout0_big_vec,
|
||||
&tekhex_vec,
|
||||
&we32kcoff_vec,
|
||||
&tic30_aout_vec,
|
||||
&tic30_coff_vec,
|
||||
&vaxnetbsd_vec,
|
||||
&versados_vec,
|
||||
&we32kcoff_vec,
|
||||
&z8kcoff_vec,
|
||||
|
||||
#endif /* not SELECT_VECS */
|
||||
|
@ -805,6 +825,9 @@ const bfd_target * const bfd_target_vector[] = {
|
|||
#ifdef IRIX_CORE
|
||||
&irix_core_vec,
|
||||
#endif
|
||||
#ifdef NETBSD_CORE
|
||||
&netbsd_core_vec,
|
||||
#endif
|
||||
#ifdef OSF_CORE
|
||||
&osf_core_vec,
|
||||
#endif
|
||||
|
|
|
@ -817,6 +817,8 @@ tekhex_write_object_contents (abfd)
|
|||
asection *s;
|
||||
struct data_struct *d;
|
||||
|
||||
tekhex_init ();
|
||||
|
||||
bytes_written = 0;
|
||||
|
||||
/* And the raw data */
|
||||
|
@ -868,50 +870,53 @@ tekhex_write_object_contents (abfd)
|
|||
}
|
||||
|
||||
/* And the symbols */
|
||||
for (p = abfd->outsymbols; *p; p++)
|
||||
if (abfd->outsymbols)
|
||||
{
|
||||
int section_code = bfd_decode_symclass (*p);
|
||||
for (p = abfd->outsymbols; *p; p++)
|
||||
{
|
||||
int section_code = bfd_decode_symclass (*p);
|
||||
|
||||
if (section_code != '?')
|
||||
{ /* do not include debug symbols */
|
||||
asymbol *s = *p;
|
||||
char *dst = buffer;
|
||||
if (section_code != '?')
|
||||
{ /* do not include debug symbols */
|
||||
asymbol *s = *p;
|
||||
char *dst = buffer;
|
||||
|
||||
writesym (&dst, s->section->name);
|
||||
writesym (&dst, s->section->name);
|
||||
|
||||
switch (section_code)
|
||||
{
|
||||
case 'A':
|
||||
*dst++ = '2';
|
||||
break;
|
||||
case 'a':
|
||||
*dst++ = '6';
|
||||
break;
|
||||
case 'D':
|
||||
case 'B':
|
||||
case 'O':
|
||||
*dst++ = '4';
|
||||
break;
|
||||
case 'd':
|
||||
case 'b':
|
||||
case 'o':
|
||||
*dst++ = '8';
|
||||
break;
|
||||
case 'T':
|
||||
*dst++ = '3';
|
||||
break;
|
||||
case 't':
|
||||
*dst++ = '7';
|
||||
break;
|
||||
case 'C':
|
||||
case 'U':
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return false;
|
||||
switch (section_code)
|
||||
{
|
||||
case 'A':
|
||||
*dst++ = '2';
|
||||
break;
|
||||
case 'a':
|
||||
*dst++ = '6';
|
||||
break;
|
||||
case 'D':
|
||||
case 'B':
|
||||
case 'O':
|
||||
*dst++ = '4';
|
||||
break;
|
||||
case 'd':
|
||||
case 'b':
|
||||
case 'o':
|
||||
*dst++ = '8';
|
||||
break;
|
||||
case 'T':
|
||||
*dst++ = '3';
|
||||
break;
|
||||
case 't':
|
||||
*dst++ = '7';
|
||||
break;
|
||||
case 'C':
|
||||
case 'U':
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return false;
|
||||
}
|
||||
|
||||
writesym (&dst, s->name);
|
||||
writevalue (&dst, s->value + s->section->vma);
|
||||
out (abfd, '3', buffer, dst);
|
||||
}
|
||||
|
||||
writesym (&dst, s->name);
|
||||
writevalue (&dst, s->value + s->section->vma);
|
||||
out (abfd, '3', buffer, dst);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,566 @@
|
|||
Tue May 13 10:42:58 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
Mon Apr 27 13:45:26 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (VERSION): Set to 2.8.1.
|
||||
* configure.in: Set version number to 2.9.1.
|
||||
* configure: Rebuild.
|
||||
|
||||
Tue Apr 7 15:41:15 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (DISTSTUFF): Add defparse.h, defparse.c, rclex.c,
|
||||
rcparse.h, and rcparse.c
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Mon Apr 6 16:24:35 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (PROGS): Move $(ADDR2LINE_PROG) to end, so that
|
||||
Makefile.in doesn't have an empty continuation line.
|
||||
(bin_PROGRAMS): Likewise.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fri Apr 3 13:41:05 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (mostlyclean-local): New target.
|
||||
(MOSTLYCLEANFILES): Add binutils.log, binutils.sum, and abcdefg*.
|
||||
(DISTCLEANFILES): Add site.exp and site.bak
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Wed Apr 1 15:54:16 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
From Zack Weinberg <zack@rabi.phys.columbia.edu> and H.J. Lu
|
||||
<hjl@gnu.org>:
|
||||
* ar.c (usage): Mention S modifier.
|
||||
(main): Add S modifier.
|
||||
* ar.1, binutils.texi: Document S modifier.
|
||||
|
||||
Wed Apr 1 13:11:23 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* binutils.texi: Use @itemx for a secondary item in a table.
|
||||
|
||||
Tue Mar 31 18:44:13 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* dep-in.sed: Add rule to remove @OBJDIR@.
|
||||
* Makefile.am (dep.sed): Substitute for @OBJDIR@.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Mon Mar 30 16:13:07 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (DISTCLEANFILES): Remove defparse.h, arparse.h,
|
||||
rcparse.h, and nlmheader.h.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
* configure.in: Set version number to 2.9.
|
||||
* configure: Rebuild.
|
||||
|
||||
Sat Mar 28 17:39:27 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (MOSTLYCLEANFILES): Define.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fix some gcc -Wall warnings:
|
||||
* nlmconv.c (main): Add casts to avoid warnings.
|
||||
(alpha_mangle_relocs): Likewise.
|
||||
* objdump.c (dump_section_stabs): Likewise.
|
||||
* size.c (print_sysv_format): Likewise.
|
||||
* srcconv.c (wr_ob): Likewise.
|
||||
* wrstabs.c (stab_modify_type): Likewise.
|
||||
(stab_variable): Likewise.
|
||||
* nlmconv.c (main): Initialize variables to avoid warnings.
|
||||
* nm.c (sort_symbols_by_size): Likewise.
|
||||
* objdump.c (disassemble_bytes): Likewise.
|
||||
* wrstabs.c (stab_end_class_type): Likewise.
|
||||
* coffgrok.c (do_sections_p2): Change j to unsigned int.
|
||||
(do_lines): Change l to unsigned int.
|
||||
* nlmheader.y (yylex): Change i to unsigned int.
|
||||
* nm.c (print_symbol): Change j to long.
|
||||
* size.c (lprint_number): Comment out.
|
||||
* srconv.c (wr_ob): Change i to bfd_size_type.
|
||||
* sysdump.c (unit_info_list): Comment out.
|
||||
(object_body_list, program_structure, debug_list): Likewise.
|
||||
* sysinfo.y (yyerror): Return value.
|
||||
|
||||
Thu Mar 26 17:06:51 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* defparse.y (explist): Allow epsilon.
|
||||
Suggestion from Jonathan-Harris@psion.com.
|
||||
|
||||
Thu Mar 26 16:59:09 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* coffgrok.c (do_sections_p1): Use the section's lma instead of vma
|
||||
for the benefit of prom loaders.
|
||||
|
||||
Wed Mar 25 13:05:39 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
Based on patch from H.J. Lu <hjl@gnu.org>:
|
||||
* Makefile.am (DISTSTUFF): New variable.
|
||||
(diststuff): New target.
|
||||
(DISTCLEANFILES): New variable.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Tue Mar 24 19:33:08 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* rclex.l: Accept { and } as synonyms for BEGIN and END.
|
||||
|
||||
Fri Mar 20 19:18:08 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* aclocal.m4, configure: Rebuild with libtool 1.2.
|
||||
|
||||
Tue Feb 24 13:07:50 1998 Doug Evans <devans@canuck.cygnus.com>
|
||||
|
||||
* objdump.c (disassemble_data): Delete "++place" after call to
|
||||
find_symbol_for_address. Set disasm_info.symbols to array of
|
||||
symbols at the current address.
|
||||
|
||||
Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* Makefile.am (install-exec-local): Install properly when ln
|
||||
fails or tooldir == prefix.
|
||||
|
||||
Tue Feb 17 18:40:55 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* objcopy.c (compare_section_lma): Rename from _vma.
|
||||
(copy_object): Gap fill based on LMA not VMA.
|
||||
* binutils.texi: Update and clarify.
|
||||
* objcopy.1: Likewise.
|
||||
|
||||
Tue Feb 17 20:34:11 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* dlltool.c (make_one_lib_file): Don't add 1 to hint.
|
||||
|
||||
Fri Feb 13 16:37:44 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (AUTOMAKE_OPTIONS): Define.
|
||||
* configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
|
||||
|
||||
Thu Feb 12 14:13:46 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* deflex.l: Accept '?' in symbol names, for VC++ mangled names.
|
||||
From Mikey <jeffdb@netzone.com>.
|
||||
|
||||
* addr2line.c (usage): Update bug-gnu-utils address.
|
||||
* ar.c (usage): Likewise.
|
||||
* nlmconv.c (show_usage): Likewise.
|
||||
* nm.c (usage): Likewise.
|
||||
* objcopy.c (copy_usage): Likewise.
|
||||
(strip_usage): Likewise.
|
||||
* objdump.c (usage): Likewise.
|
||||
* size.c (usage): Likewise.
|
||||
* strings.c (usage): Likewise.
|
||||
* windres.c (usage): Likewise.
|
||||
* binutils.texi (Bug Reporting): Likewise.
|
||||
|
||||
Sat Feb 7 15:36:24 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* configure, aclocal.m4: Rebuild with new libtool.
|
||||
|
||||
Thu Feb 5 12:21:13 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
|
||||
|
||||
Fri Jan 30 19:16:28 1998 Doug Evans <devans@canuck.cygnus.com>
|
||||
|
||||
* Makefile.am (CC_FOR_TARGET,nlmcomv.o): Change program_transform_name
|
||||
to transform.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
Thu Jan 29 16:24:04 1998 Mumit Khan <khan@xraylith.wisc.edu>
|
||||
|
||||
* dlltool.c: Define exit status macros for _WIN32 but not
|
||||
__CYGWIN32__.
|
||||
(gen_lib_file): Check for exit status of unlink.
|
||||
* resrc.c: Define popen and pclose if _WIN32 but not
|
||||
__CYGWIN32__.
|
||||
|
||||
Wed Jan 28 17:45:46 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* configure.in: Remove vfork check.
|
||||
* nlmconv.c: Never include vfork.h.
|
||||
* aclocal.m4, configure, Makefile.in, config.in: Rebuild.
|
||||
|
||||
Wed Jan 28 17:43:02 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
|
||||
|
||||
* objcopy.c (copy_archive): Only pass one argument to mkdir if
|
||||
_WIN32 but not __CYGWIN32__.
|
||||
(smart_rename): Add code for _WIN32 (not __CYGWIN32__), to cope
|
||||
with different rename behaviour and lack of chown.
|
||||
|
||||
* configure.in: Check for mingw32 when deciding whether to build
|
||||
dlltool.
|
||||
* dlltool.c: Never include vfork.h.
|
||||
(run): Use pexecute rather than vfork.
|
||||
(gen_lib_file): Check for errors from bfd_set_archive_head and
|
||||
bfd_close. Close all the BFDs in the archive before deleting the
|
||||
temporary files.
|
||||
|
||||
Thu Jan 22 16:22:55 1998 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* objdump.c (disassemble_bytes): Add flag INSN_HAS_RELOC to tell
|
||||
disassembly function there is a reloc on this line.
|
||||
|
||||
Wed Jan 14 15:29:43 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* srconv.c (sh, h8300): Delete variables.
|
||||
(addrsize, toolname, rnames): New variables.
|
||||
(writeINT): Use addrsize.
|
||||
(wr_un): Use toolname.
|
||||
(wr_hd): Set up addrsize et al properly for h8300[hs].
|
||||
(walk_tree_symbol): Zero dsy. Use rnames.
|
||||
(wr_un, wr_hd, wr_ob, wr_du): Use proper bfd access macros.
|
||||
* sysdump.c (sh, h8300): Delete variables.
|
||||
(addrsize): New variable.
|
||||
(getINT): Use it.
|
||||
(getone): Initialize it.
|
||||
(getBITS): Range check on MAX.
|
||||
|
||||
Mon Dec 29 16:58:05 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
From Matthew Bellantoni <matthew@chrysalis.com>:
|
||||
* ar.c (get_pos_bfd): Add default_posname parameter. Change all
|
||||
callers.
|
||||
(replace_members): Default to replacing in the same position.
|
||||
|
||||
Mon Dec 22 11:27:22 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* rclex.l: Don't permit a comma in a STRING.
|
||||
* rcparse.y (acc_entry): Warn if an inappropriate modifier is used
|
||||
with a non VIRTKEY.
|
||||
(acc_event): For a control character, set VIRTKEY, and force the
|
||||
character to uppercase.
|
||||
(acc_options): Don't require a comma separator.
|
||||
|
||||
Tue Dec 9 13:25:42 1997 Michael Meissner <meissner@cygnus.com>
|
||||
|
||||
* size.c (size_number): New function to provide size of field.
|
||||
({l,r}print_number): For octal and hex fields, print field using
|
||||
'0' and '0x' suffixes. Do not include following tab.
|
||||
(sysv_internal_sizer): Size section name, section size, and vma
|
||||
address fields.
|
||||
(sysv_internal_printer): Use calculated sizes for the columns.
|
||||
(print_sysv_format): Size columns before printing.
|
||||
(print_berkeley_format): Print tabs between numbers now that
|
||||
{l,r}print_number doesn't. Print fields right justified.
|
||||
|
||||
Mon Dec 8 11:22:04 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* objdump.c (objdump_print_addr_with_sym): Remove call to
|
||||
disasm_symaddr() as this function no longer exists.
|
||||
|
||||
Tue Dec 2 10:23:50 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* objdump.c (objdump_print_addr_with_sym): Call disasm_symaddr()
|
||||
to allow backend to know which symbol has just been displayed.
|
||||
|
||||
Tue Dec 2 13:06:46 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* windres.h (ESCAPE_*): Define standard escape sequences.
|
||||
* rclex.l (handle_quotes): Handle standard escape sequences. Warn
|
||||
about an unrecognized escape character.
|
||||
* windres.c (unicode_print): Print standard escape sequences.
|
||||
* rcparse.y (acc_event): Initialize $$.next.
|
||||
* resbin.c (bin_to_res_menuitems): Don't set MENUITEM_POPUP or
|
||||
MENUITEM_ENDMENU in the menu item flags.
|
||||
(bin_to_res_accelerators): Allocate a structure (the old code
|
||||
never worked).
|
||||
(res_to_bin_accelerator): Correct the test for setting ACC_LAST.
|
||||
(res_to_bin_dialog): Save the extended style rather than saving
|
||||
the style twice. Remove useless shadowing length variable. Set
|
||||
the length of control data correctly.
|
||||
* resrc.c (write_rc_dialog): Don't print the class or menu if the
|
||||
string length is zero.
|
||||
|
||||
Mon Nov 24 18:52:43 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* stabs.c (parse_stab_argtypes): Don't try to parse the name of a
|
||||
destructor as mangled argument types.
|
||||
|
||||
Mon Nov 10 17:51:41 1997 Gavin Koch <gavin@cygnus.com>
|
||||
|
||||
* addr2line.c (translate_addresses): Use bfd_scan_vma rather
|
||||
than strtol to scan addresses.
|
||||
|
||||
Sun Nov 9 11:01:31 1997 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* Makefile.am (bin_PROGRAMS): Don't use line continuations here.
|
||||
|
||||
Tue Nov 4 11:56:14 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* objcopy.c (copy_section): Don't crash if there is no particular
|
||||
information for a section.
|
||||
|
||||
Mon Nov 3 12:36:19 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* objcopy.c (parse_flags): Make flag check case insensitive.
|
||||
Check for `contents' flag. Give an error for unrecognized flags.
|
||||
(copy_section): If the contents flag was set for a section that
|
||||
had no contents, zero out the new contents.
|
||||
* binutils.texi (objcopy): Document contents section flag.
|
||||
|
||||
Sun Nov 2 14:49:56 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* objcopy.c: Move new struct and variable definitions to top of
|
||||
file. Remove obsolete add_strip_symbol and is_strip_symbol
|
||||
declarations. Add prototype declarations for add_specific_symbol
|
||||
and is_specified_symbol.
|
||||
|
||||
Mon Oct 20 15:31:43 1997 Klaus K"ampf <kkaempf@progis.de>
|
||||
|
||||
* configure.com (HAVE_SBRK): Undefine.
|
||||
|
||||
Tue Oct 14 16:14:35 1997 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* objdump.c (objdump_symbol_at_address): New function. Returns
|
||||
true if a symbol can be found at the address passed in.
|
||||
(disassemble_data): Set the symbol_at_address_func field to point
|
||||
to objdump_symbol_at_address.
|
||||
|
||||
Fri Oct 10 14:13:09 1997 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* objcopy.c, objcopy.1, binutils.texi: "localize" is a better name
|
||||
than "privatize". Update all references.
|
||||
|
||||
Thu Oct 9 15:57:29 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils.texi (strip): Remove duplicate --target. From Marty
|
||||
Leisner <leisner@sdsp.mc.xerox.com>.
|
||||
|
||||
* nm.c (lineno_cache_bfd): New file static variable.
|
||||
(lineno_cache_rel_bfd): New file static variable.
|
||||
(display_archive): Clear lineno_cache_bfd and lineno_cache_rel_bfd
|
||||
when closing a BFD.
|
||||
(display_file): Likewise.
|
||||
(print_symbol): Use lineno_cache_bfd and lineno_cache_rel_bfd
|
||||
instead of cache_bfd and cache_rel_bfd. Make seccount static, and
|
||||
only set it when setting relocs.
|
||||
|
||||
Wed Oct 8 21:19:11 1997 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* objcopy.c (keep_specific_list, privatize_specific_list,
|
||||
weaken_specific_list): New variables.
|
||||
(keep_symbols): Removed.
|
||||
(add_specific_symbol): New function from the carcas of
|
||||
add_strip_symbol. Takes a list as an argument.
|
||||
(is_specified_symbol): Likewise from is_strip_symbol.
|
||||
(filter_symbols): Honor the new privatize and weaken lists.
|
||||
Optimize bfd_asymbol_name handling.
|
||||
(copy_object, copy_options, copy_usage): Add privatize-symbol &
|
||||
weaken-symbol options.
|
||||
|
||||
* objcopy.1, binutils.texi: Update docs.
|
||||
|
||||
Sun Oct 5 09:05:44 1997 Frank Ch. Eigler <fche@cygnus.com>
|
||||
|
||||
* objdump.c (disassemble_data): Make "--prefix-addresses"
|
||||
disassembly adjust to mixed-length instructions.
|
||||
(objdump_print_addr_with_sym): Add "0x" prefix for hexadecimal
|
||||
symbol-offsets in disassembly.
|
||||
|
||||
Fri Oct 3 12:04:25 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* objcopy.c (set_times): New static function, replacing
|
||||
make_same_dates.
|
||||
(strip_main): If preserve_dates, stat the input file before
|
||||
copying it, and call set_times afterward.
|
||||
(copy_main): Likewise.
|
||||
|
||||
* wrstabs.c (write_stabs_in_sections_debugging_info): Cast p to
|
||||
char * when calling strcpy and strlen.
|
||||
|
||||
Wed Sep 24 11:34:05 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils.texi (ar cmdline): Document that q now works like r.
|
||||
From Marty Leisner <leisner@sdsp.mc.xerox.com>.
|
||||
|
||||
* binutils.texi (size): The object file argument is optional.
|
||||
From Marty Leisner <leisner@sdsp.mc.xerox.com>.
|
||||
|
||||
* aclocal.m4: Rebuild with new libtool.
|
||||
* configure: Rebuild.
|
||||
|
||||
Tue Aug 26 17:48:34 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (EXEEXT_FOR_BUILD): New variable. Use it in all
|
||||
references to the sysinfo program.
|
||||
* configure.in: Rebuild with new bfd/acinclude.m4.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fri Aug 8 15:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* windres.c: Include <time.h>.
|
||||
(define_resource): Set a timestamp for the resource.
|
||||
|
||||
Wed Aug 6 13:37:58 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* configure.in: Define TARGET in header file.
|
||||
* acconfig.h (TARGET): Add #undef.
|
||||
* Makefile.am (version.o, bucomm.o): Remove special targets.
|
||||
* bucomm.c (target): Remove.
|
||||
* nm.c (program_name): Don't declare.
|
||||
(target): Make static.
|
||||
* size.c (target): Make static.
|
||||
* configure, config.in, Makefile.in: Rebuild.
|
||||
|
||||
Tue Aug 5 00:01:41 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am (check-DEJAGNU): Export r.
|
||||
(.dep1): Use $(INCLUDES) rather than $(ALL_CFLAGS).
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
* nlmheader.y: Use VERSIONK rather than VERSION.
|
||||
|
||||
* Makefile.am (STRIP_PROG): Change from strip.new to strip-new.
|
||||
(NM_PROG): Change from nm.new to nm-new.
|
||||
(TOOL_PROGS, install-exec-local): Adjust accordingly.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Mon Aug 4 11:47:31 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* configure.in: Remove AC_ARG_PROGRAM; it's invoked by
|
||||
AM_INIT_AUTOMAKE.
|
||||
* configure: Rebuild.
|
||||
|
||||
* Makefile.am (install-exec-local): Create $(tooldir)/bin before
|
||||
trying to install anything into it.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
* Makefile.am (TOOL_PROGS): Use an explicit $(EXEEXT).
|
||||
(install-exec-local): When handling $(noinst_PROGRAMS), only use
|
||||
$(EXEEXT) on the installed file. When handling $(TOOL_PROGS),
|
||||
handle $(EXEEXT) correctly.
|
||||
* configure.in: Add an explicit $(EXEEXT) when substituting for
|
||||
the name of a program to build.
|
||||
* Makefile.in, configure: Rebuild.
|
||||
|
||||
* aclocal.m4, configure, Makefile.in: Rebuild with new automake
|
||||
patches.
|
||||
|
||||
* deflex.l, defparse.y: Use VERSIONK rather than VERSION.
|
||||
* rclex.l, rcparse.y: Likewise.
|
||||
* Makefile.am (windres_SOURCES): Add $(BULIBS).
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
Fri Aug 1 13:08:39 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* acinclude.m4: Include bfd/acinclude.m4, not bfd/acmacros.m4.
|
||||
* aclocal.m4, configure: Rebuild with new libtool.
|
||||
|
||||
Thu Jul 31 11:51:35 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.am: New file, based on old Makefile.in.
|
||||
* acinclude.m4: New file, from old aclocal.m4.
|
||||
* configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
|
||||
shared library handling; now handled by libtool. Replace
|
||||
AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
|
||||
AC_PROG_LEX, AC_DECL_YYTEST, AM_MAINTAINER_MODE, AM_CYGWIN32, and
|
||||
AM_EXEEXT. Replace AC_PROG_INSTALL with AM_PROG_INSTALL. Remove
|
||||
stamp-h handling in AC_OUTPUT.
|
||||
* acconfig.h: Mention PACKAGE and VERSION.
|
||||
* stamp-h.in: New file.
|
||||
* Makefile.in: Now built with automake.
|
||||
* aclocal.m4: Now built with aclocal.
|
||||
* config.in, configure: Rebuild.
|
||||
|
||||
From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>:
|
||||
* rcparse.y (dialog): Default menu and class to be named.
|
||||
(styles): If FONT is seen, set DS_SETFONT in dialog style.
|
||||
* resbin.c (res_to_bin_dialog): Correct computation of font
|
||||
information length.
|
||||
|
||||
Wed Jul 30 11:21:06 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>:
|
||||
* resbin.c (res_to_bin_menu): Correct computation of menu
|
||||
vs. menuex length.
|
||||
* resrc.c (define_stringtable): Add 1 to resource ID.
|
||||
|
||||
Tue Jul 29 11:06:03 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* resbin.c (bin_to_res_string): Correct adjustment of data and
|
||||
length. From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>.
|
||||
|
||||
Tue Jul 22 18:01:23 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* nlmconv.c (link_inputs): Call libiberty pexecute function.
|
||||
(pexecute) [multiple versions]: Remove.
|
||||
|
||||
Tue Jul 22 16:19:34 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
|
||||
|
||||
* bucomm.c (make_tempname): If we might be using a DOS filesystem,
|
||||
check for a backslash as well as a slash.
|
||||
|
||||
Thu Jun 26 13:53:17 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* windres.c (main): Quit if we didn't get any resources.
|
||||
(usage): Fix --yydebug usage message.
|
||||
* rescoff.c (write_coff_file): Don't free the relocation array
|
||||
until after we've closed the BFD.
|
||||
(read_coff_rsrc): Quit rather than try to read standard input.
|
||||
(write_coff_file): Quit rather than try to write to standard
|
||||
output.
|
||||
* rcparse.y: Add a couple of missing semicolons (accepted by bison
|
||||
but not byacc).
|
||||
* binutils.texi: Document windres.
|
||||
|
||||
Wed Jun 25 20:57:06 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* resbin.c: New file.
|
||||
* rclex.l, rcparse.y, rescoff.c, resrc.c, windres.c, windres.h:
|
||||
Numerous fixes and improvements.
|
||||
* Makefile.in: Rebuild dependencies.
|
||||
(CFILES): Add resbin.c.
|
||||
(WINDRES_OBJS): Add resbin.o.
|
||||
|
||||
Sun Jun 22 17:29:41 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
First stab at Windows resource compiler:
|
||||
* windres.h: New file.
|
||||
* windres.c: New file.
|
||||
* resrc.c: New file.
|
||||
* rcparse.y: New file.
|
||||
* rclex.l: New file.
|
||||
* rescoff.c: New file.
|
||||
* configure.in: Define and substitute BUILD_WINDRES.
|
||||
* configure: Rebuild.
|
||||
* Makefile.in: Rebuild dependencies.
|
||||
(WINDRES_PROG): New variable.
|
||||
(PROGS): Add @BUILD_WINDRES@.
|
||||
(HFILES): Add dlltool.h and windres.h.
|
||||
(CFILES): Add windres.c and resrc.c.
|
||||
(GENERATED_CFILES): Add rcparse.c and rclex.c.
|
||||
(WINDRES_OBJS): New variable.
|
||||
$(WINDRES_PROG): New target.
|
||||
(rcparse.c, rcparse.h, rclex.c): New targets.
|
||||
|
||||
Thu Jun 12 12:27:51 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* dlltool.c (export_type): Add data field.
|
||||
(def_exports): Add data parameter. Change all callers.
|
||||
(dump_def_info): Print data field.
|
||||
(gen_def_file): Likewise.
|
||||
(make_one_lib_file): Handle data field by not emitting simple
|
||||
label and not emitting anything in SEC_TEXT.
|
||||
(dtab): Print data field.
|
||||
(process_duplicates): Merge data field.
|
||||
* dlltool.h (def_exports): Update declaration.
|
||||
* defparse.y (expline): Accept opt_DATA. Pass it to def_exports.
|
||||
(opt_DATA): New non-terminal.
|
||||
|
||||
Wed Jun 11 17:15:47 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* dlltool.h: New file.
|
||||
* deflex.l: Include dlltool.h and libiberty.h. Don't declare
|
||||
strdup. Use xstrdup rather than strdup.
|
||||
* defparse.y: Include bfd.h, bucomm.h, and dlltool.h.
|
||||
* dlltool.c: Include dlltool.h and time.h. Make a lot of
|
||||
variables and functions static. Make a lot of char * variables
|
||||
and parameters const. Add declarations for static functions. Do
|
||||
some reindenting. Hide more PowerPC stuff inside DLLTOOL_PPC.
|
||||
|
||||
Wed Jun 11 12:05:52 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
|
||||
|
||||
* ar.c (bfd_special_undocumented_glue): Add const.
|
||||
|
||||
Mon May 12 22:09:35 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||
|
||||
* Makefile.in (check): Pass CC_FOR_TARGET and CFLAGS_FOR_TARGET
|
||||
to runtest.
|
||||
|
||||
Mon May 12 13:14:22 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
|
@ -13,8 +573,20 @@ Fri Apr 25 14:22:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
|
|||
* Makefile.in (maintainer-clean realclean): Change *.info*
|
||||
to binutils.info* to save sysroff.info.
|
||||
|
||||
Tue Apr 15 13:42:22 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (INSTALL): Set to @INSTALL@.
|
||||
(INSTALL_XFORM, INSTALL_XFORM1): Remove.
|
||||
(install): Depend upon installdirs. Use $(program_transform_name)
|
||||
directly, rather than using $(INSTALL_XFORM) and
|
||||
$(INSTALL_XFORM1).
|
||||
(installdirs): New target.
|
||||
(install-info): Run mkinstalldirs.
|
||||
|
||||
Mon Apr 14 11:52:39 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (INSTALL): Change install.sh to install-sh.
|
||||
|
||||
From Thomas Graichen <graichen@rzpd.de>:
|
||||
* Makefile.in: Always use $(SHELL) when running move-if-change.
|
||||
* configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
|
||||
|
@ -31,9 +603,11 @@ Fri Apr 4 13:28:02 1997 Ian Lance Taylor <ian@cygnus.com>
|
|||
* Makefile.in (distclean): Remove site.exp and site.bak. Remove
|
||||
everything that clean removes.
|
||||
|
||||
Thu Apr 3 18:53:31 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
Thu Apr 3 13:18:39 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* Makefile.in (VERSION): Set to 2.8.
|
||||
* Makefile.in (VERSION): Set to 2.8.1.
|
||||
|
||||
* Branched binutils 2.8.
|
||||
|
||||
Tue Apr 1 16:21:44 1997 Klaus Kaempf <kkaempf@progis.de>
|
||||
|
||||
|
|
449
contrib/binutils/binutils/Makefile.am
Normal file
449
contrib/binutils/binutils/Makefile.am
Normal file
|
@ -0,0 +1,449 @@
|
|||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus dejagnu
|
||||
|
||||
tooldir = $(exec_prefix)/$(target_alias)
|
||||
|
||||
## These aren't set by automake, because they appear in
|
||||
## bfd/acinclude.m4, which is included by binutils/acinclude.m4, and
|
||||
## thus is not seen by automake.
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
|
||||
|
||||
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
|
||||
YFLAGS = -d
|
||||
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
|
||||
|
||||
# these two are almost the same program
|
||||
AR_PROG=ar
|
||||
RANLIB_PROG=ranlib
|
||||
|
||||
# objcopy and strip should be the same program
|
||||
OBJCOPY_PROG=objcopy
|
||||
STRIP_PROG=strip-new
|
||||
|
||||
STRINGS_PROG=strings
|
||||
|
||||
# These should all be the same program too.
|
||||
SIZE_PROG=size
|
||||
NM_PROG=nm-new
|
||||
OBJDUMP_PROG=objdump
|
||||
|
||||
# This is the demangler, as a standalone program.
|
||||
# Note: This one is used as the installed name too, unlike the above.
|
||||
DEMANGLER_PROG=c++filt
|
||||
|
||||
ADDR2LINE_PROG=addr2line
|
||||
|
||||
NLMCONV_PROG=nlmconv
|
||||
DLLTOOL_PROG=dlltool
|
||||
WINDRES_PROG=windres
|
||||
|
||||
SRCONV_PROG=srconv sysdump coffdump
|
||||
|
||||
man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 \
|
||||
addr2line.1 nlmconv.1 $(DEMANGLER_PROG).1
|
||||
|
||||
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG)
|
||||
|
||||
bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG)
|
||||
|
||||
## We need a special rule to install the programs which are built with -new
|
||||
noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG)
|
||||
|
||||
EXTRA_PROGRAMS = $(NLMCONV_PROG) $(SRCONV_PROG) $(DLLTOOL_PROG) $(WINDRES_PROG)
|
||||
|
||||
# Stuff that goes in tooldir/ if appropriate
|
||||
TOOL_PROGS = nm-new strip-new ar ranlib dlltool
|
||||
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
|
||||
DEP = mkdep
|
||||
|
||||
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@
|
||||
|
||||
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
||||
windres.h
|
||||
|
||||
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h
|
||||
|
||||
CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
|
||||
dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \
|
||||
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
|
||||
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
||||
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
||||
windres.c resrc.c rescoff.c resbin.c
|
||||
|
||||
GENERATED_CFILES = \
|
||||
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
||||
defparse.c deflex.c nlmheader.c rcparse.c rclex.c
|
||||
|
||||
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
|
||||
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
|
||||
|
||||
# Code shared by all the binutils.
|
||||
BULIBS = bucomm.c version.c filemode.c
|
||||
|
||||
BFDLIB = ../bfd/libbfd.la
|
||||
|
||||
OPCODES = ../opcodes/libopcodes.la
|
||||
|
||||
LIBIBERTY = ../libiberty/libiberty.a
|
||||
|
||||
EXPECT = `if [ -f $$r/../expect/expect ] ; then \
|
||||
echo $$r/../expect/expect ; \
|
||||
else echo expect ; fi`
|
||||
RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
|
||||
echo ${srcdir}/../dejagnu/runtest ; \
|
||||
else echo runtest ; fi`
|
||||
|
||||
CC_FOR_TARGET = ` \
|
||||
if [ -f $$r/../gcc/xgcc ] ; then \
|
||||
if [ -f $$r/../newlib/Makefile ] ; then \
|
||||
echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
|
||||
else \
|
||||
echo $$r/../gcc/xgcc -B$$r/../gcc/; \
|
||||
fi; \
|
||||
else \
|
||||
if [ "@host@" = "@target@" ] ; then \
|
||||
echo $(CC); \
|
||||
else \
|
||||
echo gcc | sed '$(transform)'; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
check-DEJAGNU: site.exp
|
||||
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
|
||||
r=`pwd`; export r; \
|
||||
EXPECT=$(EXPECT); export EXPECT; \
|
||||
if [ -f $(top_builddir)/../expect/expect ]; then \
|
||||
TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
|
||||
export TCL_LIBRARY; \
|
||||
fi; \
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
|
||||
CC_FOR_TARGET="$(CC_FOR_TARGET)" \
|
||||
CFLAGS_FOR_TARGET="$(CFLAGS)" $(RUNTESTFLAGS); \
|
||||
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
||||
fi
|
||||
|
||||
installcheck:
|
||||
/bin/sh $(srcdir)/sanity.sh $(bindir)
|
||||
|
||||
info_TEXINFOS = binutils.texi
|
||||
|
||||
LDADD = $(BFDLIB) $(LIBIBERTY)
|
||||
|
||||
size_SOURCES = size.c $(BULIBS)
|
||||
|
||||
objcopy_SOURCES = objcopy.c not-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS)
|
||||
|
||||
strings_SOURCES = strings.c $(BULIBS)
|
||||
|
||||
strip_new_SOURCES = objcopy.c is-strip.c $(WRITE_DEBUG_SRCS) $(BULIBS)
|
||||
|
||||
nm_new_SOURCES = nm.c $(BULIBS)
|
||||
|
||||
objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
|
||||
objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY)
|
||||
|
||||
underscore.c: stamp-under ; @true
|
||||
|
||||
stamp-under: Makefile
|
||||
echo '/*WARNING: This file is automatically generated!*/' >underscore.t
|
||||
echo "int prepends_underscore = @UNDERSCORE@;" >>underscore.t
|
||||
$(SHELL) $(srcdir)/../move-if-change underscore.t underscore.c
|
||||
touch stamp-under
|
||||
|
||||
cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
|
||||
$(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
|
||||
|
||||
c__filt_SOURCES =
|
||||
c__filt_LDADD = cplus-dem.o underscore.o $(LIBIBERTY)
|
||||
|
||||
ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c $(BULIBS)
|
||||
ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
|
||||
|
||||
ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c $(BULIBS)
|
||||
ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
|
||||
|
||||
addr2line_SOURCES = addr2line.c $(BULIBS)
|
||||
|
||||
# The following is commented out for the convertion to automake.
|
||||
# This rule creates a single binary that switches between ar and ranlib
|
||||
# by looking at argv[0]. Use this kludge to save some disk space.
|
||||
# However, you have to install things by hand.
|
||||
# (That is after 'make install', replace the installed ranlib by a link to ar.)
|
||||
# Alternatively, you can install ranlib.sh as ranlib.
|
||||
# ar_with_ranlib: $(ADDL_DEPS) ar.o maybe-ranlib.o
|
||||
# $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
|
||||
# -rm -f $(RANLIB_PROG)
|
||||
# -ln $(AR_PROG) $(RANLIB_PROG)
|
||||
#
|
||||
# objcopy and strip in one binary that uses argv[0] to decide its action.
|
||||
#
|
||||
#objcopy_with_strip: $(ADDL_DEPS) objcopy.o maybe-strip.o
|
||||
# $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
|
||||
# -rm -f $(STRIP_PROG)
|
||||
# -ln $(OBJCOPY_PROG) $(STRIP_PROG)
|
||||
|
||||
sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -c <$(srcdir)/sysroff.info >sysroff.c
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -i <$(srcdir)/sysroff.info >>sysroff.c
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -g <$(srcdir)/sysroff.info >>sysroff.c
|
||||
|
||||
sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
|
||||
|
||||
sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o
|
||||
$(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
|
||||
|
||||
syslex.o: syslex.c sysinfo.h
|
||||
if [ -r syslex.c ]; then \
|
||||
$(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \
|
||||
else \
|
||||
$(CC_FOR_BUILD) -c -I. -I$(srcdir) $(CFLAGS) $(srcdir)/syslex.c ;\
|
||||
fi
|
||||
|
||||
sysinfo.o: sysinfo.c
|
||||
if [ -r sysinfo.c ]; then \
|
||||
$(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \
|
||||
else \
|
||||
$(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
|
||||
fi
|
||||
|
||||
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
|
||||
|
||||
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
|
||||
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
|
||||
|
||||
dlltool.o:dlltool.c
|
||||
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
|
||||
|
||||
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
|
||||
|
||||
sysdump_SOURCES = sysdump.c $(BULIBS)
|
||||
|
||||
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
|
||||
# scripts, since they are only included conditionally.
|
||||
nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
|
||||
ldname=`echo ld | sed '$(transform)'`; \
|
||||
$(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c
|
||||
|
||||
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
||||
|
||||
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
||||
$(BULIBS)
|
||||
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@
|
||||
|
||||
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
||||
syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
|
||||
|
||||
diststuff: $(DISTSTUFF) info
|
||||
|
||||
DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
|
||||
site.exp site.bak
|
||||
|
||||
# Targets to rebuild dependencies in this Makefile.
|
||||
# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
|
||||
.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h
|
||||
rm -f .dep1
|
||||
$(MAKE) DEP=$(DEP) .dep1
|
||||
sed -f dep.sed <.dep1 >.dep
|
||||
|
||||
# This rule really wants a mkdep that runs "gcc -MM".
|
||||
.dep1: $(CFILES) $(GENERATED_CFILES)
|
||||
rm -f .dep2
|
||||
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
|
||||
$(DEP) -f .dep2 $(INCLUDES) $?
|
||||
$(SHELL) $(srcdir)/../move-if-change .dep2 .dep1
|
||||
|
||||
dep.sed: dep-in.sed config.status
|
||||
objdir=`pwd`; \
|
||||
sed <$(srcdir)/dep-in.sed >dep.sed \
|
||||
-e 's!@INCDIR@!$(INCDIR)!' \
|
||||
-e 's!@BFDDIR@!$(BFDDIR)!' \
|
||||
-e 's!@SRCDIR@!$(srcdir)!' \
|
||||
-e "s!@OBJDIR@!$${objdir}!"
|
||||
|
||||
dep: .dep
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat .dep >> tmp-Makefile
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
|
||||
dep-in: .dep
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
|
||||
cat .dep >> tmp-Makefile.in
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
|
||||
dep-am: .dep
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
|
||||
cat .dep >> tmp-Makefile.am
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
|
||||
.PHONY: dep dep-in dep-am
|
||||
|
||||
###
|
||||
# DOCUMENTATION TARGETS
|
||||
config.texi: Makefile
|
||||
rm -f config.texi
|
||||
echo '@set VERSION $(VERSION)' > config.texi
|
||||
|
||||
binutils.dvi: $(srcdir)/binutils.texi config.texi
|
||||
|
||||
binutils.info: $(srcdir)/binutils.texi config.texi
|
||||
|
||||
$(DEMANGLER_PROG).1: cxxfilt.man Makefile
|
||||
sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
|
||||
> $(DEMANGLER_PROG).1
|
||||
|
||||
MOSTLYCLEANFILES = sysinfo $(DEMANGLER_PROG).1 binutils.log binutils.sum \
|
||||
abcdefgh*
|
||||
mostlyclean-local:
|
||||
-rm -rf tmpdir
|
||||
|
||||
CLEANFILES = dep.sed .dep .dep1
|
||||
|
||||
.PHONY: install-exec-local
|
||||
|
||||
install-exec-local: $(bin_PROGRAMS) $(noinst_PROGRAMS)
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
$(mkinstalldirs) $(tooldir)/bin
|
||||
for i in $(TOOL_PROGS); do \
|
||||
if [ -f $$i$(EXEEXT) ]; then \
|
||||
j=`echo $$i | sed -e 's/-new//'`; \
|
||||
rm -f $(tooldir)/bin/$$j$(EXEEXT); \
|
||||
k=`echo $$j | sed '$(transform)'`; \
|
||||
if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
|
||||
ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
|
||||
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \
|
||||
fi; \
|
||||
else true; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# What appears below is generated by a hacked mkdep using gcc -MM.
|
||||
|
||||
# DO NOT DELETE THIS LINE -- mkdep uses it.
|
||||
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
|
||||
|
||||
addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h
|
||||
ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
|
||||
$(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h
|
||||
arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h
|
||||
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h
|
||||
coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
|
||||
$(INCDIR)/fopen-same.h
|
||||
coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
|
||||
coffgrok.h
|
||||
debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
debug.h
|
||||
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/getopt.h $(INCDIR)/demangle.h dlltool.h
|
||||
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h
|
||||
ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
debug.h budbg.h
|
||||
is-ranlib.o: is-ranlib.c
|
||||
is-strip.o: is-strip.c
|
||||
maybe-ranlib.o: maybe-ranlib.c
|
||||
maybe-strip.o: maybe-strip.c
|
||||
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
|
||||
$(INCDIR)/nlm/external.h nlmconv.h
|
||||
nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/progress.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h \
|
||||
$(INCDIR)/demangle.h $(INCDIR)/libiberty.h
|
||||
not-ranlib.o: not-ranlib.c
|
||||
not-strip.o: not-strip.c
|
||||
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/getopt.h $(INCDIR)/libiberty.h budbg.h
|
||||
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
|
||||
$(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
|
||||
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
debug.h budbg.h
|
||||
rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/coff/internal.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
|
||||
budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
|
||||
rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
debug.h budbg.h
|
||||
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
|
||||
srconv.o: srconv.c bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
sysroff.h coffgrok.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
|
||||
$(INCDIR)/bfdlink.h sysroff.c
|
||||
stabs.o: stabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
$(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
|
||||
strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
|
||||
sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h sysroff.h \
|
||||
sysroff.c
|
||||
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h
|
||||
wrstabs.o: wrstabs.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def
|
||||
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/libiberty.h $(INCDIR)/obstack.h windres.h
|
||||
resrc.o: resrc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
windres.h
|
||||
rescoff.o: rescoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
windres.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
|
||||
$(INCDIR)/bfdlink.h
|
||||
resbin.o: resbin.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
windres.h
|
||||
underscore.o: underscore.c
|
||||
arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h arsup.h
|
||||
arlex.o: arlex.c $(INCDIR)/libiberty.h arparse.h
|
||||
sysroff.o: sysroff.c
|
||||
sysinfo.o: sysinfo.c
|
||||
syslex.o: syslex.c sysinfo.h
|
||||
defparse.o: defparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h dlltool.h
|
||||
deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
|
||||
defparse.h dlltool.h
|
||||
nlmheader.o: nlmheader.c ../bfd/bfd.h bucomm.h config.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
|
||||
nlmconv.h
|
||||
rcparse.o: rcparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
windres.h
|
||||
rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
|
||||
windres.h rcparse.h
|
||||
|
||||
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue