Commit 7fa39330 authored by Tristan Gingold's avatar Tristan Gingold
Browse files

Add generated files

parent 95e58507
2017-03-02 Tristan Gingold <gingold@adacore.com>
* version.m4: Bump version to 2.28
* configure: Regenerate.
2017-03-02 Tristan Gingold <gingold@adacore.com>
* development.sh: Set development to false.
2017-02-28 Alan Modra <amodra@gmail.com>
PR 20995
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for bfd 2.27.90.
# Generated by GNU Autoconf 2.64 for bfd 2.28.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
......@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bfd'
PACKAGE_TARNAME='bfd'
PACKAGE_VERSION='2.27.90'
PACKAGE_STRING='bfd 2.27.90'
PACKAGE_VERSION='2.28'
PACKAGE_STRING='bfd 2.28'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
......@@ -1354,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures bfd 2.27.90 to adapt to many kinds of systems.
\`configure' configures bfd 2.28 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1425,7 +1425,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bfd 2.27.90:";;
short | recursive ) echo "Configuration of bfd 2.28:";;
esac
cat <<\_ACEOF
......@@ -1546,7 +1546,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bfd configure 2.27.90
bfd configure 2.28
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
......@@ -2188,7 +2188,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by bfd $as_me 2.27.90, which was
It was created by bfd $as_me 2.28, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
......@@ -3997,7 +3997,7 @@ fi
# Define the identity of the package.
PACKAGE='bfd'
VERSION='2.27.90'
VERSION='2.28'
cat >>confdefs.h <<_ACEOF
......@@ -16613,7 +16613,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by bfd $as_me 2.27.90, which was
This file was extended by bfd $as_me 2.28, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -16677,7 +16677,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
bfd config.status 2.27.90
bfd config.status 2.28
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
......
......@@ -16,4 +16,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Controls whether to enable development-mode features by default.
development=true
development=false
@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
structures on disk, and the shape of the relocation
information.
The support is split into a basic support file @file{aoutx.h}
and other files which derive functions from the base. One
derivation file is @file{aoutf1.h} (for a.out flavour 1), and
adds to the basic a.out functions support for sun3, sun4, 386
and 29k a.out files, to create a target jump vector for a
specific target.
This information is further split out into more specific files
for each machine, including @file{sunos.c} for sun3 and sun4,
@file{newsos3.c} for the Sony NEWS, and @file{demo64.c} for a
demonstration of a 64 bit a.out format.
The base file @file{aoutx.h} defines general mechanisms for
reading and writing records to and from disk and various
other methods which BFD requires. It is included by
@file{aout32.c} and @file{aout64.c} to form the names
@code{aout_32_swap_exec_header_in}, @code{aout_64_swap_exec_header_in}, etc.
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"
@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
...
@end example
from @file{sunos.c}:
@example
#define TARGET_NAME "a.out-sunos-big"
#define VECNAME sparc_aout_sunos_be_vec
#include "aoutf1.h"
@end example
requires all the names from @file{aout32.c}, and produces the jump vector
@example
sparc_aout_sunos_be_vec
@end example
The file @file{host-aout.c} is a special case. It is for a large set
of hosts that use ``more or less standard'' a.out files, and
for which cross-debugging is not interesting. It uses the
standard 32-bit a.out support routines, but determines the
file offsets and addresses of the text, data, and BSS
sections, the machine architecture and machine type, and the
entry point address, in a host-dependent manner. Once these
values have been determined, generic code is used to handle
the object file.
When porting it to run on a new system, you must supply:
@example
HOST_PAGE_SIZE
HOST_SEGMENT_SIZE
HOST_MACHINE_ARCH (optional)
HOST_MACHINE_MACHINE (optional)
HOST_TEXT_START_ADDR
HOST_STACK_END_ADDR
@end example
in the file @file{../include/sys/h-@var{XXX}.h} (for your host). These
values, plus the structures and macros defined in @file{a.out.h} on
your host system, will produce a BFD target that will access
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
@end example
in the @file{config/@var{XXX}.mt} file, and modify @file{configure.ac}
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.
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}
@example
void aout_@var{size}_swap_exec_header_in,
(bfd *abfd,
struct external_exec *bytes,
struct internal_exec *execp);
@end example
@strong{Description}@*
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}
@example
void aout_@var{size}_swap_exec_header_out
(bfd *abfd,
struct internal_exec *execp,
struct external_exec *raw_bytes);
@end example
@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}
@example
const bfd_target *aout_@var{size}_some_aout_object_p
(bfd *abfd,
struct internal_exec *execp,
const bfd_target *(*callback_to_real_object_p) (bfd *));
@end example
@strong{Description}@*
Some a.out variant thinks that the file open in @var{abfd}
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}
@example
bfd_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}
@example
enum machine_type aout_@var{size}_machine_type
(enum bfd_architecture arch,
unsigned long machine,
bfd_boolean *unknown);
@end example
@strong{Description}@*
Keep track of machine architecture and machine type for
a.out's. Return the @code{machine_type} for a particular
architecture and machine, or @code{M_UNKNOWN} if that exact architecture
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}
@example
bfd_boolean aout_@var{size}_set_arch_mach,
(bfd *,
enum bfd_architecture arch,
unsigned long machine);
@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}
@example
bfd_boolean aout_@var{size}_new_section_hook,
(bfd *abfd,
asection *newsect);
@end example
@strong{Description}@*
Called by the BFD in response to a @code{bfd_make_section}
request.
@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.
The big difference between an archive BFD and an ordinary BFD
is that the archive doesn't have sections. Instead it has a
chain of BFDs that are considered its contents. These BFDs can
be manipulated like any other. The BFDs contained in an
archive opened for reading will all be opened for reading. You
may put either input or output BFDs into an archive opened for
output; they will be handled correctly when the archive is closed.
Use @code{bfd_openr_next_archived_file} to step through
the contents of an archive opened for input. You don't
have to read the entire archive if you don't want
to! Read it until you find what you want.
A BFD returned by @code{bfd_openr_next_archived_file} can be
closed manually with @code{bfd_close}. If you do not close it,
then a second iteration through the members of an archive may
return the same BFD. If you close the archive BFD, then all
the member BFDs will automatically be closed as well.
Archive contents of output BFDs are chained through the
@code{archive_next} pointer in a BFD. The first one is findable
through the @code{archive_head} slot of the archive. Set it with
@code{bfd_set_archive_head} (q.v.). A given BFD may be in only
one open output archive at a time.
As expected, the BFD archive code is more general than the
archive code of any given environment. BFD archives may
contain files of different formats (e.g., a.out and coff) and
even different architectures. You may even place archives
recursively into archives!
This can cause unexpected confusion, since some archive
formats are more expressive than others. For instance, Intel
COFF archives can preserve long filenames; SunOS a.out archives
cannot. If you move a file from the first to the second
format and back again, the filename may be truncated.
Likewise, different a.out environments have different
conventions as to how they truncate filenames, whether they
preserve directory names in filenames, etc. When
interoperating with native tools, be sure your files are
homogeneous.
Beware: most of these formats do not react well to the
presence of spaces in filenames. We do the best we can, but
can't always handle this case due to restrictions in the format of
archives. Many Unix utilities are braindead in regards to
spaces and such in filenames anyway, so this shouldn't be much
of a restriction.
Archives are supported in BFD in @code{archive.c}.
@subsection Archive functions
@findex bfd_get_next_mapent
@subsubsection @code{bfd_get_next_mapent}
@strong{Synopsis}
@example
symindex bfd_get_next_mapent
(bfd *abfd, symindex previous, carsym **sym);
@end example
@strong{Description}@*
Step through archive @var{abfd}'s symbol table (if it
has one). Successively update @var{sym} with the next symbol's
information, returning that symbol's (internal) index into the
symbol table.
Supply @code{BFD_NO_MORE_SYMBOLS} as the @var{previous} entry to get
the first one; returns @code{BFD_NO_MORE_SYMBOLS} when you've already
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}
@example
bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
@end example
@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}
@example
bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
@end example
@strong{Description}@*
Provided a BFD, @var{archive}, containing an archive and NULL, open
an input BFD on the first contained element and returns that.
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.
This diff is collapsed.
This diff is collapsed.
@findex struct bfd_iovec
@subsubsection @code{struct bfd_iovec}
@strong{Description}@*
The @code{struct bfd_iovec} contains the internal file I/O class.
Each @code{BFD} has an instance of this class and all file I/O is
routed through it (it is assumed that the instance implements
all methods listed below).
@example
struct bfd_iovec
@{
/* To avoid problems with macros, a "b" rather than "f"
prefix is prepended to each method name. */
/* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
bytes starting at PTR. Return the number of bytes actually
transfered (a read past end-of-file returns less than NBYTES),
or -1 (setting @code{bfd_error}) if an error occurs. */
file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
file_ptr nbytes);
/* Return the current IOSTREAM file offset, or -1 (setting @code{bfd_error}
if an error occurs. */
file_ptr (*btell) (struct bfd *abfd);
/* For the following, on successful completion a value of 0 is returned.
Otherwise, a value of -1 is returned (and @code{bfd_error} is set). */
int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
int (*bclose) (struct bfd *abfd);
int (*bflush) (struct bfd *abfd);
int (*bstat) (struct bfd *abfd, struct stat *sb);
/* Mmap a part of the files. ADDR, LEN, PROT, FLAGS and OFFSET are the usual
mmap parameter, except that LEN and OFFSET do not need to be page
aligned. Returns (void *)-1 on failure, mmapped address on success.
Also write in MAP_ADDR the address of the page aligned buffer and in
MAP_LEN the size mapped (a page multiple). Use unmap with MAP_ADDR and
MAP_LEN to unmap. */
void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len,
int prot, int flags, file_ptr offset,
void **map_addr, bfd_size_type *map_len);
@};
extern const struct bfd_iovec _bfd_memory_iovec;
@end example
@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
file_ptr 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 question, "is the
size reasonable?".
@findex bfd_mmap
@subsubsection @code{bfd_mmap}
@strong{Synopsis}
@example
void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
int prot, int flags, file_ptr offset,
void **map_addr, bfd_size_type *map_len);
@end example
@strong{Description}@*
Return mmap()ed region of the file, if possible and implemented.
LEN and OFFSET do not need to be page aligned. The page aligned
address and length are written to MAP_ADDR and MAP_LEN.
This diff is collapsed.
@set VERSION 2.28
@set VERSION_PACKAGE (GNU Binutils)
@set UPDATED March 2017
@set BUGURL @uref{http://www.sourceware.org/bugzilla/}
@findex
@subsubsection @code{}
@section File caching
The file caching mechanism is embedded within BFD and allows
the application to open as many BFDs as it wants without
regard to the underlying operating system's file descriptor
limit (often as low as 20 open files). The module in
@code{cache.c} maintains a least recently used list of
@code{bfd_cache_max_open} files, and exports the name
@code{bfd_cache_lookup}, which runs around and makes sure that
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.
@subsection Caching functions
@findex bfd_cache_init
@subsubsection @code{bfd_cache_init}
@strong{Synopsis}
@example
bfd_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}
@example
bfd_boolean bfd_cache_close (bfd *abfd);
@end example
@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_cache_close_all
@subsubsection @code{bfd_cache_close_all}
@strong{Synopsis}
@example
bfd_boolean bfd_cache_close_all (void);
@end example
@strong{Description}@*
Remove all BFDs from the cache. If the attached file is open,
then close it too.
@strong{Returns}@*
@code{FALSE} is returned if closing one of the file fails, @code{TRUE} is
returned if all is well.
@findex bfd_open_file
@subsubsection @code{bfd_open_file}
@strong{Synopsis}
@example
FILE* bfd_open_file (bfd *abfd);
@end example
@strong{Description}@*
Call the OS to open a file for @var{abfd}. Return the @code{FILE *}
(possibly @code{NULL}) that results from this operation. Set up the
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.
This diff is collapsed.
@section Core files
@subsection Core file functions
@strong{Description}@*
These are functions pertaining to core files.
@findex bfd_core_file_failing_command
@subsubsection @code{bfd_core_file_failing_command}
@strong{Synopsis}
@example
const char *bfd_core_file_failing_command (bfd *abfd);
@end example
@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}
@example
int bfd_core_file_failing_signal (bfd *abfd);
@end example
@strong{Description}@*
Returns the signal number which caused the core dump which
generated the file the BFD @var{abfd} is attached to.
@findex bfd_core_file_pid
@subsubsection @code{bfd_core_file_pid}
@strong{Synopsis}
@example
int bfd_core_file_pid (bfd *abfd);
@end example
@strong{Description}@*
Returns the PID of the process the core dump the BFD