summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/binutils/bfd/doc/bfd.info-6683
-rw-r--r--gnu/usr.bin/binutils/bfd/doc/bfd.info-7491
-rw-r--r--gnu/usr.bin/binutils/bfd/elf-hppa.h3
-rw-r--r--gnu/usr.bin/binutils/bfd/elf32-mcore.c3
-rw-r--r--gnu/usr.bin/binutils/binutils/binutils.info-3182
-rw-r--r--gnu/usr.bin/binutils/etc/configbuild.ein149
-rw-r--r--gnu/usr.bin/binutils/etc/configbuild.fig50
-rw-r--r--gnu/usr.bin/binutils/etc/configbuild.jinbin0 -> 11123 bytes
-rw-r--r--gnu/usr.bin/binutils/etc/configbuild.tin9
-rw-r--r--gnu/usr.bin/binutils/etc/configdev.ein185
-rw-r--r--gnu/usr.bin/binutils/etc/configdev.fig80
-rw-r--r--gnu/usr.bin/binutils/etc/configdev.jinbin0 -> 17967 bytes
-rw-r--r--gnu/usr.bin/binutils/etc/configdev.tin17
-rw-r--r--gnu/usr.bin/binutils/etc/configure.info-3285
-rw-r--r--gnu/usr.bin/binutils/gas/doc/as.info-81042
-rw-r--r--gnu/usr.bin/binutils/gas/doc/gasver.texi2
-rw-r--r--gnu/usr.bin/binutils/gprof/gprof.info-11121
-rw-r--r--gnu/usr.bin/binutils/gprof/gprof.info-2760
-rw-r--r--gnu/usr.bin/binutils/include/dyn-string.h92
-rw-r--r--gnu/usr.bin/binutils/ld/ldver.texi2
-rw-r--r--gnu/usr.bin/binutils/ld/scripttempl/elfd30v.sc7
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elf-offset.ld168
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.dat22
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.exp359
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/main.c178
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh1.c324
-rw-r--r--gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh2.c24
27 files changed, 6229 insertions, 9 deletions
diff --git a/gnu/usr.bin/binutils/bfd/doc/bfd.info-6 b/gnu/usr.bin/binutils/bfd/doc/bfd.info-6
new file mode 100644
index 00000000000..0c59a3dc63d
--- /dev/null
+++ b/gnu/usr.bin/binutils/bfd/doc/bfd.info-6
@@ -0,0 +1,683 @@
+This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
+
+START-INFO-DIR-ENTRY
+* Bfd: (bfd). The Binary File Descriptor library.
+END-INFO-DIR-ENTRY
+
+ This file documents the BFD library.
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, subject to the
+terms of the GNU General Public License, which includes the provision
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: bfd.info, Node: coff, Next: elf, Prev: aout, Up: BFD back ends
+
+coff backends
+=============
+
+ BFD supports a number of different flavours of coff format. The
+major differences between formats are the sizes and alignments of
+fields in structures on disk, and the occasional extra field.
+
+ Coff in all its varieties is implemented with a few common files and
+a number of implementation specific files. For example, The 88k bcs
+coff format is implemented in the file `coff-m88k.c'. This file
+`#include's `coff/m88k.h' which defines the external structure of the
+coff format for the 88k, and `coff/internal.h' which defines the
+internal structure. `coff-m88k.c' also defines the relocations used by
+the 88k format *Note Relocations::.
+
+ The Intel i960 processor version of coff is implemented in
+`coff-i960.c'. This file has the same structure as `coff-m88k.c',
+except that it includes `coff/i960.h' rather than `coff-m88k.h'.
+
+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 you want
+to use. For example, we'll say that i386 coff is the one you select,
+and that your coff flavour is called foo. Copy `i386coff.c' to
+`foocoff.c', copy `../include/coff/i386.h' to `../include/coff/foo.h',
+and add the lines to `targets.c' and `Makefile.in' so that your new
+back end is used. Alter the shapes of the structures in
+`../include/coff/foo.h' so that they match what you need. You will
+probably also have to add `#ifdef's to the code in `coff/internal.h' and
+`coffcode.h' if your version of coff is too wild.
+
+ You can verify that your new BFD backend works quite simply by
+building `objdump' from the `binutils' directory, and making sure that
+its version of what's going on and your host system's idea (assuming it
+has the pretty standard coff dump utility, usually called `att-dump' or
+just `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.
+
+How the coff backend works
+--------------------------
+
+File layout
+...........
+
+ The Coff backend is split into generic routines that are applicable
+to any Coff target and routines that are specific to a particular
+target. The target-specific routines are further split into ones which
+are basically the same for all Coff targets except that they use the
+external symbol format or use different values for certain constants.
+
+ The generic routines are in `coffgen.c'. These routines work for
+any Coff target. They use some hooks into the target specific code;
+the hooks are in a `bfd_coff_backend_data' structure, one of which
+exists for each target.
+
+ The essentially similar target-specific routines are in
+`coffcode.h'. This header file includes executable C code. The
+various Coff targets first include the appropriate Coff header file,
+make any special defines that are needed, and then include `coffcode.h'.
+
+ Some of the Coff targets then also have additional routines in the
+target source file itself.
+
+ For example, `coff-i960.c' includes `coff/internal.h' and
+`coff/i960.h'. It then defines a few constants, such as `I960', and
+includes `coffcode.h'. Since the i960 has complex relocation types,
+`coff-i960.c' also includes some code to manipulate the i960 relocs.
+This code is not in `coffcode.h' because it would not be used by any
+other target.
+
+Bit twiddling
+.............
+
+ Each flavour of coff supported in BFD has its own header file
+describing the external layout of the structures. There is also an
+internal description of the coff layout, in `coff/internal.h'. A major
+function of the coff backend is swapping the bytes and twiddling the
+bits to translate the external form of the structures into the normal
+internal form. This is all performed in the `bfd_swap'_thing_direction
+routines. Some elements are different sizes between different versions
+of coff; it is the duty of the coff version specific include file to
+override the definitions of various packing routines in `coffcode.h'.
+E.g., the size of line number entry in coff is sometimes 16 bits, and
+sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
+will select the correct one. No doubt, some day someone will find a
+version of coff which has a varying field size not catered to at the
+moment. To port BFD, that person will have to add more `#defines'.
+Three of the bit twiddling routines are exported to `gdb';
+`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
+reads the symbol table on its own, but uses BFD to fix things up. More
+of the bit twiddlers are exported for `gas'; `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'. `Gas' currently keeps track of all the symbol
+table and reloc drudgery itself, thereby 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 `gas', which makes one avenue to disaster
+disappear.
+
+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 table. The back
+end gets around this problem by keeping the original symbol table
+around, "behind the scenes".
+
+ When a symbol table is requested (through a call to
+`bfd_canonicalize_symtab'), a request gets through to
+`coff_get_normalized_symtab'. This reads the symbol table from the coff
+file and swaps all the structures inside into the internal form. It
+also fixes up all the pointers in the table (represented in the file by
+offsets from the first symbol in the table) into physical pointers to
+elements in the new internal table. This involves some work since the
+meanings of fields change depending upon context: a field that is a
+pointer to another structure in the symbol table at one moment may be
+the size in bytes of a structure at the next. Another pass is made
+over the table. All symbols which mark file names (`C_FILE' symbols)
+are modified so that the internal string points to the value in the
+auxent (the real filename) rather than the normal text associated with
+the symbol (`".file"').
+
+ 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 into memory and replaces them with
+pointers to the strings.
+
+ The symbol table is massaged once again, this time to create the
+canonical table used by the BFD application. Each symbol is inspected
+in turn, and a decision made (using the `sclass' field) about the
+various flags to set in the `asymbol'. *Note Symbols::. The generated
+canonical table 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.
+
+Symbol writing
+..............
+
+ Writing a symbol to a coff file which didn't come from a coff file
+will lose any debugging information. The `asymbol' structure remembers
+the BFD from which the symbol was taken, and on output the back end
+makes sure that the same destination target as source target is present.
+
+ When the symbols have come from a coff file then all the debugging
+information is preserved.
+
+ Symbol tables are provided for writing to the back end in a vector
+of pointers to pointers. This allows applications like the linker to
+accumulate and output large symbol tables without having to do too much
+byte copying.
+
+ This function runs through the provided symbol table and patches
+each symbol marked as a file place holder (`C_FILE') to point to the
+next file place holder in the list. It also marks each `offset' field
+in the list with the offset from the first symbol of the current symbol.
+
+ Another function of this procedure is to turn the canonical value
+form of BFD into the form used by coff. Internally, BFD expects symbol
+values to be offsets from a section base; so a symbol physically at
+0x120, but in a section starting at 0x100, would have the value 0x20.
+Coff expects symbols to contain their final value, so symbols have
+their values changed at this point to reflect their sum with their
+owning section. This transformation uses the `output_section' field of
+the `asymbol''s `asection' *Note Sections::.
+
+ * `coff_mangle_symbols'
+ This routine runs though the provided symbol table and uses the
+offsets generated by the previous pass and the pointers generated when
+the symbol table was read in to create the structured hierachy required
+by coff. It changes each pointer to a symbol into the index into the
+symbol table of the asymbol.
+
+ * `coff_write_symbols'
+ 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.
+
+`coff_symbol_type'
+..................
+
+ *Description*
+The hidden information for an `asymbol' is described in a
+`combined_entry_type':
+
+
+ typedef struct coff_ptr_struct
+ {
+
+ /* Remembers the offset from the first symbol in the file for
+ this symbol. Generated by coff_renumber_symbols. */
+ unsigned int offset;
+
+ /* Should the value of this symbol be renumbered. Used for
+ XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
+ unsigned int fix_value : 1;
+
+ /* Should the tag field of this symbol be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_tag : 1;
+
+ /* Should the endidx field of this symbol be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_end : 1;
+
+ /* Should the x_csect.x_scnlen field be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_scnlen : 1;
+
+ /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
+ index into the line number entries. Set by
+ coff_slurp_symbol_table. */
+ unsigned int fix_line : 1;
+
+ /* The container for the symbol structure as read and translated
+ from the file. */
+
+ union {
+ union internal_auxent auxent;
+ struct internal_syment syment;
+ } u;
+ } combined_entry_type;
+
+
+ /* Each canonical asymbol really looks like this: */
+
+ typedef struct coff_symbol_struct
+ {
+ /* The actual symbol which the rest of BFD works with */
+ asymbol symbol;
+
+ /* A pointer to the hidden information for this symbol */
+ combined_entry_type *native;
+
+ /* A pointer to the linenumber information for this symbol */
+ struct lineno_cache_entry *lineno;
+
+ /* Have the line numbers been relocated yet ? */
+ boolean done_lineno;
+ } coff_symbol_type;
+
+`bfd_coff_backend_data'
+.......................
+
+ /* COFF symbol classifications. */
+
+ enum coff_symbol_classification
+ {
+ /* Global symbol. */
+ COFF_SYMBOL_GLOBAL,
+ /* Common symbol. */
+ COFF_SYMBOL_COMMON,
+ /* Undefined symbol. */
+ COFF_SYMBOL_UNDEFINED,
+ /* Local symbol. */
+ COFF_SYMBOL_LOCAL,
+ /* PE section symbol. */
+ COFF_SYMBOL_PE_SECTION
+ };
+ Special entry points for gdb to swap in coff symbol table parts:
+ typedef struct
+ {
+ void (*_bfd_coff_swap_aux_in) PARAMS ((
+ bfd *abfd,
+ PTR ext,
+ int type,
+ int class,
+ int indaux,
+ int numaux,
+ PTR in));
+
+ void (*_bfd_coff_swap_sym_in) PARAMS ((
+ bfd *abfd ,
+ PTR ext,
+ PTR in));
+
+ void (*_bfd_coff_swap_lineno_in) PARAMS ((
+ bfd *abfd,
+ PTR ext,
+ PTR in));
+ Special entry points for gas to swap out coff parts:
+ unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
+ bfd *abfd,
+ PTR in,
+ int type,
+ int class,
+ int indaux,
+ int numaux,
+ PTR ext));
+
+ unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
+ bfd *abfd,
+ PTR in,
+ PTR ext));
+
+ unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
+ bfd *abfd,
+ PTR in,
+ PTR ext));
+
+ unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
+ bfd *abfd,
+ PTR src,
+ PTR dst));
+
+ unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
+ bfd *abfd,
+ PTR in,
+ PTR out));
+
+ unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
+ bfd *abfd,
+ PTR in,
+ PTR out));
+
+ unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
+ bfd *abfd,
+ PTR in,
+ PTR out));
+ Special entry points for generic COFF routines to call target
+dependent COFF routines:
+ unsigned int _bfd_filhsz;
+ unsigned int _bfd_aoutsz;
+ unsigned int _bfd_scnhsz;
+ unsigned int _bfd_symesz;
+ unsigned int _bfd_auxesz;
+ unsigned int _bfd_relsz;
+ unsigned int _bfd_linesz;
+ unsigned int _bfd_filnmlen;
+ boolean _bfd_coff_long_filenames;
+ boolean _bfd_coff_long_section_names;
+ unsigned int _bfd_coff_default_section_alignment_power;
+ void (*_bfd_coff_swap_filehdr_in) PARAMS ((
+ bfd *abfd,
+ PTR ext,
+ PTR in));
+ void (*_bfd_coff_swap_aouthdr_in) PARAMS ((
+ bfd *abfd,
+ PTR ext,
+ PTR in));
+ void (*_bfd_coff_swap_scnhdr_in) PARAMS ((
+ bfd *abfd,
+ PTR ext,
+ PTR in));
+ void (*_bfd_coff_swap_reloc_in) PARAMS ((
+ bfd *abfd,
+ PTR ext,
+ PTR in));
+ boolean (*_bfd_coff_bad_format_hook) PARAMS ((
+ bfd *abfd,
+ PTR internal_filehdr));
+ boolean (*_bfd_coff_set_arch_mach_hook) PARAMS ((
+ bfd *abfd,
+ PTR internal_filehdr));
+ PTR (*_bfd_coff_mkobject_hook) PARAMS ((
+ bfd *abfd,
+ PTR internal_filehdr,
+ PTR internal_aouthdr));
+ flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
+ bfd *abfd,
+ PTR internal_scnhdr,
+ const char *name,
+ asection *section));
+ void (*_bfd_set_alignment_hook) PARAMS ((
+ bfd *abfd,
+ asection *sec,
+ PTR internal_scnhdr));
+ boolean (*_bfd_coff_slurp_symbol_table) PARAMS ((
+ bfd *abfd));
+ boolean (*_bfd_coff_symname_in_debug) PARAMS ((
+ bfd *abfd,
+ struct internal_syment *sym));
+ boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
+ bfd *abfd,
+ combined_entry_type *table_base,
+ combined_entry_type *symbol,
+ unsigned int indaux,
+ combined_entry_type *aux));
+ boolean (*_bfd_coff_print_aux) PARAMS ((
+ bfd *abfd,
+ FILE *file,
+ combined_entry_type *table_base,
+ combined_entry_type *symbol,
+ combined_entry_type *aux,
+ unsigned int indaux));
+ void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
+ bfd *abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ arelent *reloc,
+ bfd_byte *data,
+ unsigned int *src_ptr,
+ unsigned int *dst_ptr));
+ int (*_bfd_coff_reloc16_estimate) PARAMS ((
+ bfd *abfd,
+ asection *input_section,
+ arelent *r,
+ unsigned int shrink,
+ struct bfd_link_info *link_info));
+ enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
+ bfd *abfd,
+ struct internal_syment *));
+ boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
+ bfd *abfd));
+ boolean (*_bfd_coff_start_final_link) PARAMS ((
+ bfd *output_bfd,
+ struct bfd_link_info *info));
+ boolean (*_bfd_coff_relocate_section) PARAMS ((
+ 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));
+ reloc_howto_type *(*_bfd_coff_rtype_to_howto) PARAMS ((
+ bfd *abfd,
+ asection *sec,
+ struct internal_reloc *rel,
+ struct coff_link_hash_entry *h,
+ struct internal_syment *sym,
+ bfd_vma *addendp));
+ boolean (*_bfd_coff_adjust_symndx) PARAMS ((
+ bfd *obfd,
+ struct bfd_link_info *info,
+ bfd *ibfd,
+ asection *sec,
+ struct internal_reloc *reloc,
+ boolean *adjustedp));
+ boolean (*_bfd_coff_link_add_one_symbol) PARAMS ((
+ struct bfd_link_info *info,
+ bfd *abfd,
+ const char *name,
+ flagword flags,
+ asection *section,
+ bfd_vma value,
+ const char *string,
+ boolean copy,
+ boolean collect,
+ struct bfd_link_hash_entry **hashp));
+
+ boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
+ bfd * abfd,
+ struct coff_final_link_info * pfinfo));
+ 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)
+
+ #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
+ ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
+
+ #define bfd_coff_swap_sym_in(a,e,i) \
+ ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
+
+ #define bfd_coff_swap_lineno_in(a,e,i) \
+ ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
+
+ #define bfd_coff_swap_reloc_out(abfd, i, o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
+
+ #define bfd_coff_swap_lineno_out(abfd, i, o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
+
+ #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
+ ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
+
+ #define bfd_coff_swap_sym_out(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
+
+ #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
+
+ #define bfd_coff_swap_filehdr_out(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
+
+ #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
+
+ #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
+ #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
+ #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
+ #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
+ #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
+ #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
+ #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
+ #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
+ #define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
+ #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)
+ #define bfd_coff_swap_filehdr_in(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
+
+ #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
+
+ #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
+
+ #define bfd_coff_swap_reloc_in(abfd, i, o) \
+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
+
+ #define bfd_coff_bad_format_hook(abfd, filehdr) \
+ ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
+
+ #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
+ ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
+ #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
+ ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
+
+ #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\
+ ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
+ (abfd, scnhdr, name, section))
+
+ #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
+ ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
+
+ #define bfd_coff_slurp_symbol_table(abfd)\
+ ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
+
+ #define bfd_coff_symname_in_debug(abfd, sym)\
+ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
+
+ #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
+ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
+ (abfd, file, base, symbol, aux, indaux))
+
+ #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
+ (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
+
+ #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
+ (abfd, section, reloc, shrink, link_info))
+
+ #define bfd_coff_classify_symbol(abfd, sym)\
+ ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
+ (abfd, sym))
+
+ #define bfd_coff_compute_section_file_positions(abfd)\
+ ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
+ (abfd))
+
+ #define bfd_coff_start_final_link(obfd, info)\
+ ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
+ (obfd, info))
+ #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
+ ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
+ (obfd, info, ibfd, o, con, rel, isyms, secs))
+ #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
+ ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
+ (abfd, sec, rel, h, sym, addendp))
+ #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
+ ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
+ (obfd, info, ibfd, sec, rel, adjustedp))
+ #define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
+ ((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,p) \
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
+ #define bfd_coff_final_link_postscript(a,p) \
+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+
+Writing relocations
+...................
+
+ To write relocations, the back end steps though the canonical
+relocation table and create an `internal_reloc'. The symbol index to
+use is removed from the `offset' field in the symbol table supplied.
+The address comes directly from the sum of the section base address and
+the relocation offset; the type is dug directly from the howto field.
+Then the `internal_reloc' is swapped into the shape of an
+`external_reloc' and written out to disk.
+
+Reading linenumbers
+...................
+
+ Creating the linenumber table is done by reading in the entire coff
+linenumber table, and creating another table for internal use.
+
+ A coff linenumber table is structured so that each function is
+marked as having a line number of 0. Each line within the function is
+an offset from the first line in the function. The base of the line
+number information for the table is stored in the symbol associated
+with the function.
+
+ Note: The PE format uses line number 0 for a flag indicating a new
+source file.
+
+ The information is copied from the external to the internal table,
+and each symbol which marks a function is marked by pointing its...
+
+ How does this work ?
+
+Reading relocations
+...................
+
+ Coff relocations are easily transformed into the internal BFD form
+(`arelent').
+
+ Reading a coff relocation table is done in the following stages:
+
+ * Read the entire coff relocation table into memory.
+
+ * Process each relocation in turn; first swap it from the external
+ to the internal form.
+
+ * Turn the symbol referenced in the relocation's symbol index into a
+ pointer into the canonical symbol table. This table is the same
+ as the one returned by a call to `bfd_canonicalize_symtab'. The
+ back end will call that routine and save the result if a
+ canonicalization hasn't been done.
+
+ * The reloc index is turned into a pointer to a howto structure, in
+ a back end specific way. For instance, the 386 and 960 use the
+ `r_type' to directly produce an index into a howto table vector;
+ the 88k subtracts a number from the `r_type' field and creates an
+ addend field.
+
+
+File: bfd.info, Node: elf, Prev: coff, Up: BFD back ends
+
+ELF backends
+============
+
+ BFD support for ELF formats is being worked on. Currently, the best
+supported back ends are for sparc and i386 (running svr4 or Solaris 2).
+
+ 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.
+
+`bfd_elf_find_section'
+......................
+
+ *Synopsis*
+ struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
+ *Description*
+Helper functions for GDB to locate the string tables. 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.
+
diff --git a/gnu/usr.bin/binutils/bfd/doc/bfd.info-7 b/gnu/usr.bin/binutils/bfd/doc/bfd.info-7
new file mode 100644
index 00000000000..18e8a5d8c89
--- /dev/null
+++ b/gnu/usr.bin/binutils/bfd/doc/bfd.info-7
@@ -0,0 +1,491 @@
+This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
+
+START-INFO-DIR-ENTRY
+* Bfd: (bfd). The Binary File Descriptor library.
+END-INFO-DIR-ENTRY
+
+ This file documents the BFD library.
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, subject to the
+terms of the GNU General Public License, which includes the provision
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: bfd.info, Node: Index, Prev: BFD back ends, Up: Top
+
+Index
+*****
+
+* Menu:
+
+* _bfd_final_link_relocate: Relocating the section contents.
+* _bfd_generic_link_add_archive_symbols: Adding symbols from an archive.
+* _bfd_generic_link_add_one_symbol: Adding symbols from an object file.
+* _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
+* _bfd_link_final_link in target vector: Performing the Final Link.
+* _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
+* _bfd_relocate_contents: Relocating the section contents.
+* _bfd_strip_section_from_output: section prototypes.
+* aout_SIZE_machine_type: aout.
+* aout_SIZE_mkobject: aout.
+* aout_SIZE_new_section_hook: aout.
+* aout_SIZE_set_arch_mach: aout.
+* aout_SIZE_some_aout_object_p: aout.
+* aout_SIZE_swap_exec_header_in: aout.
+* aout_SIZE_swap_exec_header_out: aout.
+* arelent_chain: typedef arelent.
+* BFD: Overview.
+* BFD canonical format: Canonical format.
+* bfd_alloc: Opening and Closing.
+* bfd_arch_bits_per_address: Architectures.
+* bfd_arch_bits_per_byte: Architectures.
+* bfd_arch_get_compatible: Architectures.
+* bfd_arch_list: Architectures.
+* bfd_arch_mach_octets_per_byte: Architectures.
+* bfd_cache_close: File Caching.
+* bfd_cache_init: File Caching.
+* bfd_cache_lookup: File Caching.
+* bfd_cache_lookup_worker: File Caching.
+* BFD_CACHE_MAX_OPEN macro: File Caching.
+* bfd_canonicalize_reloc: BFD front end.
+* bfd_canonicalize_symtab: symbol handling functions.
+* bfd_check_format: Formats.
+* bfd_check_format_matches: Formats.
+* bfd_check_overflow: typedef arelent.
+* bfd_close: Opening and Closing.
+* bfd_close_all_done: Opening and Closing.
+* bfd_coff_backend_data: coff.
+* bfd_copy_private_bfd_data: BFD front end.
+* bfd_copy_private_section_data: section prototypes.
+* bfd_copy_private_symbol_data: symbol handling functions.
+* bfd_core_file_failing_command: Core Files.
+* bfd_core_file_failing_signal: Core Files.
+* bfd_create: Opening and Closing.
+* bfd_decode_symclass: symbol handling functions.
+* bfd_default_arch_struct: Architectures.
+* bfd_default_compatible: Architectures.
+* bfd_default_reloc_type_lookup: howto manager.
+* bfd_default_scan: Architectures.
+* bfd_default_set_arch_mach: Architectures.
+* bfd_elf_find_section: elf.
+* bfd_errmsg: BFD front end.
+* bfd_fdopenr: Opening and Closing.
+* bfd_find_target: bfd_target.
+* bfd_format_string: Formats.
+* bfd_generic_gc_sections: howto manager.
+* bfd_generic_get_relocated_section_contents: howto manager.
+* bfd_generic_relax_section: howto manager.
+* bfd_get_arch: Architectures.
+* bfd_get_arch_info: Architectures.
+* bfd_get_error: BFD front end.
+* bfd_get_error_handler: BFD front end.
+* bfd_get_gp_size: BFD front end.
+* bfd_get_mach: Architectures.
+* bfd_get_mtime: BFD front end.
+* bfd_get_next_mapent: Archives.
+* bfd_get_reloc_code_name: howto manager.
+* bfd_get_reloc_size: typedef arelent.
+* bfd_get_reloc_upper_bound: BFD front end.
+* bfd_get_section_by_name: section prototypes.
+* bfd_get_section_contents: section prototypes.
+* bfd_get_size <1>: Internal.
+* bfd_get_size: BFD front end.
+* bfd_get_symtab_upper_bound: symbol handling functions.
+* bfd_h_put_size: Internal.
+* bfd_hash_allocate: Creating and Freeing a Hash Table.
+* bfd_hash_lookup: Looking Up or Entering a String.
+* bfd_hash_newfunc: Creating and Freeing a Hash Table.
+* bfd_hash_table_free: Creating and Freeing a Hash Table.
+* bfd_hash_table_init: Creating and Freeing a Hash Table.
+* bfd_hash_table_init_n: Creating and Freeing a Hash Table.
+* bfd_hash_traverse: Traversing a Hash Table.
+* bfd_init: Initialization.
+* bfd_install_relocation: typedef arelent.
+* bfd_is_local_label: symbol handling functions.
+* bfd_is_local_label_name: symbol handling functions.
+* bfd_is_undefined_symclass: symbol handling functions.
+* bfd_last_cache: File Caching.
+* bfd_link_split_section: Writing the symbol table.
+* bfd_log2: Internal.
+* bfd_lookup_arch: Architectures.
+* bfd_make_debug_symbol: symbol handling functions.
+* bfd_make_empty_symbol: symbol handling functions.
+* bfd_make_readable: Opening and Closing.
+* bfd_make_section: section prototypes.
+* bfd_make_section_anyway: section prototypes.
+* bfd_make_section_old_way: section prototypes.
+* bfd_make_writable: Opening and Closing.
+* bfd_map_over_sections: section prototypes.
+* bfd_merge_private_bfd_data: BFD front end.
+* bfd_octets_per_byte: Architectures.
+* bfd_open_file: File Caching.
+* bfd_openr: Opening and Closing.
+* bfd_openr_next_archived_file: Archives.
+* bfd_openstreamr: Opening and Closing.
+* bfd_openw: Opening and Closing.
+* bfd_perform_relocation: typedef arelent.
+* bfd_perror: BFD front end.
+* bfd_print_symbol_vandf: symbol handling functions.
+* bfd_printable_arch_mach: Architectures.
+* bfd_printable_name: Architectures.
+* bfd_put_size: Internal.
+* BFD_RELOC_12_PCREL: howto manager.
+* BFD_RELOC_14: howto manager.
+* BFD_RELOC_16: howto manager.
+* BFD_RELOC_16_BASEREL: howto manager.
+* BFD_RELOC_16_GOT_PCREL: howto manager.
+* BFD_RELOC_16_GOTOFF: howto manager.
+* BFD_RELOC_16_PCREL: howto manager.
+* BFD_RELOC_16_PCREL_S2: howto manager.
+* BFD_RELOC_16_PLT_PCREL: howto manager.
+* BFD_RELOC_16_PLTOFF: howto manager.
+* BFD_RELOC_23_PCREL_S2: howto manager.
+* BFD_RELOC_24: howto manager.
+* BFD_RELOC_24_PCREL: howto manager.
+* BFD_RELOC_24_PLT_PCREL: howto manager.
+* BFD_RELOC_26: howto manager.
+* BFD_RELOC_32: howto manager.
+* BFD_RELOC_32_BASEREL: howto manager.
+* BFD_RELOC_32_GOT_PCREL: howto manager.
+* BFD_RELOC_32_GOTOFF: howto manager.
+* BFD_RELOC_32_PCREL: howto manager.
+* BFD_RELOC_32_PCREL_S2: howto manager.
+* BFD_RELOC_32_PLT_PCREL: howto manager.
+* BFD_RELOC_32_PLTOFF: howto manager.
+* BFD_RELOC_386_COPY: howto manager.
+* BFD_RELOC_386_GLOB_DAT: howto manager.
+* BFD_RELOC_386_GOT32: howto manager.
+* BFD_RELOC_386_GOTOFF: howto manager.
+* BFD_RELOC_386_GOTPC: howto manager.
+* BFD_RELOC_386_JUMP_SLOT: howto manager.
+* BFD_RELOC_386_PLT32: howto manager.
+* BFD_RELOC_386_RELATIVE: howto manager.
+* BFD_RELOC_64: howto manager.
+* BFD_RELOC_64_PCREL: howto manager.
+* BFD_RELOC_68K_GLOB_DAT: howto manager.
+* BFD_RELOC_68K_JMP_SLOT: howto manager.
+* BFD_RELOC_68K_RELATIVE: howto manager.
+* BFD_RELOC_8: howto manager.
+* BFD_RELOC_8_BASEREL: howto manager.
+* BFD_RELOC_8_FFnn: howto manager.
+* BFD_RELOC_8_GOT_PCREL: howto manager.
+* BFD_RELOC_8_GOTOFF: howto manager.
+* BFD_RELOC_8_PCREL: howto manager.
+* BFD_RELOC_8_PLT_PCREL: howto manager.
+* BFD_RELOC_8_PLTOFF: howto manager.
+* BFD_RELOC_ALPHA_CODEADDR: howto manager.
+* BFD_RELOC_ALPHA_ELF_LITERAL: howto manager.
+* BFD_RELOC_ALPHA_GPDISP: howto manager.
+* BFD_RELOC_ALPHA_GPDISP_HI16: howto manager.
+* BFD_RELOC_ALPHA_GPDISP_LO16: howto manager.
+* BFD_RELOC_ALPHA_HINT: howto manager.
+* BFD_RELOC_ALPHA_LINKAGE: howto manager.
+* BFD_RELOC_ALPHA_LITERAL: howto manager.
+* BFD_RELOC_ALPHA_LITUSE: howto manager.
+* BFD_RELOC_ALPHA_USER_GPDISP: howto manager.
+* BFD_RELOC_ALPHA_USER_GPRELHIGH: howto manager.
+* BFD_RELOC_ALPHA_USER_GPRELLOW: howto manager.
+* BFD_RELOC_ALPHA_USER_LITERAL: howto manager.
+* BFD_RELOC_ALPHA_USER_LITUSE_BASE: howto manager.
+* BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF: howto manager.
+* BFD_RELOC_ALPHA_USER_LITUSE_JSR: howto manager.
+* BFD_RELOC_ARC_B22_PCREL: howto manager.
+* BFD_RELOC_ARC_B26: howto manager.
+* BFD_RELOC_ARM_ADR_IMM: howto manager.
+* BFD_RELOC_ARM_ADRL_IMMEDIATE: howto manager.
+* BFD_RELOC_ARM_COPY: howto manager.
+* BFD_RELOC_ARM_CP_OFF_IMM: howto manager.
+* BFD_RELOC_ARM_GLOB_DAT: howto manager.
+* BFD_RELOC_ARM_GOT12: howto manager.
+* BFD_RELOC_ARM_GOT32: howto manager.
+* BFD_RELOC_ARM_GOTOFF: howto manager.
+* BFD_RELOC_ARM_GOTPC: howto manager.
+* BFD_RELOC_ARM_HWLITERAL: howto manager.
+* BFD_RELOC_ARM_IMMEDIATE: howto manager.
+* BFD_RELOC_ARM_IN_POOL: howto manager.
+* BFD_RELOC_ARM_JUMP_SLOT: howto manager.
+* BFD_RELOC_ARM_LDR_IMM: howto manager.
+* BFD_RELOC_ARM_LITERAL: howto manager.
+* BFD_RELOC_ARM_MULTI: howto manager.
+* BFD_RELOC_ARM_OFFSET_IMM: howto manager.
+* BFD_RELOC_ARM_OFFSET_IMM8: howto manager.
+* BFD_RELOC_ARM_PCREL_BRANCH: howto manager.
+* BFD_RELOC_ARM_PLT32: howto manager.
+* BFD_RELOC_ARM_RELATIVE: howto manager.
+* BFD_RELOC_ARM_SHIFT_IMM: howto manager.
+* BFD_RELOC_ARM_SWI: howto manager.
+* BFD_RELOC_ARM_THUMB_ADD: howto manager.
+* BFD_RELOC_ARM_THUMB_IMM: howto manager.
+* BFD_RELOC_ARM_THUMB_OFFSET: howto manager.
+* BFD_RELOC_ARM_THUMB_SHIFT: howto manager.
+* BFD_RELOC_AVR_13_PCREL: howto manager.
+* BFD_RELOC_AVR_16_PM: howto manager.
+* BFD_RELOC_AVR_7_PCREL: howto manager.
+* BFD_RELOC_AVR_CALL: howto manager.
+* BFD_RELOC_AVR_HH8_LDI: howto manager.
+* BFD_RELOC_AVR_HH8_LDI_NEG: howto manager.
+* BFD_RELOC_AVR_HH8_LDI_PM: howto manager.
+* BFD_RELOC_AVR_HH8_LDI_PM_NEG: howto manager.
+* BFD_RELOC_AVR_HI8_LDI: howto manager.
+* BFD_RELOC_AVR_HI8_LDI_NEG: howto manager.
+* BFD_RELOC_AVR_HI8_LDI_PM: howto manager.
+* BFD_RELOC_AVR_HI8_LDI_PM_NEG: howto manager.
+* BFD_RELOC_AVR_LO8_LDI: howto manager.
+* BFD_RELOC_AVR_LO8_LDI_NEG: howto manager.
+* BFD_RELOC_AVR_LO8_LDI_PM: howto manager.
+* BFD_RELOC_AVR_LO8_LDI_PM_NEG: howto manager.
+* bfd_reloc_code_type: howto manager.
+* BFD_RELOC_CTOR: howto manager.
+* BFD_RELOC_D10V_10_PCREL_L: howto manager.
+* BFD_RELOC_D10V_10_PCREL_R: howto manager.
+* BFD_RELOC_D10V_18: howto manager.
+* BFD_RELOC_D10V_18_PCREL: howto manager.
+* BFD_RELOC_D30V_15: howto manager.
+* BFD_RELOC_D30V_15_PCREL: howto manager.
+* BFD_RELOC_D30V_15_PCREL_R: howto manager.
+* BFD_RELOC_D30V_21: howto manager.
+* BFD_RELOC_D30V_21_PCREL: howto manager.
+* BFD_RELOC_D30V_21_PCREL_R: howto manager.
+* BFD_RELOC_D30V_32: howto manager.
+* BFD_RELOC_D30V_32_PCREL: howto manager.
+* BFD_RELOC_D30V_6: howto manager.
+* BFD_RELOC_D30V_9_PCREL: howto manager.
+* BFD_RELOC_D30V_9_PCREL_R: howto manager.
+* BFD_RELOC_FR30_10_IN_8: howto manager.
+* BFD_RELOC_FR30_12_PCREL: howto manager.
+* BFD_RELOC_FR30_20: howto manager.
+* BFD_RELOC_FR30_48: howto manager.
+* BFD_RELOC_FR30_6_IN_4: howto manager.
+* BFD_RELOC_FR30_8_IN_8: howto manager.
+* BFD_RELOC_FR30_9_IN_8: howto manager.
+* BFD_RELOC_FR30_9_PCREL: howto manager.
+* BFD_RELOC_GPREL16: howto manager.
+* BFD_RELOC_GPREL32: howto manager.
+* BFD_RELOC_HI16: howto manager.
+* BFD_RELOC_HI16_BASEREL: howto manager.
+* BFD_RELOC_HI16_GOTOFF: howto manager.
+* BFD_RELOC_HI16_PLTOFF: howto manager.
+* BFD_RELOC_HI16_S: howto manager.
+* BFD_RELOC_HI16_S_BASEREL: howto manager.
+* BFD_RELOC_HI16_S_GOTOFF: howto manager.
+* BFD_RELOC_HI16_S_PLTOFF: howto manager.
+* BFD_RELOC_HI22: howto manager.
+* BFD_RELOC_I370_D12: howto manager.
+* BFD_RELOC_I960_CALLJ: howto manager.
+* BFD_RELOC_LO10: howto manager.
+* BFD_RELOC_LO16: howto manager.
+* BFD_RELOC_LO16_BASEREL: howto manager.
+* BFD_RELOC_LO16_GOTOFF: howto manager.
+* BFD_RELOC_LO16_PLTOFF: howto manager.
+* BFD_RELOC_M32R_10_PCREL: howto manager.
+* BFD_RELOC_M32R_18_PCREL: howto manager.
+* BFD_RELOC_M32R_24: howto manager.
+* BFD_RELOC_M32R_26_PCREL: howto manager.
+* BFD_RELOC_M32R_HI16_SLO: howto manager.
+* BFD_RELOC_M32R_HI16_ULO: howto manager.
+* BFD_RELOC_M32R_LO16: howto manager.
+* BFD_RELOC_M32R_SDA16: howto manager.
+* BFD_RELOC_MCORE_PCREL_32: howto manager.
+* BFD_RELOC_MCORE_PCREL_IMM11BY2: howto manager.
+* BFD_RELOC_MCORE_PCREL_IMM4BY2: howto manager.
+* BFD_RELOC_MCORE_PCREL_IMM8BY4: howto manager.
+* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: howto manager.
+* BFD_RELOC_MCORE_RVA: howto manager.
+* BFD_RELOC_MIPS16_GPREL: howto manager.
+* BFD_RELOC_MIPS16_JMP: howto manager.
+* BFD_RELOC_MIPS_CALL16: howto manager.
+* BFD_RELOC_MIPS_CALL_HI16: howto manager.
+* BFD_RELOC_MIPS_CALL_LO16: howto manager.
+* BFD_RELOC_MIPS_GOT16: howto manager.
+* BFD_RELOC_MIPS_GOT_DISP: howto manager.
+* BFD_RELOC_MIPS_GOT_HI16: howto manager.
+* BFD_RELOC_MIPS_GOT_LO16: howto manager.
+* BFD_RELOC_MIPS_GOT_OFST: howto manager.
+* BFD_RELOC_MIPS_GOT_PAGE: howto manager.
+* BFD_RELOC_MIPS_GPREL: howto manager.
+* BFD_RELOC_MIPS_GPREL32: howto manager.
+* BFD_RELOC_MIPS_JMP: howto manager.
+* BFD_RELOC_MIPS_LITERAL: howto manager.
+* BFD_RELOC_MIPS_SUB: howto manager.
+* BFD_RELOC_MN10300_16_PCREL: howto manager.
+* BFD_RELOC_MN10300_32_PCREL: howto manager.
+* BFD_RELOC_NONE: howto manager.
+* BFD_RELOC_NS32K_DISP_16: howto manager.
+* BFD_RELOC_NS32K_DISP_16_PCREL: howto manager.
+* BFD_RELOC_NS32K_DISP_32: howto manager.
+* BFD_RELOC_NS32K_DISP_32_PCREL: howto manager.
+* BFD_RELOC_NS32K_DISP_8: howto manager.
+* BFD_RELOC_NS32K_DISP_8_PCREL: howto manager.
+* BFD_RELOC_NS32K_IMM_16: howto manager.
+* BFD_RELOC_NS32K_IMM_16_PCREL: howto manager.
+* BFD_RELOC_NS32K_IMM_32: howto manager.
+* BFD_RELOC_NS32K_IMM_32_PCREL: howto manager.
+* BFD_RELOC_NS32K_IMM_8: howto manager.
+* BFD_RELOC_NS32K_IMM_8_PCREL: howto manager.
+* BFD_RELOC_PCREL_HI16_S: howto manager.
+* BFD_RELOC_PCREL_LO16: howto manager.
+* BFD_RELOC_PJ_CODE_DIR16: howto manager.
+* BFD_RELOC_PJ_CODE_DIR32: howto manager.
+* BFD_RELOC_PJ_CODE_HI16: howto manager.
+* BFD_RELOC_PJ_CODE_LO16: howto manager.
+* BFD_RELOC_PJ_CODE_REL16: howto manager.
+* BFD_RELOC_PJ_CODE_REL32: howto manager.
+* BFD_RELOC_PPC_B16: howto manager.
+* BFD_RELOC_PPC_B16_BRNTAKEN: howto manager.
+* BFD_RELOC_PPC_B16_BRTAKEN: howto manager.
+* BFD_RELOC_PPC_B26: howto manager.
+* BFD_RELOC_PPC_BA16: howto manager.
+* BFD_RELOC_PPC_BA16_BRNTAKEN: howto manager.
+* BFD_RELOC_PPC_BA16_BRTAKEN: howto manager.
+* BFD_RELOC_PPC_BA26: howto manager.
+* BFD_RELOC_PPC_COPY: howto manager.
+* BFD_RELOC_PPC_EMB_BIT_FLD: howto manager.
+* BFD_RELOC_PPC_EMB_MRKREF: howto manager.
+* BFD_RELOC_PPC_EMB_NADDR16: howto manager.
+* BFD_RELOC_PPC_EMB_NADDR16_HA: howto manager.
+* BFD_RELOC_PPC_EMB_NADDR16_HI: howto manager.
+* BFD_RELOC_PPC_EMB_NADDR16_LO: howto manager.
+* BFD_RELOC_PPC_EMB_NADDR32: howto manager.
+* BFD_RELOC_PPC_EMB_RELSDA: howto manager.
+* BFD_RELOC_PPC_EMB_RELSEC16: howto manager.
+* BFD_RELOC_PPC_EMB_RELST_HA: howto manager.
+* BFD_RELOC_PPC_EMB_RELST_HI: howto manager.
+* BFD_RELOC_PPC_EMB_RELST_LO: howto manager.
+* BFD_RELOC_PPC_EMB_SDA21: howto manager.
+* BFD_RELOC_PPC_EMB_SDA2I16: howto manager.
+* BFD_RELOC_PPC_EMB_SDA2REL: howto manager.
+* BFD_RELOC_PPC_EMB_SDAI16: howto manager.
+* BFD_RELOC_PPC_GLOB_DAT: howto manager.
+* BFD_RELOC_PPC_JMP_SLOT: howto manager.
+* BFD_RELOC_PPC_LOCAL24PC: howto manager.
+* BFD_RELOC_PPC_RELATIVE: howto manager.
+* BFD_RELOC_PPC_TOC16: howto manager.
+* BFD_RELOC_RVA: howto manager.
+* BFD_RELOC_SH_ALIGN: howto manager.
+* BFD_RELOC_SH_CODE: howto manager.
+* BFD_RELOC_SH_COUNT: howto manager.
+* BFD_RELOC_SH_DATA: howto manager.
+* BFD_RELOC_SH_IMM4: howto manager.
+* BFD_RELOC_SH_IMM4BY2: howto manager.
+* BFD_RELOC_SH_IMM4BY4: howto manager.
+* BFD_RELOC_SH_IMM8: howto manager.
+* BFD_RELOC_SH_IMM8BY2: howto manager.
+* BFD_RELOC_SH_IMM8BY4: howto manager.
+* BFD_RELOC_SH_LABEL: howto manager.
+* BFD_RELOC_SH_PCDISP12BY2: howto manager.
+* BFD_RELOC_SH_PCDISP8BY2: howto manager.
+* BFD_RELOC_SH_PCRELIMM8BY2: howto manager.
+* BFD_RELOC_SH_PCRELIMM8BY4: howto manager.
+* BFD_RELOC_SH_SWITCH16: howto manager.
+* BFD_RELOC_SH_SWITCH32: howto manager.
+* BFD_RELOC_SH_USES: howto manager.
+* BFD_RELOC_SPARC13: howto manager.
+* BFD_RELOC_SPARC22: howto manager.
+* BFD_RELOC_SPARC_10: howto manager.
+* BFD_RELOC_SPARC_11: howto manager.
+* BFD_RELOC_SPARC_5: howto manager.
+* BFD_RELOC_SPARC_6: howto manager.
+* BFD_RELOC_SPARC_64: howto manager.
+* BFD_RELOC_SPARC_7: howto manager.
+* BFD_RELOC_SPARC_BASE13: howto manager.
+* BFD_RELOC_SPARC_BASE22: howto manager.
+* BFD_RELOC_SPARC_COPY: howto manager.
+* BFD_RELOC_SPARC_DISP64: howto manager.
+* BFD_RELOC_SPARC_GLOB_DAT: howto manager.
+* BFD_RELOC_SPARC_GOT10: howto manager.
+* BFD_RELOC_SPARC_GOT13: howto manager.
+* BFD_RELOC_SPARC_GOT22: howto manager.
+* BFD_RELOC_SPARC_H44: howto manager.
+* BFD_RELOC_SPARC_HH22: howto manager.
+* BFD_RELOC_SPARC_HIX22: howto manager.
+* BFD_RELOC_SPARC_HM10: howto manager.
+* BFD_RELOC_SPARC_JMP_SLOT: howto manager.
+* BFD_RELOC_SPARC_L44: howto manager.
+* BFD_RELOC_SPARC_LM22: howto manager.
+* BFD_RELOC_SPARC_LOX10: howto manager.
+* BFD_RELOC_SPARC_M44: howto manager.
+* BFD_RELOC_SPARC_OLO10: howto manager.
+* BFD_RELOC_SPARC_PC10: howto manager.
+* BFD_RELOC_SPARC_PC22: howto manager.
+* BFD_RELOC_SPARC_PC_HH22: howto manager.
+* BFD_RELOC_SPARC_PC_HM10: howto manager.
+* BFD_RELOC_SPARC_PC_LM22: howto manager.
+* BFD_RELOC_SPARC_PLT64: howto manager.
+* BFD_RELOC_SPARC_REGISTER: howto manager.
+* BFD_RELOC_SPARC_RELATIVE: howto manager.
+* BFD_RELOC_SPARC_REV32: howto manager.
+* BFD_RELOC_SPARC_UA32: howto manager.
+* BFD_RELOC_SPARC_WDISP16: howto manager.
+* BFD_RELOC_SPARC_WDISP19: howto manager.
+* BFD_RELOC_SPARC_WDISP22: howto manager.
+* BFD_RELOC_SPARC_WPLT30: howto manager.
+* BFD_RELOC_THUMB_PCREL_BRANCH12: howto manager.
+* BFD_RELOC_THUMB_PCREL_BRANCH23: howto manager.
+* BFD_RELOC_THUMB_PCREL_BRANCH9: howto manager.
+* BFD_RELOC_TIC30_LDP: howto manager.
+* bfd_reloc_type_lookup: howto manager.
+* BFD_RELOC_V850_22_PCREL: howto manager.
+* BFD_RELOC_V850_9_PCREL: howto manager.
+* BFD_RELOC_V850_CALLT_16_16_OFFSET: howto manager.
+* BFD_RELOC_V850_CALLT_6_7_OFFSET: howto manager.
+* BFD_RELOC_V850_SDA_15_16_OFFSET: howto manager.
+* BFD_RELOC_V850_SDA_16_16_OFFSET: howto manager.
+* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager.
+* BFD_RELOC_V850_TDA_16_16_OFFSET: howto manager.
+* BFD_RELOC_V850_TDA_4_4_OFFSET: howto manager.
+* BFD_RELOC_V850_TDA_4_5_OFFSET: howto manager.
+* BFD_RELOC_V850_TDA_6_8_OFFSET: howto manager.
+* BFD_RELOC_V850_TDA_7_7_OFFSET: howto manager.
+* BFD_RELOC_V850_TDA_7_8_OFFSET: howto manager.
+* BFD_RELOC_V850_ZDA_15_16_OFFSET: howto manager.
+* BFD_RELOC_V850_ZDA_16_16_OFFSET: howto manager.
+* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager.
+* BFD_RELOC_VTABLE_ENTRY: howto manager.
+* BFD_RELOC_VTABLE_INHERIT: howto manager.
+* bfd_scan_arch: Architectures.
+* bfd_scan_vma: BFD front end.
+* bfd_seach_for_target: bfd_target.
+* bfd_set_arch_info: Architectures.
+* bfd_set_archive_head: Archives.
+* bfd_set_default_target: bfd_target.
+* bfd_set_error: BFD front end.
+* bfd_set_error_handler: BFD front end.
+* bfd_set_error_program_name: BFD front end.
+* bfd_set_file_flags: BFD front end.
+* bfd_set_format: Formats.
+* bfd_set_gp_size: BFD front end.
+* bfd_set_private_flags: BFD front end.
+* bfd_set_reloc: BFD front end.
+* bfd_set_section_contents: section prototypes.
+* bfd_set_section_flags: section prototypes.
+* bfd_set_section_size: section prototypes.
+* bfd_set_start_address: BFD front end.
+* bfd_set_symtab: symbol handling functions.
+* bfd_symbol_info: symbol handling functions.
+* bfd_target_list: bfd_target.
+* bfd_write_bigendian_4byte_int: Internal.
+* coff_symbol_type: coff.
+* core_file_matches_executable_p: Core Files.
+* Hash tables: Hash Tables.
+* internal object-file format: Canonical format.
+* Linker: Linker Functions.
+* stuff: BFD front end.
+* target vector (_bfd_final_link): Performing the Final Link.
+* target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
+* target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
+* The HOWTO Macro: typedef arelent.
+* what is it?: Overview.
+
+
diff --git a/gnu/usr.bin/binutils/bfd/elf-hppa.h b/gnu/usr.bin/binutils/bfd/elf-hppa.h
index b55e1c4e5bc..000ffea3c75 100644
--- a/gnu/usr.bin/binutils/bfd/elf-hppa.h
+++ b/gnu/usr.bin/binutils/bfd/elf-hppa.h
@@ -1079,7 +1079,8 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
}
/* Allow undefined symbols in shared libraries. */
- else if (info->shared && !info->no_undefined)
+ else if (info->shared && !info->no_undefined
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
{
if (info->symbolic)
(*info->callbacks->undefined_symbol)
diff --git a/gnu/usr.bin/binutils/bfd/elf32-mcore.c b/gnu/usr.bin/binutils/bfd/elf32-mcore.c
index 5963a9eff6e..edc6f678c22 100644
--- a/gnu/usr.bin/binutils/bfd/elf32-mcore.c
+++ b/gnu/usr.bin/binutils/bfd/elf32-mcore.c
@@ -532,7 +532,8 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared)
+ else if (info->shared
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
{
diff --git a/gnu/usr.bin/binutils/binutils/binutils.info-3 b/gnu/usr.bin/binutils/binutils/binutils.info-3
new file mode 100644
index 00000000000..4de1e8e001a
--- /dev/null
+++ b/gnu/usr.bin/binutils/binutils/binutils.info-3
@@ -0,0 +1,182 @@
+This is binutils.info, produced by makeinfo version 4.0 from
+binutils.texi.
+
+START-INFO-DIR-ENTRY
+* Binutils: (binutils). The GNU binary utilities.
+* ar: (binutils)ar. Create, modify, and extract from archives
+* nm: (binutils)nm. List symbols from object files
+* objcopy: (binutils)objcopy. Copy and translate object files
+* objdump: (binutils)objdump. Display information from object files
+* ranlib: (binutils)ranlib. Generate index to archive contents
+* readelf: (binutils)readelf. Display the contents of ELF format files.
+* size: (binutils)size. List section sizes and total size
+* strings: (binutils)strings. List printable strings from files
+* strip: (binutils)strip. Discard symbols
+* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols
+* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt
+* addr2line: (binutils)addr2line. Convert addresses to file and line
+* nlmconv: (binutils)nlmconv. Converts object code into an NLM
+* windres: (binutils)windres. Manipulate Windows resources
+* dlltool: (binutils)dlltool. Create files needed to build and use DLLs
+END-INFO-DIR-ENTRY
+
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free
+Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided also
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: binutils.info, Node: Index, Prev: Reporting Bugs, Up: Top
+
+Index
+*****
+
+* Menu:
+
+* .stab: objdump.
+* addr2line: addr2line.
+* address to file name and line number: addr2line.
+* all header information, object file: objdump.
+* ar: ar.
+* ar compatibility: ar.
+* architecture: objdump.
+* architectures available: objdump.
+* archive contents: ranlib.
+* archive headers: objdump.
+* archives: ar.
+* base files: dlltool.
+* bug criteria: Bug Criteria.
+* bug reports: Bug Reporting.
+* bugs: Reporting Bugs.
+* bugs, reporting: Bug Reporting.
+* c++filt: c++filt.
+* changing object addresses: objcopy.
+* changing section address: objcopy.
+* changing section LMA: objcopy.
+* changing section VMA: objcopy.
+* changing start address: objcopy.
+* collections of files: ar.
+* compatibility, ar: ar.
+* contents of archive: ar cmdline.
+* crash: Bug Criteria.
+* creating archives: ar cmdline.
+* cxxfilt: c++filt.
+* dates in archive: ar cmdline.
+* debug symbols: objdump.
+* debugging symbols: nm.
+* deleting from archive: ar cmdline.
+* demangling C++ symbols: c++filt.
+* demangling in nm: nm.
+* demangling in objdump <1>: addr2line.
+* demangling in objdump: objdump.
+* disassembling object code: objdump.
+* disassembly architecture: objdump.
+* disassembly endianness: objdump.
+* disassembly, with source: objdump.
+* discarding symbols: strip.
+* DLL: dlltool.
+* dlltool: dlltool.
+* dynamic relocation entries, in object file: objdump.
+* dynamic symbol table entries, printing: objdump.
+* dynamic symbols: nm.
+* ELF core notes: readelf.
+* ELF dynamic section information: readelf.
+* ELF file header information: readelf.
+* ELF file information: readelf.
+* ELF object file format: objdump.
+* ELF program header information: readelf.
+* ELF reloc information: readelf.
+* ELF section information: readelf.
+* ELF segment information: readelf.
+* ELF symbol table information: readelf.
+* ELF version sections informations: readelf.
+* endianness: objdump.
+* error on valid input: Bug Criteria.
+* external symbols: nm.
+* extract from archive: ar cmdline.
+* fatal signal: Bug Criteria.
+* file name: nm.
+* header information, all: objdump.
+* input .def file: dlltool.
+* input file name: nm.
+* libraries: ar.
+* listings strings: strings.
+* machine instructions: objdump.
+* moving in archive: ar cmdline.
+* MRI compatibility, ar: ar scripts.
+* name duplication in archive: ar cmdline.
+* name length: ar.
+* nm: nm.
+* nm compatibility: nm.
+* nm format: nm.
+* not writing archive index: ar cmdline.
+* objdump: objdump.
+* object code format <1>: addr2line.
+* object code format <2>: strings.
+* object code format <3>: size.
+* object code format <4>: objdump.
+* object code format: nm.
+* object file header: objdump.
+* object file information: objdump.
+* object file sections: objdump.
+* object formats available: objdump.
+* operations on archive: ar cmdline.
+* printing from archive: ar cmdline.
+* printing strings: strings.
+* quick append to archive: ar cmdline.
+* radix for section sizes: size.
+* ranlib: ranlib.
+* readelf: readelf.
+* relative placement in archive: ar cmdline.
+* relocation entries, in object file: objdump.
+* removing symbols: strip.
+* repeated names in archive: ar cmdline.
+* replacement in archive: ar cmdline.
+* reporting bugs: Reporting Bugs.
+* scripts, ar: ar scripts.
+* section addresses in objdump: objdump.
+* section headers: objdump.
+* section information: objdump.
+* section sizes: size.
+* sections, full contents: objdump.
+* size: size.
+* size display format: size.
+* size number format: size.
+* sorting symbols: nm.
+* source code context: objdump.
+* source disassembly: objdump.
+* source file name: nm.
+* source filenames for object files: objdump.
+* stab: objdump.
+* start-address: objdump.
+* stop-address: objdump.
+* strings: strings.
+* strings, printing: strings.
+* strip: strip.
+* symbol index <1>: ranlib.
+* symbol index: ar.
+* symbol index, listing: nm.
+* symbol line numbers: nm.
+* symbol table entries, printing: objdump.
+* symbols: nm.
+* symbols, discarding: strip.
+* undefined symbols: nm.
+* Unix compatibility, ar: ar cmdline.
+* updating an archive: ar cmdline.
+* version: Top.
+* VMA in objdump: objdump.
+* wide output, printing: objdump.
+* writing archive index: ar cmdline.
+
+
diff --git a/gnu/usr.bin/binutils/etc/configbuild.ein b/gnu/usr.bin/binutils/etc/configbuild.ein
new file mode 100644
index 00000000000..7a0e214f2d5
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configbuild.ein
@@ -0,0 +1,149 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: configbuild.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Jun 12 20:13:16 1998
+%%For: ian@tito.cygnus.com (Ian Lance Taylor)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 322 173
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-62.0 226.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1050 900 m 2100 900 l 2100 1425 l 1050 1425 l clp gs col-1 s gr
+% Polyline
+n 1500 1425 m 1500 2100 l gs col-1 s gr
+n 1530.00 1980.00 m 1500.00 2100.00 l 1470.00 1980.00 l 1500.50 1980.50 l 1530.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1500 2625 m 1500 3300 l gs col-1 s gr
+n 1530.00 3180.00 m 1500.00 3300.00 l 1470.00 3180.00 l 1500.50 3180.50 l 1530.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2925 900 m 3825 900 l 3825 1425 l 2925 1425 l clp gs col-1 s gr
+% Polyline
+n 1155 2100 m 1050 2100 1050 2520 105 arcto 4 {pop} repeat 1050 2625 2220 2625 105 arcto 4 {pop} repeat 2325 2625 2325 2205 105 arcto 4 {pop} repeat 2325 2100 1155 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 2850 2100 m 4125 2100 l 4125 2625 l 2850 2625 l clp gs col-1 s gr
+% Polyline
+n 3375 1425 m 3375 2100 l gs col-1 s gr
+n 3405.00 1980.00 m 3375.00 2100.00 l 3345.00 1980.00 l 3375.50 1980.50 l 3405.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 5100 900 m 6300 900 l 6300 1350 l 5100 1350 l clp gs col-1 s gr
+% Polyline
+n 5625 1350 m 5625 2100 l gs col-1 s gr
+n 5655.00 1980.00 m 5625.00 2100.00 l 5595.00 1980.00 l 5625.50 1980.50 l 5655.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 5205 2100 m 5100 2100 5100 2520 105 arcto 4 {pop} repeat 5100 2625 6270 2625 105 arcto 4 {pop} repeat 6375 2625 6375 2205 105 arcto 4 {pop} repeat 6375 2100 5205 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 5625 2625 m 5625 3300 l gs col-1 s gr
+n 5655.00 3180.00 m 5625.00 3300.00 l 5595.00 3180.00 l 5625.50 3180.50 l 5655.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 5100 3300 m 6225 3300 l 6225 3750 l 5100 3750 l clp gs col-1 s gr
+% Polyline
+ [1 50.0] 50.000000 setdash
+n 2850 2400 m 2325 2400 l gs col-1 s gr [] 0 setdash
+n 2445.00 2430.00 m 2325.00 2400.00 l 2445.00 2370.00 l 2445.50 2400.50 l 2445.00 2430.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+ [1 50.0] 50.000000 setdash
+n 4125 2400 m 5100 2400 l gs col-1 s gr [] 0 setdash
+n 4980.00 2370.00 m 5100.00 2400.00 l 4980.00 2430.00 l 4980.50 2400.50 l 4980.00 2370.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 3300 m 1950 3300 l 1950 3750 l 1050 3750 l clp gs col-1 s gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 1200 m
+gs 1 -1 sc (config.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (configure) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 2400 m
+gs 1 -1 sc (config.status) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 2400 m
+gs 1 -1 sc (config.status) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 3600 m
+gs 1 -1 sc (config.h) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5250 1200 m
+gs 1 -1 sc (Makefile.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5250 2400 m
+gs 1 -1 sc (config.status) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5250 3600 m
+gs 1 -1 sc (Makefile) col-1 show gr
+$F2psEnd
+restore
diff --git a/gnu/usr.bin/binutils/etc/configbuild.fig b/gnu/usr.bin/binutils/etc/configbuild.fig
new file mode 100644
index 00000000000..747592d3d62
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configbuild.fig
@@ -0,0 +1,50 @@
+#FIG 3.1
+Portrait
+Center
+Inches
+1200 2
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 900 2100 900 2100 1425 1050 1425 1050 900
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 1425 1500 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 2625 1500 3300
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2925 900 3825 900 3825 1425 2925 1425 2925 900
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2325 2625 2325 2100 1050 2100 1050 2625 2325 2625
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2850 2100 4125 2100 4125 2625 2850 2625 2850 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3375 1425 3375 2100
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5100 900 6300 900 6300 1350 5100 1350 5100 900
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 1350 5625 2100
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 6375 2625 6375 2100 5100 2100 5100 2625 6375 2625
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 2625 5625 3300
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5100 3300 6225 3300 6225 3750 5100 3750 5100 3300
+2 1 2 1 -1 7 0 0 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 2850 2400 2325 2400
+2 1 2 1 -1 7 0 0 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4125 2400 5100 2400
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 3300 1950 3300 1950 3750 1050 3750 1050 3300
+4 0 -1 0 0 0 12 0.0000000 4 180 645 1200 1200 config.in\001
+4 0 -1 0 0 0 12 0.0000000 4 180 705 3000 1200 configure\001
+4 0 -1 0 0 0 12 0.0000000 4 180 990 3000 2400 config.status\001
+4 0 -1 0 0 0 12 0.0000000 4 180 990 1200 2400 config.status\001
+4 0 -1 0 0 0 12 0.0000000 4 180 600 1200 3600 config.h\001
+4 0 -1 0 0 0 12 0.0000000 4 135 855 5250 1200 Makefile.in\001
+4 0 -1 0 0 0 12 0.0000000 4 180 990 5250 2400 config.status\001
+4 0 -1 0 0 0 12 0.0000000 4 135 675 5250 3600 Makefile\001
diff --git a/gnu/usr.bin/binutils/etc/configbuild.jin b/gnu/usr.bin/binutils/etc/configbuild.jin
new file mode 100644
index 00000000000..44cd9397aa1
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configbuild.jin
Binary files differ
diff --git a/gnu/usr.bin/binutils/etc/configbuild.tin b/gnu/usr.bin/binutils/etc/configbuild.tin
new file mode 100644
index 00000000000..cfdd6fe0743
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configbuild.tin
@@ -0,0 +1,9 @@
+ config.in *configure* Makefile.in
+ | | |
+ | v |
+ | config.status |
+ | | |
+ *config.status*<======+==========>*config.status*
+ | |
+ v v
+ config.h Makefile
diff --git a/gnu/usr.bin/binutils/etc/configdev.ein b/gnu/usr.bin/binutils/etc/configdev.ein
new file mode 100644
index 00000000000..7f837850d69
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configdev.ein
@@ -0,0 +1,185 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: configdev.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Mon Jun 15 17:35:19 1998
+%%For: ian@tito.cygnus.com (Ian Lance Taylor)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 344 317
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-62.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1050 900 m 2100 900 l 2100 1425 l 1050 1425 l clp gs col-1 s gr
+% Polyline
+n 2925 900 m 3975 900 l 3975 1425 l 2925 1425 l clp gs col-1 s gr
+% Polyline
+n 5550 900 m 6750 900 l 6750 1350 l 5550 1350 l clp gs col-1 s gr
+% Polyline
+n 3750 1800 m 5025 1800 l 5025 2250 l 3750 2250 l clp gs col-1 s gr
+% Polyline
+n 1155 2100 m 1050 2100 1050 2520 105 arcto 4 {pop} repeat 1050 2625 2070 2625 105 arcto 4 {pop} repeat 2175 2625 2175 2205 105 arcto 4 {pop} repeat 2175 2100 1155 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 5550 3300 m 6675 3300 l 6675 3750 l 5550 3750 l clp gs col-1 s gr
+% Polyline
+n 5655 2100 m 5550 2100 5550 2520 105 arcto 4 {pop} repeat 5550 2625 6495 2625 105 arcto 4 {pop} repeat 6600 2625 6600 2205 105 arcto 4 {pop} repeat 6600 2100 5655 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 3750 3600 m 4875 3600 l 4875 4050 l 3750 4050 l clp gs col-1 s gr
+% Polyline
+n 3855 2700 m 3750 2700 3750 3045 105 arcto 4 {pop} repeat 3750 3150 4545 3150 105 arcto 4 {pop} repeat 4650 3150 4650 2805 105 arcto 4 {pop} repeat 4650 2700 3855 2700 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 2850 5700 m 3750 5700 l 3750 6150 l 2850 6150 l clp gs col-1 s gr
+% Polyline
+n 3030 4800 m 2925 4800 2925 5145 105 arcto 4 {pop} repeat 2925 5250 3645 5250 105 arcto 4 {pop} repeat 3750 5250 3750 4905 105 arcto 4 {pop} repeat 3750 4800 3030 4800 105 arcto 4 {pop} repeat clp gs col-1 s gr
+% Polyline
+n 1500 1425 m 1500 2100 l gs col-1 s gr
+n 1530.00 1980.00 m 1500.00 2100.00 l 1470.00 1980.00 l 1500.50 1980.50 l 1530.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 1425 m 3300 4800 l gs col-1 s gr
+n 3330.00 4680.00 m 3300.00 4800.00 l 3270.00 4680.00 l 3300.50 4680.50 l 3330.00 4680.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 1575 m 1875 1575 l 1875 2100 l gs col-1 s gr
+n 1905.00 1980.00 m 1875.00 2100.00 l 1845.00 1980.00 l 1875.50 1980.50 l 1905.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 1575 m 5700 1575 l 5700 2100 l gs col-1 s gr
+n 5730.00 1980.00 m 5700.00 2100.00 l 5670.00 1980.00 l 5700.50 1980.50 l 5730.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 6225 1350 m 6225 2100 l gs col-1 s gr
+n 6255.00 1980.00 m 6225.00 2100.00 l 6195.00 1980.00 l 6225.50 1980.50 l 6255.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 6075 2625 m 6075 3300 l gs col-1 s gr
+n 6105.00 3180.00 m 6075.00 3300.00 l 6045.00 3180.00 l 6075.50 3180.50 l 6105.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 4200 2250 m 4200 2700 l gs col-1 s gr
+n 4230.00 2580.00 m 4200.00 2700.00 l 4170.00 2580.00 l 4200.50 2580.50 l 4230.00 2580.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 4200 3150 m 4200 3600 l gs col-1 s gr
+n 4230.00 3480.00 m 4200.00 3600.00 l 4170.00 3480.00 l 4200.50 3480.50 l 4230.00 3480.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 4200 4050 m 4200 4500 l 3675 4500 l 3675 4800 l gs col-1 s gr
+n 3705.00 4680.00 m 3675.00 4800.00 l 3645.00 4680.00 l 3675.50 4680.50 l 3705.00 4680.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3375 5250 m 3375 5700 l gs col-1 s gr
+n 3405.00 5580.00 m 3375.00 5700.00 l 3345.00 5580.00 l 3375.50 5580.50 l 3405.00 5580.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 3300 2925 m 3750 2925 l gs col-1 s gr
+n 3630.00 2895.00 m 3750.00 2925.00 l 3630.00 2955.00 l 3630.50 2925.50 l 3630.00 2895.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1500 2625 m 1500 3300 l gs col-1 s gr
+n 1530.00 3180.00 m 1500.00 3300.00 l 1470.00 3180.00 l 1500.50 3180.50 l 1530.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 3300 m 2100 3300 l 2100 3750 l 1050 3750 l clp gs col-1 s gr
+% Polyline
+n 4875 3825 m 5250 3825 l 5250 2400 l 5550 2400 l gs col-1 s gr
+n 5430.00 2370.00 m 5550.00 2400.00 l 5430.00 2430.00 l 5430.50 2400.50 l 5430.00 2370.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 1200 m
+gs 1 -1 sc (acconfig.h) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (configure.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5700 1200 m
+gs 1 -1 sc (Makefile.am) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3900 2100 m
+gs 1 -1 sc (acinclude.m4) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 2400 m
+gs 1 -1 sc (autoheader) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+1200 3600 m
+gs 1 -1 sc (config.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5700 3600 m
+gs 1 -1 sc (Makefile.in) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+5700 2400 m
+gs 1 -1 sc (automake) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3900 3900 m
+gs 1 -1 sc (aclocal.m4) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3900 3000 m
+gs 1 -1 sc (aclocal) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 6000 m
+gs 1 -1 sc (configure) col-1 show gr
+/Times-Roman findfont 180.00 scalefont setfont
+3000 5100 m
+gs 1 -1 sc (autoconf) col-1 show gr
+$F2psEnd
+restore
diff --git a/gnu/usr.bin/binutils/etc/configdev.fig b/gnu/usr.bin/binutils/etc/configdev.fig
new file mode 100644
index 00000000000..4d386ec4ff7
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configdev.fig
@@ -0,0 +1,80 @@
+#FIG 3.1
+Portrait
+Center
+Inches
+1200 2
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 900 2100 900 2100 1425 1050 1425 1050 900
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2925 900 3975 900 3975 1425 2925 1425 2925 900
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5550 900 6750 900 6750 1350 5550 1350 5550 900
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 3750 1800 5025 1800 5025 2250 3750 2250 3750 1800
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2175 2625 2175 2100 1050 2100 1050 2625 2175 2625
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 5550 3300 6675 3300 6675 3750 5550 3750 5550 3300
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 6600 2625 6600 2100 5550 2100 5550 2625 6600 2625
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 3750 3600 4875 3600 4875 4050 3750 4050 3750 3600
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 4650 3150 4650 2700 3750 2700 3750 3150 4650 3150
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 2850 5700 3750 5700 3750 6150 2850 6150 2850 5700
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 3750 5250 3750 4800 2925 4800 2925 5250 3750 5250
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 1425 1500 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3300 1425 3300 4800
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 3300 1575 1875 1575 1875 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 3300 1575 5700 1575 5700 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6225 1350 6225 2100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6075 2625 6075 3300
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4200 2250 4200 2700
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4200 3150 4200 3600
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
+ 1 1 1.00 60.00 120.00
+ 4200 4050 4200 4500 3675 4500 3675 4800
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3375 5250 3375 5700
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3300 2925 3750 2925
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 1500 2625 1500 3300
+2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
+ 1050 3300 2100 3300 2100 3750 1050 3750 1050 3300
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
+ 1 1 1.00 60.00 120.00
+ 4875 3825 5250 3825 5250 2400 5550 2400
+4 0 -1 0 0 0 12 0.0000000 4 180 780 1200 1200 acconfig.h\001
+4 0 -1 0 0 0 12 0.0000000 4 180 885 3000 1200 configure.in\001
+4 0 -1 0 0 0 12 0.0000000 4 135 945 5700 1200 Makefile.am\001
+4 0 -1 0 0 0 12 0.0000000 4 135 990 3900 2100 acinclude.m4\001
+4 0 -1 0 0 0 12 0.0000000 4 135 840 1200 2400 autoheader\001
+4 0 -1 0 0 0 12 0.0000000 4 180 645 1200 3600 config.in\001
+4 0 -1 0 0 0 12 0.0000000 4 135 855 5700 3600 Makefile.in\001
+4 0 -1 0 0 0 12 0.0000000 4 135 735 5700 2400 automake\001
+4 0 -1 0 0 0 12 0.0000000 4 135 810 3900 3900 aclocal.m4\001
+4 0 -1 0 0 0 12 0.0000000 4 135 540 3900 3000 aclocal\001
+4 0 -1 0 0 0 12 0.0000000 4 180 705 3000 6000 configure\001
+4 0 -1 0 0 0 12 0.0000000 4 135 660 3000 5100 autoconf\001
diff --git a/gnu/usr.bin/binutils/etc/configdev.jin b/gnu/usr.bin/binutils/etc/configdev.jin
new file mode 100644
index 00000000000..9b11a71acd7
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configdev.jin
Binary files differ
diff --git a/gnu/usr.bin/binutils/etc/configdev.tin b/gnu/usr.bin/binutils/etc/configdev.tin
new file mode 100644
index 00000000000..c9b6f34f4d7
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configdev.tin
@@ -0,0 +1,17 @@
+ acconfig.h configure.in Makefile.am
+ | | |
+ | --------------+---------------------- |
+ | | | | |
+ v v | acinclude.m4 | |
+ *autoheader* | | v v
+ | | v --->*automake*
+ v |--->*aclocal* | |
+ config.in | | | v
+ | v | Makefile.in
+ | aclocal.m4---
+ | |
+ v v
+ *autoconf*
+ |
+ v
+ configure
diff --git a/gnu/usr.bin/binutils/etc/configure.info-3 b/gnu/usr.bin/binutils/etc/configure.info-3
new file mode 100644
index 00000000000..bf1dcc076b1
--- /dev/null
+++ b/gnu/usr.bin/binutils/etc/configure.info-3
@@ -0,0 +1,285 @@
+This is configure.info, produced by makeinfo version 4.0 from
+./configure.texi.
+
+INFO-DIR-SECTION GNU admin
+START-INFO-DIR-ENTRY
+* configure: (configure). The GNU configure and build system
+END-INFO-DIR-ENTRY
+
+ This file documents the GNU configure and build system.
+
+ Copyright (C) 1998 Cygnus Solutions.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Foundation.
+
+
+File: configure.info, Node: Multilibs in Target Libraries, Prev: Multilibs in gcc, Up: Multilibs
+
+Multilibs in Target Libraries
+=============================
+
+ The target libraries in the Cygnus tree are automatically built with
+multilibs. That means that each library is built multiple times.
+
+ This default is set in the top level `configure.in' file, by adding
+`--enable-multilib' to the list of arguments passed to configure when
+it is run for the target libraries (*note Host and Target Libraries::).
+
+ Each target library uses the shell script `config-ml.in', written by
+Doug Evans, to prepare to build target libraries. This shell script is
+invoked after the `Makefile' has been created by the `configure'
+script. If multilibs are not enabled, it does nothing, otherwise it
+modifies the `Makefile' to support multilibs.
+
+ The `config-ml.in' script makes one copy of the `Makefile' for each
+multilib in the appropriate subdirectory. When configuring in the
+source directory (which is not recommended), it will build a symlink
+tree of the sources in each subdirectory.
+
+ The `config-ml.in' script sets several variables in the various
+`Makefile's. The `Makefile.in' must have definitions for these
+variables already; `config-ml.in' simply changes the existing values.
+The `Makefile' should use default values for these variables which will
+do the right thing in the subdirectories.
+
+`MULTISRCTOP'
+ `config-ml.in' will set this to a sequence of `../' strings, where
+ the number of strings is the number of multilib levels in the
+ source tree. The default value should be the empty string.
+
+`MULTIBUILDTOP'
+ `config-ml.in' will set this to a sequence of `../' strings, where
+ the number of strings is number of multilib levels in the object
+ directory. The default value should be the empty string. This
+ will differ from `MULTISRCTOP' when configuring in the source tree
+ (which is not recommended).
+
+`MULTIDIRS'
+ In the top level `Makefile' only, `config-ml.in' will set this to
+ the list of multilib subdirectories. The default value should be
+ the empty string.
+
+`MULTISUBDIR'
+ `config-ml.in' will set this to the installed subdirectory name to
+ use for this subdirectory, with a leading `/'. The default value
+ shold be the empty string.
+
+`MULTIDO'
+`MULTICLEAN'
+ In the top level `Makefile' only, `config-ml.in' will set these
+ variables to commands to use when doing a recursive make. These
+ variables should both default to the string `true', so that by
+ default nothing happens.
+
+ All references to the parent of the source directory should use the
+variable `MULTISRCTOP'. Instead of writing `$(srcdir)/..', you must
+write `$(srcdir)/$(MULTISRCTOP)..'.
+
+ Similarly, references to the parent of the object directory should
+use the variable `MULTIBUILDTOP'.
+
+ In the installation target, the libraries should be installed in the
+subdirectory `MULTISUBDIR'. Instead of installing
+`$(libdir)/libfoo.a', install `$(libdir)$(MULTISUBDIR)/libfoo.a'.
+
+ The `config-ml.in' script also modifies the top level `Makefile' to
+add `multi-do' and `multi-clean' targets which are used when building
+multilibs.
+
+ The default target of the `Makefile' should include the following
+command:
+ @$(MULTIDO) $(FLAGS_TO_PASS) DO=all multi-do
+
+This assumes that `$(FLAGS_TO_PASS)' is defined as a set of variables
+to pass to a recursive invocation of `make'. This will build all the
+multilibs. Note that the default value of `MULTIDO' is `true', so by
+default this command will do nothing. It will only do something in the
+top level `Makefile' if multilibs were enabled.
+
+ The `install' target of the `Makefile' should include the following
+command:
+ @$(MULTIDO) $(FLAGS_TO_PASS) DO=install multi-do
+
+ In general, any operation, other than clean, which should be
+performed on all the multilibs should use a `$(MULTIDO)' line, setting
+the variable `DO' to the target of each recursive call to `make'.
+
+ The `clean' targets (`clean', `mostlyclean', etc.) should use
+`$(MULTICLEAN)'. For example, the `clean' target should do this:
+ @$(MULTICLEAN) DO=clean multi-clean
+
+
+File: configure.info, Node: FAQ, Next: Index, Prev: Multilibs, Up: Top
+
+Frequently Asked Questions
+**************************
+
+Which do I run first, `autoconf' or `automake'?
+ Except when you first add autoconf or automake support to a
+ package, you shouldn't run either by hand. Instead, configure
+ with the `--enable-maintainer-mode' option, and let `make' take
+ care of it.
+
+`autoconf' says something about undefined macros.
+ This means that you have macros in your `configure.in' which are
+ not defined by `autoconf'. You may be using an old version of
+ `autoconf'; try building and installing a newer one. Make sure the
+ newly installled `autoconf' is first on your `PATH'. Also, see
+ the next question.
+
+My `configure' script has stuff like `CY_GNU_GETTEXT' in it.
+ This means that you have macros in your `configure.in' which should
+ be defined in your `aclocal.m4' file, but aren't. This usually
+ means that `aclocal' was not able to appropriate definitions of the
+ macros. Make sure that you have installed all the packages you
+ need. In particular, make sure that you have installed libtool
+ (this is where `AM_PROG_LIBTOOL' is defined) and gettext (this is
+ where `CY_GNU_GETTEXT' is defined, at least in the Cygnus version
+ of gettext).
+
+My `Makefile' has `@' characters in it.
+ This may mean that you tried to use an autoconf substitution in
+ your `Makefile.in' without adding the appropriate `AC_SUBST' call
+ to your `configure' script. Or it may just mean that you need to
+ rebuild `Makefile' in your build directory. To rebuild `Makefile'
+ from `Makefile.in', run the shell script `config.status' with no
+ arguments. If you need to force `configure' to run again, first
+ run `config.status --recheck'. These runs are normally done
+ automatically by `Makefile' targets, but if your `Makefile' has
+ gotten messed up you'll need to help them along.
+
+Why do I have to run both `config.status --recheck' and `config.status'?
+ Normally, you don't; they will be run automatically by `Makefile'
+ targets. If you do need to run them, use `config.status --recheck'
+ to run the `configure' script again with the same arguments as the
+ first time you ran it. Use `config.status' (with no arguments) to
+ regenerate all files (`Makefile', `config.h', etc.) based on the
+ results of the configure script. The two cases are separate
+ because it isn't always necessary to regenerate all the files
+ after running `config.status --recheck'. The `Makefile' targets
+ generated by automake will use the environment variables
+ `CONFIG_FILES' and `CONFIG_HEADERS' to only regenerate files as
+ they are needed.
+
+What is the Cygnus tree?
+ The Cygnus tree is used for various packages including gdb, the GNU
+ binutils, and egcs. It is also, of course, used for Cygnus
+ releases. It is the build system which was developed at Cygnus,
+ using the Cygnus configure script. It permits building many
+ different packages with a single configure and make. The
+ configure scripts in the tree are being converted to autoconf, but
+ the general build structure remains intact.
+
+Why do I have to keep rebuilding and reinstalling the tools?
+ I know, it's a pain. Unfortunately, there are bugs in the tools
+ themselves which need to be fixed, and each time that happens
+ everybody who uses the tools need to reinstall new versions of
+ them. I don't know if there is going to be a clever fix until the
+ tools stabilize.
+
+Why not just have a Cygnus tree `make' target to update the tools?
+ The tools unfortunately need to be installed before they can be
+ used. That means that they must be built using an appropriate
+ prefix, and it seems unwise to assume that every configuration
+ uses an appropriate prefix. It might be possible to make them
+ work in place, or it might be possible to install them in some
+ subdirectory; so far these approaches have not been implemented.
+
+
+File: configure.info, Node: Index, Prev: FAQ, Up: Top
+
+Index
+*****
+
+* Menu:
+
+* --build option: Build and Host Options.
+* --host option: Build and Host Options.
+* --target option: Specifying the Target.
+* _GNU_SOURCE: Write configure.in.
+* AC_CANONICAL_HOST: Using the Host Type.
+* AC_CANONICAL_SYSTEM: Using the Target Type.
+* AC_CONFIG_HEADER: Write configure.in.
+* AC_EXEEXT: Write configure.in.
+* AC_INIT: Write configure.in.
+* AC_OUTPUT: Write configure.in.
+* AC_PREREQ: Write configure.in.
+* AC_PROG_CC: Write configure.in.
+* AC_PROG_CXX: Write configure.in.
+* acconfig.h: Written Developer Files.
+* acconfig.h, writing: Write acconfig.h.
+* acinclude.m4: Written Developer Files.
+* aclocal.m4: Generated Developer Files.
+* AM_CONFIG_HEADER: Write configure.in.
+* AM_DISABLE_SHARED: Write configure.in.
+* AM_EXEEXT: Write configure.in.
+* AM_INIT_AUTOMAKE: Write configure.in.
+* AM_MAINTAINER_MODE: Write configure.in.
+* AM_PROG_LIBTOOL: Write configure.in.
+* AM_PROG_LIBTOOL in configure: FAQ.
+* build option: Build and Host Options.
+* building with a cross compiler: Canadian Cross.
+* canadian cross: Canadian Cross.
+* canadian cross in configure: CCross in Configure.
+* canadian cross in cygnus tree: CCross in Cygnus Tree.
+* canadian cross in makefile: CCross in Make.
+* canadian cross, configuring: Build and Host Options.
+* canonical system names: Configuration Names.
+* config.cache: Build Files Description.
+* config.h: Build Files Description.
+* config.h.in: Generated Developer Files.
+* config.in: Generated Developer Files.
+* config.status: Build Files Description.
+* config.status --recheck: FAQ.
+* configuration names: Configuration Names.
+* configuration triplets: Configuration Names.
+* configure: Generated Developer Files.
+* configure build system: Build and Host Options.
+* configure host: Build and Host Options.
+* configure target: Specifying the Target.
+* configure.in: Written Developer Files.
+* configure.in, writing: Write configure.in.
+* configuring a canadian cross: Build and Host Options.
+* cross compiler: Cross Compilation Concepts.
+* cross compiler, building with: Canadian Cross.
+* cross tools: Cross Compilation Tools.
+* CY_GNU_GETTEXT in configure: FAQ.
+* cygnus configure: Cygnus Configure.
+* goals: Goals.
+* history: History.
+* host names: Configuration Names.
+* host option: Build and Host Options.
+* host system: Host and Target.
+* host triplets: Configuration Names.
+* HOST_CC: CCross in Make.
+* libg++ configure: Cygnus Configure in C++ Libraries.
+* libio configure: Cygnus Configure in C++ Libraries.
+* libstdc++ configure: Cygnus Configure in C++ Libraries.
+* Makefile: Build Files Description.
+* Makefile, garbage characters: FAQ.
+* Makefile.am: Written Developer Files.
+* Makefile.am, writing: Write Makefile.am.
+* Makefile.in: Generated Developer Files.
+* multilibs: Multilibs.
+* stamp-h: Build Files Description.
+* stamp-h.in: Generated Developer Files.
+* system names: Configuration Names.
+* system types: Configuration Names.
+* target option: Specifying the Target.
+* target system: Host and Target.
+* triplets: Configuration Names.
+* undefined macros: FAQ.
+
+
diff --git a/gnu/usr.bin/binutils/gas/doc/as.info-8 b/gnu/usr.bin/binutils/gas/doc/as.info-8
new file mode 100644
index 00000000000..37fdb152b00
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/doc/as.info-8
@@ -0,0 +1,1042 @@
+This is as.info, produced by makeinfo version 4.0 from as.texinfo.
+
+START-INFO-DIR-ENTRY
+* As: (as). The GNU assembler.
+END-INFO-DIR-ENTRY
+
+ This file documents the GNU Assembler "as".
+
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free
+Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: as.info, Node: Index, Prev: Acknowledgements, Up: Top
+
+Index
+*****
+
+* Menu:
+
+* #: Comments.
+* #APP: Preprocessing.
+* #NO_APP: Preprocessing.
+* $ in symbol names <1>: SH-Chars.
+* $ in symbol names <2>: H8/500-Chars.
+* $ in symbol names <3>: D30V-Chars.
+* $ in symbol names: D10V-Chars.
+* -+ option, VAX/VMS: VAX-Opts.
+* --: Command Line.
+* --base-size-default-16: M68K-Opts.
+* --base-size-default-32: M68K-Opts.
+* --bitwise-or option, M680x0: M68K-Opts.
+* --disp-size-default-16: M68K-Opts.
+* --disp-size-default-32: M68K-Opts.
+* --enforce-aligned-data: Sparc-Aligned-Data.
+* --fatal-warnings: W.
+* --MD: MD.
+* --no-warn: W.
+* --register-prefix-optional option, M680x0: M68K-Opts.
+* --statistics: statistics.
+* --traditional-format: traditional-format.
+* --warn: W.
+* -1 option, VAX/VMS: VAX-Opts.
+* -a: a.
+* -A options, i960: Options-i960.
+* -ac: a.
+* -ad: a.
+* -ah: a.
+* -al: a.
+* -an: a.
+* -as: a.
+* -Asparclet: Sparc-Opts.
+* -Asparclite: Sparc-Opts.
+* -Av6: Sparc-Opts.
+* -Av8: Sparc-Opts.
+* -Av9: Sparc-Opts.
+* -Av9a: Sparc-Opts.
+* -b option, i960: Options-i960.
+* -D: D.
+* -D, ignored on VAX: VAX-Opts.
+* -d, VAX option: VAX-Opts.
+* -EB command line option, ARM: ARM Options.
+* -EB option (MIPS): MIPS Opts.
+* -EL command line option, ARM: ARM Options.
+* -EL option (MIPS): MIPS Opts.
+* -f: f.
+* -G option (MIPS): MIPS Opts.
+* -H option, VAX/VMS: VAX-Opts.
+* -h option, VAX/VMS: VAX-Opts.
+* -I PATH: I.
+* -J, ignored on VAX: VAX-Opts.
+* -K: K.
+* -k command line option, ARM: ARM Options.
+* -L: L.
+* -l option, M680x0: M68K-Opts.
+* -M: M.
+* -m68000 and related options: M68K-Opts.
+* -mall command line option, ARM: ARM Options.
+* -mapcs command line option, ARM: ARM Options.
+* -mapcs-float command line option, ARM: ARM Options.
+* -mapcs-reentrant command line option, ARM: ARM Options.
+* -marm command line option, ARM: ARM Options.
+* -marmv command line option, ARM: ARM Options.
+* -mbig-endian option (ARC): ARC-Opts.
+* -mfpa command line option, ARM: ARM Options.
+* -mfpe-old command line option, ARM: ARM Options.
+* -mlittle-endian option (ARC): ARC-Opts.
+* -mno-fpu command line option, ARM: ARM Options.
+* -moabi command line option, ARM: ARM Options.
+* -mthumb command line option, ARM: ARM Options.
+* -mthumb-interwork command line option, ARM: ARM Options.
+* -mv850 command line option, V850: V850 Options.
+* -mv850any command line option, V850: V850 Options.
+* -mv850e command line option, V850: V850 Options.
+* -no-relax option, i960: Options-i960.
+* -nocpp ignored (MIPS): MIPS Opts.
+* -o: o.
+* -R: R.
+* -S, ignored on VAX: VAX-Opts.
+* -t, ignored on VAX: VAX-Opts.
+* -T, ignored on VAX: VAX-Opts.
+* -v: v.
+* -V, redundant on VAX: VAX-Opts.
+* -version: v.
+* -W: W.
+* -wsigned_overflow command line option, V850: V850 Options.
+* -wunsigned_overflow command line option, V850: V850 Options.
+* . (symbol): Dot.
+* .insn: MIPS insn.
+* .ltorg directive, ARM: ARM Directives.
+* .o: Object.
+* .param on HPPA: HPPA Directives.
+* .pool directive, ARM: ARM Directives.
+* .set autoextend: MIPS autoextend.
+* .set mipsN: MIPS ISA.
+* .set noautoextend: MIPS autoextend.
+* .set pop: MIPS option stack.
+* .set push: MIPS option stack.
+* .v850 directive, V850: V850 Directives.
+* .v850e directive, V850: V850 Directives.
+* 16-bit code, i386: i386-16bit.
+* 29K support: AMD29K-Dependent.
+* 3DNow!, i386: i386-SIMD.
+* : (label): Statements.
+* @word modifier, D10V: D10V-Word.
+* \" (doublequote character): Strings.
+* \\ (\ character): Strings.
+* \b (backspace character): Strings.
+* \DDD (octal character code): Strings.
+* \f (formfeed character): Strings.
+* \n (newline character): Strings.
+* \r (carriage return character): Strings.
+* \t (tab): Strings.
+* \XD... (hex character code): Strings.
+* a.out: Object.
+* a.out symbol attributes: a.out Symbols.
+* ABORT directive: ABORT.
+* abort directive: Abort.
+* absolute section: Ld Sections.
+* addition, permitted arguments: Infix Ops.
+* addresses: Expressions.
+* addresses, format of: Secs Background.
+* addressing modes, D10V: D10V-Addressing.
+* addressing modes, D30V: D30V-Addressing.
+* addressing modes, H8/300: H8/300-Addressing.
+* addressing modes, H8/500: H8/500-Addressing.
+* addressing modes, M680x0: M68K-Syntax.
+* addressing modes, SH: SH-Addressing.
+* addressing modes, Z8000: Z8000-Addressing.
+* ADR reg,<label> pseudo op, ARM: ARM Opcodes.
+* ADRL reg,<label> pseudo op, ARM: ARM Opcodes.
+* advancing location counter: Org.
+* align directive: Align.
+* align directive, ARM: ARM Directives.
+* align directive, SPARC: Sparc-Directives.
+* altered difference tables: Word.
+* alternate syntax for the 680x0: M68K-Moto-Syntax.
+* AMD 29K floating point (IEEE): AMD29K Floating Point.
+* AMD 29K identifiers: AMD29K-Chars.
+* AMD 29K line comment character: AMD29K-Chars.
+* AMD 29K machine directives: AMD29K Directives.
+* AMD 29K macros: AMD29K-Macros.
+* AMD 29K opcodes: AMD29K Opcodes.
+* AMD 29K options (none): AMD29K Options.
+* AMD 29K protected registers: AMD29K-Regs.
+* AMD 29K register names: AMD29K-Regs.
+* AMD 29K special purpose registers: AMD29K-Regs.
+* AMD 29K support: AMD29K-Dependent.
+* ARC architectures: ARC-Opts.
+* ARC big-endian output: ARC-Opts.
+* ARC endianness: Overview.
+* ARC floating point (IEEE): ARC-Float.
+* ARC little-endian output: ARC-Opts.
+* ARC machine directives: ARC-Directives.
+* ARC options: ARC-Opts.
+* ARC support: ARC-Dependent.
+* architecture options, i960: Options-i960.
+* architecture options, M680x0: M68K-Opts.
+* architectures, ARC: ARC-Opts.
+* architectures, SPARC: Sparc-Opts.
+* arguments for addition: Infix Ops.
+* arguments for subtraction: Infix Ops.
+* arguments in expressions: Arguments.
+* arithmetic functions: Operators.
+* arithmetic operands: Arguments.
+* arm directive, ARM: ARM Directives.
+* ARM floating point (IEEE): ARM Floating Point.
+* ARM identifiers: ARM-Chars.
+* ARM immediate character: ARM-Chars.
+* ARM line comment character: ARM-Chars.
+* ARM line separator: ARM-Chars.
+* ARM machine directives: ARM Directives.
+* ARM opcodes: ARM Opcodes.
+* ARM options (none): ARM Options.
+* ARM register names: ARM-Regs.
+* ARM support: ARM-Dependent.
+* ascii directive: Ascii.
+* asciz directive: Asciz.
+* assembler bugs, reporting: Bug Reporting.
+* assembler crash: Bug Criteria.
+* assembler internal logic error: As Sections.
+* assembler version: v.
+* assembler, and linker: Secs Background.
+* assembly listings, enabling: a.
+* assigning values to symbols <1>: Equ.
+* assigning values to symbols: Setting Symbols.
+* attributes, symbol: Symbol Attributes.
+* auxiliary attributes, COFF symbols: COFF Symbols.
+* auxiliary symbol information, COFF: Dim.
+* Av7: Sparc-Opts.
+* backslash (\\): Strings.
+* backspace (\b): Strings.
+* balign directive: Balign.
+* balignl directive: Balign.
+* balignw directive: Balign.
+* big endian output, ARC: Overview.
+* big endian output, MIPS: Overview.
+* big endian output, PJ: Overview.
+* big-endian output, ARC: ARC-Opts.
+* big-endian output, MIPS: MIPS Opts.
+* bignums: Bignums.
+* binary integers: Integers.
+* bitfields, not supported on VAX: VAX-no.
+* block: Z8000 Directives.
+* block directive, AMD 29K: AMD29K Directives.
+* branch improvement, M680x0: M68K-Branch.
+* branch improvement, VAX: VAX-branch.
+* branch recording, i960: Options-i960.
+* branch statistics table, i960: Options-i960.
+* bss directive, i960: Directives-i960.
+* bss section <1>: bss.
+* bss section: Ld Sections.
+* bug criteria: Bug Criteria.
+* bug reports: Bug Reporting.
+* bugs in assembler: Reporting Bugs.
+* bus lock prefixes, i386: i386-Prefixes.
+* bval: Z8000 Directives.
+* byte directive: Byte.
+* call instructions, i386: i386-Mnemonics.
+* callj, i960 pseudo-opcode: callj-i960.
+* carriage return (\r): Strings.
+* character constants: Characters.
+* character escape codes: Strings.
+* character, single: Chars.
+* characters used in symbols: Symbol Intro.
+* code directive, ARM: ARM Directives.
+* code16 directive, i386: i386-16bit.
+* code16gcc directive, i386: i386-16bit.
+* code32 directive, i386: i386-16bit.
+* COFF auxiliary symbol information: Dim.
+* COFF structure debugging: Tag.
+* COFF symbol attributes: COFF Symbols.
+* COFF symbol descriptor: Desc.
+* COFF symbol storage class: Scl.
+* COFF symbol type: Type.
+* COFF symbols, debugging: Def.
+* COFF value attribute: Val.
+* COMDAT: Linkonce.
+* comm directive: Comm.
+* command line conventions: Command Line.
+* command line options, V850: V850 Options.
+* command-line options ignored, VAX: VAX-Opts.
+* comments: Comments.
+* comments, M680x0: M68K-Chars.
+* comments, removed by preprocessor: Preprocessing.
+* common directive, SPARC: Sparc-Directives.
+* common sections: Linkonce.
+* common variable storage: bss.
+* compare and jump expansions, i960: Compare-and-branch-i960.
+* compare/branch instructions, i960: Compare-and-branch-i960.
+* conditional assembly: If.
+* constant, single character: Chars.
+* constants: Constants.
+* constants, bignum: Bignums.
+* constants, character: Characters.
+* constants, converted by preprocessor: Preprocessing.
+* constants, floating point: Flonums.
+* constants, integer: Integers.
+* constants, number: Numbers.
+* constants, string: Strings.
+* conversion instructions, i386: i386-Mnemonics.
+* coprocessor wait, i386: i386-Prefixes.
+* cpu directive, SPARC: ARC-Directives.
+* cputype directive, AMD 29K: AMD29K Directives.
+* crash of assembler: Bug Criteria.
+* ctbp register, V850: V850-Regs.
+* ctoff pseudo-op, V850: V850 Opcodes.
+* ctpc register, V850: V850-Regs.
+* ctpsw register, V850: V850-Regs.
+* current address: Dot.
+* current address, advancing: Org.
+* D10V @word modifier: D10V-Word.
+* D10V addressing modes: D10V-Addressing.
+* D10V floating point: D10V-Float.
+* D10V line comment character: D10V-Chars.
+* D10V opcode summary: D10V-Opcodes.
+* D10V optimization: Overview.
+* D10V options: D10V-Opts.
+* D10V registers: D10V-Regs.
+* D10V size modifiers: D10V-Size.
+* D10V sub-instruction ordering: D10V-Chars.
+* D10V sub-instructions: D10V-Subs.
+* D10V support: D10V-Dependent.
+* D10V syntax: D10V-Syntax.
+* D30V addressing modes: D30V-Addressing.
+* D30V floating point: D30V-Float.
+* D30V Guarded Execution: D30V-Guarded.
+* D30V line comment character: D30V-Chars.
+* D30V nops: Overview.
+* D30V nops after 32-bit multiply: Overview.
+* D30V opcode summary: D30V-Opcodes.
+* D30V optimization: Overview.
+* D30V options: D30V-Opts.
+* D30V registers: D30V-Regs.
+* D30V size modifiers: D30V-Size.
+* D30V sub-instruction ordering: D30V-Chars.
+* D30V sub-instructions: D30V-Subs.
+* D30V support: D30V-Dependent.
+* D30V syntax: D30V-Syntax.
+* data alignment on SPARC: Sparc-Aligned-Data.
+* data and text sections, joining: R.
+* data directive: Data.
+* data section: Ld Sections.
+* data1 directive, M680x0: M68K-Directives.
+* data2 directive, M680x0: M68K-Directives.
+* dbpc register, V850: V850-Regs.
+* dbpsw register, V850: V850-Regs.
+* debuggers, and symbol order: Symbols.
+* debugging COFF symbols: Def.
+* decimal integers: Integers.
+* def directive: Def.
+* dependency tracking: MD.
+* deprecated directives: Deprecated.
+* desc directive: Desc.
+* descriptor, of a.out symbol: Symbol Desc.
+* dfloat directive, VAX: VAX-directives.
+* difference tables altered: Word.
+* difference tables, warning: K.
+* dim directive: Dim.
+* directives and instructions: Statements.
+* directives, M680x0: M68K-Directives.
+* directives, machine independent: Pseudo Ops.
+* directives, Z8000: Z8000 Directives.
+* displacement sizing character, VAX: VAX-operands.
+* dot (symbol): Dot.
+* double directive: Double.
+* double directive, i386: i386-Float.
+* double directive, M680x0: M68K-Float.
+* double directive, VAX: VAX-float.
+* doublequote (\"): Strings.
+* ECOFF sections: MIPS Object.
+* ecr register, V850: V850-Regs.
+* eight-byte integer: Quad.
+* eipc register, V850: V850-Regs.
+* eipsw register, V850: V850-Regs.
+* eject directive: Eject.
+* else directive: Else.
+* elseif directive: Elseif.
+* empty expressions: Empty Exprs.
+* emulation: Overview.
+* end directive: End.
+* endef directive: Endef.
+* endfunc directive: Endfunc.
+* endianness, ARC: Overview.
+* endianness, MIPS: Overview.
+* endianness, PJ: Overview.
+* endif directive: Endif.
+* endm directive: Macro.
+* EOF, newline must precede: Statements.
+* ep register, V850: V850-Regs.
+* equ directive: Equ.
+* equiv directive: Equiv.
+* err directive: Err.
+* error messsages: Errors.
+* error on valid input: Bug Criteria.
+* errors, caused by warnings: W.
+* errors, continuing after: Z.
+* ESA/390 floating point (IEEE): ESA/390 Floating Point.
+* ESA/390 support: ESA/390-Dependent.
+* ESA/390 Syntax: ESA/390 Options.
+* ESA/390-only directives: ESA/390 Directives.
+* escape codes, character: Strings.
+* even: Z8000 Directives.
+* even directive, M680x0: M68K-Directives.
+* exitm directive: Macro.
+* expr (internal section): As Sections.
+* expression arguments: Arguments.
+* expressions: Expressions.
+* expressions, empty: Empty Exprs.
+* expressions, integer: Integer Exprs.
+* extend directive M680x0: M68K-Float.
+* extended directive, i960: Directives-i960.
+* extern directive: Extern.
+* fail directive: Fail.
+* faster processing (-f): f.
+* fatal signal: Bug Criteria.
+* fepc register, V850: V850-Regs.
+* fepsw register, V850: V850-Regs.
+* ffloat directive, VAX: VAX-directives.
+* file directive: File.
+* file directive, AMD 29K: AMD29K Directives.
+* file name, logical: File.
+* files, including: Include.
+* files, input: Input Files.
+* fill directive: Fill.
+* filling memory <1>: Space.
+* filling memory: Skip.
+* float directive: Float.
+* float directive, i386: i386-Float.
+* float directive, M680x0: M68K-Float.
+* float directive, VAX: VAX-float.
+* floating point numbers: Flonums.
+* floating point numbers (double): Double.
+* floating point numbers (single) <1>: Single.
+* floating point numbers (single): Float.
+* floating point, AMD 29K (IEEE): AMD29K Floating Point.
+* floating point, ARC (IEEE): ARC-Float.
+* floating point, ARM (IEEE): ARM Floating Point.
+* floating point, D10V: D10V-Float.
+* floating point, D30V: D30V-Float.
+* floating point, ESA/390 (IEEE): ESA/390 Floating Point.
+* floating point, H8/300 (IEEE): H8/300 Floating Point.
+* floating point, H8/500 (IEEE): H8/500 Floating Point.
+* floating point, HPPA (IEEE): HPPA Floating Point.
+* floating point, i386: i386-Float.
+* floating point, i960 (IEEE): Floating Point-i960.
+* floating point, M680x0: M68K-Float.
+* floating point, SH (IEEE): SH Floating Point.
+* floating point, SPARC (IEEE): Sparc-Float.
+* floating point, V850 (IEEE): V850 Floating Point.
+* floating point, VAX: VAX-float.
+* flonums: Flonums.
+* force_thumb directive, ARM: ARM Directives.
+* format of error messages: Errors.
+* format of warning messages: Errors.
+* formfeed (\f): Strings.
+* func directive: Func.
+* functions, in expressions: Operators.
+* gbr960, i960 postprocessor: Options-i960.
+* gfloat directive, VAX: VAX-directives.
+* global: Z8000 Directives.
+* global directive: Global.
+* gp register, MIPS: MIPS Object.
+* gp register, V850: V850-Regs.
+* grouping data: Sub-Sections.
+* H8/300 addressing modes: H8/300-Addressing.
+* H8/300 floating point (IEEE): H8/300 Floating Point.
+* H8/300 line comment character: H8/300-Chars.
+* H8/300 line separator: H8/300-Chars.
+* H8/300 machine directives (none): H8/300 Directives.
+* H8/300 opcode summary: H8/300 Opcodes.
+* H8/300 options (none): H8/300 Options.
+* H8/300 registers: H8/300-Regs.
+* H8/300 size suffixes: H8/300 Opcodes.
+* H8/300 support: H8/300-Dependent.
+* H8/300H, assembling for: H8/300 Directives.
+* H8/500 addressing modes: H8/500-Addressing.
+* H8/500 floating point (IEEE): H8/500 Floating Point.
+* H8/500 line comment character: H8/500-Chars.
+* H8/500 line separator: H8/500-Chars.
+* H8/500 machine directives (none): H8/500 Directives.
+* H8/500 opcode summary: H8/500 Opcodes.
+* H8/500 options (none): H8/500 Options.
+* H8/500 registers: H8/500-Regs.
+* H8/500 support: H8/500-Dependent.
+* half directive, SPARC: Sparc-Directives.
+* hex character code (\XD...): Strings.
+* hexadecimal integers: Integers.
+* hfloat directive, VAX: VAX-directives.
+* hi pseudo-op, V850: V850 Opcodes.
+* hi0 pseudo-op, V850: V850 Opcodes.
+* hidden directive: Visibility.
+* hilo pseudo-op, V850: V850 Opcodes.
+* HPPA directives not supported: HPPA Directives.
+* HPPA floating point (IEEE): HPPA Floating Point.
+* HPPA Syntax: HPPA Options.
+* HPPA-only directives: HPPA Directives.
+* hword directive: hword.
+* i370 support: ESA/390-Dependent.
+* i386 16-bit code: i386-16bit.
+* i386 conversion instructions: i386-Mnemonics.
+* i386 floating point: i386-Float.
+* i386 immediate operands: i386-Syntax.
+* i386 instruction naming: i386-Mnemonics.
+* i386 instruction prefixes: i386-Prefixes.
+* i386 jump optimization: i386-jumps.
+* i386 jump, call, return: i386-Syntax.
+* i386 jump/call operands: i386-Syntax.
+* i386 memory references: i386-Memory.
+* i386 mul, imul instructions: i386-Notes.
+* i386 options (none): i386-Options.
+* i386 register operands: i386-Syntax.
+* i386 registers: i386-Regs.
+* i386 sections: i386-Syntax.
+* i386 size suffixes: i386-Syntax.
+* i386 source, destination operands: i386-Syntax.
+* i386 support: i386-Dependent.
+* i386 syntax compatibility: i386-Syntax.
+* i80306 support: i386-Dependent.
+* i960 architecture options: Options-i960.
+* i960 branch recording: Options-i960.
+* i960 callj pseudo-opcode: callj-i960.
+* i960 compare and jump expansions: Compare-and-branch-i960.
+* i960 compare/branch instructions: Compare-and-branch-i960.
+* i960 floating point (IEEE): Floating Point-i960.
+* i960 machine directives: Directives-i960.
+* i960 opcodes: Opcodes for i960.
+* i960 options: Options-i960.
+* i960 support: i960-Dependent.
+* ident directive: Ident.
+* identifiers, AMD 29K: AMD29K-Chars.
+* identifiers, ARM: ARM-Chars.
+* if directive: If.
+* ifc directive: If.
+* ifdef directive: If.
+* ifeq directive: If.
+* ifeqs directive: If.
+* ifge directive: If.
+* ifgt directive: If.
+* ifle directive: If.
+* iflt directive: If.
+* ifnc directive: If.
+* ifndef directive: If.
+* ifne directive: If.
+* ifnes directive: If.
+* ifnotdef directive: If.
+* immediate character, ARM: ARM-Chars.
+* immediate character, M680x0: M68K-Chars.
+* immediate character, VAX: VAX-operands.
+* immediate operands, i386: i386-Syntax.
+* imul instruction, i386: i386-Notes.
+* include directive: Include.
+* include directive search path: I.
+* indirect character, VAX: VAX-operands.
+* infix operators: Infix Ops.
+* inhibiting interrupts, i386: i386-Prefixes.
+* input: Input Files.
+* input file linenumbers: Input Files.
+* instruction naming, i386: i386-Mnemonics.
+* instruction prefixes, i386: i386-Prefixes.
+* instruction set, M680x0: M68K-opcodes.
+* instruction summary, D10V: D10V-Opcodes.
+* instruction summary, D30V: D30V-Opcodes.
+* instruction summary, H8/300: H8/300 Opcodes.
+* instruction summary, H8/500: H8/500 Opcodes.
+* instruction summary, SH: SH Opcodes.
+* instruction summary, Z8000: Z8000 Opcodes.
+* instructions and directives: Statements.
+* int directive: Int.
+* int directive, H8/300: H8/300 Directives.
+* int directive, H8/500: H8/500 Directives.
+* int directive, i386: i386-Float.
+* integer expressions: Integer Exprs.
+* integer, 16-byte: Octa.
+* integer, 8-byte: Quad.
+* integers: Integers.
+* integers, 16-bit: hword.
+* integers, 32-bit: Int.
+* integers, binary: Integers.
+* integers, decimal: Integers.
+* integers, hexadecimal: Integers.
+* integers, octal: Integers.
+* integers, one byte: Byte.
+* internal assembler sections: As Sections.
+* internal directive: Visibility.
+* invalid input: Bug Criteria.
+* invocation summary: Overview.
+* irp directive: Irp.
+* irpc directive: Irpc.
+* joining text and data sections: R.
+* jump instructions, i386: i386-Mnemonics.
+* jump optimization, i386: i386-jumps.
+* jump/call operands, i386: i386-Syntax.
+* label (:): Statements.
+* labels: Labels.
+* lcomm directive: Lcomm.
+* ld: Object.
+* ldouble directive M680x0: M68K-Float.
+* LDR reg,=<label> pseudo op, ARM: ARM Opcodes.
+* leafproc directive, i960: Directives-i960.
+* length of symbols: Symbol Intro.
+* lflags directive (ignored): Lflags.
+* line comment character: Comments.
+* line comment character, AMD 29K: AMD29K-Chars.
+* line comment character, ARM: ARM-Chars.
+* line comment character, D10V: D10V-Chars.
+* line comment character, D30V: D30V-Chars.
+* line comment character, H8/300: H8/300-Chars.
+* line comment character, H8/500: H8/500-Chars.
+* line comment character, M680x0: M68K-Chars.
+* line comment character, SH: SH-Chars.
+* line comment character, V850: V850-Chars.
+* line comment character, Z8000: Z8000-Chars.
+* line directive: Line.
+* line directive, AMD 29K: AMD29K Directives.
+* line numbers, in input files: Input Files.
+* line numbers, in warnings/errors: Errors.
+* line separator character: Statements.
+* line separator, ARM: ARM-Chars.
+* line separator, H8/300: H8/300-Chars.
+* line separator, H8/500: H8/500-Chars.
+* line separator, SH: SH-Chars.
+* line separator, Z8000: Z8000-Chars.
+* lines starting with #: Comments.
+* linker: Object.
+* linker, and assembler: Secs Background.
+* linkonce directive: Linkonce.
+* list directive: List.
+* listing control, turning off: Nolist.
+* listing control, turning on: List.
+* listing control: new page: Eject.
+* listing control: paper size: Psize.
+* listing control: subtitle: Sbttl.
+* listing control: title line: Title.
+* listings, enabling: a.
+* little endian output, ARC: Overview.
+* little endian output, MIPS: Overview.
+* little endian output, PJ: Overview.
+* little-endian output, ARC: ARC-Opts.
+* little-endian output, MIPS: MIPS Opts.
+* ln directive: Ln.
+* lo pseudo-op, V850: V850 Opcodes.
+* local common symbols: Lcomm.
+* local labels, retaining in output: L.
+* local symbol names: Symbol Names.
+* location counter: Dot.
+* location counter, advancing: Org.
+* logical file name: File.
+* logical line number: Line.
+* logical line numbers: Comments.
+* long directive: Long.
+* long directive, i386: i386-Float.
+* lp register, V850: V850-Regs.
+* lval: Z8000 Directives.
+* M680x0 addressing modes: M68K-Syntax.
+* M680x0 architecture options: M68K-Opts.
+* M680x0 branch improvement: M68K-Branch.
+* M680x0 directives: M68K-Directives.
+* M680x0 floating point: M68K-Float.
+* M680x0 immediate character: M68K-Chars.
+* M680x0 line comment character: M68K-Chars.
+* M680x0 opcodes: M68K-opcodes.
+* M680x0 options: M68K-Opts.
+* M680x0 pseudo-opcodes: M68K-Branch.
+* M680x0 size modifiers: M68K-Syntax.
+* M680x0 support: M68K-Dependent.
+* M680x0 syntax: M68K-Syntax.
+* machine dependencies: Machine Dependencies.
+* machine directives, AMD 29K: AMD29K Directives.
+* machine directives, ARC: ARC-Directives.
+* machine directives, ARM: ARM Directives.
+* machine directives, H8/300 (none): H8/300 Directives.
+* machine directives, H8/500 (none): H8/500 Directives.
+* machine directives, i960: Directives-i960.
+* machine directives, SH: SH Directives.
+* machine directives, SPARC: Sparc-Directives.
+* machine directives, V850: V850 Directives.
+* machine directives, VAX: VAX-directives.
+* machine independent directives: Pseudo Ops.
+* machine instructions (not covered): Manual.
+* machine-independent syntax: Syntax.
+* macro directive: Macro.
+* macros: Macro.
+* Macros, AMD 29K: AMD29K-Macros.
+* macros, count executed: Macro.
+* make rules: MD.
+* manual, structure and purpose: Manual.
+* memory references, i386: i386-Memory.
+* merging text and data sections: R.
+* messages from assembler: Errors.
+* minus, permitted arguments: Infix Ops.
+* MIPS architecture options: MIPS Opts.
+* MIPS big-endian output: MIPS Opts.
+* MIPS debugging directives: MIPS Stabs.
+* MIPS ECOFF sections: MIPS Object.
+* MIPS endianness: Overview.
+* MIPS ISA: Overview.
+* MIPS ISA override: MIPS ISA.
+* MIPS little-endian output: MIPS Opts.
+* MIPS option stack: MIPS option stack.
+* MIPS processor: MIPS-Dependent.
+* MIT: M68K-Syntax.
+* MMX, i386: i386-SIMD.
+* mnemonic suffixes, i386: i386-Syntax.
+* mnemonics for opcodes, VAX: VAX-opcodes.
+* mnemonics, D10V: D10V-Opcodes.
+* mnemonics, D30V: D30V-Opcodes.
+* mnemonics, H8/300: H8/300 Opcodes.
+* mnemonics, H8/500: H8/500 Opcodes.
+* mnemonics, SH: SH Opcodes.
+* mnemonics, Z8000: Z8000 Opcodes.
+* Motorola syntax for the 680x0: M68K-Moto-Syntax.
+* MRI compatibility mode: M.
+* mri directive: MRI.
+* MRI mode, temporarily: MRI.
+* mul instruction, i386: i386-Notes.
+* name: Z8000 Directives.
+* named section: Section.
+* named sections: Ld Sections.
+* names, symbol: Symbol Names.
+* naming object file: o.
+* new page, in listings: Eject.
+* newline (\n): Strings.
+* newline, required at file end: Statements.
+* nolist directive: Nolist.
+* NOP pseudo op, ARM: ARM Opcodes.
+* null-terminated strings: Asciz.
+* number constants: Numbers.
+* number of macros executed: Macro.
+* numbered subsections: Sub-Sections.
+* numbers, 16-bit: hword.
+* numeric values: Expressions.
+* nword directive, SPARC: Sparc-Directives.
+* object file: Object.
+* object file format: Object Formats.
+* object file name: o.
+* object file, after errors: Z.
+* obsolescent directives: Deprecated.
+* octa directive: Octa.
+* octal character code (\DDD): Strings.
+* octal integers: Integers.
+* offset directive, V850: V850 Directives.
+* opcode mnemonics, VAX: VAX-opcodes.
+* opcode summary, D10V: D10V-Opcodes.
+* opcode summary, D30V: D30V-Opcodes.
+* opcode summary, H8/300: H8/300 Opcodes.
+* opcode summary, H8/500: H8/500 Opcodes.
+* opcode summary, SH: SH Opcodes.
+* opcode summary, Z8000: Z8000 Opcodes.
+* opcodes for AMD 29K: AMD29K Opcodes.
+* opcodes for ARM: ARM Opcodes.
+* opcodes for V850: V850 Opcodes.
+* opcodes, i960: Opcodes for i960.
+* opcodes, M680x0: M68K-opcodes.
+* operand delimiters, i386: i386-Syntax.
+* operand notation, VAX: VAX-operands.
+* operands in expressions: Arguments.
+* operator precedence: Infix Ops.
+* operators, in expressions: Operators.
+* operators, permitted arguments: Infix Ops.
+* optimization, D10V: Overview.
+* optimization, D30V: Overview.
+* option summary: Overview.
+* options for AMD29K (none): AMD29K Options.
+* options for ARC: ARC-Opts.
+* options for ARM (none): ARM Options.
+* options for i386 (none): i386-Options.
+* options for SPARC: Sparc-Opts.
+* options for V850 (none): V850 Options.
+* options for VAX/VMS: VAX-Opts.
+* options, all versions of assembler: Invoking.
+* options, command line: Command Line.
+* options, D10V: D10V-Opts.
+* options, D30V: D30V-Opts.
+* options, H8/300 (none): H8/300 Options.
+* options, H8/500 (none): H8/500 Options.
+* options, i960: Options-i960.
+* options, M680x0: M68K-Opts.
+* options, PJ: PJ Options.
+* options, SH (none): SH Options.
+* options, Z8000: Z8000 Options.
+* org directive: Org.
+* other attribute, of a.out symbol: Symbol Other.
+* output file: Object.
+* p2align directive: P2align.
+* p2alignl directive: P2align.
+* p2alignw directive: P2align.
+* padding the location counter: Align.
+* padding the location counter given a power of two: P2align.
+* padding the location counter given number of bytes: Balign.
+* page, in listings: Eject.
+* paper size, for listings: Psize.
+* paths for .include: I.
+* patterns, writing in memory: Fill.
+* PIC code generation for ARM: ARM Options.
+* PJ endianness: Overview.
+* PJ options: PJ Options.
+* PJ support: PJ-Dependent.
+* plus, permitted arguments: Infix Ops.
+* precedence of operators: Infix Ops.
+* precision, floating point: Flonums.
+* prefix operators: Prefix Ops.
+* prefixes, i386: i386-Prefixes.
+* preprocessing: Preprocessing.
+* preprocessing, turning on and off: Preprocessing.
+* primary attributes, COFF symbols: COFF Symbols.
+* print directive: Print.
+* proc directive, SPARC: Sparc-Directives.
+* protected directive: Visibility.
+* protected registers, AMD 29K: AMD29K-Regs.
+* pseudo-opcodes, M680x0: M68K-Branch.
+* pseudo-ops for branch, VAX: VAX-branch.
+* pseudo-ops, machine independent: Pseudo Ops.
+* psize directive: Psize.
+* psw register, V850: V850-Regs.
+* purgem directive: Purgem.
+* purpose of GNU assembler: GNU Assembler.
+* quad directive: Quad.
+* quad directive, i386: i386-Float.
+* real-mode code, i386: i386-16bit.
+* register directive, SPARC: Sparc-Directives.
+* register names, AMD 29K: AMD29K-Regs.
+* register names, ARM: ARM-Regs.
+* register names, H8/300: H8/300-Regs.
+* register names, V850: V850-Regs.
+* register names, VAX: VAX-operands.
+* register operands, i386: i386-Syntax.
+* registers, D10V: D10V-Regs.
+* registers, D30V: D30V-Regs.
+* registers, H8/500: H8/500-Regs.
+* registers, i386: i386-Regs.
+* registers, SH: SH-Regs.
+* registers, Z8000: Z8000-Regs.
+* relocation: Sections.
+* relocation example: Ld Sections.
+* repeat prefixes, i386: i386-Prefixes.
+* reporting bugs in assembler: Reporting Bugs.
+* rept directive: Rept.
+* req directive, ARM: ARM Directives.
+* reserve directive, SPARC: Sparc-Directives.
+* return instructions, i386: i386-Syntax.
+* rsect: Z8000 Directives.
+* sbttl directive: Sbttl.
+* scl directive: Scl.
+* sdaoff pseudo-op, V850: V850 Opcodes.
+* search path for .include: I.
+* sect directive, AMD 29K: AMD29K Directives.
+* section directive: Section.
+* section directive, V850: V850 Directives.
+* section override prefixes, i386: i386-Prefixes.
+* section-relative addressing: Secs Background.
+* sections: Sections.
+* sections in messages, internal: As Sections.
+* sections, i386: i386-Syntax.
+* sections, named: Ld Sections.
+* seg directive, SPARC: Sparc-Directives.
+* segm: Z8000 Directives.
+* set directive: Set.
+* SH addressing modes: SH-Addressing.
+* SH floating point (IEEE): SH Floating Point.
+* SH line comment character: SH-Chars.
+* SH line separator: SH-Chars.
+* SH machine directives: SH Directives.
+* SH opcode summary: SH Opcodes.
+* SH options (none): SH Options.
+* SH registers: SH-Regs.
+* SH support: SH-Dependent.
+* short directive: Short.
+* SIMD, i386: i386-SIMD.
+* single character constant: Chars.
+* single directive: Single.
+* single directive, i386: i386-Float.
+* sixteen bit integers: hword.
+* sixteen byte integer: Octa.
+* size directive: Size.
+* size modifiers, D10V: D10V-Size.
+* size modifiers, D30V: D30V-Size.
+* size modifiers, M680x0: M68K-Syntax.
+* size prefixes, i386: i386-Prefixes.
+* size suffixes, H8/300: H8/300 Opcodes.
+* sizes operands, i386: i386-Syntax.
+* skip directive: Skip.
+* skip directive, M680x0: M68K-Directives.
+* skip directive, SPARC: Sparc-Directives.
+* sleb128 directive: Sleb128.
+* small objects, MIPS ECOFF: MIPS Object.
+* SOM symbol attributes: SOM Symbols.
+* source program: Input Files.
+* source, destination operands; i386: i386-Syntax.
+* sp register, V850: V850-Regs.
+* space directive: Space.
+* space used, maximum for assembly: statistics.
+* SPARC architectures: Sparc-Opts.
+* SPARC data alignment: Sparc-Aligned-Data.
+* SPARC floating point (IEEE): Sparc-Float.
+* SPARC machine directives: Sparc-Directives.
+* SPARC options: Sparc-Opts.
+* SPARC support: Sparc-Dependent.
+* special characters, M680x0: M68K-Chars.
+* special purpose registers, AMD 29K: AMD29K-Regs.
+* stabd directive: Stab.
+* stabn directive: Stab.
+* stabs directive: Stab.
+* stabX directives: Stab.
+* standard assembler sections: Secs Background.
+* standard input, as input file: Command Line.
+* statement separator character: Statements.
+* statement separator, ARM: ARM-Chars.
+* statement separator, H8/300: H8/300-Chars.
+* statement separator, H8/500: H8/500-Chars.
+* statement separator, SH: SH-Chars.
+* statement separator, Z8000: Z8000-Chars.
+* statements, structure of: Statements.
+* statistics, about assembly: statistics.
+* stopping the assembly: Abort.
+* string constants: Strings.
+* string directive: String.
+* string directive on HPPA: HPPA Directives.
+* string literals: Ascii.
+* string, copying to object file: String.
+* struct directive: Struct.
+* structure debugging, COFF: Tag.
+* sub-instruction ordering, D10V: D10V-Chars.
+* sub-instruction ordering, D30V: D30V-Chars.
+* sub-instructions, D10V: D10V-Subs.
+* sub-instructions, D30V: D30V-Subs.
+* subexpressions: Arguments.
+* subtitles for listings: Sbttl.
+* subtraction, permitted arguments: Infix Ops.
+* summary of options: Overview.
+* support: HPPA-Dependent.
+* supporting files, including: Include.
+* suppressing warnings: W.
+* sval: Z8000 Directives.
+* symbol attributes: Symbol Attributes.
+* symbol attributes, a.out: a.out Symbols.
+* symbol attributes, COFF: COFF Symbols.
+* symbol attributes, SOM: SOM Symbols.
+* symbol descriptor, COFF: Desc.
+* symbol names: Symbol Names.
+* symbol names, $ in <1>: SH-Chars.
+* symbol names, $ in <2>: H8/500-Chars.
+* symbol names, $ in <3>: D30V-Chars.
+* symbol names, $ in: D10V-Chars.
+* symbol names, local: Symbol Names.
+* symbol names, temporary: Symbol Names.
+* symbol storage class (COFF): Scl.
+* symbol type: Symbol Type.
+* symbol type, COFF: Type.
+* symbol value: Symbol Value.
+* symbol value, setting: Set.
+* symbol values, assigning: Setting Symbols.
+* symbol versioning: Symver.
+* symbol visibility: Visibility.
+* symbol, common: Comm.
+* symbol, making visible to linker: Global.
+* symbolic debuggers, information for: Stab.
+* symbols: Symbols.
+* symbols with uppercase, VAX/VMS: VAX-Opts.
+* symbols, assigning values to: Equ.
+* symbols, local common: Lcomm.
+* symver directive: Symver.
+* syntax compatibility, i386: i386-Syntax.
+* syntax, D10V: D10V-Syntax.
+* syntax, D30V: D30V-Syntax.
+* syntax, M680x0: M68K-Syntax.
+* syntax, machine-independent: Syntax.
+* sysproc directive, i960: Directives-i960.
+* tab (\t): Strings.
+* tag directive: Tag.
+* tdaoff pseudo-op, V850: V850 Opcodes.
+* temporary symbol names: Symbol Names.
+* text and data sections, joining: R.
+* text directive: Text.
+* text section: Ld Sections.
+* tfloat directive, i386: i386-Float.
+* thumb directive, ARM: ARM Directives.
+* Thumb support: ARM-Dependent.
+* thumb_func directive, ARM: ARM Directives.
+* thumb_set directive, ARM: ARM Directives.
+* time, total for assembly: statistics.
+* title directive: Title.
+* tp register, V850: V850-Regs.
+* trusted compiler: f.
+* turning preprocessing on and off: Preprocessing.
+* type directive: Type.
+* type of a symbol: Symbol Type.
+* ualong directive, SH: SH Directives.
+* uaword directive, SH: SH Directives.
+* uleb128 directive: Uleb128.
+* undefined section: Ld Sections.
+* unsegm: Z8000 Directives.
+* use directive, AMD 29K: AMD29K Directives.
+* V850 command line options: V850 Options.
+* V850 floating point (IEEE): V850 Floating Point.
+* V850 line comment character: V850-Chars.
+* V850 machine directives: V850 Directives.
+* V850 opcodes: V850 Opcodes.
+* V850 options (none): V850 Options.
+* V850 register names: V850-Regs.
+* V850 support: V850-Dependent.
+* val directive: Val.
+* value attribute, COFF: Val.
+* value of a symbol: Symbol Value.
+* VAX bitfields not supported: VAX-no.
+* VAX branch improvement: VAX-branch.
+* VAX command-line options ignored: VAX-Opts.
+* VAX displacement sizing character: VAX-operands.
+* VAX floating point: VAX-float.
+* VAX immediate character: VAX-operands.
+* VAX indirect character: VAX-operands.
+* VAX machine directives: VAX-directives.
+* VAX opcode mnemonics: VAX-opcodes.
+* VAX operand notation: VAX-operands.
+* VAX register names: VAX-operands.
+* VAX support: Vax-Dependent.
+* Vax-11 C compatibility: VAX-Opts.
+* VAX/VMS options: VAX-Opts.
+* version of assembler: v.
+* versions of symbols: Symver.
+* VMS (VAX) options: VAX-Opts.
+* warning for altered difference tables: K.
+* warning messages: Errors.
+* warnings, causing error: W.
+* warnings, suppressing: W.
+* warnings, switching on: W.
+* whitespace: Whitespace.
+* whitespace, removed by preprocessor: Preprocessing.
+* wide floating point directives, VAX: VAX-directives.
+* word directive: Word.
+* word directive, H8/300: H8/300 Directives.
+* word directive, H8/500: H8/500 Directives.
+* word directive, i386: i386-Float.
+* word directive, SPARC: Sparc-Directives.
+* writing patterns in memory: Fill.
+* wval: Z8000 Directives.
+* xword directive, SPARC: Sparc-Directives.
+* Z800 addressing modes: Z8000-Addressing.
+* Z8000 directives: Z8000 Directives.
+* Z8000 line comment character: Z8000-Chars.
+* Z8000 line separator: Z8000-Chars.
+* Z8000 opcode summary: Z8000 Opcodes.
+* Z8000 options: Z8000 Options.
+* Z8000 registers: Z8000-Regs.
+* Z8000 support: Z8000-Dependent.
+* zdaoff pseudo-op, V850: V850 Opcodes.
+* zero register, V850: V850-Regs.
+* zero-terminated strings: Asciz.
+
+
diff --git a/gnu/usr.bin/binutils/gas/doc/gasver.texi b/gnu/usr.bin/binutils/gas/doc/gasver.texi
index b696ac718c9..4c75b622163 100644
--- a/gnu/usr.bin/binutils/gas/doc/gasver.texi
+++ b/gnu/usr.bin/binutils/gas/doc/gasver.texi
@@ -1 +1 @@
-@set VERSION 2.10
+@set VERSION 2.10.1
diff --git a/gnu/usr.bin/binutils/gprof/gprof.info-1 b/gnu/usr.bin/binutils/gprof/gprof.info-1
new file mode 100644
index 00000000000..b631818c52d
--- /dev/null
+++ b/gnu/usr.bin/binutils/gprof/gprof.info-1
@@ -0,0 +1,1121 @@
+This is gprof.info, produced by makeinfo version 4.0 from gprof.texi.
+
+START-INFO-DIR-ENTRY
+* gprof: (gprof). Profiling your program's execution
+END-INFO-DIR-ENTRY
+
+ This file documents the gprof profiler of the GNU system.
+
+ Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation,
+Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: gprof.info, Node: Top, Next: Introduction, Up: (dir)
+
+Profiling a Program: Where Does It Spend Its Time?
+**************************************************
+
+ This manual describes the GNU profiler, `gprof', and how you can use
+it to determine which parts of a program are taking most of the
+execution time. We assume that you know how to write, compile, and
+execute programs. GNU `gprof' was written by Jay Fenlason.
+
+* Menu:
+
+* Introduction:: What profiling means, and why it is useful.
+
+* Compiling:: How to compile your program for profiling.
+* Executing:: Executing your program to generate profile data
+* Invoking:: How to run `gprof', and its options
+
+* Output:: Interpreting `gprof''s output
+
+* Inaccuracy:: Potential problems you should be aware of
+* How do I?:: Answers to common questions
+* Incompatibilities:: (between GNU `gprof' and Unix `gprof'.)
+* Details:: Details of how profiling is done
+
+
+File: gprof.info, Node: Introduction, Next: Compiling, Prev: Top, Up: Top
+
+Introduction to Profiling
+*************************
+
+ Profiling allows you to learn where your program spent its time and
+which functions called which other functions while it was executing.
+This information can show you which pieces of your program are slower
+than you expected, and might be candidates for rewriting to make your
+program execute faster. It can also tell you which functions are being
+called more or less often than you expected. This may help you spot
+bugs that had otherwise been unnoticed.
+
+ Since the profiler uses information collected during the actual
+execution of your program, it can be used on programs that are too
+large or too complex to analyze by reading the source. However, how
+your program is run will affect the information that shows up in the
+profile data. If you don't use some feature of your program while it
+is being profiled, no profile information will be generated for that
+feature.
+
+ Profiling has several steps:
+
+ * You must compile and link your program with profiling enabled.
+ *Note Compiling::.
+
+ * You must execute your program to generate a profile data file.
+ *Note Executing::.
+
+ * You must run `gprof' to analyze the profile data. *Note
+ Invoking::.
+
+ The next three chapters explain these steps in greater detail.
+
+ Several forms of output are available from the analysis.
+
+ The "flat profile" shows how much time your program spent in each
+function, and how many times that function was called. If you simply
+want to know which functions burn most of the cycles, it is stated
+concisely here. *Note Flat Profile::.
+
+ The "call graph" shows, for each function, which functions called
+it, which other functions it called, and how many times. There is also
+an estimate of how much time was spent in the subroutines of each
+function. This can suggest places where you might try to eliminate
+function calls that use a lot of time. *Note Call Graph::.
+
+ The "annotated source" listing is a copy of the program's source
+code, labeled with the number of times each line of the program was
+executed. *Note Annotated Source::.
+
+ To better understand how profiling works, you may wish to read a
+description of its implementation. *Note Implementation::.
+
+
+File: gprof.info, Node: Compiling, Next: Executing, Prev: Introduction, Up: Top
+
+Compiling a Program for Profiling
+*********************************
+
+ The first step in generating profile information for your program is
+to compile and link it with profiling enabled.
+
+ To compile a source file for profiling, specify the `-pg' option when
+you run the compiler. (This is in addition to the options you normally
+use.)
+
+ To link the program for profiling, if you use a compiler such as `cc'
+to do the linking, simply specify `-pg' in addition to your usual
+options. The same option, `-pg', alters either compilation or linking
+to do what is necessary for profiling. Here are examples:
+
+ cc -g -c myprog.c utils.c -pg
+ cc -o myprog myprog.o utils.o -pg
+
+ The `-pg' option also works with a command that both compiles and
+links:
+
+ cc -o myprog myprog.c utils.c -g -pg
+
+ If you run the linker `ld' directly instead of through a compiler
+such as `cc', you may have to specify a profiling startup file
+`gcrt0.o' as the first input file instead of the usual startup file
+`crt0.o'. In addition, you would probably want to specify the
+profiling C library, `libc_p.a', by writing `-lc_p' instead of the
+usual `-lc'. This is not absolutely necessary, but doing this gives
+you number-of-calls information for standard library functions such as
+`read' and `open'. For example:
+
+ ld -o myprog /lib/gcrt0.o myprog.o utils.o -lc_p
+
+ If you compile only some of the modules of the program with `-pg',
+you can still profile the program, but you won't get complete
+information about the modules that were compiled without `-pg'. The
+only information you get for the functions in those modules is the
+total time spent in them; there is no record of how many times they
+were called, or from where. This will not affect the flat profile
+(except that the `calls' field for the functions will be blank), but
+will greatly reduce the usefulness of the call graph.
+
+ If you wish to perform line-by-line profiling, you will also need to
+specify the `-g' option, instructing the compiler to insert debugging
+symbols into the program that match program addresses to source code
+lines. *Note Line-by-line::.
+
+ In addition to the `-pg' and `-g' options, you may also wish to
+specify the `-a' option when compiling. This will instrument the
+program to perform basic-block counting. As the program runs, it will
+count how many times it executed each branch of each `if' statement,
+each iteration of each `do' loop, etc. This will enable `gprof' to
+construct an annotated source code listing showing how many times each
+line of code was executed.
+
+
+File: gprof.info, Node: Executing, Next: Invoking, Prev: Compiling, Up: Top
+
+Executing the Program
+*********************
+
+ Once the program is compiled for profiling, you must run it in order
+to generate the information that `gprof' needs. Simply run the program
+as usual, using the normal arguments, file names, etc. The program
+should run normally, producing the same output as usual. It will,
+however, run somewhat slower than normal because of the time spent
+collecting and the writing the profile data.
+
+ The way you run the program--the arguments and input that you give
+it--may have a dramatic effect on what the profile information shows.
+The profile data will describe the parts of the program that were
+activated for the particular input you use. For example, if the first
+command you give to your program is to quit, the profile data will show
+the time used in initialization and in cleanup, but not much else.
+
+ Your program will write the profile data into a file called
+`gmon.out' just before exiting. If there is already a file called
+`gmon.out', its contents are overwritten. There is currently no way to
+tell the program to write the profile data under a different name, but
+you can rename the file afterward if you are concerned that it may be
+overwritten.
+
+ In order to write the `gmon.out' file properly, your program must
+exit normally: by returning from `main' or by calling `exit'. Calling
+the low-level function `_exit' does not write the profile data, and
+neither does abnormal termination due to an unhandled signal.
+
+ The `gmon.out' file is written in the program's _current working
+directory_ at the time it exits. This means that if your program calls
+`chdir', the `gmon.out' file will be left in the last directory your
+program `chdir''d to. If you don't have permission to write in this
+directory, the file is not written, and you will get an error message.
+
+ Older versions of the GNU profiling library may also write a file
+called `bb.out'. This file, if present, contains an human-readable
+listing of the basic-block execution counts. Unfortunately, the
+appearance of a human-readable `bb.out' means the basic-block counts
+didn't get written into `gmon.out'. The Perl script `bbconv.pl',
+included with the `gprof' source distribution, will convert a `bb.out'
+file into a format readable by `gprof'.
+
+
+File: gprof.info, Node: Invoking, Next: Output, Prev: Executing, Up: Top
+
+`gprof' Command Summary
+***********************
+
+ After you have a profile data file `gmon.out', you can run `gprof'
+to interpret the information in it. The `gprof' program prints a flat
+profile and a call graph on standard output. Typically you would
+redirect the output of `gprof' into a file with `>'.
+
+ You run `gprof' like this:
+
+ gprof OPTIONS [EXECUTABLE-FILE [PROFILE-DATA-FILES...]] [> OUTFILE]
+
+Here square-brackets indicate optional arguments.
+
+ If you omit the executable file name, the file `a.out' is used. If
+you give no profile data file name, the file `gmon.out' is used. If
+any file is not in the proper format, or if the profile data file does
+not appear to belong to the executable file, an error message is
+printed.
+
+ You can give more than one profile data file by entering all their
+names after the executable file name; then the statistics in all the
+data files are summed together.
+
+ The order of these options does not matter.
+
+* Menu:
+
+* Output Options:: Controlling `gprof''s output style
+* Analysis Options:: Controlling how `gprof' analyses its data
+* Miscellaneous Options::
+* Deprecated Options:: Options you no longer need to use, but which
+ have been retained for compatibility
+* Symspecs:: Specifying functions to include or exclude
+
+
+File: gprof.info, Node: Output Options, Next: Analysis Options, Up: Invoking
+
+Output Options
+==============
+
+ These options specify which of several output formats `gprof' should
+produce.
+
+ Many of these options take an optional "symspec" to specify
+functions to be included or excluded. These options can be specified
+multiple times, with different symspecs, to include or exclude sets of
+symbols. *Note Symspecs::.
+
+ Specifying any of these options overrides the default (`-p -q'),
+which prints a flat profile and call graph analysis for all functions.
+
+`-A[SYMSPEC]'
+`--annotated-source[=SYMSPEC]'
+ The `-A' option causes `gprof' to print annotated source code. If
+ SYMSPEC is specified, print output only for matching symbols.
+ *Note Annotated Source::.
+
+`-b'
+`--brief'
+ If the `-b' option is given, `gprof' doesn't print the verbose
+ blurbs that try to explain the meaning of all of the fields in the
+ tables. This is useful if you intend to print out the output, or
+ are tired of seeing the blurbs.
+
+`-C[SYMSPEC]'
+`--exec-counts[=SYMSPEC]'
+ The `-C' option causes `gprof' to print a tally of functions and
+ the number of times each was called. If SYMSPEC is specified,
+ print tally only for matching symbols.
+
+ If the profile data file contains basic-block count records,
+ specifying the `-l' option, along with `-C', will cause basic-block
+ execution counts to be tallied and displayed.
+
+`-i'
+`--file-info'
+ The `-i' option causes `gprof' to display summary information
+ about the profile data file(s) and then exit. The number of
+ histogram, call graph, and basic-block count records is displayed.
+
+`-I DIRS'
+`--directory-path=DIRS'
+ The `-I' option specifies a list of search directories in which to
+ find source files. Environment variable GPROF_PATH can also be
+ used to convey this information. Used mostly for annotated source
+ output.
+
+`-J[SYMSPEC]'
+`--no-annotated-source[=SYMSPEC]'
+ The `-J' option causes `gprof' not to print annotated source code.
+ If SYMSPEC is specified, `gprof' prints annotated source, but
+ excludes matching symbols.
+
+`-L'
+`--print-path'
+ Normally, source filenames are printed with the path component
+ suppressed. The `-L' option causes `gprof' to print the full
+ pathname of source filenames, which is determined from symbolic
+ debugging information in the image file and is relative to the
+ directory in which the compiler was invoked.
+
+`-p[SYMSPEC]'
+`--flat-profile[=SYMSPEC]'
+ The `-p' option causes `gprof' to print a flat profile. If
+ SYMSPEC is specified, print flat profile only for matching symbols.
+ *Note Flat Profile::.
+
+`-P[SYMSPEC]'
+`--no-flat-profile[=SYMSPEC]'
+ The `-P' option causes `gprof' to suppress printing a flat profile.
+ If SYMSPEC is specified, `gprof' prints a flat profile, but
+ excludes matching symbols.
+
+`-q[SYMSPEC]'
+`--graph[=SYMSPEC]'
+ The `-q' option causes `gprof' to print the call graph analysis.
+ If SYMSPEC is specified, print call graph only for matching symbols
+ and their children. *Note Call Graph::.
+
+`-Q[SYMSPEC]'
+`--no-graph[=SYMSPEC]'
+ The `-Q' option causes `gprof' to suppress printing the call graph.
+ If SYMSPEC is specified, `gprof' prints a call graph, but excludes
+ matching symbols.
+
+`-y'
+`--separate-files'
+ This option affects annotated source output only. Normally,
+ `gprof' prints annotated source files to standard-output. If this
+ option is specified, annotated source for a file named
+ `path/FILENAME' is generated in the file `FILENAME-ann'. If the
+ underlying filesystem would truncate `FILENAME-ann' so that it
+ overwrites the original `FILENAME', `gprof' generates annotated
+ source in the file `FILENAME.ann' instead (if the original file
+ name has an extension, that extension is _replaced_ with `.ann').
+
+`-Z[SYMSPEC]'
+`--no-exec-counts[=SYMSPEC]'
+ The `-Z' option causes `gprof' not to print a tally of functions
+ and the number of times each was called. If SYMSPEC is specified,
+ print tally, but exclude matching symbols.
+
+`--function-ordering'
+ The `--function-ordering' option causes `gprof' to print a
+ suggested function ordering for the program based on profiling
+ data. This option suggests an ordering which may improve paging,
+ tlb and cache behavior for the program on systems which support
+ arbitrary ordering of functions in an executable.
+
+ The exact details of how to force the linker to place functions in
+ a particular order is system dependent and out of the scope of this
+ manual.
+
+`--file-ordering MAP_FILE'
+ The `--file-ordering' option causes `gprof' to print a suggested
+ .o link line ordering for the program based on profiling data.
+ This option suggests an ordering which may improve paging, tlb and
+ cache behavior for the program on systems which do not support
+ arbitrary ordering of functions in an executable.
+
+ Use of the `-a' argument is highly recommended with this option.
+
+ The MAP_FILE argument is a pathname to a file which provides
+ function name to object file mappings. The format of the file is
+ similar to the output of the program `nm'.
+
+ c-parse.o:00000000 T yyparse
+ c-parse.o:00000004 C yyerrflag
+ c-lang.o:00000000 T maybe_objc_method_name
+ c-lang.o:00000000 T print_lang_statistics
+ c-lang.o:00000000 T recognize_objc_keyword
+ c-decl.o:00000000 T print_lang_identifier
+ c-decl.o:00000000 T print_lang_type
+ ...
+
+ To create a MAP_FILE with GNU `nm', type a command like `nm
+ --extern-only --defined-only -v --print-file-name program-name'.
+
+`-T'
+`--traditional'
+ The `-T' option causes `gprof' to print its output in
+ "traditional" BSD style.
+
+`-w WIDTH'
+`--width=WIDTH'
+ Sets width of output lines to WIDTH. Currently only used when
+ printing the function index at the bottom of the call graph.
+
+`-x'
+`--all-lines'
+ This option affects annotated source output only. By default,
+ only the lines at the beginning of a basic-block are annotated.
+ If this option is specified, every line in a basic-block is
+ annotated by repeating the annotation for the first line. This
+ behavior is similar to `tcov''s `-a'.
+
+`--demangle'
+`--no-demangle'
+ These options control whether C++ symbol names should be demangled
+ when printing output. The default is to demangle symbols. The
+ `--no-demangle' option may be used to turn off demangling.
+
+
+File: gprof.info, Node: Analysis Options, Next: Miscellaneous Options, Prev: Output Options, Up: Invoking
+
+Analysis Options
+================
+
+`-a'
+`--no-static'
+ The `-a' option causes `gprof' to suppress the printing of
+ statically declared (private) functions. (These are functions
+ whose names are not listed as global, and which are not visible
+ outside the file/function/block where they were defined.) Time
+ spent in these functions, calls to/from them, etc, will all be
+ attributed to the function that was loaded directly before it in
+ the executable file. This option affects both the flat profile
+ and the call graph.
+
+`-c'
+`--static-call-graph'
+ The `-c' option causes the call graph of the program to be
+ augmented by a heuristic which examines the text space of the
+ object file and identifies function calls in the binary machine
+ code. Since normal call graph records are only generated when
+ functions are entered, this option identifies children that could
+ have been called, but never were. Calls to functions that were
+ not compiled with profiling enabled are also identified, but only
+ if symbol table entries are present for them. Calls to dynamic
+ library routines are typically _not_ found by this option.
+ Parents or children identified via this heuristic are indicated in
+ the call graph with call counts of `0'.
+
+`-D'
+`--ignore-non-functions'
+ The `-D' option causes `gprof' to ignore symbols which are not
+ known to be functions. This option will give more accurate
+ profile data on systems where it is supported (Solaris and HPUX for
+ example).
+
+`-k FROM/TO'
+ The `-k' option allows you to delete from the call graph any arcs
+ from symbols matching symspec FROM to those matching symspec TO.
+
+`-l'
+`--line'
+ The `-l' option enables line-by-line profiling, which causes
+ histogram hits to be charged to individual source code lines,
+ instead of functions. If the program was compiled with
+ basic-block counting enabled, this option will also identify how
+ many times each line of code was executed. While line-by-line
+ profiling can help isolate where in a large function a program is
+ spending its time, it also significantly increases the running
+ time of `gprof', and magnifies statistical inaccuracies. *Note
+ Sampling Error::.
+
+`-m NUM'
+`--min-count=NUM'
+ This option affects execution count output only. Symbols that are
+ executed less than NUM times are suppressed.
+
+`-n[SYMSPEC]'
+`--time[=SYMSPEC]'
+ The `-n' option causes `gprof', in its call graph analysis, to
+ only propagate times for symbols matching SYMSPEC.
+
+`-N[SYMSPEC]'
+`--no-time[=SYMSPEC]'
+ The `-n' option causes `gprof', in its call graph analysis, not to
+ propagate times for symbols matching SYMSPEC.
+
+`-z'
+`--display-unused-functions'
+ If you give the `-z' option, `gprof' will mention all functions in
+ the flat profile, even those that were never called, and that had
+ no time spent in them. This is useful in conjunction with the
+ `-c' option for discovering which routines were never called.
+
+
+File: gprof.info, Node: Miscellaneous Options, Next: Deprecated Options, Prev: Analysis Options, Up: Invoking
+
+Miscellaneous Options
+=====================
+
+`-d[NUM]'
+`--debug[=NUM]'
+ The `-d NUM' option specifies debugging options. If NUM is not
+ specified, enable all debugging. *Note Debugging::.
+
+`-ONAME'
+`--file-format=NAME'
+ Selects the format of the profile data files. Recognized formats
+ are `auto' (the default), `bsd', `4.4bsd', `magic', and `prof'
+ (not yet supported).
+
+`-s'
+`--sum'
+ The `-s' option causes `gprof' to summarize the information in the
+ profile data files it read in, and write out a profile data file
+ called `gmon.sum', which contains all the information from the
+ profile data files that `gprof' read in. The file `gmon.sum' may
+ be one of the specified input files; the effect of this is to
+ merge the data in the other input files into `gmon.sum'.
+
+ Eventually you can run `gprof' again without `-s' to analyze the
+ cumulative data in the file `gmon.sum'.
+
+`-v'
+`--version'
+ The `-v' flag causes `gprof' to print the current version number,
+ and then exit.
+
+
+File: gprof.info, Node: Deprecated Options, Next: Symspecs, Prev: Miscellaneous Options, Up: Invoking
+
+Deprecated Options
+==================
+
+ These options have been replaced with newer versions that use
+ symspecs.
+
+`-e FUNCTION_NAME'
+ The `-e FUNCTION' option tells `gprof' to not print information
+ about the function FUNCTION_NAME (and its children...) in the call
+ graph. The function will still be listed as a child of any
+ functions that call it, but its index number will be shown as
+ `[not printed]'. More than one `-e' option may be given; only one
+ FUNCTION_NAME may be indicated with each `-e' option.
+
+`-E FUNCTION_NAME'
+ The `-E FUNCTION' option works like the `-e' option, but time
+ spent in the function (and children who were not called from
+ anywhere else), will not be used to compute the
+ percentages-of-time for the call graph. More than one `-E' option
+ may be given; only one FUNCTION_NAME may be indicated with each
+ `-E' option.
+
+`-f FUNCTION_NAME'
+ The `-f FUNCTION' option causes `gprof' to limit the call graph to
+ the function FUNCTION_NAME and its children (and their
+ children...). More than one `-f' option may be given; only one
+ FUNCTION_NAME may be indicated with each `-f' option.
+
+`-F FUNCTION_NAME'
+ The `-F FUNCTION' option works like the `-f' option, but only time
+ spent in the function and its children (and their children...)
+ will be used to determine total-time and percentages-of-time for
+ the call graph. More than one `-F' option may be given; only one
+ FUNCTION_NAME may be indicated with each `-F' option. The `-F'
+ option overrides the `-E' option.
+
+ Note that only one function can be specified with each `-e', `-E',
+`-f' or `-F' option. To specify more than one function, use multiple
+options. For example, this command:
+
+ gprof -e boring -f foo -f bar myprogram > gprof.output
+
+lists in the call graph all functions that were reached from either
+`foo' or `bar' and were not reachable from `boring'.
+
+
+File: gprof.info, Node: Symspecs, Prev: Deprecated Options, Up: Invoking
+
+Symspecs
+========
+
+ Many of the output options allow functions to be included or excluded
+using "symspecs" (symbol specifications), which observe the following
+syntax:
+
+ filename_containing_a_dot
+ | funcname_not_containing_a_dot
+ | linenumber
+ | ( [ any_filename ] `:' ( any_funcname | linenumber ) )
+
+ Here are some sample symspecs:
+
+`main.c'
+ Selects everything in file `main.c'--the dot in the string tells
+ `gprof' to interpret the string as a filename, rather than as a
+ function name. To select a file whose name does not contain a
+ dot, a trailing colon should be specified. For example, `odd:' is
+ interpreted as the file named `odd'.
+
+`main'
+ Selects all functions named `main'.
+
+ Note that there may be multiple instances of the same function name
+ because some of the definitions may be local (i.e., static).
+ Unless a function name is unique in a program, you must use the
+ colon notation explained below to specify a function from a
+ specific source file.
+
+ Sometimes, function names contain dots. In such cases, it is
+ necessary to add a leading colon to the name. For example,
+ `:.mul' selects function `.mul'.
+
+ In some object file formats, symbols have a leading underscore.
+ `gprof' will normally not print these underscores. When you name a
+ symbol in a symspec, you should type it exactly as `gprof' prints
+ it in its output. For example, if the compiler produces a symbol
+ `_main' from your `main' function, `gprof' still prints it as
+ `main' in its output, so you should use `main' in symspecs.
+
+`main.c:main'
+ Selects function `main' in file `main.c'.
+
+`main.c:134'
+ Selects line 134 in file `main.c'.
+
+
+File: gprof.info, Node: Output, Next: Inaccuracy, Prev: Invoking, Up: Top
+
+Interpreting `gprof''s Output
+*****************************
+
+ `gprof' can produce several different output styles, the most
+important of which are described below. The simplest output styles
+(file information, execution count, and function and file ordering) are
+not described here, but are documented with the respective options that
+trigger them. *Note Output Options::.
+
+* Menu:
+
+* Flat Profile:: The flat profile shows how much time was spent
+ executing directly in each function.
+* Call Graph:: The call graph shows which functions called which
+ others, and how much time each function used
+ when its subroutine calls are included.
+* Line-by-line:: `gprof' can analyze individual source code lines
+* Annotated Source:: The annotated source listing displays source code
+ labeled with execution counts
+
+
+File: gprof.info, Node: Flat Profile, Next: Call Graph, Up: Output
+
+The Flat Profile
+================
+
+ The "flat profile" shows the total amount of time your program spent
+executing each function. Unless the `-z' option is given, functions
+with no apparent time spent in them, and no apparent calls to them, are
+not mentioned. Note that if a function was not compiled for profiling,
+and didn't run long enough to show up on the program counter histogram,
+it will be indistinguishable from a function that was never called.
+
+ This is part of a flat profile for a small program:
+
+ Flat profile:
+
+ Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls ms/call ms/call name
+ 33.34 0.02 0.02 7208 0.00 0.00 open
+ 16.67 0.03 0.01 244 0.04 0.12 offtime
+ 16.67 0.04 0.01 8 1.25 1.25 memccpy
+ 16.67 0.05 0.01 7 1.43 1.43 write
+ 16.67 0.06 0.01 mcount
+ 0.00 0.06 0.00 236 0.00 0.00 tzset
+ 0.00 0.06 0.00 192 0.00 0.00 tolower
+ 0.00 0.06 0.00 47 0.00 0.00 strlen
+ 0.00 0.06 0.00 45 0.00 0.00 strchr
+ 0.00 0.06 0.00 1 0.00 50.00 main
+ 0.00 0.06 0.00 1 0.00 0.00 memcpy
+ 0.00 0.06 0.00 1 0.00 10.11 print
+ 0.00 0.06 0.00 1 0.00 0.00 profil
+ 0.00 0.06 0.00 1 0.00 50.00 report
+ ...
+
+The functions are sorted by first by decreasing run-time spent in them,
+then by decreasing number of calls, then alphabetically by name. The
+functions `mcount' and `profil' are part of the profiling apparatus and
+appear in every flat profile; their time gives a measure of the amount
+of overhead due to profiling.
+
+ Just before the column headers, a statement appears indicating how
+much time each sample counted as. This "sampling period" estimates the
+margin of error in each of the time figures. A time figure that is not
+much larger than this is not reliable. In this example, each sample
+counted as 0.01 seconds, suggesting a 100 Hz sampling rate. The
+program's total execution time was 0.06 seconds, as indicated by the
+`cumulative seconds' field. Since each sample counted for 0.01
+seconds, this means only six samples were taken during the run. Two of
+the samples occurred while the program was in the `open' function, as
+indicated by the `self seconds' field. Each of the other four samples
+occurred one each in `offtime', `memccpy', `write', and `mcount'.
+Since only six samples were taken, none of these values can be regarded
+as particularly reliable. In another run, the `self seconds' field for
+`mcount' might well be `0.00' or `0.02'. *Note Sampling Error::, for a
+complete discussion.
+
+ The remaining functions in the listing (those whose `self seconds'
+field is `0.00') didn't appear in the histogram samples at all.
+However, the call graph indicated that they were called, so therefore
+they are listed, sorted in decreasing order by the `calls' field.
+Clearly some time was spent executing these functions, but the paucity
+of histogram samples prevents any determination of how much time each
+took.
+
+ Here is what the fields in each line mean:
+
+`% time'
+ This is the percentage of the total execution time your program
+ spent in this function. These should all add up to 100%.
+
+`cumulative seconds'
+ This is the cumulative total number of seconds the computer spent
+ executing this functions, plus the time spent in all the functions
+ above this one in this table.
+
+`self seconds'
+ This is the number of seconds accounted for by this function alone.
+ The flat profile listing is sorted first by this number.
+
+`calls'
+ This is the total number of times the function was called. If the
+ function was never called, or the number of times it was called
+ cannot be determined (probably because the function was not
+ compiled with profiling enabled), the "calls" field is blank.
+
+`self ms/call'
+ This represents the average number of milliseconds spent in this
+ function per call, if this function is profiled. Otherwise, this
+ field is blank for this function.
+
+`total ms/call'
+ This represents the average number of milliseconds spent in this
+ function and its descendants per call, if this function is
+ profiled. Otherwise, this field is blank for this function. This
+ is the only field in the flat profile that uses call graph
+ analysis.
+
+`name'
+ This is the name of the function. The flat profile is sorted by
+ this field alphabetically after the "self seconds" and "calls"
+ fields are sorted.
+
+
+File: gprof.info, Node: Call Graph, Next: Line-by-line, Prev: Flat Profile, Up: Output
+
+The Call Graph
+==============
+
+ The "call graph" shows how much time was spent in each function and
+its children. From this information, you can find functions that,
+while they themselves may not have used much time, called other
+functions that did use unusual amounts of time.
+
+ Here is a sample call from a small program. This call came from the
+same `gprof' run as the flat profile example in the previous chapter.
+
+ granularity: each sample hit covers 2 byte(s) for 20.00% of 0.05 seconds
+
+ index % time self children called name
+ <spontaneous>
+ [1] 100.0 0.00 0.05 start [1]
+ 0.00 0.05 1/1 main [2]
+ 0.00 0.00 1/2 on_exit [28]
+ 0.00 0.00 1/1 exit [59]
+ -----------------------------------------------
+ 0.00 0.05 1/1 start [1]
+ [2] 100.0 0.00 0.05 1 main [2]
+ 0.00 0.05 1/1 report [3]
+ -----------------------------------------------
+ 0.00 0.05 1/1 main [2]
+ [3] 100.0 0.00 0.05 1 report [3]
+ 0.00 0.03 8/8 timelocal [6]
+ 0.00 0.01 1/1 print [9]
+ 0.00 0.01 9/9 fgets [12]
+ 0.00 0.00 12/34 strncmp <cycle 1> [40]
+ 0.00 0.00 8/8 lookup [20]
+ 0.00 0.00 1/1 fopen [21]
+ 0.00 0.00 8/8 chewtime [24]
+ 0.00 0.00 8/16 skipspace [44]
+ -----------------------------------------------
+ [4] 59.8 0.01 0.02 8+472 <cycle 2 as a whole> [4]
+ 0.01 0.02 244+260 offtime <cycle 2> [7]
+ 0.00 0.00 236+1 tzset <cycle 2> [26]
+ -----------------------------------------------
+
+ The lines full of dashes divide this table into "entries", one for
+each function. Each entry has one or more lines.
+
+ In each entry, the primary line is the one that starts with an index
+number in square brackets. The end of this line says which function
+the entry is for. The preceding lines in the entry describe the
+callers of this function and the following lines describe its
+subroutines (also called "children" when we speak of the call graph).
+
+ The entries are sorted by time spent in the function and its
+subroutines.
+
+ The internal profiling function `mcount' (*note Flat Profile::) is
+never mentioned in the call graph.
+
+* Menu:
+
+* Primary:: Details of the primary line's contents.
+* Callers:: Details of caller-lines' contents.
+* Subroutines:: Details of subroutine-lines' contents.
+* Cycles:: When there are cycles of recursion,
+ such as `a' calls `b' calls `a'...
+
+
+File: gprof.info, Node: Primary, Next: Callers, Up: Call Graph
+
+The Primary Line
+----------------
+
+ The "primary line" in a call graph entry is the line that describes
+the function which the entry is about and gives the overall statistics
+for this function.
+
+ For reference, we repeat the primary line from the entry for function
+`report' in our main example, together with the heading line that shows
+the names of the fields:
+
+ index % time self children called name
+ ...
+ [3] 100.0 0.00 0.05 1 report [3]
+
+ Here is what the fields in the primary line mean:
+
+`index'
+ Entries are numbered with consecutive integers. Each function
+ therefore has an index number, which appears at the beginning of
+ its primary line.
+
+ Each cross-reference to a function, as a caller or subroutine of
+ another, gives its index number as well as its name. The index
+ number guides you if you wish to look for the entry for that
+ function.
+
+`% time'
+ This is the percentage of the total time that was spent in this
+ function, including time spent in subroutines called from this
+ function.
+
+ The time spent in this function is counted again for the callers of
+ this function. Therefore, adding up these percentages is
+ meaningless.
+
+`self'
+ This is the total amount of time spent in this function. This
+ should be identical to the number printed in the `seconds' field
+ for this function in the flat profile.
+
+`children'
+ This is the total amount of time spent in the subroutine calls
+ made by this function. This should be equal to the sum of all the
+ `self' and `children' entries of the children listed directly
+ below this function.
+
+`called'
+ This is the number of times the function was called.
+
+ If the function called itself recursively, there are two numbers,
+ separated by a `+'. The first number counts non-recursive calls,
+ and the second counts recursive calls.
+
+ In the example above, the function `report' was called once from
+ `main'.
+
+`name'
+ This is the name of the current function. The index number is
+ repeated after it.
+
+ If the function is part of a cycle of recursion, the cycle number
+ is printed between the function's name and the index number (*note
+ Cycles::). For example, if function `gnurr' is part of cycle
+ number one, and has index number twelve, its primary line would be
+ end like this:
+
+ gnurr <cycle 1> [12]
+
+
+File: gprof.info, Node: Callers, Next: Subroutines, Prev: Primary, Up: Call Graph
+
+Lines for a Function's Callers
+------------------------------
+
+ A function's entry has a line for each function it was called by.
+These lines' fields correspond to the fields of the primary line, but
+their meanings are different because of the difference in context.
+
+ For reference, we repeat two lines from the entry for the function
+`report', the primary line and one caller-line preceding it, together
+with the heading line that shows the names of the fields:
+
+ index % time self children called name
+ ...
+ 0.00 0.05 1/1 main [2]
+ [3] 100.0 0.00 0.05 1 report [3]
+
+ Here are the meanings of the fields in the caller-line for `report'
+called from `main':
+
+`self'
+ An estimate of the amount of time spent in `report' itself when it
+ was called from `main'.
+
+`children'
+ An estimate of the amount of time spent in subroutines of `report'
+ when `report' was called from `main'.
+
+ The sum of the `self' and `children' fields is an estimate of the
+ amount of time spent within calls to `report' from `main'.
+
+`called'
+ Two numbers: the number of times `report' was called from `main',
+ followed by the total number of non-recursive calls to `report'
+ from all its callers.
+
+`name and index number'
+ The name of the caller of `report' to which this line applies,
+ followed by the caller's index number.
+
+ Not all functions have entries in the call graph; some options to
+ `gprof' request the omission of certain functions. When a caller
+ has no entry of its own, it still has caller-lines in the entries
+ of the functions it calls.
+
+ If the caller is part of a recursion cycle, the cycle number is
+ printed between the name and the index number.
+
+ If the identity of the callers of a function cannot be determined, a
+dummy caller-line is printed which has `<spontaneous>' as the "caller's
+name" and all other fields blank. This can happen for signal handlers.
+
+
+File: gprof.info, Node: Subroutines, Next: Cycles, Prev: Callers, Up: Call Graph
+
+Lines for a Function's Subroutines
+----------------------------------
+
+ A function's entry has a line for each of its subroutines--in other
+words, a line for each other function that it called. These lines'
+fields correspond to the fields of the primary line, but their meanings
+are different because of the difference in context.
+
+ For reference, we repeat two lines from the entry for the function
+`main', the primary line and a line for a subroutine, together with the
+heading line that shows the names of the fields:
+
+ index % time self children called name
+ ...
+ [2] 100.0 0.00 0.05 1 main [2]
+ 0.00 0.05 1/1 report [3]
+
+ Here are the meanings of the fields in the subroutine-line for `main'
+calling `report':
+
+`self'
+ An estimate of the amount of time spent directly within `report'
+ when `report' was called from `main'.
+
+`children'
+ An estimate of the amount of time spent in subroutines of `report'
+ when `report' was called from `main'.
+
+ The sum of the `self' and `children' fields is an estimate of the
+ total time spent in calls to `report' from `main'.
+
+`called'
+ Two numbers, the number of calls to `report' from `main' followed
+ by the total number of non-recursive calls to `report'. This
+ ratio is used to determine how much of `report''s `self' and
+ `children' time gets credited to `main'. *Note Assumptions::.
+
+`name'
+ The name of the subroutine of `main' to which this line applies,
+ followed by the subroutine's index number.
+
+ If the caller is part of a recursion cycle, the cycle number is
+ printed between the name and the index number.
+
+
+File: gprof.info, Node: Cycles, Prev: Subroutines, Up: Call Graph
+
+How Mutually Recursive Functions Are Described
+----------------------------------------------
+
+ The graph may be complicated by the presence of "cycles of
+recursion" in the call graph. A cycle exists if a function calls
+another function that (directly or indirectly) calls (or appears to
+call) the original function. For example: if `a' calls `b', and `b'
+calls `a', then `a' and `b' form a cycle.
+
+ Whenever there are call paths both ways between a pair of functions,
+they belong to the same cycle. If `a' and `b' call each other and `b'
+and `c' call each other, all three make one cycle. Note that even if
+`b' only calls `a' if it was not called from `a', `gprof' cannot
+determine this, so `a' and `b' are still considered a cycle.
+
+ The cycles are numbered with consecutive integers. When a function
+belongs to a cycle, each time the function name appears in the call
+graph it is followed by `<cycle NUMBER>'.
+
+ The reason cycles matter is that they make the time values in the
+call graph paradoxical. The "time spent in children" of `a' should
+include the time spent in its subroutine `b' and in `b''s
+subroutines--but one of `b''s subroutines is `a'! How much of `a''s
+time should be included in the children of `a', when `a' is indirectly
+recursive?
+
+ The way `gprof' resolves this paradox is by creating a single entry
+for the cycle as a whole. The primary line of this entry describes the
+total time spent directly in the functions of the cycle. The
+"subroutines" of the cycle are the individual functions of the cycle,
+and all other functions that were called directly by them. The
+"callers" of the cycle are the functions, outside the cycle, that
+called functions in the cycle.
+
+ Here is an example portion of a call graph which shows a cycle
+containing functions `a' and `b'. The cycle was entered by a call to
+`a' from `main'; both `a' and `b' called `c'.
+
+ index % time self children called name
+ ----------------------------------------
+ 1.77 0 1/1 main [2]
+ [3] 91.71 1.77 0 1+5 <cycle 1 as a whole> [3]
+ 1.02 0 3 b <cycle 1> [4]
+ 0.75 0 2 a <cycle 1> [5]
+ ----------------------------------------
+ 3 a <cycle 1> [5]
+ [4] 52.85 1.02 0 0 b <cycle 1> [4]
+ 2 a <cycle 1> [5]
+ 0 0 3/6 c [6]
+ ----------------------------------------
+ 1.77 0 1/1 main [2]
+ 2 b <cycle 1> [4]
+ [5] 38.86 0.75 0 1 a <cycle 1> [5]
+ 3 b <cycle 1> [4]
+ 0 0 3/6 c [6]
+ ----------------------------------------
+
+(The entire call graph for this program contains in addition an entry
+for `main', which calls `a', and an entry for `c', with callers `a' and
+`b'.)
+
+ index % time self children called name
+ <spontaneous>
+ [1] 100.00 0 1.93 0 start [1]
+ 0.16 1.77 1/1 main [2]
+ ----------------------------------------
+ 0.16 1.77 1/1 start [1]
+ [2] 100.00 0.16 1.77 1 main [2]
+ 1.77 0 1/1 a <cycle 1> [5]
+ ----------------------------------------
+ 1.77 0 1/1 main [2]
+ [3] 91.71 1.77 0 1+5 <cycle 1 as a whole> [3]
+ 1.02 0 3 b <cycle 1> [4]
+ 0.75 0 2 a <cycle 1> [5]
+ 0 0 6/6 c [6]
+ ----------------------------------------
+ 3 a <cycle 1> [5]
+ [4] 52.85 1.02 0 0 b <cycle 1> [4]
+ 2 a <cycle 1> [5]
+ 0 0 3/6 c [6]
+ ----------------------------------------
+ 1.77 0 1/1 main [2]
+ 2 b <cycle 1> [4]
+ [5] 38.86 0.75 0 1 a <cycle 1> [5]
+ 3 b <cycle 1> [4]
+ 0 0 3/6 c [6]
+ ----------------------------------------
+ 0 0 3/6 b <cycle 1> [4]
+ 0 0 3/6 a <cycle 1> [5]
+ [6] 0.00 0 0 6 c [6]
+ ----------------------------------------
+
+ The `self' field of the cycle's primary line is the total time spent
+in all the functions of the cycle. It equals the sum of the `self'
+fields for the individual functions in the cycle, found in the entry in
+the subroutine lines for these functions.
+
+ The `children' fields of the cycle's primary line and subroutine
+lines count only subroutines outside the cycle. Even though `a' calls
+`b', the time spent in those calls to `b' is not counted in `a''s
+`children' time. Thus, we do not encounter the problem of what to do
+when the time in those calls to `b' includes indirect recursive calls
+back to `a'.
+
+ The `children' field of a caller-line in the cycle's entry estimates
+the amount of time spent _in the whole cycle_, and its other
+subroutines, on the times when that caller called a function in the
+cycle.
+
+ The `calls' field in the primary line for the cycle has two numbers:
+first, the number of times functions in the cycle were called by
+functions outside the cycle; second, the number of times they were
+called by functions in the cycle (including times when a function in
+the cycle calls itself). This is a generalization of the usual split
+into non-recursive and recursive calls.
+
+ The `calls' field of a subroutine-line for a cycle member in the
+cycle's entry says how many time that function was called from
+functions in the cycle. The total of all these is the second number in
+the primary line's `calls' field.
+
+ In the individual entry for a function in a cycle, the other
+functions in the same cycle can appear as subroutines and as callers.
+These lines show how many times each function in the cycle called or
+was called from each other function in the cycle. The `self' and
+`children' fields in these lines are blank because of the difficulty of
+defining meanings for them when recursion is going on.
+
diff --git a/gnu/usr.bin/binutils/gprof/gprof.info-2 b/gnu/usr.bin/binutils/gprof/gprof.info-2
new file mode 100644
index 00000000000..6cdfda58698
--- /dev/null
+++ b/gnu/usr.bin/binutils/gprof/gprof.info-2
@@ -0,0 +1,760 @@
+This is gprof.info, produced by makeinfo version 4.0 from gprof.texi.
+
+START-INFO-DIR-ENTRY
+* gprof: (gprof). Profiling your program's execution
+END-INFO-DIR-ENTRY
+
+ This file documents the gprof profiler of the GNU system.
+
+ Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation,
+Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: gprof.info, Node: Line-by-line, Next: Annotated Source, Prev: Call Graph, Up: Output
+
+Line-by-line Profiling
+======================
+
+ `gprof''s `-l' option causes the program to perform "line-by-line"
+profiling. In this mode, histogram samples are assigned not to
+functions, but to individual lines of source code. The program usually
+must be compiled with a `-g' option, in addition to `-pg', in order to
+generate debugging symbols for tracking source code lines.
+
+ The flat profile is the most useful output table in line-by-line
+mode. The call graph isn't as useful as normal, since the current
+version of `gprof' does not propagate call graph arcs from source code
+lines to the enclosing function. The call graph does, however, show
+each line of code that called each function, along with a count.
+
+ Here is a section of `gprof''s output, without line-by-line
+profiling. Note that `ct_init' accounted for four histogram hits, and
+13327 calls to `init_block'.
+
+ Flat profile:
+
+ Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls us/call us/call name
+ 30.77 0.13 0.04 6335 6.31 6.31 ct_init
+
+
+ Call graph (explanation follows)
+
+
+ granularity: each sample hit covers 4 byte(s) for 7.69% of 0.13 seconds
+
+ index % time self children called name
+
+ 0.00 0.00 1/13496 name_too_long
+ 0.00 0.00 40/13496 deflate
+ 0.00 0.00 128/13496 deflate_fast
+ 0.00 0.00 13327/13496 ct_init
+ [7] 0.0 0.00 0.00 13496 init_block
+
+ Now let's look at some of `gprof''s output from the same program run,
+this time with line-by-line profiling enabled. Note that `ct_init''s
+four histogram hits are broken down into four lines of source code -
+one hit occurred on each of lines 349, 351, 382 and 385. In the call
+graph, note how `ct_init''s 13327 calls to `init_block' are broken down
+into one call from line 396, 3071 calls from line 384, 3730 calls from
+line 385, and 6525 calls from 387.
+
+ Flat profile:
+
+ Each sample counts as 0.01 seconds.
+ % cumulative self
+ time seconds seconds calls name
+ 7.69 0.10 0.01 ct_init (trees.c:349)
+ 7.69 0.11 0.01 ct_init (trees.c:351)
+ 7.69 0.12 0.01 ct_init (trees.c:382)
+ 7.69 0.13 0.01 ct_init (trees.c:385)
+
+
+ Call graph (explanation follows)
+
+
+ granularity: each sample hit covers 4 byte(s) for 7.69% of 0.13 seconds
+
+ % time self children called name
+
+ 0.00 0.00 1/13496 name_too_long (gzip.c:1440)
+ 0.00 0.00 1/13496 deflate (deflate.c:763)
+ 0.00 0.00 1/13496 ct_init (trees.c:396)
+ 0.00 0.00 2/13496 deflate (deflate.c:727)
+ 0.00 0.00 4/13496 deflate (deflate.c:686)
+ 0.00 0.00 5/13496 deflate (deflate.c:675)
+ 0.00 0.00 12/13496 deflate (deflate.c:679)
+ 0.00 0.00 16/13496 deflate (deflate.c:730)
+ 0.00 0.00 128/13496 deflate_fast (deflate.c:654)
+ 0.00 0.00 3071/13496 ct_init (trees.c:384)
+ 0.00 0.00 3730/13496 ct_init (trees.c:385)
+ 0.00 0.00 6525/13496 ct_init (trees.c:387)
+ [6] 0.0 0.00 0.00 13496 init_block (trees.c:408)
+
+
+File: gprof.info, Node: Annotated Source, Prev: Line-by-line, Up: Output
+
+The Annotated Source Listing
+============================
+
+ `gprof''s `-A' option triggers an annotated source listing, which
+lists the program's source code, each function labeled with the number
+of times it was called. You may also need to specify the `-I' option,
+if `gprof' can't find the source code files.
+
+ Compiling with `gcc ... -g -pg -a' augments your program with
+basic-block counting code, in addition to function counting code. This
+enables `gprof' to determine how many times each line of code was
+executed. For example, consider the following function, taken from
+gzip, with line numbers added:
+
+ 1 ulg updcrc(s, n)
+ 2 uch *s;
+ 3 unsigned n;
+ 4 {
+ 5 register ulg c;
+ 6
+ 7 static ulg crc = (ulg)0xffffffffL;
+ 8
+ 9 if (s == NULL) {
+ 10 c = 0xffffffffL;
+ 11 } else {
+ 12 c = crc;
+ 13 if (n) do {
+ 14 c = crc_32_tab[...];
+ 15 } while (--n);
+ 16 }
+ 17 crc = c;
+ 18 return c ^ 0xffffffffL;
+ 19 }
+
+ `updcrc' has at least five basic-blocks. One is the function
+itself. The `if' statement on line 9 generates two more basic-blocks,
+one for each branch of the `if'. A fourth basic-block results from the
+`if' on line 13, and the contents of the `do' loop form the fifth
+basic-block. The compiler may also generate additional basic-blocks to
+handle various special cases.
+
+ A program augmented for basic-block counting can be analyzed with
+`gprof -l -A'. I also suggest use of the `-x' option, which ensures
+that each line of code is labeled at least once. Here is `updcrc''s
+annotated source listing for a sample `gzip' run:
+
+ ulg updcrc(s, n)
+ uch *s;
+ unsigned n;
+ 2 ->{
+ register ulg c;
+
+ static ulg crc = (ulg)0xffffffffL;
+
+ 2 -> if (s == NULL) {
+ 1 -> c = 0xffffffffL;
+ 1 -> } else {
+ 1 -> c = crc;
+ 1 -> if (n) do {
+ 26312 -> c = crc_32_tab[...];
+ 26312,1,26311 -> } while (--n);
+ }
+ 2 -> crc = c;
+ 2 -> return c ^ 0xffffffffL;
+ 2 ->}
+
+ In this example, the function was called twice, passing once through
+each branch of the `if' statement. The body of the `do' loop was
+executed a total of 26312 times. Note how the `while' statement is
+annotated. It began execution 26312 times, once for each iteration
+through the loop. One of those times (the last time) it exited, while
+it branched back to the beginning of the loop 26311 times.
+
+
+File: gprof.info, Node: Inaccuracy, Next: How do I?, Prev: Output, Up: Top
+
+Inaccuracy of `gprof' Output
+****************************
+
+* Menu:
+
+* Sampling Error:: Statistical margins of error
+* Assumptions:: Estimating children times
+
+
+File: gprof.info, Node: Sampling Error, Next: Assumptions, Up: Inaccuracy
+
+Statistical Sampling Error
+==========================
+
+ The run-time figures that `gprof' gives you are based on a sampling
+process, so they are subject to statistical inaccuracy. If a function
+runs only a small amount of time, so that on the average the sampling
+process ought to catch that function in the act only once, there is a
+pretty good chance it will actually find that function zero times, or
+twice.
+
+ By contrast, the number-of-calls and basic-block figures are derived
+by counting, not sampling. They are completely accurate and will not
+vary from run to run if your program is deterministic.
+
+ The "sampling period" that is printed at the beginning of the flat
+profile says how often samples are taken. The rule of thumb is that a
+run-time figure is accurate if it is considerably bigger than the
+sampling period.
+
+ The actual amount of error can be predicted. For N samples, the
+_expected_ error is the square-root of N. For example, if the sampling
+period is 0.01 seconds and `foo''s run-time is 1 second, N is 100
+samples (1 second/0.01 seconds), sqrt(N) is 10 samples, so the expected
+error in `foo''s run-time is 0.1 seconds (10*0.01 seconds), or ten
+percent of the observed value. Again, if the sampling period is 0.01
+seconds and `bar''s run-time is 100 seconds, N is 10000 samples,
+sqrt(N) is 100 samples, so the expected error in `bar''s run-time is 1
+second, or one percent of the observed value. It is likely to vary
+this much _on the average_ from one profiling run to the next.
+(_Sometimes_ it will vary more.)
+
+ This does not mean that a small run-time figure is devoid of
+information. If the program's _total_ run-time is large, a small
+run-time for one function does tell you that that function used an
+insignificant fraction of the whole program's time. Usually this means
+it is not worth optimizing.
+
+ One way to get more accuracy is to give your program more (but
+similar) input data so it will take longer. Another way is to combine
+the data from several runs, using the `-s' option of `gprof'. Here is
+how:
+
+ 1. Run your program once.
+
+ 2. Issue the command `mv gmon.out gmon.sum'.
+
+ 3. Run your program again, the same as before.
+
+ 4. Merge the new data in `gmon.out' into `gmon.sum' with this command:
+
+ gprof -s EXECUTABLE-FILE gmon.out gmon.sum
+
+ 5. Repeat the last two steps as often as you wish.
+
+ 6. Analyze the cumulative data using this command:
+
+ gprof EXECUTABLE-FILE gmon.sum > OUTPUT-FILE
+
+
+File: gprof.info, Node: Assumptions, Prev: Sampling Error, Up: Inaccuracy
+
+Estimating `children' Times
+===========================
+
+ Some of the figures in the call graph are estimates--for example, the
+`children' time values and all the the time figures in caller and
+subroutine lines.
+
+ There is no direct information about these measurements in the
+profile data itself. Instead, `gprof' estimates them by making an
+assumption about your program that might or might not be true.
+
+ The assumption made is that the average time spent in each call to
+any function `foo' is not correlated with who called `foo'. If `foo'
+used 5 seconds in all, and 2/5 of the calls to `foo' came from `a',
+then `foo' contributes 2 seconds to `a''s `children' time, by
+assumption.
+
+ This assumption is usually true enough, but for some programs it is
+far from true. Suppose that `foo' returns very quickly when its
+argument is zero; suppose that `a' always passes zero as an argument,
+while other callers of `foo' pass other arguments. In this program,
+all the time spent in `foo' is in the calls from callers other than `a'.
+But `gprof' has no way of knowing this; it will blindly and incorrectly
+charge 2 seconds of time in `foo' to the children of `a'.
+
+ We hope some day to put more complete data into `gmon.out', so that
+this assumption is no longer needed, if we can figure out how. For the
+nonce, the estimated figures are usually more useful than misleading.
+
+
+File: gprof.info, Node: How do I?, Next: Incompatibilities, Prev: Inaccuracy, Up: Top
+
+Answers to Common Questions
+***************************
+
+How do I find which lines in my program were executed the most times?
+ Compile your program with basic-block counting enabled, run it,
+ then use the following pipeline:
+
+ gprof -l -C OBJFILE | sort -k 3 -n -r
+
+ This listing will show you the lines in your code executed most
+ often, but not necessarily those that consumed the most time.
+
+How do I find which lines in my program called a particular function?
+ Use `gprof -l' and lookup the function in the call graph. The
+ callers will be broken down by function and line number.
+
+How do I analyze a program that runs for less than a second?
+ Try using a shell script like this one:
+
+ for i in `seq 1 100`; do
+ fastprog
+ mv gmon.out gmon.out.$i
+ done
+
+ gprof -s fastprog gmon.out.*
+
+ gprof fastprog gmon.sum
+
+ If your program is completely deterministic, all the call counts
+ will be simple multiples of 100 (i.e. a function called once in
+ each run will appear with a call count of 100).
+
+
+File: gprof.info, Node: Incompatibilities, Next: Details, Prev: How do I?, Up: Top
+
+Incompatibilities with Unix `gprof'
+***********************************
+
+ GNU `gprof' and Berkeley Unix `gprof' use the same data file
+`gmon.out', and provide essentially the same information. But there
+are a few differences.
+
+ * GNU `gprof' uses a new, generalized file format with support for
+ basic-block execution counts and non-realtime histograms. A magic
+ cookie and version number allows `gprof' to easily identify new
+ style files. Old BSD-style files can still be read. *Note File
+ Format::.
+
+ * For a recursive function, Unix `gprof' lists the function as a
+ parent and as a child, with a `calls' field that lists the number
+ of recursive calls. GNU `gprof' omits these lines and puts the
+ number of recursive calls in the primary line.
+
+ * When a function is suppressed from the call graph with `-e', GNU
+ `gprof' still lists it as a subroutine of functions that call it.
+
+ * GNU `gprof' accepts the `-k' with its argument in the form
+ `from/to', instead of `from to'.
+
+ * In the annotated source listing, if there are multiple basic
+ blocks on the same line, GNU `gprof' prints all of their counts,
+ separated by commas.
+
+ * The blurbs, field widths, and output formats are different. GNU
+ `gprof' prints blurbs after the tables, so that you can see the
+ tables without skipping the blurbs.
+
+
+File: gprof.info, Node: Details, Prev: Incompatibilities, Up: Top
+
+Details of Profiling
+********************
+
+* Menu:
+
+* Implementation:: How a program collects profiling information
+* File Format:: Format of `gmon.out' files
+* Internals:: `gprof''s internal operation
+* Debugging:: Using `gprof''s `-d' option
+
+
+File: gprof.info, Node: Implementation, Next: File Format, Up: Details
+
+Implementation of Profiling
+===========================
+
+ Profiling works by changing how every function in your program is
+compiled so that when it is called, it will stash away some information
+about where it was called from. From this, the profiler can figure out
+what function called it, and can count how many times it was called.
+This change is made by the compiler when your program is compiled with
+the `-pg' option, which causes every function to call `mcount' (or
+`_mcount', or `__mcount', depending on the OS and compiler) as one of
+its first operations.
+
+ The `mcount' routine, included in the profiling library, is
+responsible for recording in an in-memory call graph table both its
+parent routine (the child) and its parent's parent. This is typically
+done by examining the stack frame to find both the address of the
+child, and the return address in the original parent. Since this is a
+very machine-dependent operation, `mcount' itself is typically a short
+assembly-language stub routine that extracts the required information,
+and then calls `__mcount_internal' (a normal C function) with two
+arguments - `frompc' and `selfpc'. `__mcount_internal' is responsible
+for maintaining the in-memory call graph, which records `frompc',
+`selfpc', and the number of times each of these call arcs was traversed.
+
+ GCC Version 2 provides a magical function
+(`__builtin_return_address'), which allows a generic `mcount' function
+to extract the required information from the stack frame. However, on
+some architectures, most notably the SPARC, using this builtin can be
+very computationally expensive, and an assembly language version of
+`mcount' is used for performance reasons.
+
+ Number-of-calls information for library routines is collected by
+using a special version of the C library. The programs in it are the
+same as in the usual C library, but they were compiled with `-pg'. If
+you link your program with `gcc ... -pg', it automatically uses the
+profiling version of the library.
+
+ Profiling also involves watching your program as it runs, and
+keeping a histogram of where the program counter happens to be every
+now and then. Typically the program counter is looked at around 100
+times per second of run time, but the exact frequency may vary from
+system to system.
+
+ This is done is one of two ways. Most UNIX-like operating systems
+provide a `profil()' system call, which registers a memory array with
+the kernel, along with a scale factor that determines how the program's
+address space maps into the array. Typical scaling values cause every
+2 to 8 bytes of address space to map into a single array slot. On
+every tick of the system clock (assuming the profiled program is
+running), the value of the program counter is examined and the
+corresponding slot in the memory array is incremented. Since this is
+done in the kernel, which had to interrupt the process anyway to handle
+the clock interrupt, very little additional system overhead is required.
+
+ However, some operating systems, most notably Linux 2.0 (and
+earlier), do not provide a `profil()' system call. On such a system,
+arrangements are made for the kernel to periodically deliver a signal
+to the process (typically via `setitimer()'), which then performs the
+same operation of examining the program counter and incrementing a slot
+in the memory array. Since this method requires a signal to be
+delivered to user space every time a sample is taken, it uses
+considerably more overhead than kernel-based profiling. Also, due to
+the added delay required to deliver the signal, this method is less
+accurate as well.
+
+ A special startup routine allocates memory for the histogram and
+either calls `profil()' or sets up a clock signal handler. This
+routine (`monstartup') can be invoked in several ways. On Linux
+systems, a special profiling startup file `gcrt0.o', which invokes
+`monstartup' before `main', is used instead of the default `crt0.o'.
+Use of this special startup file is one of the effects of using `gcc
+... -pg' to link. On SPARC systems, no special startup files are used.
+Rather, the `mcount' routine, when it is invoked for the first time
+(typically when `main' is called), calls `monstartup'.
+
+ If the compiler's `-a' option was used, basic-block counting is also
+enabled. Each object file is then compiled with a static array of
+counts, initially zero. In the executable code, every time a new
+basic-block begins (i.e. when an `if' statement appears), an extra
+instruction is inserted to increment the corresponding count in the
+array. At compile time, a paired array was constructed that recorded
+the starting address of each basic-block. Taken together, the two
+arrays record the starting address of every basic-block, along with the
+number of times it was executed.
+
+ The profiling library also includes a function (`mcleanup') which is
+typically registered using `atexit()' to be called as the program
+exits, and is responsible for writing the file `gmon.out'. Profiling
+is turned off, various headers are output, and the histogram is
+written, followed by the call-graph arcs and the basic-block counts.
+
+ The output from `gprof' gives no indication of parts of your program
+that are limited by I/O or swapping bandwidth. This is because samples
+of the program counter are taken at fixed intervals of the program's
+run time. Therefore, the time measurements in `gprof' output say
+nothing about time that your program was not running. For example, a
+part of the program that creates so much data that it cannot all fit in
+physical memory at once may run very slowly due to thrashing, but
+`gprof' will say it uses little time. On the other hand, sampling by
+run time has the advantage that the amount of load due to other users
+won't directly affect the output you get.
+
+
+File: gprof.info, Node: File Format, Next: Internals, Prev: Implementation, Up: Details
+
+Profiling Data File Format
+==========================
+
+ The old BSD-derived file format used for profile data does not
+contain a magic cookie that allows to check whether a data file really
+is a `gprof' file. Furthermore, it does not provide a version number,
+thus rendering changes to the file format almost impossible. GNU
+`gprof' uses a new file format that provides these features. For
+backward compatibility, GNU `gprof' continues to support the old
+BSD-derived format, but not all features are supported with it. For
+example, basic-block execution counts cannot be accommodated by the old
+file format.
+
+ The new file format is defined in header file `gmon_out.h'. It
+consists of a header containing the magic cookie and a version number,
+as well as some spare bytes available for future extensions. All data
+in a profile data file is in the native format of the host on which the
+profile was collected. GNU `gprof' adapts automatically to the
+byte-order in use.
+
+ In the new file format, the header is followed by a sequence of
+records. Currently, there are three different record types: histogram
+records, call-graph arc records, and basic-block execution count
+records. Each file can contain any number of each record type. When
+reading a file, GNU `gprof' will ensure records of the same type are
+compatible with each other and compute the union of all records. For
+example, for basic-block execution counts, the union is simply the sum
+of all execution counts for each basic-block.
+
+Histogram Records
+-----------------
+
+ Histogram records consist of a header that is followed by an array of
+bins. The header contains the text-segment range that the histogram
+spans, the size of the histogram in bytes (unlike in the old BSD
+format, this does not include the size of the header), the rate of the
+profiling clock, and the physical dimension that the bin counts
+represent after being scaled by the profiling clock rate. The physical
+dimension is specified in two parts: a long name of up to 15 characters
+and a single character abbreviation. For example, a histogram
+representing real-time would specify the long name as "seconds" and the
+abbreviation as "s". This feature is useful for architectures that
+support performance monitor hardware (which, fortunately, is becoming
+increasingly common). For example, under DEC OSF/1, the "uprofile"
+command can be used to produce a histogram of, say, instruction cache
+misses. In this case, the dimension in the histogram header could be
+set to "i-cache misses" and the abbreviation could be set to "1"
+(because it is simply a count, not a physical dimension). Also, the
+profiling rate would have to be set to 1 in this case.
+
+ Histogram bins are 16-bit numbers and each bin represent an equal
+amount of text-space. For example, if the text-segment is one thousand
+bytes long and if there are ten bins in the histogram, each bin
+represents one hundred bytes.
+
+Call-Graph Records
+------------------
+
+ Call-graph records have a format that is identical to the one used in
+the BSD-derived file format. It consists of an arc in the call graph
+and a count indicating the number of times the arc was traversed during
+program execution. Arcs are specified by a pair of addresses: the
+first must be within caller's function and the second must be within
+the callee's function. When performing profiling at the function
+level, these addresses can point anywhere within the respective
+function. However, when profiling at the line-level, it is better if
+the addresses are as close to the call-site/entry-point as possible.
+This will ensure that the line-level call-graph is able to identify
+exactly which line of source code performed calls to a function.
+
+Basic-Block Execution Count Records
+-----------------------------------
+
+ Basic-block execution count records consist of a header followed by a
+sequence of address/count pairs. The header simply specifies the
+length of the sequence. In an address/count pair, the address
+identifies a basic-block and the count specifies the number of times
+that basic-block was executed. Any address within the basic-address can
+be used.
+
+
+File: gprof.info, Node: Internals, Next: Debugging, Prev: File Format, Up: Details
+
+`gprof''s Internal Operation
+============================
+
+ Like most programs, `gprof' begins by processing its options.
+During this stage, it may building its symspec list
+(`sym_ids.c:sym_id_add'), if options are specified which use symspecs.
+`gprof' maintains a single linked list of symspecs, which will
+eventually get turned into 12 symbol tables, organized into six
+include/exclude pairs - one pair each for the flat profile
+(INCL_FLAT/EXCL_FLAT), the call graph arcs (INCL_ARCS/EXCL_ARCS),
+printing in the call graph (INCL_GRAPH/EXCL_GRAPH), timing propagation
+in the call graph (INCL_TIME/EXCL_TIME), the annotated source listing
+(INCL_ANNO/EXCL_ANNO), and the execution count listing
+(INCL_EXEC/EXCL_EXEC).
+
+ After option processing, `gprof' finishes building the symspec list
+by adding all the symspecs in `default_excluded_list' to the exclude
+lists EXCL_TIME and EXCL_GRAPH, and if line-by-line profiling is
+specified, EXCL_FLAT as well. These default excludes are not added to
+EXCL_ANNO, EXCL_ARCS, and EXCL_EXEC.
+
+ Next, the BFD library is called to open the object file, verify that
+it is an object file, and read its symbol table (`core.c:core_init'),
+using `bfd_canonicalize_symtab' after mallocing an appropriately sized
+array of symbols. At this point, function mappings are read (if the
+`--file-ordering' option has been specified), and the core text space
+is read into memory (if the `-c' option was given).
+
+ `gprof''s own symbol table, an array of Sym structures, is now built.
+This is done in one of two ways, by one of two routines, depending on
+whether line-by-line profiling (`-l' option) has been enabled. For
+normal profiling, the BFD canonical symbol table is scanned. For
+line-by-line profiling, every text space address is examined, and a new
+symbol table entry gets created every time the line number changes. In
+either case, two passes are made through the symbol table - one to
+count the size of the symbol table required, and the other to actually
+read the symbols. In between the two passes, a single array of type
+`Sym' is created of the appropriate length. Finally,
+`symtab.c:symtab_finalize' is called to sort the symbol table and
+remove duplicate entries (entries with the same memory address).
+
+ The symbol table must be a contiguous array for two reasons. First,
+the `qsort' library function (which sorts an array) will be used to
+sort the symbol table. Also, the symbol lookup routine
+(`symtab.c:sym_lookup'), which finds symbols based on memory address,
+uses a binary search algorithm which requires the symbol table to be a
+sorted array. Function symbols are indicated with an `is_func' flag.
+Line number symbols have no special flags set. Additionally, a symbol
+can have an `is_static' flag to indicate that it is a local symbol.
+
+ With the symbol table read, the symspecs can now be translated into
+Syms (`sym_ids.c:sym_id_parse'). Remember that a single symspec can
+match multiple symbols. An array of symbol tables (`syms') is created,
+each entry of which is a symbol table of Syms to be included or
+excluded from a particular listing. The master symbol table and the
+symspecs are examined by nested loops, and every symbol that matches a
+symspec is inserted into the appropriate syms table. This is done
+twice, once to count the size of each required symbol table, and again
+to build the tables, which have been malloced between passes. From now
+on, to determine whether a symbol is on an include or exclude symspec
+list, `gprof' simply uses its standard symbol lookup routine on the
+appropriate table in the `syms' array.
+
+ Now the profile data file(s) themselves are read
+(`gmon_io.c:gmon_out_read'), first by checking for a new-style
+`gmon.out' header, then assuming this is an old-style BSD `gmon.out' if
+the magic number test failed.
+
+ New-style histogram records are read by `hist.c:hist_read_rec'. For
+the first histogram record, allocate a memory array to hold all the
+bins, and read them in. When multiple profile data files (or files
+with multiple histogram records) are read, the starting address, ending
+address, number of bins and sampling rate must match between the
+various histograms, or a fatal error will result. If everything
+matches, just sum the additional histograms into the existing in-memory
+array.
+
+ As each call graph record is read (`call_graph.c:cg_read_rec'), the
+parent and child addresses are matched to symbol table entries, and a
+call graph arc is created by `cg_arcs.c:arc_add', unless the arc fails
+a symspec check against INCL_ARCS/EXCL_ARCS. As each arc is added, a
+linked list is maintained of the parent's child arcs, and of the child's
+parent arcs. Both the child's call count and the arc's call count are
+incremented by the record's call count.
+
+ Basic-block records are read (`basic_blocks.c:bb_read_rec'), but
+only if line-by-line profiling has been selected. Each basic-block
+address is matched to a corresponding line symbol in the symbol table,
+and an entry made in the symbol's bb_addr and bb_calls arrays. Again,
+if multiple basic-block records are present for the same address, the
+call counts are cumulative.
+
+ A gmon.sum file is dumped, if requested (`gmon_io.c:gmon_out_write').
+
+ If histograms were present in the data files, assign them to symbols
+(`hist.c:hist_assign_samples') by iterating over all the sample bins
+and assigning them to symbols. Since the symbol table is sorted in
+order of ascending memory addresses, we can simple follow along in the
+symbol table as we make our pass over the sample bins. This step
+includes a symspec check against INCL_FLAT/EXCL_FLAT. Depending on the
+histogram scale factor, a sample bin may span multiple symbols, in
+which case a fraction of the sample count is allocated to each symbol,
+proportional to the degree of overlap. This effect is rare for normal
+profiling, but overlaps are more common during line-by-line profiling,
+and can cause each of two adjacent lines to be credited with half a
+hit, for example.
+
+ If call graph data is present, `cg_arcs.c:cg_assemble' is called.
+First, if `-c' was specified, a machine-dependent routine (`find_call')
+scans through each symbol's machine code, looking for subroutine call
+instructions, and adding them to the call graph with a zero call count.
+A topological sort is performed by depth-first numbering all the
+symbols (`cg_dfn.c:cg_dfn'), so that children are always numbered less
+than their parents, then making a array of pointers into the symbol
+table and sorting it into numerical order, which is reverse topological
+order (children appear before parents). Cycles are also detected at
+this point, all members of which are assigned the same topological
+number. Two passes are now made through this sorted array of symbol
+pointers. The first pass, from end to beginning (parents to children),
+computes the fraction of child time to propagate to each parent and a
+print flag. The print flag reflects symspec handling of
+INCL_GRAPH/EXCL_GRAPH, with a parent's include or exclude (print or no
+print) property being propagated to its children, unless they
+themselves explicitly appear in INCL_GRAPH or EXCL_GRAPH. A second
+pass, from beginning to end (children to parents) actually propagates
+the timings along the call graph, subject to a check against
+INCL_TIME/EXCL_TIME. With the print flag, fractions, and timings now
+stored in the symbol structures, the topological sort array is now
+discarded, and a new array of pointers is assembled, this time sorted
+by propagated time.
+
+ Finally, print the various outputs the user requested, which is now
+fairly straightforward. The call graph (`cg_print.c:cg_print') and
+flat profile (`hist.c:hist_print') are regurgitations of values already
+computed. The annotated source listing
+(`basic_blocks.c:print_annotated_source') uses basic-block information,
+if present, to label each line of code with call counts, otherwise only
+the function call counts are presented.
+
+ The function ordering code is marginally well documented in the
+source code itself (`cg_print.c'). Basically, the functions with the
+most use and the most parents are placed first, followed by other
+functions with the most use, followed by lower use functions, followed
+by unused functions at the end.
+
+
+File: gprof.info, Node: Debugging, Prev: Internals, Up: Details
+
+Debugging `gprof'
+-----------------
+
+ If `gprof' was compiled with debugging enabled, the `-d' option
+triggers debugging output (to stdout) which can be helpful in
+understanding its operation. The debugging number specified is
+interpreted as a sum of the following options:
+
+2 - Topological sort
+ Monitor depth-first numbering of symbols during call graph analysis
+
+4 - Cycles
+ Shows symbols as they are identified as cycle heads
+
+16 - Tallying
+ As the call graph arcs are read, show each arc and how the total
+ calls to each function are tallied
+
+32 - Call graph arc sorting
+ Details sorting individual parents/children within each call graph
+ entry
+
+64 - Reading histogram and call graph records
+ Shows address ranges of histograms as they are read, and each call
+ graph arc
+
+128 - Symbol table
+ Reading, classifying, and sorting the symbol table from the object
+ file. For line-by-line profiling (`-l' option), also shows line
+ numbers being assigned to memory addresses.
+
+256 - Static call graph
+ Trace operation of `-c' option
+
+512 - Symbol table and arc table lookups
+ Detail operation of lookup routines
+
+1024 - Call graph propagation
+ Shows how function times are propagated along the call graph
+
+2048 - Basic-blocks
+ Shows basic-block records as they are read from profile data (only
+ meaningful with `-l' option)
+
+4096 - Symspecs
+ Shows symspec-to-symbol pattern matching operation
+
+8192 - Annotate source
+ Tracks operation of `-A' option
+
+
diff --git a/gnu/usr.bin/binutils/include/dyn-string.h b/gnu/usr.bin/binutils/include/dyn-string.h
new file mode 100644
index 00000000000..67f7ab7d36e
--- /dev/null
+++ b/gnu/usr.bin/binutils/include/dyn-string.h
@@ -0,0 +1,92 @@
+/* An abstract string datatype.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Contributed by Mark Mitchell (mark@markmitchell.com).
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+typedef struct dyn_string
+{
+ int allocated; /* The amount of space allocated for the string. */
+ int length; /* The actual length of the string. */
+ char *s; /* The string itself, NUL-terminated. */
+}* dyn_string_t;
+
+/* The length STR, in bytes, not including the terminating NUL. */
+#define dyn_string_length(STR) \
+ ((STR)->length)
+
+/* The NTBS in which the contents of STR are stored. */
+#define dyn_string_buf(STR) \
+ ((STR)->s)
+
+/* Compare DS1 to DS2 with strcmp. */
+#define dyn_string_compare(DS1, DS2) \
+ (strcmp ((DS1)->s, (DS2)->s))
+
+
+/* dyn_string functions are used in the demangling implementation
+ included in the G++ runtime library. To prevent collisions with
+ names in user programs, the functions that are used in the
+ demangler are given implementation-reserved names. */
+
+#ifdef IN_LIBGCC2
+
+#define dyn_string_init __cxa_dyn_string_init
+#define dyn_string_new __cxa_dyn_string_new
+#define dyn_string_delete __cxa_dyn_string_delete
+#define dyn_string_release __cxa_dyn_string_release
+#define dyn_string_resize __cxa_dyn_string_resize
+#define dyn_string_clear __cxa_dyn_string_clear
+#define dyn_string_copy __cxa_dyn_string_copy
+#define dyn_string_copy_cstr __cxa_dyn_string_copy_cstr
+#define dyn_string_prepend __cxa_dyn_string_prepend
+#define dyn_string_prepend_cstr __cxa_dyn_string_prepend_cstr
+#define dyn_string_insert __cxa_dyn_string_insert
+#define dyn_string_insert_cstr __cxa_dyn_string_insert_cstr
+#define dyn_string_insert_char __cxa_dyn_string_insert_char
+#define dyn_string_append __cxa_dyn_string_append
+#define dyn_string_append_cstr __cxa_dyn_string_append_cstr
+#define dyn_string_append_char __cxa_dyn_string_append_char
+#define dyn_string_substring __cxa_dyn_string_substring
+#define dyn_string_eq __cxa_dyn_string_eq
+
+#endif /* IN_LIBGCC2 */
+
+
+extern int dyn_string_init PARAMS ((struct dyn_string *, int));
+extern dyn_string_t dyn_string_new PARAMS ((int));
+extern void dyn_string_delete PARAMS ((dyn_string_t));
+extern char *dyn_string_release PARAMS ((dyn_string_t));
+extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));
+extern void dyn_string_clear PARAMS ((dyn_string_t));
+extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t));
+extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *));
+extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t));
+extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *));
+extern int dyn_string_insert PARAMS ((dyn_string_t, int,
+ dyn_string_t));
+extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int,
+ const char *));
+extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int));
+extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t));
+extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *));
+extern int dyn_string_append_char PARAMS ((dyn_string_t, int));
+extern int dyn_string_substring PARAMS ((dyn_string_t,
+ dyn_string_t, int, int));
+extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t));
diff --git a/gnu/usr.bin/binutils/ld/ldver.texi b/gnu/usr.bin/binutils/ld/ldver.texi
index b696ac718c9..4c75b622163 100644
--- a/gnu/usr.bin/binutils/ld/ldver.texi
+++ b/gnu/usr.bin/binutils/ld/ldver.texi
@@ -1 +1 @@
-@set VERSION 2.10
+@set VERSION 2.10.1
diff --git a/gnu/usr.bin/binutils/ld/scripttempl/elfd30v.sc b/gnu/usr.bin/binutils/ld/scripttempl/elfd30v.sc
index 0ff928345be..f33f90ce14b 100644
--- a/gnu/usr.bin/binutils/ld/scripttempl/elfd30v.sc
+++ b/gnu/usr.bin/binutils/ld/scripttempl/elfd30v.sc
@@ -121,7 +121,8 @@ SECTIONS
.rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}}
/* C++ exception support. */
- .eh_frame ${RELOCATING-0} : { *(.eh_frame) } ${RELOCATING+ > ${DATA_MEMORY}}
+ .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${DATA_MEMORY}}
+ .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } ${RELOCATING+ > ${DATA_MEMORY}}
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
@@ -213,7 +214,3 @@ SECTIONS
PROVIDE (__stack = ${STACK_START_ADDR});
}
EOF
-
-
-
-
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elf-offset.ld b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elf-offset.ld
new file mode 100644
index 00000000000..dfe429309a7
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elf-offset.ld
@@ -0,0 +1,168 @@
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ . = 0x100000;
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .gnu.version : { *(.gnu.version) }
+ .gnu.version_d : { *(.gnu.version_d) }
+ .gnu.version_r : { *(.gnu.version_r) }
+ .rel.text :
+ {
+ *(.rel.text)
+ *(.rel.text.*)
+ *(.rel.gnu.linkonce.t*)
+ }
+ .rela.text :
+ {
+ *(.rela.text)
+ *(.rela.text.*)
+ *(.rela.gnu.linkonce.t*)
+ }
+ .rel.data :
+ {
+ *(.rel.data)
+ *(.rel.data.*)
+ *(.rel.gnu.linkonce.d*)
+ }
+ .rela.data :
+ {
+ *(.rela.data)
+ *(.rela.data.*)
+ *(.rela.gnu.linkonce.d*)
+ }
+ .rel.rodata :
+ {
+ *(.rel.rodata)
+ *(.rel.rodata.*)
+ *(.rel.gnu.linkonce.r*)
+ }
+ .rela.rodata :
+ {
+ *(.rela.rodata)
+ *(.rela.rodata.*)
+ *(.rela.gnu.linkonce.r*)
+ }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.init : { *(.rel.init) }
+ .rela.init : { *(.rela.init) }
+ .rel.fini : { *(.rel.fini) }
+ .rela.fini : { *(.rela.fini) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .init : { KEEP (*(.init)) }
+ .plt : { *(.plt) }
+ .text :
+ {
+ *(.text)
+ *(.text.*)
+ *(.stub)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ *(.gnu.linkonce.t*)
+ }
+ _etext = .;
+ PROVIDE (etext = .);
+ .fini : { KEEP (*(.fini)) } =0x9090
+ .rodata :
+ {
+ *(.rodata)
+ *(.rodata.*)
+ *(.gnu.linkonce.r*)
+ }
+ .rodata1 : { *(.rodata1) }
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. */
+ . = ALIGN(0x1000) + (. & (0x1000 - 1));
+ .data :
+ {
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d*)
+ SORT(CONSTRUCTORS)
+ }
+ .data1 : { *(.data1) }
+ .ctors :
+ {
+ /* gcc uses crtbegin.o to find the start of the constructors, so
+ we make sure it is first. Because this is a wildcard, it
+ doesn't matter if the user does not actually link against
+ crtbegin.o; the linker won't look for a file to match a
+ wildcard. The wildcard also means that it doesn't matter which
+ directory crtbegin.o is in. */
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ }
+ .dtors :
+ {
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ }
+ .got : { *(.got.plt) *(.got) }
+ .dynamic : { *(.dynamic) }
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+ .sdata : { *(.sdata) *(.sdata.*) }
+ _edata = .;
+ PROVIDE (edata = .);
+ __bss_start = .;
+ .sbss : { *(.sbss) *(.scommon) }
+ .bss :
+ {
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ . = ALIGN(32 / 8);
+ }
+ . = ALIGN(32 / 8);
+ _end = . ;
+ PROVIDE (end = .);
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /* These must appear regardless of . */
+}
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.dat b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.dat
new file mode 100644
index 00000000000..e94a178e14b
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.dat
@@ -0,0 +1,22 @@
+mainvar == 1
+overriddenvar == 2
+shlibvar1 == 3
+shlib_mainvar () == 1
+shlib_overriddenvar () == 2
+shlib_shlibvar1 () == 3
+shlib_shlibvar2 () == 4
+shlib_shlibcall () == 5
+shlib_shlibcall2 () == 8
+shlib_maincall () == 6
+main_called () == 6
+shlib_checkfunptr1 (shlib_shlibvar1) == 1
+shlib_checkfunptr2 (main_called) == 1
+shlib_getfunptr1 () == shlib_shlibvar1
+shlib_getfunptr2 () == main_called
+shlib_check () == 1
+visibility_check () == 1
+visibility_checkfunptr () == 1
+main_visibility_check () == 1
+visibility_checkvar () == 1
+visibility_checkvarptr () == 1
+main_visibility_checkvar () == 1
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.exp b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.exp
new file mode 100644
index 00000000000..b563c3487dd
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -0,0 +1,359 @@
+# Expect script for ld-visibility tests
+# Copyright (C) 2000 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.
+#
+# 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.
+#
+# Written by Ian Lance Taylor (ian@cygnus.com)
+# and H.J. Lu (hjl@gnu.org)
+#
+
+# Make sure that ld can generate ELF shared libraries with visibility.
+
+# This test can only be run if ld generates native executables.
+if ![isnative] then {return}
+
+# This test can only be run on a couple of ELF platforms.
+# Square bracket expressions seem to confuse istarget.
+if { ![istarget i386-*-linux*] \
+ && ![istarget i486-*-linux*] \
+ && ![istarget i586-*-linux*] \
+ && ![istarget i686-*-linux*] \
+ && ![istarget m68k-*-linux*] \
+ && ![istarget powerpc-*-linux*] \
+ && ![istarget sparc*-*-linux*] } {
+ return
+}
+
+if { [istarget *-*-linux*aout*] \
+ || [istarget *-*-linux*oldld*] } {
+ return
+}
+
+set tmpdir tmpdir
+set SHCFLAG ""
+
+if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+
+ # AIX shared libraries do not seem to support useful features,
+ # like overriding the shared library function or letting the
+ # shared library refer to objects defined in the main program. We
+ # avoid testing those features.
+ set SHCFLAG "-DXCOFF_TEST"
+
+ # The AIX 3.2.5 loader appears to randomly fail when loading
+ # shared libraries from NSF mounted partitions, so we avoid any
+ # potential problems by using a local directory.
+ catch {exec /bin/sh -c "echo $$"} pid
+ set tmpdir /usr/tmp/ld.$pid
+ catch "exec mkdir $tmpdir" exec_status
+
+ # On AIX, we need to explicitly export the symbols the shared
+ # library is going to provide, and need.
+ set file [open $tmpdir/xcoff.exp w]
+ puts $file shlibvar1
+ puts $file shlibvar2
+ puts $file shlib_shlibvar1
+ puts $file shlib_shlibvar2
+ puts $file shlib_shlibcall
+ puts $file shlib_shlibcalled
+ puts $file shlib_checkfunptr1
+ puts $file shlib_getfunptr1
+ puts $file shlib_check
+ close $file
+}
+
+set support_protected "no"
+
+if [istarget *-*-linux*] {
+ if [ld_compile "$CC -g $CFLAGS -DPROTECTED_CHECK" $srcdir/$subdir/main.c $tmpdir/main.o] {
+ if [ld_link $ld $tmpdir/main "$tmpdir/main.o"] {
+ catch "exec $tmpdir/main" support_protected
+ }
+ }
+}
+
+# The test procedure.
+proc visibility_test { visibility progname testname main sh1 sh2 dat args } {
+ global ld
+ global srcdir
+ global subdir
+ global exec_output
+ global link_output
+ global host_triplet
+ global tmpdir
+
+ if [llength $args] { set shldflags [lindex $args 0] } else { set shldflags "" }
+
+ # Build the shared library.
+ # On AIX, we need to use an export file.
+ set shared -shared
+ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ set shared "-bM:SRE -bE:$tmpdir/xcoff.exp"
+ }
+ if {![ld_simple_link $ld $tmpdir/$progname.so "$shared $shldflags $tmpdir/$sh1 $tmpdir/$sh2"]} {
+ if { [ string match $visibility "hidden_undef" ]
+ && [regexp ".*/sh1.c.*: undefined reference to \`visibility\'" $link_output]
+ && [regexp ".*/sh1.c.*: undefined reference to \`visibility_var\'" $link_output] } {
+ pass "$testname"
+ } else { if { [ string match $visibility "protected_undef" ]
+ && [regexp ".*/sh1.c.*: undefined reference to \`visibility\'" $link_output]
+ && [regexp ".*/sh1.c.*: undefined reference to \`visibility_var\'" $link_output] } {
+ pass "$testname"
+ } else {
+ fail "$testname"
+ }}
+ return
+ }
+
+ # Link against the shared library. Use -rpath so that the
+ # dynamic linker can locate the shared library at runtime.
+ # On AIX, we must include /lib in -rpath, as otherwise the loader
+ # can not find -lc.
+ set rpath $tmpdir
+ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ set rpath /lib:$tmpdir
+ }
+ if ![ld_link $ld $tmpdir/$progname "-rpath $rpath $tmpdir/$main $tmpdir/$progname.so"] {
+ if { [ string match $visibility "hidden" ]
+ && [regexp ".*/main.c.*: undefined reference to \`visibility\'" $link_output]
+ && [regexp ".*/main.c.*: undefined reference to \`visibility_var\'" $link_output] } {
+ pass "$testname"
+ } else { if { [ string match $visibility "hidden_undef_def" ]
+ && [regexp ".*/main.c.*: undefined reference to \`visibility\'" $link_output]
+ && [regexp ".*/main.c.*: undefined reference to \`visibility_var\'" $link_output] } {
+ pass "$testname"
+ } else {
+ fail "$testname"
+ }}
+ return
+ }
+
+ if { [ string match $visibility "hidden" ]
+ || [ string match $visibility "hidden_undef" ]
+ || [ string match $visibility "protected_undef" ] } {
+ fail "$testname"
+ }
+
+ # Run the resulting program
+ send_log "$tmpdir/$progname >$tmpdir/$progname.out\n"
+ verbose "$tmpdir/$progname >$tmpdir/$progname.out"
+ catch "exec $tmpdir/$progname >$tmpdir/$progname.out" exec_output
+ if ![string match "" $exec_output] then {
+ send_log "$exec_output\n"
+ verbose "$exec_output"
+ fail "$testname"
+ return
+ }
+
+ send_log "diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat\n"
+ verbose "diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat"
+ catch "exec diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat" exec_output
+ set exec_output [prune_warnings $exec_output]
+
+ if {![string match "" $exec_output]} then {
+ send_log "$exec_output\n"
+ verbose "$exec_output"
+ fail "$testname"
+ return
+ }
+
+ pass "$testname"
+}
+
+proc visibility_run {visibility} {
+ global CC
+ global CFLAGS
+ global SHCFLAG
+ global srcdir
+ global subdir
+ global tmpdir
+ global picflag
+ global target_triplet
+ global support_protected
+
+ if [ string match $visibility "hidden" ] {
+ set VSBCFLAG "-DHIDDEN_TEST"
+ } else { if [ string match $visibility "hidden_normal" ] {
+ set VSBCFLAG "-DHIDDEN_NORMAL_TEST"
+ } else { if [ string match $visibility "hidden_undef" ] {
+ set VSBCFLAG "-DHIDDEN_UNDEF_TEST"
+ } else { if [ string match $visibility "hidden_undef_def" ] {
+ set VSBCFLAG "-DHIDDEN_UNDEF_TEST -DDSO_DEFINE_TEST"
+ } else { if [ string match $visibility "hidden_weak" ] {
+ set VSBCFLAG "-DHIDDEN_WEAK_TEST"
+ } else { if [ string match $visibility "protected" ] {
+ set VSBCFLAG "-DPROTECTED_TEST"
+ } else { if [ string match $visibility "protected_undef" ] {
+ set VSBCFLAG "-DPROTECTED_UNDEF_TEST"
+ } else { if [ string match $visibility "protected_undef_def" ] {
+ set VSBCFLAG "-DPROTECTED_UNDEF_TEST -DDSO_DEFINE_TEST"
+ } else { if [ string match $visibility "protected_weak" ] {
+ set VSBCFLAG "-DPROTECTED_WEAK_TEST"
+ } else {
+ set VSBCFLAG ""
+ }}}}}}}}}
+
+ # Compile the main program.
+ if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
+ unresolved "visibility ($visibility) (non PIC)"
+ unresolved "visibility ($visibility)"
+ } else {
+ # The shared library is composed of two files. First compile them
+ # without using -fpic. That should work on an ELF system,
+ # although it will be less efficient because the dynamic linker
+ # will need to do more relocation work. However, note that not
+ # using -fpic will cause some of the tests to return different
+ # results.
+ if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
+ || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
+ unresolved "visibility ($visibility) (non PIC)"
+ } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ visibility_test $visibility vnp "visibility ($visibility) (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff
+ } else {
+ # SunOS non PIC shared libraries don't permit some cases of
+ # overriding.
+ if { [ string match $visibility "protected" ]
+ || [ string match $visibility "protected_undef_def" ] } {
+ if [ string match $support_protected "no" ] {
+ setup_xfail $target_triplet
+ }
+ } else {
+ setup_xfail "*-*-sunos4*"
+ }
+ visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb
+
+ # Test ELF shared library relocations with a non-zero load
+ # address for the library. Near as I can tell, the R_*_RELATIVE
+ # relocations for various targets are broken in the case where
+ # the load address is not zero (which is the default).
+ if { [ string match $visibility "protected" ]
+ || [ string match $visibility "protected_undef_def" ] } {
+ if [ string match $support_protected "no" ] {
+ setup_xfail $target_triplet
+ }
+ } else {
+ setup_xfail "*-*-sunos4*"
+ setup_xfail "*-*-linux*libc1"
+ }
+ visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \
+ mainnp.o sh1np.o sh2np.o elfvsb \
+ "-T $srcdir/$subdir/elf-offset.ld"
+ } }
+
+ # Now compile the code using -fpic.
+
+ if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
+ || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
+ unresolved "visibility ($visibility)"
+ } else {
+ if { [ string match $visibility "protected" ]
+ || [ string match $visibility "protected_undef_def" ] } {
+ if [ string match $support_protected "no" ] {
+ setup_xfail $target_triplet
+ }
+ }
+ # SunOS can not compare function pointers correctly
+ if [istarget "*-*-sunos4*"] {
+ visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o sun4
+ } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o xcoff
+ } else {
+ visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o elfvsb
+ } }
+ }
+ }
+
+ # Now do the same tests again, but this time compile main.c PIC.
+ if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
+ unresolved "visibility ($visibility) (PIC main, non PIC so)"
+ unresolved "visibility ($visibility) (PIC main)"
+ } else {
+ if { [file exists $tmpdir/sh1np.o ] && [ file exists $tmpdir/sh2np.o ] } {
+ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o xcoff
+ } else {
+ # SunOS non PIC shared libraries don't permit some cases of
+ # overriding.
+ if { [ string match $visibility "protected" ]
+ || [ string match $visibility "protected_undef_def" ] } {
+ if [ string match $support_protected "no" ] {
+ setup_xfail $target_triplet
+ }
+ } else {
+ setup_xfail "*-*-sunos4*"
+ }
+ visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
+ }
+ } else {
+ unresolved "visibility (PIC main, non PIC so)"
+ }
+
+ if { [file exists $tmpdir/sh1p.o ] && [ file exists $tmpdir/sh2p.o ] } {
+ if { [ string match $visibility "protected" ]
+ || [ string match $visibility "protected_undef_def" ] } {
+ if [ string match $support_protected "no" ] {
+ setup_xfail $target_triplet
+ }
+ }
+ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o xcoff
+ } else {
+ visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o elfvsb
+ }
+ } else {
+ unresolved "visibility ($visibility) (PIC main)"
+ }
+ }
+}
+
+if [istarget mips*-*-*] {
+ set picflag ""
+} else {
+ # Unfortunately, the gcc argument is -fpic and the cc argument is
+ # -KPIC. We have to try both.
+ set picflag "-fpic"
+ send_log "$CC $picflag\n"
+ verbose "$CC $picflag"
+ catch "exec $CC $picflag" exec_output
+ send_log "$exec_output\n"
+ verbose "--" "$exec_output"
+ if { [string match "*illegal option*" $exec_output] \
+ || [string match "*option ignored*" $exec_output] \
+ || [string match "*unrecognized option*" $exec_output] \
+ || [string match "*passed to ld*" $exec_output] } {
+ if [istarget *-*-sunos4*] {
+ set picflag "-pic"
+ } else {
+ set picflag "-KPIC"
+ }
+ }
+}
+verbose "Using $picflag to compile PIC code"
+
+visibility_run hidden
+visibility_run hidden_normal
+visibility_run hidden_undef
+visibility_run hidden_undef_def
+visibility_run hidden_weak
+visibility_run protected
+visibility_run protected_undef
+visibility_run protected_undef_def
+visibility_run protected_weak
+visibility_run normal
+
+if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
+ # Remove the temporary directory.
+ catch "exec rm -rf $tmpdir" exec_status
+}
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/main.c b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/main.c
new file mode 100644
index 00000000000..26542b8a1fc
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/main.c
@@ -0,0 +1,178 @@
+#ifdef PROTECTED_CHECK
+#include <features.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+#if defined (__GLIBC__) && (__GLIBC__ > 2 \
+ || (__GLIBC__ == 2 \
+ && __GLIBC_MINOR__ >= 2))
+ puts ("yes");
+#else
+ puts ("no");
+#endif
+ return 0;
+}
+#else
+/* This is the main program for the shared library test. */
+
+#include <stdio.h>
+
+int mainvar = 1;
+int overriddenvar = 2;
+extern int shlibvar1;
+
+extern int shlib_mainvar ();
+extern int shlib_overriddenvar ();
+extern int shlib_shlibvar1 ();
+extern int shlib_shlibvar2 ();
+extern int shlib_shlibcall ();
+extern int shlib_maincall ();
+extern int shlib_checkfunptr1 ();
+extern int shlib_checkfunptr2 ();
+extern int (*shlib_getfunptr1 ()) ();
+extern int (*shlib_getfunptr2 ()) ();
+extern int shlib_check ();
+extern int shlib_shlibcall2 ();
+extern int visibility_check ();
+extern int visibility_checkfunptr ();
+extern void *visibility_funptr ();
+extern int visibility_checkvar ();
+extern int visibility_checkvarptr ();
+extern int visibility_varval ();
+extern void *visibility_varptr ();
+
+#ifdef HIDDEN_WEAK_TEST
+#define WEAK_TEST
+#endif
+
+#ifdef PROTECTED_WEAK_TEST
+#define WEAK_TEST
+#endif
+
+#ifdef PROTECTED_UNDEF_TEST
+#define PROTECTED_TEST
+#endif
+
+#ifndef WEAK_TEST
+extern int visibility ();
+extern int visibility_var;
+#endif
+
+#if !defined (HIDDEN_TEST) && defined (PROTECTED_TEST)
+int
+visibility ()
+{
+ return 1;
+}
+
+static int
+main_visibility_check ()
+{
+ return visibility_funptr () != visibility;
+}
+
+int visibility_var = 1;
+
+static int
+main_visibility_checkvar ()
+{
+ return visibility_varval () != visibility_var
+ && visibility_varptr () != &visibility_var;
+}
+#else
+static int
+main_visibility_check ()
+{
+#ifdef WEAK_TEST
+ return visibility_funptr () == NULL;
+#else
+ return visibility_funptr () == visibility;
+#endif
+}
+
+static int
+main_visibility_checkvar ()
+{
+#ifdef WEAK_TEST
+ return visibility_varval () == 0
+ && visibility_varptr () == NULL;
+#else
+ return visibility_varval () == visibility_var
+ && visibility_varptr () == &visibility_var;
+#endif
+}
+#endif
+
+/* This function is called by the shared library. */
+
+int
+main_called ()
+{
+ return 6;
+}
+
+/* This function overrides a function in the shared library. */
+
+int
+shlib_overriddencall2 ()
+{
+ return 8;
+}
+
+int
+main ()
+{
+ int (*p) ();
+
+ printf ("mainvar == %d\n", mainvar);
+ printf ("overriddenvar == %d\n", overriddenvar);
+ printf ("shlibvar1 == %d\n", shlibvar1);
+#ifndef XCOFF_TEST
+ printf ("shlib_mainvar () == %d\n", shlib_mainvar ());
+ printf ("shlib_overriddenvar () == %d\n", shlib_overriddenvar ());
+#endif
+ printf ("shlib_shlibvar1 () == %d\n", shlib_shlibvar1 ());
+ printf ("shlib_shlibvar2 () == %d\n", shlib_shlibvar2 ());
+ printf ("shlib_shlibcall () == %d\n", shlib_shlibcall ());
+#ifndef XCOFF_TEST
+ printf ("shlib_shlibcall2 () == %d\n", shlib_shlibcall2 ());
+ printf ("shlib_maincall () == %d\n", shlib_maincall ());
+#endif
+ printf ("main_called () == %d\n", main_called ());
+ printf ("shlib_checkfunptr1 (shlib_shlibvar1) == %d\n",
+ shlib_checkfunptr1 (shlib_shlibvar1));
+#ifndef XCOFF_TEST
+ printf ("shlib_checkfunptr2 (main_called) == %d\n",
+ shlib_checkfunptr2 (main_called));
+#endif
+ p = shlib_getfunptr1 ();
+ printf ("shlib_getfunptr1 () ");
+ if (p == shlib_shlibvar1)
+ printf ("==");
+ else
+ printf ("!=");
+ printf (" shlib_shlibvar1\n");
+#ifndef XCOFF_TEST
+ p = shlib_getfunptr2 ();
+ printf ("shlib_getfunptr2 () ");
+ if (p == main_called)
+ printf ("==");
+ else
+ printf ("!=");
+ printf (" main_called\n");
+#endif
+ printf ("shlib_check () == %d\n", shlib_check ());
+ printf ("visibility_check () == %d\n", visibility_check ());
+ printf ("visibility_checkfunptr () == %d\n",
+ visibility_checkfunptr ());
+ printf ("main_visibility_check () == %d\n", main_visibility_check ());
+ printf ("visibility_checkvar () == %d\n", visibility_checkvar ());
+ printf ("visibility_checkvarptr () == %d\n",
+ visibility_checkvarptr ());
+ printf ("main_visibility_checkvar () == %d\n",
+ main_visibility_checkvar ());
+ return 0;
+}
+#endif
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh1.c b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh1.c
new file mode 100644
index 00000000000..2299f83bdc3
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh1.c
@@ -0,0 +1,324 @@
+#ifndef NULL
+#define NULL ((void *) 0)
+#endif
+
+/* This is part of the shared library ld test. This file becomes part
+ of a shared library. */
+
+/* This variable is supplied by the main program. */
+#ifndef XCOFF_TEST
+extern int mainvar;
+#endif
+
+/* This variable is defined in the shared library, and overridden by
+ the main program. */
+#ifndef XCOFF_TEST
+int overriddenvar = -1;
+#endif
+
+/* This variable is defined in the shared library. */
+int shlibvar1 = 3;
+
+/* This variable is defined by another object in the shared library. */
+extern int shlibvar2;
+
+/* These functions return the values of the above variables as seen in
+ the shared library. */
+
+#ifndef XCOFF_TEST
+int
+shlib_mainvar ()
+{
+ return mainvar;
+}
+#endif
+
+#ifndef XCOFF_TEST
+int
+shlib_overriddenvar ()
+{
+ return overriddenvar;
+}
+#endif
+
+int
+shlib_shlibvar1 ()
+{
+ return shlibvar1;
+}
+
+int
+shlib_shlibvar2 ()
+{
+ return shlibvar2;
+}
+
+/* This function calls a function defined by another object in the
+ shared library. */
+
+extern int shlib_shlibcalled ();
+
+int
+shlib_shlibcall ()
+{
+ return shlib_shlibcalled ();
+}
+
+#ifndef XCOFF_TEST
+/* This function calls a function defined in this object in the shared
+ library. The main program will override the called function. */
+
+extern int shlib_overriddencall2 ();
+
+int
+shlib_shlibcall2 ()
+{
+ return shlib_overriddencall2 ();
+}
+
+int
+shlib_overriddencall2 ()
+{
+ return 7;
+}
+#endif
+
+/* This function calls a function defined by the main program. */
+
+#ifndef XCOFF_TEST
+extern int main_called ();
+
+int
+shlib_maincall ()
+{
+ return main_called ();
+}
+#endif
+
+/* This function is passed a function pointer to shlib_mainvar. It
+ confirms that the pointer compares equally. */
+
+int
+shlib_checkfunptr1 (p)
+ int (*p) ();
+{
+ return p == shlib_shlibvar1;
+}
+
+/* This function is passed a function pointer to main_called. It
+ confirms that the pointer compares equally. */
+
+#ifndef XCOFF_TEST
+int
+shlib_checkfunptr2 (p)
+ int (*p) ();
+{
+ return p == main_called;
+}
+#endif
+
+/* This function returns a pointer to shlib_mainvar. */
+
+int
+(*shlib_getfunptr1 ()) ()
+{
+ return shlib_shlibvar1;
+}
+
+/* This function returns a pointer to main_called. */
+
+#ifndef XCOFF_TEST
+int
+(*shlib_getfunptr2 ()) ()
+{
+ return main_called;
+}
+#endif
+
+/* This function makes sure that constant data and local functions
+ work. */
+
+#ifndef __STDC__
+#define const
+#endif
+
+static int i = 6;
+static const char *str = "Hello, world\n";
+
+int
+shlib_check ()
+{
+ const char *s1, *s2;
+
+ if (i != 6)
+ return 0;
+
+ /* To isolate the test, don't rely on any external functions, such
+ as strcmp. */
+ s1 = "Hello, world\n";
+ s2 = str;
+ while (*s1 != '\0')
+ if (*s1++ != *s2++)
+ return 0;
+ if (*s2 != '\0')
+ return 0;
+
+ if (shlib_shlibvar1 () != 3)
+ return 0;
+
+ return 1;
+}
+
+#ifdef HIDDEN_WEAK_TEST
+#define HIDDEN_UNDEF_TEST
+#define WEAK_TEST
+#endif
+
+#ifdef PROTECTED_WEAK_TEST
+#define PROTECTED_UNDEF_TEST
+#define WEAK_TEST
+#endif
+
+#if defined (HIDDEN_UNDEF_TEST) || defined (PROTECTED_UNDEF_TEST)
+extern int visibility ();
+#else
+int
+visibility ()
+{
+ return 2;
+}
+#endif
+
+#ifdef HIDDEN_NORMAL_TEST
+asm (".hidden visibility_normal");
+
+int
+visibility_normal ()
+{
+ return 2;
+}
+#endif
+
+int
+visibility_checkfunptr ()
+{
+#ifdef WEAK_TEST
+ return 1;
+#else
+#ifdef HIDDEN_NORMAL_TEST
+ int (*v) () = visibility_normal;
+#else
+ int (*v) () = visibility;
+#endif
+ return (*v) () == 2;
+#endif
+}
+
+int
+visibility_check ()
+{
+#ifdef WEAK_TEST
+ if (&visibility)
+ return visibility () == 1;
+ else
+ return 1;
+#else
+#ifdef HIDDEN_NORMAL_TEST
+ return visibility_normal () == 2;
+#else
+ return visibility () == 2;
+#endif
+#endif
+}
+
+void *
+visibility_funptr ()
+{
+#ifdef WEAK_TEST
+ if (&visibility == NULL)
+ return NULL;
+ else
+#endif
+ return visibility;
+}
+
+#if defined (HIDDEN_UNDEF_TEST) || defined (PROTECTED_UNDEF_TEST)
+extern int visibility_var;
+#else
+int visibility_var = 2;
+#endif
+
+#ifdef HIDDEN_NORMAL_TEST
+asm (".hidden visibility_var_normal");
+
+int visibility_var_normal = 2;
+#endif
+
+int
+visibility_checkvarptr ()
+{
+#ifdef WEAK_TEST
+ if (&visibility_var)
+ return visibility_var == 1;
+ else
+ return 1;
+#else
+#ifdef HIDDEN_NORMAL_TEST
+ int *v = &visibility_var_normal;
+#else
+ int *v = &visibility_var;
+#endif
+ return *v == 2;
+#endif
+}
+
+int
+visibility_checkvar ()
+{
+#ifdef WEAK_TEST
+ return 1;
+#else
+#ifdef HIDDEN_NORMAL_TEST
+ return visibility_var_normal == 2;
+#else
+ return visibility_var == 2;
+#endif
+#endif
+}
+
+void *
+visibility_varptr ()
+{
+#ifdef WEAK_TEST
+ if (&visibility_var == NULL)
+ return NULL;
+ else
+#endif
+ return &visibility_var;
+}
+
+int
+visibility_varval ()
+{
+#ifdef WEAK_TEST
+ if (&visibility_var == NULL)
+ return 0;
+ else
+#endif
+ return visibility_var;
+}
+
+#if defined (HIDDEN_TEST) || defined (HIDDEN_UNDEF_TEST)
+asm (".hidden visibility");
+asm (".hidden visibility_var");
+#else
+#if defined (PROTECTED_TEST) || defined (PROTECTED_UNDEF_TEST) || defined (PROTECTED_WEAK_TEST)
+asm (".protected visibility");
+asm (".protected visibility_var");
+#endif
+#endif
+
+#ifdef WEAK_TEST
+asm (".weak visibility");
+asm (".weak visibility_var");
+#endif
diff --git a/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh2.c b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh2.c
new file mode 100644
index 00000000000..6ed30bc52e1
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/testsuite/ld-elfvsb/sh2.c
@@ -0,0 +1,24 @@
+/* This is part of the shared library ld test. This file becomes part
+ of a shared library. */
+
+/* This variable is defined here, and referenced by another file in
+ the shared library. */
+int shlibvar2 = 4;
+
+/* This function is called by another file in the shared library. */
+
+int
+shlib_shlibcalled ()
+{
+ return 5;
+}
+
+#ifdef DSO_DEFINE_TEST
+int
+visibility ()
+{
+ return 2;
+}
+
+int visibility_var = 2;
+#endif