summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libg2c/MAIN.c4
-rw-r--r--gnu/lib/libg2c/Makefile117
-rw-r--r--gnu/lib/libg2c/config.h173
-rw-r--r--gnu/lib/libg2c/g2c.h236
-rw-r--r--gnu/lib/libiberty/Makefile22
-rw-r--r--gnu/lib/libiberty/config.h255
-rw-r--r--gnu/usr.bin/binutils/Makefile.inc06
-rw-r--r--gnu/usr.bin/binutils/addr2line/Makefile1
-rw-r--r--gnu/usr.bin/binutils/addr2line/addr2line.1266
-rw-r--r--gnu/usr.bin/binutils/ar/ar.1391
-rw-r--r--gnu/usr.bin/binutils/as/Makefile45
-rw-r--r--gnu/usr.bin/binutils/as/as.11135
-rw-r--r--gnu/usr.bin/binutils/as/config.h335
-rw-r--r--gnu/usr.bin/binutils/as/tc-sparc-fixed.c4656
-rw-r--r--gnu/usr.bin/binutils/doc/Makefile13
-rw-r--r--gnu/usr.bin/binutils/doc/asconfig.texi51
-rw-r--r--gnu/usr.bin/binutils/gasp/Makefile21
-rw-r--r--gnu/usr.bin/binutils/gasp/gasp.1115
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile139
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.arm5
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.i3869
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.ia645
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.powerpc5
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.powerpc645
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.sparc644
-rw-r--r--gnu/usr.bin/binutils/gdb/config.h505
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h14
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-amd64.h8
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h8
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h21
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h8
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h8
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h9
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb.h34
-rw-r--r--gnu/usr.bin/binutils/gdb/freebsd-uthread.c889
-rw-r--r--gnu/usr.bin/binutils/gdb/gdb.1385
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd-alpha.h77
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd-i386.h131
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd-sparc64.h96
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c502
-rw-r--r--gnu/usr.bin/binutils/gdb/solib-fbsd-kld.c304
-rw-r--r--gnu/usr.bin/binutils/gdbreplay/Makefile23
-rw-r--r--gnu/usr.bin/binutils/ld/Makefile21
-rw-r--r--gnu/usr.bin/binutils/ld/armelf_fbsd.sh7
-rw-r--r--gnu/usr.bin/binutils/ld/armelfb_fbsd.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/config.h221
-rwxr-xr-xgnu/usr.bin/binutils/ld/genscripts.sh35
-rw-r--r--gnu/usr.bin/binutils/ld/ld.12156
-rw-r--r--gnu/usr.bin/binutils/libbfd/Makefile49
-rw-r--r--gnu/usr.bin/binutils/libbfd/Makefile.amd6418
-rw-r--r--gnu/usr.bin/binutils/libbfd/Makefile.arm26
-rw-r--r--gnu/usr.bin/binutils/libbfd/Makefile.ia6413
-rw-r--r--gnu/usr.bin/binutils/libbfd/Makefile.sparc645
-rw-r--r--gnu/usr.bin/binutils/libbfd/bfd.h1430
-rw-r--r--gnu/usr.bin/binutils/libbfd/config.h.fbsd380
-rw-r--r--gnu/usr.bin/binutils/libbfd/elf-fbsd-brand.c25
-rw-r--r--gnu/usr.bin/binutils/libbinutils/Makefile23
-rw-r--r--gnu/usr.bin/binutils/libbinutils/config.h279
-rw-r--r--gnu/usr.bin/binutils/libiberty/Makefile33
-rw-r--r--gnu/usr.bin/binutils/libiberty/config.h104
-rw-r--r--gnu/usr.bin/binutils/libopcodes/Makefile2
-rw-r--r--gnu/usr.bin/binutils/libopcodes/config.h153
-rw-r--r--gnu/usr.bin/binutils/nm/Makefile1
-rw-r--r--gnu/usr.bin/binutils/nm/nm.1450
-rw-r--r--gnu/usr.bin/binutils/objcopy/Makefile1
-rw-r--r--gnu/usr.bin/binutils/objcopy/objcopy.1858
-rw-r--r--gnu/usr.bin/binutils/objdump/Makefile1
-rw-r--r--gnu/usr.bin/binutils/objdump/objdump.1636
-rw-r--r--gnu/usr.bin/binutils/ranlib/ranlib.1189
-rw-r--r--gnu/usr.bin/binutils/readelf/Makefile1
-rw-r--r--gnu/usr.bin/binutils/readelf/readelf.1377
-rw-r--r--gnu/usr.bin/binutils/size/Makefile1
-rw-r--r--gnu/usr.bin/binutils/size/size.1263
-rw-r--r--gnu/usr.bin/binutils/strings/Makefile1
-rw-r--r--gnu/usr.bin/binutils/strings/strings.1254
-rw-r--r--gnu/usr.bin/binutils/strip/Makefile1
-rw-r--r--gnu/usr.bin/binutils/strip/strip.1392
-rw-r--r--gnu/usr.bin/cc/cc_tools/auto-host.h10
-rw-r--r--gnu/usr.bin/gdb/Makefile.inc2
-rw-r--r--gnu/usr.bin/gdb/libgdb/fbsd-threads.c8
80 files changed, 9531 insertions, 9943 deletions
diff --git a/gnu/lib/libg2c/MAIN.c b/gnu/lib/libg2c/MAIN.c
deleted file mode 100644
index 9c6f895b3ae25..0000000000000
--- a/gnu/lib/libg2c/MAIN.c
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $FreeBSD$ */
-
-int
-MAIN__(){ return 0; }
diff --git a/gnu/lib/libg2c/Makefile b/gnu/lib/libg2c/Makefile
deleted file mode 100644
index 7e68ea78618a1..0000000000000
--- a/gnu/lib/libg2c/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-# $FreeBSD$
-
-.include <bsd.own.mk>
-
-SRCDIR= ${.CURDIR}/../../../contrib/libf2c
-
-.PATH: ${SRCDIR} ${SRCDIR}/libU77 ${SRCDIR}/libF77 ${SRCDIR}/libI77
-
-LIB= g2c
-SHLIB_MAJOR= 3
-
-# Traditional FORTRAN Library members defined in libF77
-
-F77MISC= F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
- iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
- cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
- setarg.c setsig.c
-
-F77POW= pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c \
- pow_zz.c
-
-F77CX= c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c
-F77DCX= ${F77CX:S/^c_/z_/g}
-
-F77INT= i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c \
- i_sign.c
-
-F77HALF= h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c h_nint.c \
- h_sign.c
-
-F77REAL= r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c \
- r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c r_log.c \
- r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c r_tan.c \
- r_tanh.c
-F77DBL= ${F77REAL:S/^r_/d_/g} d_prod.c
-
-F77CMP= l_ge.c l_gt.c l_le.c l_lt.c hl_ge.c hl_gt.c hl_le.c hl_lt.c
-
-F77EFL= ef1asc_.c ef1cmc_.c
-
-F77CHAR= s_cat.c s_cmp.c s_copy.c
-
-F77F90BIT= lbitbits.c lbitshft.c qbitbits.c qbitshft.c
-
-F77SRCS= ${F77MISC} ${F77POW} ${F77CX} ${F77DCX} ${F77INT} ${F77HALF} \
- ${F77REAL} ${F77DBL} ${F77CMP} ${F77EFL} ${F77CHAR} ${F77F90BIT}
-
-# I/O Library members defined in libI77
-
-I77SRCS= backspace.c close.c dfe.c dolio.c due.c endfile.c \
- err.c fmt.c fmtlib.c iio.c ilnw.c inquire.c lread.c lwrite.c \
- open.c rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c \
- typesize.c uio.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c \
- xwsne.c ftell_.c
-
-# UNIX Library members defined in libU77
-
-U77SRCS= gerror_.c perror_.c ierrno_.c itime_.c time_.c \
- unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c \
- rand_.c srand_.c irand_.c sleep_.c idate_.c ctime_.c \
- etime_.c dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
- lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c \
- symlnk_.c vxttime_.c vxtidate_.c gmtime_.c fdate_.c \
- secnds_.c chdir_.c chmod_.c lnblnk_.c \
- hostnm_.c rename_.c fgetc_.c fputc_.c umask_.c \
- sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
- alarm_.c datetime_.c
-
-# Library members refered to as libE77 by EGCS
-
-E77OBJS= abort.o access.o alarm.o besj0.o besj1.o besjn.o \
- besy0.o besy1.o besyn.o chdir.o chmod.o ctime.o date.o \
- dbesj0.o dbesj1.o dbesjn.o dbesy0.o dbesy1.o dbesyn.o derf.o \
- derfc.o dtime.o ef1asc.o ef1cmc.o erf.o erfc.o etime.o exit.o \
- fdate.o fget.o fgetc.o flush.o flush1.o fnum.o fput.o fputc.o \
- fseek.o fstat.o ftell.o gerror.o getarg.o getcwd.o getenv.o \
- getgid.o getlog.o getpid.o getuid.o gmtime.o hostnm.o iargc.o \
- idate.o ierrno.o irand.o isatty.o itime.o kill.o link.o \
- lnblnk.o lstat.o ltime.o mclock.o perror.o rand.o rename.o \
- secnds.o second.o signal.o sleep.o srand.o stat.o symlnk.o \
- system.o time.o ttynam.o umask.o unlink.o vxtidt.o vxttim.o
-
-LIBF77SRCS= ${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS} MAIN.c
-
-SRCS= ${LIBF77SRCS}
-OBJS= ${E77OBJS}
-
-CFLAGS+= -DHAVE_CONFIG_H=1 -DSTDC_HEADERS=1 -DHAVE_TEMPNAM=1
-CFLAGS+= -DNO_EOF_CHAR_CHECK=1 -DRETSIGTYPE=void
-CFLAGS+= -DSkip_f2c_Undefs=1 -DIEEE_drem=1 -DAllow_TYQUAD -DPedantic
-CFLAGS+= -I${SRCDIR} -I${SRCDIR}/libF77 -I${SRCDIR}/libI77 -I${SRCDIR}/libU77
-CFLAGS+= -I${.CURDIR}
-
-.for x in F I U
-${x}77SRCS+= Version${x}.c
-CLEANFILES+= Version${x}.c
-Version${x}.c: ${SRCDIR}/lib${x}77/Version.c
- ln -sf ${.ALLSRC} ${.TARGET}
-.endfor
-
-${E77OBJS}: f2cext.c
- ${CC} ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
-
-.if !defined(NO_PIC)
-${E77OBJS:.o=.So}: f2cext.c
- ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} \
- ${.ALLSRC:M*.c}
-.endif
-
-.if ${MK_PROFILE} != "no"
-${E77OBJS:.o=.po}: f2cext.c
- ${CC} -p ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
-.endif
-
-INCS= g2c.h
-
-.include <bsd.lib.mk>
diff --git a/gnu/lib/libg2c/config.h b/gnu/lib/libg2c/config.h
deleted file mode 100644
index c4d0c2860cc37..0000000000000
--- a/gnu/lib/libg2c/config.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* $FreeBSD$ */
-
-/* *****[ libU77 ]***** */
-
-/* config.h. Generated automatically by configure. */
-/* config.hin. Generated automatically from configure.in by autoheader. */
-
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define if your struct stat has st_blksize. */
-#define HAVE_ST_BLKSIZE 1
-
-/* Define if your struct stat has st_blocks. */
-#define HAVE_ST_BLOCKS 1
-
-/* Define if your struct stat has st_rdev. */
-#define HAVE_ST_RDEV 1
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef mode_t */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* Define if your <sys/time.h> declares struct tm. */
-/* #undef TM_IN_SYS_TIME */
-
-/* Define as the path of the `chmod' program. */
-#define CHMOD_PATH "/bin/chmod"
-
-/* Define if your gettimeofday takes only one argument. */
-/* #undef GETTIMEOFDAY_ONE_ARGUMENT */
-
-/* Define if your gettimeofday takes a time zome argument. */
-#define HAVE_TIMEZONE 1
-
-/* Define if you have the alarm function. */
-#define HAVE_ALARM 1
-
-/* Define if you have the clock function. */
-#define HAVE_CLOCK 1
-
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
-
-/* Define if you have the getgid function. */
-#define HAVE_GETGID 1
-
-/* Define if you have the gethostname function. */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getlogin function. */
-#define HAVE_GETLOGIN 1
-
-/* Define if you have the getrusage function. */
-#define HAVE_GETRUSAGE 1
-
-/* Define if you have the gettimeofday function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the getuid function. */
-#define HAVE_GETUID 1
-
-/* Define if you have the getwd function. */
-#define HAVE_GETWD 1
-
-/* Define if you have the kill function. */
-#define HAVE_KILL 1
-
-/* Define if you have the link function. */
-#define HAVE_LINK 1
-
-/* Define if you have the lstat function. */
-#define HAVE_LSTAT 1
-
-/* Define if you have the strerror function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the symlink function. */
-#define HAVE_SYMLINK 1
-
-/* Define if you have the times function. */
-#define HAVE_TIMES 1
-
-/* Define if you have the ttyname function. */
-#define HAVE_TTYNAME 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define if you have the <sys/times.h> header file. */
-#define HAVE_SYS_TIMES_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Get Single Unix Specification semantics */
-#define _XOPEN_SOURCE 600L
-
-/* Get Single Unix Specification semantics */
-#define _XOPEN_SOURCE_EXTENDED 1
-
-/* Solaris extensions */
-#define __EXTENSIONS__ 1
-
-/* Get 64-bit file size support */
-#define _FILE_OFFSET_BITS 64
-
-/* *****[ libI77 ]***** */
-
-/* config.h. Generated automatically by configure. */
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
-
-/* Define if you have the fseeko function. */
-#define HAVE_FSEEKO 1
-
-/* Define if you have the ftello function. */
-#define HAVE_FTELLO 1
-
-/* Define if you have the ftruncate function. */
-#define HAVE_FTRUNCATE 1
-
-/* Define if you have the mkstemp function. */
-#define HAVE_MKSTEMP 1
-
-/* Define if you have the tempnam function. */
-#define HAVE_TEMPNAM 1
-
-/* Define if you have the tmpnam function. */
-#define HAVE_TMPNAM 1
-
-/* Define for HP-UX ftello and fseeko extension. */
-#define _LARGEFILE_SOURCE 1
-
-/* Define if we do not have Unix Stdio. */
-/* #undef NON_UNIX_STDIO */
-
-/* Define if we use strlen. */
-/* #undef USE_STRLEN */
-
-/* Define if we have non ANSI RW modes. */
-#define NON_ANSI_RW_MODES 1
-
-/* Always defined. */
-#define NO_EOF_CHAR_CHECK 1
-
-/* Define to skip f2c undefs. */
-#define Skip_f2c_Undefs 1
diff --git a/gnu/lib/libg2c/g2c.h b/gnu/lib/libg2c/g2c.h
deleted file mode 100644
index 71e021de7abf1..0000000000000
--- a/gnu/lib/libg2c/g2c.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/* g2c.h -- g77 version of f2c (Standard Fortran to C header file) */
-
-/* This file is generated by the g77 libg2c configuration process from a
- file named g2c.hin. This process sets up the appropriate types,
- defines the appropriate macros, and so on. The resulting g2c.h file
- is used to build g77's copy of libf2c, named libg2c, and also can
- be used when compiling C code produced by f2c to link the resulting
- object file(s) with those produced by the same version of g77 that
- produced this file, allowing inter-operability of f2c-compiled and
- g77-compiled code. */
-
-/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
-
- - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
-
-#ifndef F2C_INCLUDE
-#define F2C_INCLUDE
-
-/* F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems */
-/* we assume short, float are OK */
-typedef int /* long int */ integer;
-typedef unsigned long int /* long */ uinteger;
-typedef char *address;
-typedef short int shortint;
-typedef float real;
-typedef double doublereal;
-typedef struct { real r, i; } complex;
-typedef struct { doublereal r, i; } doublecomplex;
-typedef int /* long int */ logical;
-typedef short int shortlogical;
-typedef char logical1;
-typedef char integer1;
-typedef long long int /* long long */ longint; /* system-dependent */
-typedef unsigned long long int /* long long */ ulongint; /* system-dependent */
-#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
-#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
-
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-/* Extern is for use with -E */
-#ifndef Extern
-#define Extern extern
-#endif
-
-/* I/O stuff */
-
-#ifdef f2c_i2
-#error "f2c_i2 will not work with g77!!!!"
-/* for -i2 */
-typedef short flag;
-typedef short ftnlen;
-typedef short ftnint;
-#else
-typedef int /* long int */ flag;
-typedef int /* long int */ ftnlen;
-typedef int /* long int */ ftnint;
-#endif
-
-/*external read, write*/
-typedef struct
-{ flag cierr;
- ftnint ciunit;
- flag ciend;
- char *cifmt;
- ftnint cirec;
-} cilist;
-
-/*internal read, write*/
-typedef struct
-{ flag icierr;
- char *iciunit;
- flag iciend;
- char *icifmt;
- ftnint icirlen;
- ftnint icirnum;
-} icilist;
-
-/*open*/
-typedef struct
-{ flag oerr;
- ftnint ounit;
- char *ofnm;
- ftnlen ofnmlen;
- char *osta;
- char *oacc;
- char *ofm;
- ftnint orl;
- char *oblnk;
-} olist;
-
-/*close*/
-typedef struct
-{ flag cerr;
- ftnint cunit;
- char *csta;
-} cllist;
-
-/*rewind, backspace, endfile*/
-typedef struct
-{ flag aerr;
- ftnint aunit;
-} alist;
-
-/* inquire */
-typedef struct
-{ flag inerr;
- ftnint inunit;
- char *infile;
- ftnlen infilen;
- ftnint *inex; /*parameters in standard's order*/
- ftnint *inopen;
- ftnint *innum;
- ftnint *innamed;
- char *inname;
- ftnlen innamlen;
- char *inacc;
- ftnlen inacclen;
- char *inseq;
- ftnlen inseqlen;
- char *indir;
- ftnlen indirlen;
- char *infmt;
- ftnlen infmtlen;
- char *inform;
- ftnint informlen;
- char *inunf;
- ftnlen inunflen;
- ftnint *inrecl;
- ftnint *innrec;
- char *inblank;
- ftnlen inblanklen;
-} inlist;
-
-#define VOID void
-
-union Multitype { /* for multiple entry points */
- integer1 g;
- shortint h;
- integer i;
- /* longint j; */
- real r;
- doublereal d;
- complex c;
- doublecomplex z;
- };
-
-typedef union Multitype Multitype;
-
-/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
-
-struct Vardesc { /* for Namelist */
- char *name;
- char *addr;
- ftnlen *dims;
- int type;
- };
-typedef struct Vardesc Vardesc;
-
-struct Namelist {
- char *name;
- Vardesc **vars;
- int nvars;
- };
-typedef struct Namelist Namelist;
-
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-#define dabs(x) (doublereal)abs(x)
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-#define dmin(a,b) (doublereal)min(a,b)
-#define dmax(a,b) (doublereal)max(a,b)
-#define bit_test(a,b) ((a) >> (b) & 1)
-#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
-#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
-
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef int /* Unknown procedure type */ (*U_fp)(...);
-typedef shortint (*J_fp)(...);
-typedef integer (*I_fp)(...);
-typedef real (*R_fp)(...);
-typedef doublereal (*D_fp)(...), (*E_fp)(...);
-typedef /* Complex */ VOID (*C_fp)(...);
-typedef /* Double Complex */ VOID (*Z_fp)(...);
-typedef logical (*L_fp)(...);
-typedef shortlogical (*K_fp)(...);
-typedef /* Character */ VOID (*H_fp)(...);
-typedef /* Subroutine */ int (*S_fp)(...);
-#else
-typedef int /* Unknown procedure type */ (*U_fp)();
-typedef shortint (*J_fp)();
-typedef integer (*I_fp)();
-typedef real (*R_fp)();
-typedef doublereal (*D_fp)(), (*E_fp)();
-typedef /* Complex */ VOID (*C_fp)();
-typedef /* Double Complex */ VOID (*Z_fp)();
-typedef logical (*L_fp)();
-typedef shortlogical (*K_fp)();
-typedef /* Character */ VOID (*H_fp)();
-typedef /* Subroutine */ int (*S_fp)();
-#endif
-/* E_fp is for real functions when -R is not specified */
-typedef VOID C_f; /* complex function */
-typedef VOID H_f; /* character function */
-typedef VOID Z_f; /* double complex function */
-typedef doublereal E_f; /* real function with -R not specified */
-
-/* undef any lower-case symbols that your C compiler predefines, e.g.: */
-
-#ifndef Skip_f2c_Undefs
-/* (No such symbols should be defined in a strict ANSI C compiler.
- We can avoid trouble with f2c-translated code by using
- gcc -ansi [-traditional].) */
-#undef cray
-#undef gcos
-#undef mc68010
-#undef mc68020
-#undef mips
-#undef pdp11
-#undef sgi
-#undef sparc
-#undef sun
-#undef sun2
-#undef sun3
-#undef sun4
-#undef u370
-#undef u3b
-#undef u3b2
-#undef u3b5
-#undef unix
-#undef vax
-#endif
-#endif
diff --git a/gnu/lib/libiberty/Makefile b/gnu/lib/libiberty/Makefile
deleted file mode 100644
index 17228f85b94f7..0000000000000
--- a/gnu/lib/libiberty/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# $FreeBSD$
-
-SRCDIR= ${.CURDIR}/../../../contrib/binutils/libiberty
-
-.PATH: ${SRCDIR} ${SRCDIR}/../include
-
-#LIB= iberty
-
-# miniumally required sources
-SRCS= argv.c choose-temp.c concat.c cplus-dem.c fdmatch.c fnmatch.c getopt.c \
- getopt1.c getruntime.c hex.c floatformat.c objalloc.c obstack.c \
- pexecute.c spaces.c strerror.c strsignal.c xatexit.c xexit.c xmalloc.c \
- xstrdup.c xstrerror.c
-
-CFLAGS+= -I${SRCDIR}/../include -I${.CURDIR}
-CFLAGS+= -DHAVE_CONFIG_H
-
-#INCS= alloca-conf.h ansidecl.h demangle.h floatformat.h fnmatch.h getopt.h \
-# libiberty.h objalloc.h obstack.h
-#INCSDIR=${INCLUDEDIR}/libiberty
-
-.include <bsd.lib.mk>
diff --git a/gnu/lib/libiberty/config.h b/gnu/lib/libiberty/config.h
deleted file mode 100644
index 3db0e3ee7dba7..0000000000000
--- a/gnu/lib/libiberty/config.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* $FreeBSD$ */
-
-/* config.h. Generated automatically by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
-
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
-#define HAVE_SYS_WAIT_H 1
-
-/* Define if you have <vfork.h>. */
-/* #undef HAVE_VFORK_H */
-
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
-
-/* Define if you need to in order for stat and other things to work. */
-/* #undef _POSIX_SOURCE */
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* Define vfork as fork if vfork does not work. */
-/* #undef vfork */
-
-/* Define if you have the asprintf function. */
-#define HAVE_ASPRINTF 1
-
-/* Define if you have the atexit function. */
-#define HAVE_ATEXIT 1
-
-/* Define if you have the basename function. */
-#define HAVE_BASENAME 1
-
-/* Define if you have the bcmp function. */
-#define HAVE_BCMP 1
-
-/* Define if you have the bcopy function. */
-#define HAVE_BCOPY 1
-
-/* Define if you have the bsearch function. */
-#define HAVE_BSEARCH 1
-
-/* Define if you have the bzero function. */
-#define HAVE_BZERO 1
-
-/* Define if you have the calloc function. */
-#define HAVE_CALLOC 1
-
-/* Define if you have the clock function. */
-#define HAVE_CLOCK 1
-
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
-
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the getrusage function. */
-#define HAVE_GETRUSAGE 1
-
-/* Define if you have the gettimeofday function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the index function. */
-#define HAVE_INDEX 1
-
-/* Define if you have the insque function. */
-/* #undef HAVE_INSQUE */
-
-/* Define if you have the memchr function. */
-#define HAVE_MEMCHR 1
-
-/* Define if you have the memcmp function. */
-#define HAVE_MEMCMP 1
-
-/* Define if you have the memcpy function. */
-#define HAVE_MEMCPY 1
-
-/* Define if you have the memmove function. */
-#define HAVE_MEMMOVE 1
-
-/* Define if you have the memset function. */
-#define HAVE_MEMSET 1
-
-/* Define if you have the mkstemps function. */
-#define HAVE_MKSTEMPS 1
-
-/* Define if you have the on_exit function. */
-/* #undef HAVE_ON_EXIT */
-
-/* Define if you have the psignal function. */
-#define HAVE_PSIGNAL 1
-
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
-
-/* Define if you have the random function. */
-#define HAVE_RANDOM 1
-
-/* Define if you have the rename function. */
-#define HAVE_RENAME 1
-
-/* Define if you have the rindex function. */
-#define HAVE_RINDEX 1
-
-/* Define if you have the sbrk function. */
-#define HAVE_SBRK 1
-
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the sigsetmask function. */
-#define HAVE_SIGSETMASK 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strerror function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the strncasecmp function. */
-#define HAVE_STRNCASECMP 1
-
-/* Define if you have the strrchr function. */
-#define HAVE_STRRCHR 1
-
-/* Define if you have the strsignal function. */
-#define HAVE_STRSIGNAL 1
-
-/* Define if you have the strstr function. */
-#define HAVE_STRSTR 1
-
-/* Define if you have the strtod function. */
-#define HAVE_STRTOD 1
-
-/* Define if you have the strtol function. */
-#define HAVE_STRTOL 1
-
-/* Define if you have the strtoul function. */
-#define HAVE_STRTOUL 1
-
-/* Define if you have the sysconf function. */
-#define HAVE_SYSCONF 1
-
-/* Define if you have the times function. */
-#define HAVE_TIMES 1
-
-/* Define if you have the tmpnam function. */
-#define HAVE_TMPNAM 1
-
-/* Define if you have the vasprintf function. */
-#define HAVE_VASPRINTF 1
-
-/* Define if you have the vfprintf function. */
-#define HAVE_VFPRINTF 1
-
-/* Define if you have the vprintf function. */
-#define HAVE_VPRINTF 1
-
-/* Define if you have the vsprintf function. */
-#define HAVE_VSPRINTF 1
-
-/* Define if you have the waitpid function. */
-#define HAVE_WAITPID 1
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define if you have the <sys/file.h> header file. */
-#define HAVE_SYS_FILE_H 1
-
-/* Define if you have the <sys/mman.h> header file. */
-#define HAVE_SYS_MMAN_H 1
-
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define if you have the <sys/resource.h> header file. */
-#define HAVE_SYS_RESOURCE_H 1
-
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if errno must be declared even when <errno.h> is included. */
-/* #undef NEED_DECLARATION_ERRNO */
-
-/* Define if you have the sys_errlist variable. */
-#define HAVE_SYS_ERRLIST 1
-
-/* Define if you have the sys_nerr variable. */
-#define HAVE_SYS_NERR 1
-
-/* Define if you have the sys_siglist variable. */
-#define HAVE_SYS_SIGLIST 1
-
diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0
index cc20a56ddf34e..09bda29a3cc11 100644
--- a/gnu/usr.bin/binutils/Makefile.inc0
+++ b/gnu/usr.bin/binutils/Makefile.inc0
@@ -4,7 +4,7 @@
# use the normal "Makefile.inc" mechanism, because we need some of these
# definitions before the sub-Makefile is processed.
-VERSION= "2.15 [FreeBSD] 2004-05-23"
+VERSION= "2.17.50 [FreeBSD] 2007-07-03"
.if defined(TARGET_ARCH)
TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
@@ -12,8 +12,10 @@ TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
TARGET_ARCH?= ${MACHINE_ARCH}
+TARGET_VENDOR?= unknown
+TARGET_OS?= freebsd
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
-TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd
+TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb"
TARGET_BIG_ENDIAN=t
.endif
diff --git a/gnu/usr.bin/binutils/addr2line/Makefile b/gnu/usr.bin/binutils/addr2line/Makefile
index 958afa65d7b05..2380738fa6381 100644
--- a/gnu/usr.bin/binutils/addr2line/Makefile
+++ b/gnu/usr.bin/binutils/addr2line/Makefile
@@ -6,7 +6,6 @@
PROG= addr2line
SRCS= addr2line.c
-WARNS?= 2
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils
diff --git a/gnu/usr.bin/binutils/addr2line/addr2line.1 b/gnu/usr.bin/binutils/addr2line/addr2line.1
new file mode 100644
index 0000000000000..dc946f8474148
--- /dev/null
+++ b/gnu/usr.bin/binutils/addr2line/addr2line.1
@@ -0,0 +1,266 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "ADDR2LINE 1"
+.TH ADDR2LINE 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+addr2line \- convert addresses into file names and line numbers.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
+ [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]]
+ [\fB\-e\fR \fIfilename\fR|\fB\-\-exe=\fR\fIfilename\fR]
+ [\fB\-f\fR|\fB\-\-functions\fR] [\fB\-s\fR|\fB\-\-basename\fR]
+ [\fB\-i\fR|\fB\-\-inlines\fR]
+ [\fB\-j\fR|\fB\-\-section=\fR\fIname\fR]
+ [\fB\-H\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
+ [addr addr ...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBaddr2line\fR translates addresses into file names and line numbers.
+Given an address in an executable or an offset in a section of a relocatable
+object, it uses the debugging information to figure out which file name and
+line number are associated with it.
+.PP
+The executable or relocatable object to use is specified with the \fB\-e\fR
+option. The default is the file \fIa.out\fR. The section in the relocatable
+object to use is specified with the \fB\-j\fR option.
+.PP
+\&\fBaddr2line\fR has two modes of operation.
+.PP
+In the first, hexadecimal addresses are specified on the command line,
+and \fBaddr2line\fR displays the file name and line number for each
+address.
+.PP
+In the second, \fBaddr2line\fR reads hexadecimal addresses from
+standard input, and prints the file name and line number for each
+address on standard output. In this mode, \fBaddr2line\fR may be used
+in a pipe to convert dynamically chosen addresses.
+.PP
+The format of the output is \fB\s-1FILENAME:LINENO\s0\fR. The file name and
+line number for each address is printed on a separate line. If the
+\&\fB\-f\fR option is used, then each \fB\s-1FILENAME:LINENO\s0\fR line is
+preceded by a \fB\s-1FUNCTIONNAME\s0\fR line which is the name of the function
+containing the address.
+.PP
+If the file name or function name can not be determined,
+\&\fBaddr2line\fR will print two question marks in their place. If the
+line number can not be determined, \fBaddr2line\fR will print 0.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The long and short forms of options, shown here as alternatives, are
+equivalent.
+.IP "\fB\-b\fR \fIbfdname\fR" 4
+.IX Item "-b bfdname"
+.PD 0
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+.PD
+Specify that the object-code format for the object files is
+\&\fIbfdname\fR.
+.IP "\fB\-C\fR" 4
+.IX Item "-C"
+.PD 0
+.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
+.IX Item "--demangle[=style]"
+.PD
+Decode (\fIdemangle\fR) low-level symbol names into user-level names.
+Besides removing any initial underscore prepended by the system, this
+makes \*(C+ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler.
+.IP "\fB\-e\fR \fIfilename\fR" 4
+.IX Item "-e filename"
+.PD 0
+.IP "\fB\-\-exe=\fR\fIfilename\fR" 4
+.IX Item "--exe=filename"
+.PD
+Specify the name of the executable for which addresses should be
+translated. The default file is \fIa.out\fR.
+.IP "\fB\-f\fR" 4
+.IX Item "-f"
+.PD 0
+.IP "\fB\-\-functions\fR" 4
+.IX Item "--functions"
+.PD
+Display function names as well as file and line number information.
+.IP "\fB\-s\fR" 4
+.IX Item "-s"
+.PD 0
+.IP "\fB\-\-basenames\fR" 4
+.IX Item "--basenames"
+.PD
+Display only the base of each file name.
+.IP "\fB\-i\fR" 4
+.IX Item "-i"
+.PD 0
+.IP "\fB\-\-inlines\fR" 4
+.IX Item "--inlines"
+.PD
+If the address belongs to a function that was inlined, the source
+information for all enclosing scopes back to the first non-inlined
+function will also be printed. For example, if \f(CW\*(C`main\*(C'\fR inlines
+\&\f(CW\*(C`callee1\*(C'\fR which inlines \f(CW\*(C`callee2\*(C'\fR, and address is from
+\&\f(CW\*(C`callee2\*(C'\fR, the source information for \f(CW\*(C`callee1\*(C'\fR and \f(CW\*(C`main\*(C'\fR
+will also be printed.
+.IP "\fB\-j\fR" 4
+.IX Item "-j"
+.PD 0
+.IP "\fB\-\-section\fR" 4
+.IX Item "--section"
+.PD
+Read offsets relative to the specified section instead of absolute addresses.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/ar/ar.1 b/gnu/usr.bin/binutils/ar/ar.1
new file mode 100644
index 0000000000000..6e31fb70559ca
--- /dev/null
+++ b/gnu/usr.bin/binutils/ar/ar.1
@@ -0,0 +1,391 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "AR 1"
+.TH AR 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+ar \- create, modify, and extract from archives
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+ar [\fB\-X32_64\fR] [\fB\-\fR]\fIp\fR[\fImod\fR [\fIrelpos\fR] [\fIcount\fR]] \fIarchive\fR [\fImember\fR...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The \s-1GNU\s0 \fBar\fR program creates, modifies, and extracts from
+archives. An \fIarchive\fR is a single file holding a collection of
+other files in a structure that makes it possible to retrieve
+the original individual files (called \fImembers\fR of the archive).
+.PP
+The original files' contents, mode (permissions), timestamp, owner, and
+group are preserved in the archive, and can be restored on
+extraction.
+.PP
+\&\s-1GNU\s0 \fBar\fR can maintain archives whose members have names of any
+length; however, depending on how \fBar\fR is configured on your
+system, a limit on member-name length may be imposed for compatibility
+with archive formats maintained with other tools. If it exists, the
+limit is often 15 characters (typical of formats related to a.out) or 16
+characters (typical of formats related to coff).
+.PP
+\&\fBar\fR is considered a binary utility because archives of this sort
+are most often used as \fIlibraries\fR holding commonly needed
+subroutines.
+.PP
+\&\fBar\fR creates an index to the symbols defined in relocatable
+object modules in the archive when you specify the modifier \fBs\fR.
+Once created, this index is updated in the archive whenever \fBar\fR
+makes a change to its contents (save for the \fBq\fR update operation).
+An archive with such an index speeds up linking to the library, and
+allows routines in the library to call each other without regard to
+their placement in the archive.
+.PP
+You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index
+table. If an archive lacks the table, another form of \fBar\fR called
+\&\fBranlib\fR can be used to add just the table.
+.PP
+\&\s-1GNU\s0 \fBar\fR is designed to be compatible with two different
+facilities. You can control its activity using command-line options,
+like the different varieties of \fBar\fR on Unix systems; or, if you
+specify the single command-line option \fB\-M\fR, you can control it
+with a script supplied via standard input, like the \s-1MRI\s0 \*(L"librarian\*(R"
+program.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+\&\s-1GNU\s0 \fBar\fR allows you to mix the operation code \fIp\fR and modifier
+flags \fImod\fR in any order, within the first command-line argument.
+.PP
+If you wish, you may begin the first command-line argument with a
+dash.
+.PP
+The \fIp\fR keyletter specifies what operation to execute; it may be
+any of the following, but you must specify only one of them:
+.IP "\fBd\fR" 4
+.IX Item "d"
+\&\fIDelete\fR modules from the archive. Specify the names of modules to
+be deleted as \fImember\fR...; the archive is untouched if you
+specify no files to delete.
+.Sp
+If you specify the \fBv\fR modifier, \fBar\fR lists each module
+as it is deleted.
+.IP "\fBm\fR" 4
+.IX Item "m"
+Use this operation to \fImove\fR members in an archive.
+.Sp
+The ordering of members in an archive can make a difference in how
+programs are linked using the library, if a symbol is defined in more
+than one member.
+.Sp
+If no modifiers are used with \f(CW\*(C`m\*(C'\fR, any members you name in the
+\&\fImember\fR arguments are moved to the \fIend\fR of the archive;
+you can use the \fBa\fR, \fBb\fR, or \fBi\fR modifiers to move them to a
+specified place instead.
+.IP "\fBp\fR" 4
+.IX Item "p"
+\&\fIPrint\fR the specified members of the archive, to the standard
+output file. If the \fBv\fR modifier is specified, show the member
+name before copying its contents to standard output.
+.Sp
+If you specify no \fImember\fR arguments, all the files in the archive are
+printed.
+.IP "\fBq\fR" 4
+.IX Item "q"
+\&\fIQuick append\fR; Historically, add the files \fImember\fR... to the end of
+\&\fIarchive\fR, without checking for replacement.
+.Sp
+The modifiers \fBa\fR, \fBb\fR, and \fBi\fR do \fInot\fR affect this
+operation; new members are always placed at the end of the archive.
+.Sp
+The modifier \fBv\fR makes \fBar\fR list each file as it is appended.
+.Sp
+Since the point of this operation is speed, the archive's symbol table
+index is not updated, even if it already existed; you can use \fBar s\fR or
+\&\fBranlib\fR explicitly to update the symbol table index.
+.Sp
+However, too many different systems assume quick append rebuilds the
+index, so \s-1GNU\s0 \fBar\fR implements \fBq\fR as a synonym for \fBr\fR.
+.IP "\fBr\fR" 4
+.IX Item "r"
+Insert the files \fImember\fR... into \fIarchive\fR (with
+\&\fIreplacement\fR). This operation differs from \fBq\fR in that any
+previously existing members are deleted if their names match those being
+added.
+.Sp
+If one of the files named in \fImember\fR... does not exist, \fBar\fR
+displays an error message, and leaves undisturbed any existing members
+of the archive matching that name.
+.Sp
+By default, new members are added at the end of the file; but you may
+use one of the modifiers \fBa\fR, \fBb\fR, or \fBi\fR to request
+placement relative to some existing member.
+.Sp
+The modifier \fBv\fR used with this operation elicits a line of
+output for each file inserted, along with one of the letters \fBa\fR or
+\&\fBr\fR to indicate whether the file was appended (no old member
+deleted) or replaced.
+.IP "\fBt\fR" 4
+.IX Item "t"
+Display a \fItable\fR listing the contents of \fIarchive\fR, or those
+of the files listed in \fImember\fR... that are present in the
+archive. Normally only the member name is shown; if you also want to
+see the modes (permissions), timestamp, owner, group, and size, you can
+request that by also specifying the \fBv\fR modifier.
+.Sp
+If you do not specify a \fImember\fR, all files in the archive
+are listed.
+.Sp
+If there is more than one file with the same name (say, \fBfie\fR) in
+an archive (say \fBb.a\fR), \fBar t b.a fie\fR lists only the
+first instance; to see them all, you must ask for a complete
+listing\-\-\-in our example, \fBar t b.a\fR.
+.IP "\fBx\fR" 4
+.IX Item "x"
+\&\fIExtract\fR members (named \fImember\fR) from the archive. You can
+use the \fBv\fR modifier with this operation, to request that
+\&\fBar\fR list each name as it extracts it.
+.Sp
+If you do not specify a \fImember\fR, all files in the archive
+are extracted.
+.PP
+A number of modifiers (\fImod\fR) may immediately follow the \fIp\fR
+keyletter, to specify variations on an operation's behavior:
+.IP "\fBa\fR" 4
+.IX Item "a"
+Add new files \fIafter\fR an existing member of the
+archive. If you use the modifier \fBa\fR, the name of an existing archive
+member must be present as the \fIrelpos\fR argument, before the
+\&\fIarchive\fR specification.
+.IP "\fBb\fR" 4
+.IX Item "b"
+Add new files \fIbefore\fR an existing member of the
+archive. If you use the modifier \fBb\fR, the name of an existing archive
+member must be present as the \fIrelpos\fR argument, before the
+\&\fIarchive\fR specification. (same as \fBi\fR).
+.IP "\fBc\fR" 4
+.IX Item "c"
+\&\fICreate\fR the archive. The specified \fIarchive\fR is always
+created if it did not exist, when you request an update. But a warning is
+issued unless you specify in advance that you expect to create it, by
+using this modifier.
+.IP "\fBf\fR" 4
+.IX Item "f"
+Truncate names in the archive. \s-1GNU\s0 \fBar\fR will normally permit file
+names of any length. This will cause it to create archives which are
+not compatible with the native \fBar\fR program on some systems. If
+this is a concern, the \fBf\fR modifier may be used to truncate file
+names when putting them in the archive.
+.IP "\fBi\fR" 4
+.IX Item "i"
+Insert new files \fIbefore\fR an existing member of the
+archive. If you use the modifier \fBi\fR, the name of an existing archive
+member must be present as the \fIrelpos\fR argument, before the
+\&\fIarchive\fR specification. (same as \fBb\fR).
+.IP "\fBl\fR" 4
+.IX Item "l"
+This modifier is accepted but not used.
+.IP "\fBN\fR" 4
+.IX Item "N"
+Uses the \fIcount\fR parameter. This is used if there are multiple
+entries in the archive with the same name. Extract or delete instance
+\&\fIcount\fR of the given name from the archive.
+.IP "\fBo\fR" 4
+.IX Item "o"
+Preserve the \fIoriginal\fR dates of members when extracting them. If
+you do not specify this modifier, files extracted from the archive
+are stamped with the time of extraction.
+.IP "\fBP\fR" 4
+.IX Item "P"
+Use the full path name when matching names in the archive. \s-1GNU\s0
+\&\fBar\fR can not create an archive with a full path name (such archives
+are not \s-1POSIX\s0 complaint), but other archive creators can. This option
+will cause \s-1GNU\s0 \fBar\fR to match file names using a complete path
+name, which can be convenient when extracting a single file from an
+archive created by another tool.
+.IP "\fBs\fR" 4
+.IX Item "s"
+Write an object-file index into the archive, or update an existing one,
+even if no other change is made to the archive. You may use this modifier
+flag either with any operation, or alone. Running \fBar s\fR on an
+archive is equivalent to running \fBranlib\fR on it.
+.IP "\fBS\fR" 4
+.IX Item "S"
+Do not generate an archive symbol table. This can speed up building a
+large library in several steps. The resulting archive can not be used
+with the linker. In order to build a symbol table, you must omit the
+\&\fBS\fR modifier on the last execution of \fBar\fR, or you must run
+\&\fBranlib\fR on the archive.
+.IP "\fBu\fR" 4
+.IX Item "u"
+Normally, \fBar r\fR... inserts all files
+listed into the archive. If you would like to insert \fIonly\fR those
+of the files you list that are newer than existing members of the same
+names, use this modifier. The \fBu\fR modifier is allowed only for the
+operation \fBr\fR (replace). In particular, the combination \fBqu\fR is
+not allowed, since checking the timestamps would lose any speed
+advantage from the operation \fBq\fR.
+.IP "\fBv\fR" 4
+.IX Item "v"
+This modifier requests the \fIverbose\fR version of an operation. Many
+operations display additional information, such as filenames processed,
+when the modifier \fBv\fR is appended.
+.IP "\fBV\fR" 4
+.IX Item "V"
+This modifier shows the version number of \fBar\fR.
+.PP
+\&\fBar\fR ignores an initial option spelt \fB\-X32_64\fR, for
+compatibility with \s-1AIX\s0. The behaviour produced by this option is the
+default for \s-1GNU\s0 \fBar\fR. \fBar\fR does not support any of the other
+\&\fB\-X\fR options; in particular, it does not support \fB\-X32\fR
+which is the default for \s-1AIX\s0 \fBar\fR.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fInm\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/as/Makefile b/gnu/usr.bin/binutils/as/Makefile
index e4a133f68a95a..003ce1f81ab7d 100644
--- a/gnu/usr.bin/binutils/as/Makefile
+++ b/gnu/usr.bin/binutils/as/Makefile
@@ -3,20 +3,41 @@
# BINDIR
.include "${.CURDIR}/../../Makefile.inc"
-WARNS?= 2
-NO_WERROR=
.include "${.CURDIR}/../Makefile.inc0"
.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
PROG= as
-MAN= doc/as.1
-SRCS+= app.c as.c atof-generic.c atof-ieee.c bignum-copy.c \
- cond.c dwarf2dbg.c ecoff.c expr.c flonum-copy.c flonum-konst.c \
- flonum-mult.c frags.c hash.c input-file.c \
- input-scrub.c listing.c literal.c macro.c messages.c \
- obj-elf.c output-file.c read.c sb.c stabs.c \
- subsegs.c symbols.c write.c depend.c ehopt.c dw2gencfi.c
+SRCS+= app.c \
+ as.c \
+ atof-generic.c \
+ atof-ieee.c \
+ cond.c \
+ depend.c \
+ dw2gencfi.c \
+ dwarf2dbg.c \
+ ecoff.c \
+ ehopt.c \
+ expr.c \
+ flonum-copy.c \
+ flonum-konst.c \
+ flonum-mult.c \
+ frags.c \
+ hash.c \
+ input-file.c \
+ input-scrub.c \
+ listing.c \
+ literal.c \
+ macro.c \
+ messages.c \
+ obj-elf.c \
+ output-file.c \
+ read.c \
+ sb.c \
+ stabs.c \
+ subsegs.c \
+ symbols.c \
+ write.c
# DEO: why not used?
#SRCS+= itbl-ops.c
@@ -29,8 +50,7 @@ SRCS+= tc-i386.c
.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64"
SRCS+= tc-ppc.c
.elif ${TARGET_ARCH} == "sparc64"
-# change back to tc-sparc.c when new binutils is imported
-SRCS+= tc-sparc-fixed.c
+SRCS+= tc-sparc.c
.else
SRCS+= tc-${TARGET_CPUARCH}.c
.endif
@@ -44,11 +64,12 @@ CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
.endif
CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
+CFLAGS+= -DTARGET_OS=\"${TARGET_OS}\"
CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
CFLAGS+= -DVERSION=\"${VERSION}\"
CFLAGS+= -D_GNU_SOURCE
-CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/gas/config -I${SRCDIR}
+CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR}
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd
NO_SHARED?= yes
diff --git a/gnu/usr.bin/binutils/as/as.1 b/gnu/usr.bin/binutils/as/as.1
new file mode 100644
index 0000000000000..40ee7e43ea5c7
--- /dev/null
+++ b/gnu/usr.bin/binutils/as/as.1
@@ -0,0 +1,1135 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "AS 1"
+.TH AS 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+AS \- the portable GNU assembler.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-\-alternate\fR] [\fB\-D\fR]
+ [\fB\-\-defsym\fR \fIsym\fR=\fIval\fR] [\fB\-f\fR] [\fB\-g\fR] [\fB\-\-gstabs\fR]
+ [\fB\-\-gstabs+\fR] [\fB\-\-gdwarf\-2\fR] [\fB\-\-help\fR] [\fB\-I\fR \fIdir\fR] [\fB\-J\fR]
+ [\fB\-K\fR] [\fB\-L\fR] [\fB\-\-listing\-lhs\-width\fR=\fI\s-1NUM\s0\fR]
+ [\fB\-\-listing\-lhs\-width2\fR=\fI\s-1NUM\s0\fR] [\fB\-\-listing\-rhs\-width\fR=\fI\s-1NUM\s0\fR]
+ [\fB\-\-listing\-cont\-lines\fR=\fI\s-1NUM\s0\fR] [\fB\-\-keep\-locals\fR] [\fB\-o\fR
+ \fIobjfile\fR] [\fB\-R\fR] [\fB\-\-reduce\-memory\-overheads\fR] [\fB\-\-statistics\fR]
+ [\fB\-v\fR] [\fB\-version\fR] [\fB\-\-version\fR] [\fB\-W\fR] [\fB\-\-warn\fR]
+ [\fB\-\-fatal\-warnings\fR] [\fB\-w\fR] [\fB\-x\fR] [\fB\-Z\fR] [\fB@\fR\fI\s-1FILE\s0\fR]
+ [\fB\-\-target\-help\fR] [\fItarget-options\fR]
+ [\fB\-\-\fR|\fIfiles\fR ...]
+.PP
+\&\fITarget Alpha options:\fR
+ [\fB\-m\fR\fIcpu\fR]
+ [\fB\-mdebug\fR | \fB\-no\-mdebug\fR]
+ [\fB\-relax\fR] [\fB\-g\fR] [\fB\-G\fR\fIsize\fR]
+ [\fB\-F\fR] [\fB\-32addr\fR]
+.PP
+\&\fITarget \s-1ARC\s0 options:\fR
+ [\fB\-marc[5|6|7|8]\fR]
+ [\fB\-EB\fR|\fB\-EL\fR]
+.PP
+\&\fITarget \s-1ARM\s0 options:\fR
+ [\fB\-mcpu\fR=\fIprocessor\fR[+\fIextension\fR...]]
+ [\fB\-march\fR=\fIarchitecture\fR[+\fIextension\fR...]]
+ [\fB\-mfpu\fR=\fIfloating-point-format\fR]
+ [\fB\-mfloat\-abi\fR=\fIabi\fR]
+ [\fB\-meabi\fR=\fIver\fR]
+ [\fB\-mthumb\fR]
+ [\fB\-EB\fR|\fB\-EL\fR]
+ [\fB\-mapcs\-32\fR|\fB\-mapcs\-26\fR|\fB\-mapcs\-float\fR|
+ \fB\-mapcs\-reentrant\fR]
+ [\fB\-mthumb\-interwork\fR] [\fB\-k\fR]
+.PP
+\&\fITarget \s-1CRIS\s0 options:\fR
+ [\fB\-\-underscore\fR | \fB\-\-no\-underscore\fR]
+ [\fB\-\-pic\fR] [\fB\-N\fR]
+ [\fB\-\-emulation=criself\fR | \fB\-\-emulation=crisaout\fR]
+ [\fB\-\-march=v0_v10\fR | \fB\-\-march=v10\fR | \fB\-\-march=v32\fR | \fB\-\-march=common_v10_v32\fR]
+.PP
+\&\fITarget D10V options:\fR
+ [\fB\-O\fR]
+.PP
+\&\fITarget D30V options:\fR
+ [\fB\-O\fR|\fB\-n\fR|\fB\-N\fR]
+.PP
+\&\fITarget i386 options:\fR
+ [\fB\-\-32\fR|\fB\-\-64\fR] [\fB\-n\fR]
+ [\fB\-march\fR=\fI\s-1CPU\s0\fR] [\fB\-mtune\fR=\fI\s-1CPU\s0\fR]
+.PP
+\&\fITarget i960 options:\fR
+ [\fB\-ACA\fR|\fB\-ACA_A\fR|\fB\-ACB\fR|\fB\-ACC\fR|\fB\-AKA\fR|\fB\-AKB\fR|
+ \fB\-AKC\fR|\fB\-AMC\fR]
+ [\fB\-b\fR] [\fB\-no\-relax\fR]
+.PP
+\&\fITarget \s-1IA\-64\s0 options:\fR
+ [\fB\-mconstant\-gp\fR|\fB\-mauto\-pic\fR]
+ [\fB\-milp32\fR|\fB\-milp64\fR|\fB\-mlp64\fR|\fB\-mp64\fR]
+ [\fB\-mle\fR|\fBmbe\fR]
+ [\fB\-mtune=itanium1\fR|\fB\-mtune=itanium2\fR]
+ [\fB\-munwind\-check=warning\fR|\fB\-munwind\-check=error\fR]
+ [\fB\-mhint.b=ok\fR|\fB\-mhint.b=warning\fR|\fB\-mhint.b=error\fR]
+ [\fB\-x\fR|\fB\-xexplicit\fR] [\fB\-xauto\fR] [\fB\-xdebug\fR]
+.PP
+\&\fITarget \s-1IP2K\s0 options:\fR
+ [\fB\-mip2022\fR|\fB\-mip2022ext\fR]
+.PP
+\&\fITarget M32C options:\fR
+ [\fB\-m32c\fR|\fB\-m16c\fR]
+.PP
+\&\fITarget M32R options:\fR
+ [\fB\-\-m32rx\fR|\fB\-\-[no\-]warn\-explicit\-parallel\-conflicts\fR|
+ \fB\-\-W[n]p\fR]
+.PP
+\&\fITarget M680X0 options:\fR
+ [\fB\-l\fR] [\fB\-m68000\fR|\fB\-m68010\fR|\fB\-m68020\fR|...]
+.PP
+\&\fITarget M68HC11 options:\fR
+ [\fB\-m68hc11\fR|\fB\-m68hc12\fR|\fB\-m68hcs12\fR]
+ [\fB\-mshort\fR|\fB\-mlong\fR]
+ [\fB\-mshort\-double\fR|\fB\-mlong\-double\fR]
+ [\fB\-\-force\-long\-branches\fR] [\fB\-\-short\-branches\fR]
+ [\fB\-\-strict\-direct\-mode\fR] [\fB\-\-print\-insn\-syntax\fR]
+ [\fB\-\-print\-opcodes\fR] [\fB\-\-generate\-example\fR]
+.PP
+\&\fITarget \s-1MCORE\s0 options:\fR
+ [\fB\-jsri2bsr\fR] [\fB\-sifilter\fR] [\fB\-relax\fR]
+ [\fB\-mcpu=[210|340]\fR]
+.PP
+\&\fITarget \s-1MIPS\s0 options:\fR
+ [\fB\-nocpp\fR] [\fB\-EL\fR] [\fB\-EB\fR] [\fB\-O\fR[\fIoptimization level\fR]]
+ [\fB\-g\fR[\fIdebug level\fR]] [\fB\-G\fR \fInum\fR] [\fB\-KPIC\fR] [\fB\-call_shared\fR]
+ [\fB\-non_shared\fR] [\fB\-xgot\fR [\fB\-mvxworks\-pic\fR]
+ [\fB\-mabi\fR=\fI\s-1ABI\s0\fR] [\fB\-32\fR] [\fB\-n32\fR] [\fB\-64\fR] [\fB\-mfp32\fR] [\fB\-mgp32\fR]
+ [\fB\-march\fR=\fI\s-1CPU\s0\fR] [\fB\-mtune\fR=\fI\s-1CPU\s0\fR] [\fB\-mips1\fR] [\fB\-mips2\fR]
+ [\fB\-mips3\fR] [\fB\-mips4\fR] [\fB\-mips5\fR] [\fB\-mips32\fR] [\fB\-mips32r2\fR]
+ [\fB\-mips64\fR] [\fB\-mips64r2\fR]
+ [\fB\-construct\-floats\fR] [\fB\-no\-construct\-floats\fR]
+ [\fB\-trap\fR] [\fB\-no\-break\fR] [\fB\-break\fR] [\fB\-no\-trap\fR]
+ [\fB\-mfix7000\fR] [\fB\-mno\-fix7000\fR]
+ [\fB\-mips16\fR] [\fB\-no\-mips16\fR]
+ [\fB\-msmartmips\fR] [\fB\-mno\-smartmips\fR]
+ [\fB\-mips3d\fR] [\fB\-no\-mips3d\fR]
+ [\fB\-mdmx\fR] [\fB\-no\-mdmx\fR]
+ [\fB\-mdsp\fR] [\fB\-mno\-dsp\fR]
+ [\fB\-mdspr2\fR] [\fB\-mno\-dspr2\fR]
+ [\fB\-mmt\fR] [\fB\-mno\-mt\fR]
+ [\fB\-mdebug\fR] [\fB\-no\-mdebug\fR]
+ [\fB\-mpdr\fR] [\fB\-mno\-pdr\fR]
+.PP
+\&\fITarget \s-1MMIX\s0 options:\fR
+ [\fB\-\-fixed\-special\-register\-names\fR] [\fB\-\-globalize\-symbols\fR]
+ [\fB\-\-gnu\-syntax\fR] [\fB\-\-relax\fR] [\fB\-\-no\-predefined\-symbols\fR]
+ [\fB\-\-no\-expand\fR] [\fB\-\-no\-merge\-gregs\fR] [\fB\-x\fR]
+ [\fB\-\-linker\-allocated\-gregs\fR]
+.PP
+\&\fITarget \s-1PDP11\s0 options:\fR
+ [\fB\-mpic\fR|\fB\-mno\-pic\fR] [\fB\-mall\fR] [\fB\-mno\-extensions\fR]
+ [\fB\-m\fR\fIextension\fR|\fB\-mno\-\fR\fIextension\fR]
+ [\fB\-m\fR\fIcpu\fR] [\fB\-m\fR\fImachine\fR]
+.PP
+\&\fITarget picoJava options:\fR
+ [\fB\-mb\fR|\fB\-me\fR]
+.PP
+\&\fITarget PowerPC options:\fR
+ [\fB\-mpwrx\fR|\fB\-mpwr2\fR|\fB\-mpwr\fR|\fB\-m601\fR|\fB\-mppc\fR|\fB\-mppc32\fR|\fB\-m603\fR|\fB\-m604\fR|
+ \fB\-m403\fR|\fB\-m405\fR|\fB\-mppc64\fR|\fB\-m620\fR|\fB\-mppc64bridge\fR|\fB\-mbooke\fR|
+ \fB\-mbooke32\fR|\fB\-mbooke64\fR]
+ [\fB\-mcom\fR|\fB\-many\fR|\fB\-maltivec\fR] [\fB\-memb\fR]
+ [\fB\-mregnames\fR|\fB\-mno\-regnames\fR]
+ [\fB\-mrelocatable\fR|\fB\-mrelocatable\-lib\fR]
+ [\fB\-mlittle\fR|\fB\-mlittle\-endian\fR|\fB\-mbig\fR|\fB\-mbig\-endian\fR]
+ [\fB\-msolaris\fR|\fB\-mno\-solaris\fR]
+.PP
+\&\fITarget \s-1SPARC\s0 options:\fR
+ [\fB\-Av6\fR|\fB\-Av7\fR|\fB\-Av8\fR|\fB\-Asparclet\fR|\fB\-Asparclite\fR
+ \fB\-Av8plus\fR|\fB\-Av8plusa\fR|\fB\-Av9\fR|\fB\-Av9a\fR]
+ [\fB\-xarch=v8plus\fR|\fB\-xarch=v8plusa\fR] [\fB\-bump\fR]
+ [\fB\-32\fR|\fB\-64\fR]
+.PP
+\&\fITarget \s-1TIC54X\s0 options:\fR
+ [\fB\-mcpu=54[123589]\fR|\fB\-mcpu=54[56]lp\fR] [\fB\-mfar\-mode\fR|\fB\-mf\fR]
+ [\fB\-merrors\-to\-file\fR \fI<filename>\fR|\fB\-me\fR \fI<filename>\fR]
+.PP
+\&\fITarget Z80 options:\fR
+ [\fB\-z80\fR] [\fB\-r800\fR]
+ [ \fB\-ignore\-undocumented\-instructions\fR] [\fB\-Wnud\fR]
+ [ \fB\-ignore\-unportable\-instructions\fR] [\fB\-Wnup\fR]
+ [ \fB\-warn\-undocumented\-instructions\fR] [\fB\-Wud\fR]
+ [ \fB\-warn\-unportable\-instructions\fR] [\fB\-Wup\fR]
+ [ \fB\-forbid\-undocumented\-instructions\fR] [\fB\-Fud\fR]
+ [ \fB\-forbid\-unportable\-instructions\fR] [\fB\-Fup\fR]
+.PP
+\&\fITarget Xtensa options:\fR
+ [\fB\-\-[no\-]text\-section\-literals\fR] [\fB\-\-[no\-]absolute\-literals\fR]
+ [\fB\-\-[no\-]target\-align\fR] [\fB\-\-[no\-]longcalls\fR]
+ [\fB\-\-[no\-]transform\fR]
+ [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1GNU\s0 \fBas\fR is really a family of assemblers.
+If you use (or have used) the \s-1GNU\s0 assembler on one architecture, you
+should find a fairly similar environment when you use it on another
+architecture. Each version has much in common with the others,
+including object file formats, most assembler directives (often called
+\&\fIpseudo-ops\fR) and assembler syntax.
+.PP
+\&\fBas\fR is primarily intended to assemble the output of the
+\&\s-1GNU\s0 C compiler \f(CW\*(C`gcc\*(C'\fR for use by the linker
+\&\f(CW\*(C`ld\*(C'\fR. Nevertheless, we've tried to make \fBas\fR
+assemble correctly everything that other assemblers for the same
+machine would assemble.
+Any exceptions are documented explicitly.
+This doesn't mean \fBas\fR always uses the same syntax as another
+assembler for the same architecture; for example, we know of several
+incompatible versions of 680x0 assembly language syntax.
+.PP
+Each time you run \fBas\fR it assembles exactly one source
+program. The source program is made up of one or more files.
+(The standard input is also a file.)
+.PP
+You give \fBas\fR a command line that has zero or more input file
+names. The input files are read (from left file name to right). A
+command line argument (in any position) that has no special meaning
+is taken to be an input file name.
+.PP
+If you give \fBas\fR no file names it attempts to read one input file
+from the \fBas\fR standard input, which is normally your terminal. You
+may have to type \fBctl-D\fR to tell \fBas\fR there is no more program
+to assemble.
+.PP
+Use \fB\-\-\fR if you need to explicitly name the standard input file
+in your command line.
+.PP
+If the source is empty, \fBas\fR produces a small, empty object
+file.
+.PP
+\&\fBas\fR may write warnings and error messages to the standard error
+file (usually your terminal). This should not happen when a compiler
+runs \fBas\fR automatically. Warnings report an assumption made so
+that \fBas\fR could keep assembling a flawed program; errors report a
+grave problem that stops the assembly.
+.PP
+If you are invoking \fBas\fR via the \s-1GNU\s0 C compiler,
+you can use the \fB\-Wa\fR option to pass arguments through to the assembler.
+The assembler arguments must be separated from each other (and the \fB\-Wa\fR)
+by commas. For example:
+.PP
+.Vb 1
+\& gcc \-c \-g \-O \-Wa,\-alh,\-L file.c
+.Ve
+.PP
+This passes two options to the assembler: \fB\-alh\fR (emit a listing to
+standard output with high-level and assembly source) and \fB\-L\fR (retain
+local symbols in the symbol table).
+.PP
+Usually you do not need to use this \fB\-Wa\fR mechanism, since many compiler
+command-line options are automatically passed to the assembler by the compiler.
+(You can call the \s-1GNU\s0 compiler driver with the \fB\-v\fR option to see
+precisely what options it passes to each compilation pass, including the
+assembler.)
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.IP "\fB\-a[cdhlmns]\fR" 4
+.IX Item "-a[cdhlmns]"
+Turn on listings, in any of a variety of ways:
+.RS 4
+.IP "\fB\-ac\fR" 4
+.IX Item "-ac"
+omit false conditionals
+.IP "\fB\-ad\fR" 4
+.IX Item "-ad"
+omit debugging directives
+.IP "\fB\-ah\fR" 4
+.IX Item "-ah"
+include high-level source
+.IP "\fB\-al\fR" 4
+.IX Item "-al"
+include assembly
+.IP "\fB\-am\fR" 4
+.IX Item "-am"
+include macro expansions
+.IP "\fB\-an\fR" 4
+.IX Item "-an"
+omit forms processing
+.IP "\fB\-as\fR" 4
+.IX Item "-as"
+include symbols
+.IP "\fB=file\fR" 4
+.IX Item "=file"
+set the name of the listing file
+.RE
+.RS 4
+.Sp
+You may combine these options; for example, use \fB\-aln\fR for assembly
+listing without forms processing. The \fB=file\fR option, if used, must be
+the last one. By itself, \fB\-a\fR defaults to \fB\-ahls\fR.
+.RE
+.IP "\fB\-\-alternate\fR" 4
+.IX Item "--alternate"
+Begin in alternate macro mode.
+.IP "\fB\-D\fR" 4
+.IX Item "-D"
+Ignored. This option is accepted for script compatibility with calls to
+other assemblers.
+.IP "\fB\-\-defsym\fR \fIsym\fR\fB=\fR\fIvalue\fR" 4
+.IX Item "--defsym sym=value"
+Define the symbol \fIsym\fR to be \fIvalue\fR before assembling the input file.
+\&\fIvalue\fR must be an integer constant. As in C, a leading \fB0x\fR
+indicates a hexadecimal value, and a leading \fB0\fR indicates an octal
+value. The value of the symbol can be overridden inside a source file via the
+use of a \f(CW\*(C`.set\*(C'\fR pseudo-op.
+.IP "\fB\-f\fR" 4
+.IX Item "-f"
+\&\*(L"fast\*(R"\-\-\-skip whitespace and comment preprocessing (assume source is
+compiler output).
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+.PD 0
+.IP "\fB\-\-gen\-debug\fR" 4
+.IX Item "--gen-debug"
+.PD
+Generate debugging information for each assembler source line using whichever
+debug format is preferred by the target. This currently means either \s-1STABS\s0,
+\&\s-1ECOFF\s0 or \s-1DWARF2\s0.
+.IP "\fB\-\-gstabs\fR" 4
+.IX Item "--gstabs"
+Generate stabs debugging information for each assembler line. This
+may help debugging assembler code, if the debugger can handle it.
+.IP "\fB\-\-gstabs+\fR" 4
+.IX Item "--gstabs+"
+Generate stabs debugging information for each assembler line, with \s-1GNU\s0
+extensions that probably only gdb can handle, and that could make other
+debuggers crash or refuse to read your program. This
+may help debugging assembler code. Currently the only \s-1GNU\s0 extension is
+the location of the current working directory at assembling time.
+.IP "\fB\-\-gdwarf\-2\fR" 4
+.IX Item "--gdwarf-2"
+Generate \s-1DWARF2\s0 debugging information for each assembler line. This
+may help debugging assembler code, if the debugger can handle it. Note\-\-\-this
+option is only supported by some targets, not all of them.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Print a summary of the command line options and exit.
+.IP "\fB\-\-target\-help\fR" 4
+.IX Item "--target-help"
+Print a summary of all target specific options and exit.
+.IP "\fB\-I\fR \fIdir\fR" 4
+.IX Item "-I dir"
+Add directory \fIdir\fR to the search list for \f(CW\*(C`.include\*(C'\fR directives.
+.IP "\fB\-J\fR" 4
+.IX Item "-J"
+Don't warn about signed overflow.
+.IP "\fB\-K\fR" 4
+.IX Item "-K"
+Issue warnings when difference tables altered for long displacements.
+.IP "\fB\-L\fR" 4
+.IX Item "-L"
+.PD 0
+.IP "\fB\-\-keep\-locals\fR" 4
+.IX Item "--keep-locals"
+.PD
+Keep (in the symbol table) local symbols. These symbols start with
+system-specific local label prefixes, typically \fB.L\fR for \s-1ELF\s0 systems
+or \fBL\fR for traditional a.out systems.
+.IP "\fB\-\-listing\-lhs\-width=\fR\fInumber\fR" 4
+.IX Item "--listing-lhs-width=number"
+Set the maximum width, in words, of the output data column for an assembler
+listing to \fInumber\fR.
+.IP "\fB\-\-listing\-lhs\-width2=\fR\fInumber\fR" 4
+.IX Item "--listing-lhs-width2=number"
+Set the maximum width, in words, of the output data column for continuation
+lines in an assembler listing to \fInumber\fR.
+.IP "\fB\-\-listing\-rhs\-width=\fR\fInumber\fR" 4
+.IX Item "--listing-rhs-width=number"
+Set the maximum width of an input source line, as displayed in a listing, to
+\&\fInumber\fR bytes.
+.IP "\fB\-\-listing\-cont\-lines=\fR\fInumber\fR" 4
+.IX Item "--listing-cont-lines=number"
+Set the maximum number of lines printed in a listing for a single line of input
+to \fInumber\fR + 1.
+.IP "\fB\-o\fR \fIobjfile\fR" 4
+.IX Item "-o objfile"
+Name the object-file output from \fBas\fR \fIobjfile\fR.
+.IP "\fB\-R\fR" 4
+.IX Item "-R"
+Fold the data section into the text section.
+.Sp
+Set the default size of \s-1GAS\s0's hash tables to a prime number close to
+\&\fInumber\fR. Increasing this value can reduce the length of time it takes the
+assembler to perform its tasks, at the expense of increasing the assembler's
+memory requirements. Similarly reducing this value can reduce the memory
+requirements at the expense of speed.
+.IP "\fB\-\-reduce\-memory\-overheads\fR" 4
+.IX Item "--reduce-memory-overheads"
+This option reduces \s-1GAS\s0's memory requirements, at the expense of making the
+assembly processes slower. Currently this switch is a synonym for
+\&\fB\-\-hash\-size=4051\fR, but in the future it may have other effects as well.
+.IP "\fB\-\-statistics\fR" 4
+.IX Item "--statistics"
+Print the maximum space (in bytes) and total time (in seconds) used by
+assembly.
+.IP "\fB\-\-strip\-local\-absolute\fR" 4
+.IX Item "--strip-local-absolute"
+Remove local absolute symbols from the outgoing symbol table.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-version\fR" 4
+.IX Item "-version"
+.PD
+Print the \fBas\fR version.
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+Print the \fBas\fR version and exit.
+.IP "\fB\-W\fR" 4
+.IX Item "-W"
+.PD 0
+.IP "\fB\-\-no\-warn\fR" 4
+.IX Item "--no-warn"
+.PD
+Suppress warning messages.
+.IP "\fB\-\-fatal\-warnings\fR" 4
+.IX Item "--fatal-warnings"
+Treat warnings as errors.
+.IP "\fB\-\-warn\fR" 4
+.IX Item "--warn"
+Don't suppress warning messages or treat them as errors.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+Ignored.
+.IP "\fB\-x\fR" 4
+.IX Item "-x"
+Ignored.
+.IP "\fB\-Z\fR" 4
+.IX Item "-Z"
+Generate an object file even after errors.
+.IP "\fB\-\- |\fR \fIfiles\fR \fB...\fR" 4
+.IX Item "-- | files ..."
+Standard input, or source files to assemble.
+.PP
+The following options are available when as is configured for
+an \s-1ARC\s0 processor.
+.IP "\fB\-marc[5|6|7|8]\fR" 4
+.IX Item "-marc[5|6|7|8]"
+This option selects the core processor variant.
+.IP "\fB\-EB | \-EL\fR" 4
+.IX Item "-EB | -EL"
+Select either big-endian (\-EB) or little-endian (\-EL) output.
+.PP
+The following options are available when as is configured for the \s-1ARM\s0
+processor family.
+.IP "\fB\-mcpu=\fR\fIprocessor\fR\fB[+\fR\fIextension\fR\fB...]\fR" 4
+.IX Item "-mcpu=processor[+extension...]"
+Specify which \s-1ARM\s0 processor variant is the target.
+.IP "\fB\-march=\fR\fIarchitecture\fR\fB[+\fR\fIextension\fR\fB...]\fR" 4
+.IX Item "-march=architecture[+extension...]"
+Specify which \s-1ARM\s0 architecture variant is used by the target.
+.IP "\fB\-mfpu=\fR\fIfloating-point-format\fR" 4
+.IX Item "-mfpu=floating-point-format"
+Select which Floating Point architecture is the target.
+.IP "\fB\-mfloat\-abi=\fR\fIabi\fR" 4
+.IX Item "-mfloat-abi=abi"
+Select which floating point \s-1ABI\s0 is in use.
+.IP "\fB\-mthumb\fR" 4
+.IX Item "-mthumb"
+Enable Thumb only instruction decoding.
+.IP "\fB\-mapcs\-32 | \-mapcs\-26 | \-mapcs\-float | \-mapcs\-reentrant\fR" 4
+.IX Item "-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant"
+Select which procedure calling convention is in use.
+.IP "\fB\-EB | \-EL\fR" 4
+.IX Item "-EB | -EL"
+Select either big-endian (\-EB) or little-endian (\-EL) output.
+.IP "\fB\-mthumb\-interwork\fR" 4
+.IX Item "-mthumb-interwork"
+Specify that the code has been generated with interworking between Thumb and
+\&\s-1ARM\s0 code in mind.
+.IP "\fB\-k\fR" 4
+.IX Item "-k"
+Specify that \s-1PIC\s0 code has been generated.
+.PP
+See the info pages for documentation of the CRIS-specific options.
+.PP
+The following options are available when as is configured for
+a D10V processor.
+.IP "\fB\-O\fR" 4
+.IX Item "-O"
+Optimize output by parallelizing instructions.
+.PP
+The following options are available when as is configured for a D30V
+processor.
+.IP "\fB\-O\fR" 4
+.IX Item "-O"
+Optimize output by parallelizing instructions.
+.IP "\fB\-n\fR" 4
+.IX Item "-n"
+Warn when nops are generated.
+.IP "\fB\-N\fR" 4
+.IX Item "-N"
+Warn when a nop after a 32\-bit multiply instruction is generated.
+.PP
+The following options are available when as is configured for the
+Intel 80960 processor.
+.IP "\fB\-ACA | \-ACA_A | \-ACB | \-ACC | \-AKA | \-AKB | \-AKC | \-AMC\fR" 4
+.IX Item "-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC"
+Specify which variant of the 960 architecture is the target.
+.IP "\fB\-b\fR" 4
+.IX Item "-b"
+Add code to collect statistics about branches taken.
+.IP "\fB\-no\-relax\fR" 4
+.IX Item "-no-relax"
+Do not alter compare-and-branch instructions for long displacements;
+error if necessary.
+.PP
+The following options are available when as is configured for the
+Ubicom \s-1IP2K\s0 series.
+.IP "\fB\-mip2022ext\fR" 4
+.IX Item "-mip2022ext"
+Specifies that the extended \s-1IP2022\s0 instructions are allowed.
+.IP "\fB\-mip2022\fR" 4
+.IX Item "-mip2022"
+Restores the default behaviour, which restricts the permitted instructions to
+just the basic \s-1IP2022\s0 ones.
+.PP
+The following options are available when as is configured for the
+Renesas M32C and M16C processors.
+.IP "\fB\-m32c\fR" 4
+.IX Item "-m32c"
+Assemble M32C instructions.
+.IP "\fB\-m16c\fR" 4
+.IX Item "-m16c"
+Assemble M16C instructions (the default).
+.PP
+The following options are available when as is configured for the
+Renesas M32R (formerly Mitsubishi M32R) series.
+.IP "\fB\-\-m32rx\fR" 4
+.IX Item "--m32rx"
+Specify which processor in the M32R family is the target. The default
+is normally the M32R, but this option changes it to the M32RX.
+.IP "\fB\-\-warn\-explicit\-parallel\-conflicts or \-\-Wp\fR" 4
+.IX Item "--warn-explicit-parallel-conflicts or --Wp"
+Produce warning messages when questionable parallel constructs are
+encountered.
+.IP "\fB\-\-no\-warn\-explicit\-parallel\-conflicts or \-\-Wnp\fR" 4
+.IX Item "--no-warn-explicit-parallel-conflicts or --Wnp"
+Do not produce warning messages when questionable parallel constructs are
+encountered.
+.PP
+The following options are available when as is configured for the
+Motorola 68000 series.
+.IP "\fB\-l\fR" 4
+.IX Item "-l"
+Shorten references to undefined symbols, to one word instead of two.
+.IP "\fB\-m68000 | \-m68008 | \-m68010 | \-m68020 | \-m68030\fR" 4
+.IX Item "-m68000 | -m68008 | -m68010 | -m68020 | -m68030"
+.PD 0
+.IP "\fB| \-m68040 | \-m68060 | \-m68302 | \-m68331 | \-m68332\fR" 4
+.IX Item "| -m68040 | -m68060 | -m68302 | -m68331 | -m68332"
+.IP "\fB| \-m68333 | \-m68340 | \-mcpu32 | \-m5200\fR" 4
+.IX Item "| -m68333 | -m68340 | -mcpu32 | -m5200"
+.PD
+Specify what processor in the 68000 family is the target. The default
+is normally the 68020, but this can be changed at configuration time.
+.IP "\fB\-m68881 | \-m68882 | \-mno\-68881 | \-mno\-68882\fR" 4
+.IX Item "-m68881 | -m68882 | -mno-68881 | -mno-68882"
+The target machine does (or does not) have a floating-point coprocessor.
+The default is to assume a coprocessor for 68020, 68030, and cpu32. Although
+the basic 68000 is not compatible with the 68881, a combination of the
+two can be specified, since it's possible to do emulation of the
+coprocessor instructions with the main processor.
+.IP "\fB\-m68851 | \-mno\-68851\fR" 4
+.IX Item "-m68851 | -mno-68851"
+The target machine does (or does not) have a memory-management
+unit coprocessor. The default is to assume an \s-1MMU\s0 for 68020 and up.
+.PP
+For details about the \s-1PDP\-11\s0 machine dependent features options,
+see \fBPDP\-11\-Options\fR.
+.IP "\fB\-mpic | \-mno\-pic\fR" 4
+.IX Item "-mpic | -mno-pic"
+Generate position-independent (or position-dependent) code. The
+default is \fB\-mpic\fR.
+.IP "\fB\-mall\fR" 4
+.IX Item "-mall"
+.PD 0
+.IP "\fB\-mall\-extensions\fR" 4
+.IX Item "-mall-extensions"
+.PD
+Enable all instruction set extensions. This is the default.
+.IP "\fB\-mno\-extensions\fR" 4
+.IX Item "-mno-extensions"
+Disable all instruction set extensions.
+.IP "\fB\-m\fR\fIextension\fR \fB| \-mno\-\fR\fIextension\fR" 4
+.IX Item "-mextension | -mno-extension"
+Enable (or disable) a particular instruction set extension.
+.IP "\fB\-m\fR\fIcpu\fR" 4
+.IX Item "-mcpu"
+Enable the instruction set extensions supported by a particular \s-1CPU\s0, and
+disable all other extensions.
+.IP "\fB\-m\fR\fImachine\fR" 4
+.IX Item "-mmachine"
+Enable the instruction set extensions supported by a particular machine
+model, and disable all other extensions.
+.PP
+The following options are available when as is configured for
+a picoJava processor.
+.IP "\fB\-mb\fR" 4
+.IX Item "-mb"
+Generate \*(L"big endian\*(R" format output.
+.IP "\fB\-ml\fR" 4
+.IX Item "-ml"
+Generate \*(L"little endian\*(R" format output.
+.PP
+The following options are available when as is configured for the
+Motorola 68HC11 or 68HC12 series.
+.IP "\fB\-m68hc11 | \-m68hc12 | \-m68hcs12\fR" 4
+.IX Item "-m68hc11 | -m68hc12 | -m68hcs12"
+Specify what processor is the target. The default is
+defined by the configuration option when building the assembler.
+.IP "\fB\-mshort\fR" 4
+.IX Item "-mshort"
+Specify to use the 16\-bit integer \s-1ABI\s0.
+.IP "\fB\-mlong\fR" 4
+.IX Item "-mlong"
+Specify to use the 32\-bit integer \s-1ABI\s0.
+.IP "\fB\-mshort\-double\fR" 4
+.IX Item "-mshort-double"
+Specify to use the 32\-bit double \s-1ABI\s0.
+.IP "\fB\-mlong\-double\fR" 4
+.IX Item "-mlong-double"
+Specify to use the 64\-bit double \s-1ABI\s0.
+.IP "\fB\-\-force\-long\-branches\fR" 4
+.IX Item "--force-long-branches"
+Relative branches are turned into absolute ones. This concerns
+conditional branches, unconditional branches and branches to a
+sub routine.
+.IP "\fB\-S | \-\-short\-branches\fR" 4
+.IX Item "-S | --short-branches"
+Do not turn relative branches into absolute ones
+when the offset is out of range.
+.IP "\fB\-\-strict\-direct\-mode\fR" 4
+.IX Item "--strict-direct-mode"
+Do not turn the direct addressing mode into extended addressing mode
+when the instruction does not support direct addressing mode.
+.IP "\fB\-\-print\-insn\-syntax\fR" 4
+.IX Item "--print-insn-syntax"
+Print the syntax of instruction in case of error.
+.IP "\fB\-\-print\-opcodes\fR" 4
+.IX Item "--print-opcodes"
+print the list of instructions with syntax and then exit.
+.IP "\fB\-\-generate\-example\fR" 4
+.IX Item "--generate-example"
+print an example of instruction for each possible instruction and then exit.
+This option is only useful for testing \fBas\fR.
+.PP
+The following options are available when \fBas\fR is configured
+for the \s-1SPARC\s0 architecture:
+.IP "\fB\-Av6 | \-Av7 | \-Av8 | \-Asparclet | \-Asparclite\fR" 4
+.IX Item "-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite"
+.PD 0
+.IP "\fB\-Av8plus | \-Av8plusa | \-Av9 | \-Av9a\fR" 4
+.IX Item "-Av8plus | -Av8plusa | -Av9 | -Av9a"
+.PD
+Explicitly select a variant of the \s-1SPARC\s0 architecture.
+.Sp
+\&\fB\-Av8plus\fR and \fB\-Av8plusa\fR select a 32 bit environment.
+\&\fB\-Av9\fR and \fB\-Av9a\fR select a 64 bit environment.
+.Sp
+\&\fB\-Av8plusa\fR and \fB\-Av9a\fR enable the \s-1SPARC\s0 V9 instruction set with
+UltraSPARC extensions.
+.IP "\fB\-xarch=v8plus | \-xarch=v8plusa\fR" 4
+.IX Item "-xarch=v8plus | -xarch=v8plusa"
+For compatibility with the Solaris v9 assembler. These options are
+equivalent to \-Av8plus and \-Av8plusa, respectively.
+.IP "\fB\-bump\fR" 4
+.IX Item "-bump"
+Warn when the assembler switches to another architecture.
+.PP
+The following options are available when as is configured for the 'c54x
+architecture.
+.IP "\fB\-mfar\-mode\fR" 4
+.IX Item "-mfar-mode"
+Enable extended addressing mode. All addresses and relocations will assume
+extended addressing (usually 23 bits).
+.IP "\fB\-mcpu=\fR\fI\s-1CPU_VERSION\s0\fR" 4
+.IX Item "-mcpu=CPU_VERSION"
+Sets the \s-1CPU\s0 version being compiled for.
+.IP "\fB\-merrors\-to\-file\fR \fI\s-1FILENAME\s0\fR" 4
+.IX Item "-merrors-to-file FILENAME"
+Redirect error output to a file, for broken systems which don't support such
+behaviour in the shell.
+.PP
+The following options are available when as is configured for
+a \s-1MIPS\s0 processor.
+.IP "\fB\-G\fR \fInum\fR" 4
+.IX Item "-G num"
+This option sets the largest size of an object that can be referenced
+implicitly with the \f(CW\*(C`gp\*(C'\fR register. It is only accepted for targets that
+use \s-1ECOFF\s0 format, such as a DECstation running Ultrix. The default value is 8.
+.IP "\fB\-EB\fR" 4
+.IX Item "-EB"
+Generate \*(L"big endian\*(R" format output.
+.IP "\fB\-EL\fR" 4
+.IX Item "-EL"
+Generate \*(L"little endian\*(R" format output.
+.IP "\fB\-mips1\fR" 4
+.IX Item "-mips1"
+.PD 0
+.IP "\fB\-mips2\fR" 4
+.IX Item "-mips2"
+.IP "\fB\-mips3\fR" 4
+.IX Item "-mips3"
+.IP "\fB\-mips4\fR" 4
+.IX Item "-mips4"
+.IP "\fB\-mips5\fR" 4
+.IX Item "-mips5"
+.IP "\fB\-mips32\fR" 4
+.IX Item "-mips32"
+.IP "\fB\-mips32r2\fR" 4
+.IX Item "-mips32r2"
+.IP "\fB\-mips64\fR" 4
+.IX Item "-mips64"
+.IP "\fB\-mips64r2\fR" 4
+.IX Item "-mips64r2"
+.PD
+Generate code for a particular \s-1MIPS\s0 Instruction Set Architecture level.
+\&\fB\-mips1\fR is an alias for \fB\-march=r3000\fR, \fB\-mips2\fR is an
+alias for \fB\-march=r6000\fR, \fB\-mips3\fR is an alias for
+\&\fB\-march=r4000\fR and \fB\-mips4\fR is an alias for \fB\-march=r8000\fR.
+\&\fB\-mips5\fR, \fB\-mips32\fR, \fB\-mips32r2\fR, \fB\-mips64\fR, and
+\&\fB\-mips64r2\fR
+correspond to generic
+\&\fB\s-1MIPS\s0 V\fR, \fB\s-1MIPS32\s0\fR, \fB\s-1MIPS32\s0 Release 2\fR, \fB\s-1MIPS64\s0\fR,
+and \fB\s-1MIPS64\s0 Release 2\fR
+\&\s-1ISA\s0 processors, respectively.
+.IP "\fB\-march=\fR\fI\s-1CPU\s0\fR" 4
+.IX Item "-march=CPU"
+Generate code for a particular \s-1MIPS\s0 cpu.
+.IP "\fB\-mtune=\fR\fIcpu\fR" 4
+.IX Item "-mtune=cpu"
+Schedule and tune for a particular \s-1MIPS\s0 cpu.
+.IP "\fB\-mfix7000\fR" 4
+.IX Item "-mfix7000"
+.PD 0
+.IP "\fB\-mno\-fix7000\fR" 4
+.IX Item "-mno-fix7000"
+.PD
+Cause nops to be inserted if the read of the destination register
+of an mfhi or mflo instruction occurs in the following two instructions.
+.IP "\fB\-mdebug\fR" 4
+.IX Item "-mdebug"
+.PD 0
+.IP "\fB\-no\-mdebug\fR" 4
+.IX Item "-no-mdebug"
+.PD
+Cause stabs-style debugging output to go into an ECOFF-style .mdebug
+section instead of the standard \s-1ELF\s0 .stabs sections.
+.IP "\fB\-mpdr\fR" 4
+.IX Item "-mpdr"
+.PD 0
+.IP "\fB\-mno\-pdr\fR" 4
+.IX Item "-mno-pdr"
+.PD
+Control generation of \f(CW\*(C`.pdr\*(C'\fR sections.
+.IP "\fB\-mgp32\fR" 4
+.IX Item "-mgp32"
+.PD 0
+.IP "\fB\-mfp32\fR" 4
+.IX Item "-mfp32"
+.PD
+The register sizes are normally inferred from the \s-1ISA\s0 and \s-1ABI\s0, but these
+flags force a certain group of registers to be treated as 32 bits wide at
+all times. \fB\-mgp32\fR controls the size of general-purpose registers
+and \fB\-mfp32\fR controls the size of floating-point registers.
+.IP "\fB\-mips16\fR" 4
+.IX Item "-mips16"
+.PD 0
+.IP "\fB\-no\-mips16\fR" 4
+.IX Item "-no-mips16"
+.PD
+Generate code for the \s-1MIPS\s0 16 processor. This is equivalent to putting
+\&\f(CW\*(C`.set mips16\*(C'\fR at the start of the assembly file. \fB\-no\-mips16\fR
+turns off this option.
+.IP "\fB\-msmartmips\fR" 4
+.IX Item "-msmartmips"
+.PD 0
+.IP "\fB\-mno\-smartmips\fR" 4
+.IX Item "-mno-smartmips"
+.PD
+Enables the SmartMIPS extension to the \s-1MIPS32\s0 instruction set. This is
+equivalent to putting \f(CW\*(C`.set smartmips\*(C'\fR at the start of the assembly file.
+\&\fB\-mno\-smartmips\fR turns off this option.
+.IP "\fB\-mips3d\fR" 4
+.IX Item "-mips3d"
+.PD 0
+.IP "\fB\-no\-mips3d\fR" 4
+.IX Item "-no-mips3d"
+.PD
+Generate code for the \s-1MIPS\-3D\s0 Application Specific Extension.
+This tells the assembler to accept \s-1MIPS\-3D\s0 instructions.
+\&\fB\-no\-mips3d\fR turns off this option.
+.IP "\fB\-mdmx\fR" 4
+.IX Item "-mdmx"
+.PD 0
+.IP "\fB\-no\-mdmx\fR" 4
+.IX Item "-no-mdmx"
+.PD
+Generate code for the \s-1MDMX\s0 Application Specific Extension.
+This tells the assembler to accept \s-1MDMX\s0 instructions.
+\&\fB\-no\-mdmx\fR turns off this option.
+.IP "\fB\-mdsp\fR" 4
+.IX Item "-mdsp"
+.PD 0
+.IP "\fB\-mno\-dsp\fR" 4
+.IX Item "-mno-dsp"
+.PD
+Generate code for the \s-1DSP\s0 Release 1 Application Specific Extension.
+This tells the assembler to accept \s-1DSP\s0 Release 1 instructions.
+\&\fB\-mno\-dsp\fR turns off this option.
+.IP "\fB\-mdspr2\fR" 4
+.IX Item "-mdspr2"
+.PD 0
+.IP "\fB\-mno\-dspr2\fR" 4
+.IX Item "-mno-dspr2"
+.PD
+Generate code for the \s-1DSP\s0 Release 2 Application Specific Extension.
+This option implies \-mdsp.
+This tells the assembler to accept \s-1DSP\s0 Release 2 instructions.
+\&\fB\-mno\-dspr2\fR turns off this option.
+.IP "\fB\-mmt\fR" 4
+.IX Item "-mmt"
+.PD 0
+.IP "\fB\-mno\-mt\fR" 4
+.IX Item "-mno-mt"
+.PD
+Generate code for the \s-1MT\s0 Application Specific Extension.
+This tells the assembler to accept \s-1MT\s0 instructions.
+\&\fB\-mno\-mt\fR turns off this option.
+.IP "\fB\-\-construct\-floats\fR" 4
+.IX Item "--construct-floats"
+.PD 0
+.IP "\fB\-\-no\-construct\-floats\fR" 4
+.IX Item "--no-construct-floats"
+.PD
+The \fB\-\-no\-construct\-floats\fR option disables the construction of
+double width floating point constants by loading the two halves of the
+value into the two single width floating point registers that make up
+the double width register. By default \fB\-\-construct\-floats\fR is
+selected, allowing construction of these floating point constants.
+.IP "\fB\-\-emulation=\fR\fIname\fR" 4
+.IX Item "--emulation=name"
+This option causes \fBas\fR to emulate \fBas\fR configured
+for some other target, in all respects, including output format (choosing
+between \s-1ELF\s0 and \s-1ECOFF\s0 only), handling of pseudo-opcodes which may generate
+debugging information or store symbol table information, and default
+endianness. The available configuration names are: \fBmipsecoff\fR,
+\&\fBmipself\fR, \fBmipslecoff\fR, \fBmipsbecoff\fR, \fBmipslelf\fR,
+\&\fBmipsbelf\fR. The first two do not alter the default endianness from that
+of the primary target for which the assembler was configured; the others change
+the default to little\- or big-endian as indicated by the \fBb\fR or \fBl\fR
+in the name. Using \fB\-EB\fR or \fB\-EL\fR will override the endianness
+selection in any case.
+.Sp
+This option is currently supported only when the primary target
+\&\fBas\fR is configured for is a \s-1MIPS\s0 \s-1ELF\s0 or \s-1ECOFF\s0 target.
+Furthermore, the primary target or others specified with
+\&\fB\-\-enable\-targets=...\fR at configuration time must include support for
+the other format, if both are to be available. For example, the Irix 5
+configuration includes support for both.
+.Sp
+Eventually, this option will support more configurations, with more
+fine-grained control over the assembler's behavior, and will be supported for
+more processors.
+.IP "\fB\-nocpp\fR" 4
+.IX Item "-nocpp"
+\&\fBas\fR ignores this option. It is accepted for compatibility with
+the native tools.
+.IP "\fB\-\-trap\fR" 4
+.IX Item "--trap"
+.PD 0
+.IP "\fB\-\-no\-trap\fR" 4
+.IX Item "--no-trap"
+.IP "\fB\-\-break\fR" 4
+.IX Item "--break"
+.IP "\fB\-\-no\-break\fR" 4
+.IX Item "--no-break"
+.PD
+Control how to deal with multiplication overflow and division by zero.
+\&\fB\-\-trap\fR or \fB\-\-no\-break\fR (which are synonyms) take a trap exception
+(and only work for Instruction Set Architecture level 2 and higher);
+\&\fB\-\-break\fR or \fB\-\-no\-trap\fR (also synonyms, and the default) take a
+break exception.
+.IP "\fB\-n\fR" 4
+.IX Item "-n"
+When this option is used, \fBas\fR will issue a warning every
+time it generates a nop instruction from a macro.
+.PP
+The following options are available when as is configured for
+an MCore processor.
+.IP "\fB\-jsri2bsr\fR" 4
+.IX Item "-jsri2bsr"
+.PD 0
+.IP "\fB\-nojsri2bsr\fR" 4
+.IX Item "-nojsri2bsr"
+.PD
+Enable or disable the \s-1JSRI\s0 to \s-1BSR\s0 transformation. By default this is enabled.
+The command line option \fB\-nojsri2bsr\fR can be used to disable it.
+.IP "\fB\-sifilter\fR" 4
+.IX Item "-sifilter"
+.PD 0
+.IP "\fB\-nosifilter\fR" 4
+.IX Item "-nosifilter"
+.PD
+Enable or disable the silicon filter behaviour. By default this is disabled.
+The default can be overridden by the \fB\-sifilter\fR command line option.
+.IP "\fB\-relax\fR" 4
+.IX Item "-relax"
+Alter jump instructions for long displacements.
+.IP "\fB\-mcpu=[210|340]\fR" 4
+.IX Item "-mcpu=[210|340]"
+Select the cpu type on the target hardware. This controls which instructions
+can be assembled.
+.IP "\fB\-EB\fR" 4
+.IX Item "-EB"
+Assemble for a big endian target.
+.IP "\fB\-EL\fR" 4
+.IX Item "-EL"
+Assemble for a little endian target.
+.PP
+See the info pages for documentation of the MMIX-specific options.
+.PP
+The following options are available when as is configured for
+an Xtensa processor.
+.IP "\fB\-\-text\-section\-literals | \-\-no\-text\-section\-literals\fR" 4
+.IX Item "--text-section-literals | --no-text-section-literals"
+With \fB\-\-text\-section\-literals\fR, literal pools are interspersed
+in the text section. The default is
+\&\fB\-\-no\-text\-section\-literals\fR, which places literals in a
+separate section in the output file. These options only affect literals
+referenced via PC-relative \f(CW\*(C`L32R\*(C'\fR instructions; literals for
+absolute mode \f(CW\*(C`L32R\*(C'\fR instructions are handled separately.
+.IP "\fB\-\-absolute\-literals | \-\-no\-absolute\-literals\fR" 4
+.IX Item "--absolute-literals | --no-absolute-literals"
+Indicate to the assembler whether \f(CW\*(C`L32R\*(C'\fR instructions use absolute
+or PC-relative addressing. The default is to assume absolute addressing
+if the Xtensa processor includes the absolute \f(CW\*(C`L32R\*(C'\fR addressing
+option. Otherwise, only the PC-relative \f(CW\*(C`L32R\*(C'\fR mode can be used.
+.IP "\fB\-\-target\-align | \-\-no\-target\-align\fR" 4
+.IX Item "--target-align | --no-target-align"
+Enable or disable automatic alignment to reduce branch penalties at the
+expense of some code density. The default is \fB\-\-target\-align\fR.
+.IP "\fB\-\-longcalls | \-\-no\-longcalls\fR" 4
+.IX Item "--longcalls | --no-longcalls"
+Enable or disable transformation of call instructions to allow calls
+across a greater range of addresses. The default is
+\&\fB\-\-no\-longcalls\fR.
+.IP "\fB\-\-transform | \-\-no\-transform\fR" 4
+.IX Item "--transform | --no-transform"
+Enable or disable all assembler transformations of Xtensa instructions.
+The default is \fB\-\-transform\fR;
+\&\fB\-\-no\-transform\fR should be used only in the rare cases when the
+instructions must be exactly as specified in the assembly source.
+.PP
+The following options are available when as is configured for
+a Z80 family processor.
+.IP "\fB\-z80\fR" 4
+.IX Item "-z80"
+Assemble for Z80 processor.
+.IP "\fB\-r800\fR" 4
+.IX Item "-r800"
+Assemble for R800 processor.
+.IP "\fB\-ignore\-undocumented\-instructions\fR" 4
+.IX Item "-ignore-undocumented-instructions"
+.PD 0
+.IP "\fB\-Wnud\fR" 4
+.IX Item "-Wnud"
+.PD
+Assemble undocumented Z80 instructions that also work on R800 without warning.
+.IP "\fB\-ignore\-unportable\-instructions\fR" 4
+.IX Item "-ignore-unportable-instructions"
+.PD 0
+.IP "\fB\-Wnup\fR" 4
+.IX Item "-Wnup"
+.PD
+Assemble all undocumented Z80 instructions without warning.
+.IP "\fB\-warn\-undocumented\-instructions\fR" 4
+.IX Item "-warn-undocumented-instructions"
+.PD 0
+.IP "\fB\-Wud\fR" 4
+.IX Item "-Wud"
+.PD
+Issue a warning for undocumented Z80 instructions that also work on R800.
+.IP "\fB\-warn\-unportable\-instructions\fR" 4
+.IX Item "-warn-unportable-instructions"
+.PD 0
+.IP "\fB\-Wup\fR" 4
+.IX Item "-Wup"
+.PD
+Issue a warning for undocumented Z80 instructions that do not work on R800.
+.IP "\fB\-forbid\-undocumented\-instructions\fR" 4
+.IX Item "-forbid-undocumented-instructions"
+.PD 0
+.IP "\fB\-Fud\fR" 4
+.IX Item "-Fud"
+.PD
+Treat all undocumented instructions as errors.
+.IP "\fB\-forbid\-unportable\-instructions\fR" 4
+.IX Item "-forbid-unportable-instructions"
+.PD 0
+.IP "\fB\-Fup\fR" 4
+.IX Item "-Fup"
+.PD
+Treat undocumented Z80 instructions that do not work on R800 as errors.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIgcc\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIbinutils\fR and \fIld\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
+2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/as/config.h b/gnu/usr.bin/binutils/as/config.h
index 35986130f1942..9723ac77ece02 100644
--- a/gnu/usr.bin/binutils/as/config.h
+++ b/gnu/usr.bin/binutils/as/config.h
@@ -1,194 +1,148 @@
/* $FreeBSD$ */
-#define HAVE_DECL_GETOPT 1
-
-
/* config.h. Generated by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
+/* Define if using AIX 5.2 value for C_WEAKEXT. */
+/* #undef AIX_WEAK_SUPPORT */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
+/* assert broken? */
+/* #undef BROKEN_ASSERT */
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
/* #undef CRAY_STACKSEG_END */
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
+/* Compiling cross-assembler? */
+/* #undef CROSS_COMPILE */
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
+/* Default architecture. */
+/* #define DEFAULT_ARCH "i386" */
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
+/* Default CRIS architecture. */
+/* #undef DEFAULT_CRIS_ARCH */
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
+/* Default emulation. */
+/* #define DEFAULT_EMULATION "i386elf" */
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
+/* Supported emulations. */
+/* #define EMULATIONS &i386elf, */
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
+/* Define if you want run-time sanity checks. */
+/* #undef ENABLE_CHECKING */
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#define YYTEXT_POINTER 1
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
-/* Define if you have the __argz_count function. */
-/* #undef HAVE___ARGZ_COUNT */
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
-/* Define if you have the __argz_next function. */
-/* #undef HAVE___ARGZ_NEXT */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+/* #undef HAVE_ALLOCA_H */
-/* Define if you have the __argz_stringify function. */
-/* #undef HAVE___ARGZ_STRINGIFY */
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#define HAVE_DECL_GETOPT 1
-/* Define if you have the dcgettext function. */
-/* #undef HAVE_DCGETTEXT */
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_VSNPRINTF 1
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
-/* Define if you have the munmap function. */
-#define HAVE_MUNMAP 1
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
-/* Define if you have the remove function. */
+/* Define to 1 if you have the `remove' function. */
/* #undef HAVE_REMOVE */
-/* Define if you have the sbrk function. */
+/* Define to 1 if you have the `sbrk' function. */
#define HAVE_SBRK 1
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
-
-/* Define if you have the stpcpy function. */
-#define HAVE_STPCPY 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
-
-/* Define if you have the unlink function. */
-#define HAVE_UNLINK 1
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the <malloc.h> header file. */
-/* #undef HAVE_MALLOC_H */
-
-/* Define if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
-
-/* Define if you have the <stdarg.h> header file. */
+/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
-/* Define if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define if you have the <values.h> header file. */
-/* #undef HAVE_VALUES_H */
+/* Define to 1 if you have the `unlink' function. */
+#define HAVE_UNLINK 1
-/* Define if you have the <varargs.h> header file. */
+/* Define to 1 if you have the <varargs.h> header file. */
/* #undef HAVE_VARARGS_H */
-/* Name of package */
-#define PACKAGE "gas"
-
-/* Version number of package */
-/* #define VERSION "2.15" */
-
-/* Define if defaulting to ELF on SCO 5. */
-/* #undef SCO_ELF */
+/* Using i386 COFF? */
+/* #undef I386COFF */
-/* Using strict COFF? */
-/* #undef STRICTCOFF */
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
-/* Define if default target is PowerPC Solaris. */
-/* #undef TARGET_SOLARIS_COMMENT */
+/* Using m68k COFF? */
+/* #undef M68KCOFF */
-/* Define as 1 if big endian. */
-/* #undef TARGET_BYTES_BIG_ENDIAN */
+/* Using m88k COFF? */
+/* #undef M88KCOFF */
-/* Default CPU for MIPS targets. */
+/* Default CPU for MIPS targets. */
/* #undef MIPS_CPU_STRING_DEFAULT */
-/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */
-/* #undef USE_E_MIPS_ABI_O32 */
-
-/* Generate 64-bit code by default on MIPS targets. */
+/* Generate 64-bit code by default on MIPS targets. */
/* #undef MIPS_DEFAULT_64BIT */
-/* Choose a default ABI for MIPS targets. */
+/* Choose a default ABI for MIPS targets. */
/* #undef MIPS_DEFAULT_ABI */
-/* Default architecture. */
-/* #define DEFAULT_ARCH "i386" */
+/* Define if environ is not declared in system header files. */
+#define NEED_DECLARATION_ENVIRON 1
-/* Using cgen code? */
-/* #undef USING_CGEN */
+/* Define if errno is not declared in system header files. */
+/* #undef NEED_DECLARATION_ERRNO */
-/* Using i386 COFF? */
-/* #undef I386COFF */
+/* Define if ffs is not declared in system header files. */
+/* #undef NEED_DECLARATION_FFS */
-/* Using m68k COFF? */
-/* #undef M68KCOFF */
+/* Define if free is not declared in system header files. */
+/* #undef NEED_DECLARATION_FREE */
-/* Using m88k COFF? */
-/* #undef M88KCOFF */
+/* Define if malloc is not declared in system header files. */
+/* #undef NEED_DECLARATION_MALLOC */
+
+/* Define if sbrk is not declared in system header files. */
+/* #undef NEED_DECLARATION_SBRK */
+
+/* Define if strstr is not declared in system header files. */
+/* #undef NEED_DECLARATION_STRSTR */
/* a.out support? */
/* #undef OBJ_MAYBE_AOUT */
@@ -208,80 +162,93 @@
/* generic support? */
/* #undef OBJ_MAYBE_GENERIC */
-/* HP300 support? */
-/* #undef OBJ_MAYBE_HP300 */
-
-/* IEEE support? */
-/* #undef OBJ_MAYBE_IEEE */
-
/* SOM support? */
/* #undef OBJ_MAYBE_SOM */
-/* VMS support? */
-/* #undef OBJ_MAYBE_VMS */
+/* Name of package */
+#define PACKAGE "gas"
-/* Use emulation support? */
-/* #undef USE_EMULATIONS */
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
-/* Supported emulations. */
-/* #define EMULATIONS &i386elf, */
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
-/* Default emulation. */
-/* #define DEFAULT_EMULATION "i386elf" */
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define if defaulting to ELF on SCO 5. */
+/* #undef SCO_ELF */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
-/* old COFF support? */
-/* #undef MANY_SEGMENTS */
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
-/* Use BFD interface? */
-#define BFD_ASSEMBLER 1
+/* Using strict COFF? */
+/* #undef STRICTCOFF */
/* Target alias. */
-/* #define TARGET_ALIAS "i386-obrien-freebsd5.2" */
+/* #define TARGET_ALIAS "i386-unknown-freebsd9.0" */
+
+/* Define as 1 if big endian. */
+/* #undef TARGET_BYTES_BIG_ENDIAN */
/* Canonical target. */
-/* #define TARGET_CANONICAL "i386-obrien-freebsd5.2" */
+/* #define TARGET_CANONICAL "i386-unknown-freebsd9.0" */
/* Target CPU. */
/* #define TARGET_CPU "i386" */
-/* Target vendor. */
-#define TARGET_VENDOR "obrien"
-
/* Target OS. */
-#define TARGET_OS "freebsd5"
+/* #define TARGET_OS "freebsd9.0" */
-/* Define if you have the stpcpy function */
-#define HAVE_STPCPY 1
+/* Define if default target is PowerPC Solaris. */
+/* #undef TARGET_SOLARIS_COMMENT */
-/* Define if your locale.h file contains LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
+/* Define if target is Symbian OS. */
+/* #undef TARGET_SYMBIAN */
-/* Define to 1 if NLS is requested */
-/* #define ENABLE_NLS 1 */
+/* Target vendor. */
+/* #define TARGET_VENDOR "unknown" */
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-/* #undef HAVE_GETTEXT */
+/* Use b modifier when opening binary files? */
+/* #undef USE_BINARY_FOPEN */
-/* Compiling cross-assembler? */
-/* #undef CROSS_COMPILE */
-
-/* assert broken? */
-/* #undef BROKEN_ASSERT */
+/* Use emulation support? */
+/* #undef USE_EMULATIONS */
-/* Define if strstr is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRSTR */
+/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */
+/* #undef USE_E_MIPS_ABI_O32 */
-/* Define if malloc is not declared in system header files. */
-/* #undef NEED_DECLARATION_MALLOC */
+/* Using cgen code? */
+/* #undef USING_CGEN */
-/* Define if free is not declared in system header files. */
-/* #undef NEED_DECLARATION_FREE */
+/* Version number of package */
+/* #define VERSION "2.17.50" */
-/* Define if sbrk is not declared in system header files. */
-/* #undef NEED_DECLARATION_SBRK */
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
-/* Define if environ is not declared in system header files. */
-#define NEED_DECLARATION_ENVIRON 1
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#define YYTEXT_POINTER 1
-/* Define if errno is not declared in system header files. */
-/* #undef NEED_DECLARATION_ERRNO */
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
diff --git a/gnu/usr.bin/binutils/as/tc-sparc-fixed.c b/gnu/usr.bin/binutils/as/tc-sparc-fixed.c
deleted file mode 100644
index 8088fa8a97fc5..0000000000000
--- a/gnu/usr.bin/binutils/as/tc-sparc-fixed.c
+++ /dev/null
@@ -1,4656 +0,0 @@
-/* tc-sparc.c -- Assemble for the SPARC
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
- This file is part of GAS, the GNU Assembler.
-
- GAS 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.
-
- GAS 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 GAS; see the file COPYING. If not, write
- to the Free Software Foundation, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* $FreeBSD$ */
-
-#include <stdio.h>
-
-#include "as.h"
-#include "safe-ctype.h"
-#include "subsegs.h"
-
-#include "opcode/sparc.h"
-#include "dw2gencfi.h"
-
-#ifdef OBJ_ELF
-#include "elf/sparc.h"
-#include "dwarf2dbg.h"
-#endif
-
-/* Some ancient Sun C compilers would not take such hex constants as
- unsigned, and would end up sign-extending them to form an offsetT,
- so use these constants instead. */
-#define U0xffffffff ((((unsigned long) 1 << 16) << 16) - 1)
-#define U0x80000000 ((((unsigned long) 1 << 16) << 15))
-
-static struct sparc_arch *lookup_arch PARAMS ((char *));
-static void init_default_arch PARAMS ((void));
-static int sparc_ip PARAMS ((char *, const struct sparc_opcode **));
-static int in_signed_range PARAMS ((bfd_signed_vma, bfd_signed_vma));
-static int in_unsigned_range PARAMS ((bfd_vma, bfd_vma));
-static int in_bitfield_range PARAMS ((bfd_signed_vma, bfd_signed_vma));
-static int sparc_ffs PARAMS ((unsigned int));
-static void synthetize_setuw PARAMS ((const struct sparc_opcode *));
-static void synthetize_setsw PARAMS ((const struct sparc_opcode *));
-static void synthetize_setx PARAMS ((const struct sparc_opcode *));
-static bfd_vma BSR PARAMS ((bfd_vma, int));
-static int cmp_reg_entry PARAMS ((const PTR, const PTR));
-static int parse_keyword_arg PARAMS ((int (*) (const char *), char **, int *));
-static int parse_const_expr_arg PARAMS ((char **, int *));
-static int get_expression PARAMS ((char *str));
-
-/* Default architecture. */
-/* ??? The default value should be V8, but sparclite support was added
- by making it the default. GCC now passes -Asparclite, so maybe sometime in
- the future we can set this to V8. */
-#ifndef DEFAULT_ARCH
-#define DEFAULT_ARCH "sparclite"
-#endif
-static char *default_arch = DEFAULT_ARCH;
-
-/* Non-zero if the initial values of `max_architecture' and `sparc_arch_size'
- have been set. */
-static int default_init_p;
-
-/* Current architecture. We don't bump up unless necessary. */
-static enum sparc_opcode_arch_val current_architecture = SPARC_OPCODE_ARCH_V6;
-
-/* The maximum architecture level we can bump up to.
- In a 32 bit environment, don't allow bumping up to v9 by default.
- The native assembler works this way. The user is required to pass
- an explicit argument before we'll create v9 object files. However, if
- we don't see any v9 insns, a v8plus object file is not created. */
-static enum sparc_opcode_arch_val max_architecture;
-
-/* Either 32 or 64, selects file format. */
-static int sparc_arch_size;
-/* Initial (default) value, recorded separately in case a user option
- changes the value before md_show_usage is called. */
-static int default_arch_size;
-
-#ifdef OBJ_ELF
-/* The currently selected v9 memory model. Currently only used for
- ELF. */
-static enum { MM_TSO, MM_PSO, MM_RMO } sparc_memory_model = MM_RMO;
-#endif
-
-static int architecture_requested;
-static int warn_on_bump;
-
-/* If warn_on_bump and the needed architecture is higher than this
- architecture, issue a warning. */
-static enum sparc_opcode_arch_val warn_after_architecture;
-
-/* Non-zero if as should generate error if an undeclared g[23] register
- has been used in -64. */
-static int no_undeclared_regs;
-
-/* Non-zero if we should try to relax jumps and calls. */
-static int sparc_relax;
-
-/* Non-zero if we are generating PIC code. */
-int sparc_pic_code;
-
-/* Non-zero if we should give an error when misaligned data is seen. */
-static int enforce_aligned_data;
-
-extern int target_big_endian;
-
-static int target_little_endian_data;
-
-/* Symbols for global registers on v9. */
-static symbolS *globals[8];
-
-/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
-int sparc_cie_data_alignment;
-
-/* V9 and 86x have big and little endian data, but instructions are always big
- endian. The sparclet has bi-endian support but both data and insns have
- the same endianness. Global `target_big_endian' is used for data.
- The following macro is used for instructions. */
-#ifndef INSN_BIG_ENDIAN
-#define INSN_BIG_ENDIAN (target_big_endian \
- || default_arch_type == sparc86x \
- || SPARC_OPCODE_ARCH_V9_P (max_architecture))
-#endif
-
-/* Handle of the OPCODE hash table. */
-static struct hash_control *op_hash;
-
-static int mylog2 PARAMS ((int));
-static void s_data1 PARAMS ((void));
-static void s_seg PARAMS ((int));
-static void s_proc PARAMS ((int));
-static void s_reserve PARAMS ((int));
-static void s_common PARAMS ((int));
-static void s_empty PARAMS ((int));
-static void s_uacons PARAMS ((int));
-static void s_ncons PARAMS ((int));
-#ifdef OBJ_ELF
-static void s_register PARAMS ((int));
-#endif
-
-const pseudo_typeS md_pseudo_table[] =
-{
- {"align", s_align_bytes, 0}, /* Defaulting is invalid (0). */
- {"common", s_common, 0},
- {"empty", s_empty, 0},
- {"global", s_globl, 0},
- {"half", cons, 2},
- {"nword", s_ncons, 0},
- {"optim", s_ignore, 0},
- {"proc", s_proc, 0},
- {"reserve", s_reserve, 0},
- {"seg", s_seg, 0},
- {"skip", s_space, 0},
- {"word", cons, 4},
- {"xword", cons, 8},
- {"uahalf", s_uacons, 2},
- {"uaword", s_uacons, 4},
- {"uaxword", s_uacons, 8},
-#ifdef OBJ_ELF
- /* These are specific to sparc/svr4. */
- {"2byte", s_uacons, 2},
- {"4byte", s_uacons, 4},
- {"8byte", s_uacons, 8},
- {"register", s_register, 0},
-#endif
- {NULL, 0, 0},
-};
-
-/* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful. */
-const char comment_chars[] = "!"; /* JF removed '|' from
- comment_chars. */
-
-/* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
- .line and .file directives will appear in the pre-processed output. */
-/* Note that input_file.c hand checks for '#' at the beginning of the
- first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
-/* Also note that comments started like this one will always
- work if '/' isn't otherwise defined. */
-const char line_comment_chars[] = "#";
-
-const char line_separator_chars[] = ";";
-
-/* Chars that can be used to separate mant from exp in floating point
- nums. */
-const char EXP_CHARS[] = "eE";
-
-/* Chars that mean this number is a floating point constant.
- As in 0f12.456
- or 0d1.2345e12 */
-const char FLT_CHARS[] = "rRsSfFdDxXpP";
-
-/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
- changed in read.c. Ideally it shouldn't have to know about it at all,
- but nothing is ideal around here. */
-
-#define isoctal(c) ((unsigned) ((c) - '0') < 8)
-
-struct sparc_it
- {
- char *error;
- unsigned long opcode;
- struct nlist *nlistp;
- expressionS exp;
- expressionS exp2;
- int pcrel;
- bfd_reloc_code_real_type reloc;
- };
-
-struct sparc_it the_insn, set_insn;
-
-static void output_insn
- PARAMS ((const struct sparc_opcode *, struct sparc_it *));
-
-/* Table of arguments to -A.
- The sparc_opcode_arch table in sparc-opc.c is insufficient and incorrect
- for this use. That table is for opcodes only. This table is for opcodes
- and file formats. */
-
-enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus,
- v8plusa, v9, v9a, v9b, v9_64};
-
-static struct sparc_arch {
- char *name;
- char *opcode_arch;
- enum sparc_arch_types arch_type;
- /* Default word size, as specified during configuration.
- A value of zero means can't be used to specify default architecture. */
- int default_arch_size;
- /* Allowable arg to -A? */
- int user_option_p;
-} sparc_arch_table[] = {
- { "v6", "v6", v6, 0, 1 },
- { "v7", "v7", v7, 0, 1 },
- { "v8", "v8", v8, 32, 1 },
- { "sparclet", "sparclet", sparclet, 32, 1 },
- { "sparclite", "sparclite", sparclite, 32, 1 },
- { "sparc86x", "sparclite", sparc86x, 32, 1 },
- { "v8plus", "v9", v9, 0, 1 },
- { "v8plusa", "v9a", v9, 0, 1 },
- { "v8plusb", "v9b", v9, 0, 1 },
- { "v9", "v9", v9, 0, 1 },
- { "v9a", "v9a", v9, 0, 1 },
- { "v9b", "v9b", v9, 0, 1 },
- /* This exists to allow configure.in/Makefile.in to pass one
- value to specify both the default machine and default word size. */
- { "v9-64", "v9", v9, 64, 0 },
- { NULL, NULL, v8, 0, 0 }
-};
-
-/* Variant of default_arch */
-static enum sparc_arch_types default_arch_type;
-
-static struct sparc_arch *
-lookup_arch (name)
- char *name;
-{
- struct sparc_arch *sa;
-
- for (sa = &sparc_arch_table[0]; sa->name != NULL; sa++)
- if (strcmp (sa->name, name) == 0)
- break;
- if (sa->name == NULL)
- return NULL;
- return sa;
-}
-
-/* Initialize the default opcode arch and word size from the default
- architecture name. */
-
-static void
-init_default_arch ()
-{
- struct sparc_arch *sa = lookup_arch (default_arch);
-
- if (sa == NULL
- || sa->default_arch_size == 0)
- as_fatal (_("Invalid default architecture, broken assembler."));
-
- max_architecture = sparc_opcode_lookup_arch (sa->opcode_arch);
- if (max_architecture == SPARC_OPCODE_ARCH_BAD)
- as_fatal (_("Bad opcode table, broken assembler."));
- default_arch_size = sparc_arch_size = sa->default_arch_size;
- default_init_p = 1;
- default_arch_type = sa->arch_type;
-}
-
-/* Called by TARGET_FORMAT. */
-
-const char *
-sparc_target_format ()
-{
- /* We don't get a chance to initialize anything before we're called,
- so handle that now. */
- if (! default_init_p)
- init_default_arch ();
-
-#ifdef OBJ_AOUT
-#ifdef TE_NetBSD
- return "a.out-sparc-netbsd";
-#else
-#ifdef TE_SPARCAOUT
- if (target_big_endian)
- return "a.out-sunos-big";
- else if (default_arch_type == sparc86x && target_little_endian_data)
- return "a.out-sunos-big";
- else
- return "a.out-sparc-little";
-#else
- return "a.out-sunos-big";
-#endif
-#endif
-#endif
-
-#ifdef OBJ_BOUT
- return "b.out.big";
-#endif
-
-#ifdef OBJ_COFF
-#ifdef TE_LYNX
- return "coff-sparc-lynx";
-#else
- return "coff-sparc";
-#endif
-#endif
-
-#ifdef TE_VXWORKS
- return "elf32-sparc-vxworks";
-#endif
-
-#ifdef OBJ_ELF
- return sparc_arch_size == 64 ? "elf64-sparc" : "elf32-sparc";
-#endif
-
- abort ();
-}
-
-/* md_parse_option
- * Invocation line includes a switch not recognized by the base assembler.
- * See if it's a processor-specific option. These are:
- *
- * -bump
- * Warn on architecture bumps. See also -A.
- *
- * -Av6, -Av7, -Av8, -Asparclite, -Asparclet
- * Standard 32 bit architectures.
- * -Av9, -Av9a, -Av9b
- * Sparc64 in either a 32 or 64 bit world (-32/-64 says which).
- * This used to only mean 64 bits, but properly specifying it
- * complicated gcc's ASM_SPECs, so now opcode selection is
- * specified orthogonally to word size (except when specifying
- * the default, but that is an internal implementation detail).
- * -Av8plus, -Av8plusa, -Av8plusb
- * Same as -Av9{,a,b}.
- * -xarch=v8plus, -xarch=v8plusa, -xarch=v8plusb
- * Same as -Av8plus{,a,b} -32, for compatibility with Sun's
- * assembler.
- * -xarch=v9, -xarch=v9a, -xarch=v9b
- * Same as -Av9{,a,b} -64, for compatibility with Sun's
- * assembler.
- *
- * Select the architecture and possibly the file format.
- * Instructions or features not supported by the selected
- * architecture cause fatal errors.
- *
- * The default is to start at v6, and bump the architecture up
- * whenever an instruction is seen at a higher level. In 32 bit
- * environments, v9 is not bumped up to, the user must pass
- * -Av8plus{,a,b}.
- *
- * If -bump is specified, a warning is printing when bumping to
- * higher levels.
- *
- * If an architecture is specified, all instructions must match
- * that architecture. Any higher level instructions are flagged
- * as errors. Note that in the 32 bit environment specifying
- * -Av8plus does not automatically create a v8plus object file, a
- * v9 insn must be seen.
- *
- * If both an architecture and -bump are specified, the
- * architecture starts at the specified level, but bumps are
- * warnings. Note that we can't set `current_architecture' to
- * the requested level in this case: in the 32 bit environment,
- * we still must avoid creating v8plus object files unless v9
- * insns are seen.
- *
- * Note:
- * Bumping between incompatible architectures is always an
- * error. For example, from sparclite to v9.
- */
-
-#ifdef OBJ_ELF
-const char *md_shortopts = "A:K:VQ:sq";
-#else
-#ifdef OBJ_AOUT
-const char *md_shortopts = "A:k";
-#else
-const char *md_shortopts = "A:";
-#endif
-#endif
-struct option md_longopts[] = {
-#define OPTION_BUMP (OPTION_MD_BASE)
- {"bump", no_argument, NULL, OPTION_BUMP},
-#define OPTION_SPARC (OPTION_MD_BASE + 1)
- {"sparc", no_argument, NULL, OPTION_SPARC},
-#define OPTION_XARCH (OPTION_MD_BASE + 2)
- {"xarch", required_argument, NULL, OPTION_XARCH},
-#ifdef OBJ_ELF
-#define OPTION_32 (OPTION_MD_BASE + 3)
- {"32", no_argument, NULL, OPTION_32},
-#define OPTION_64 (OPTION_MD_BASE + 4)
- {"64", no_argument, NULL, OPTION_64},
-#define OPTION_TSO (OPTION_MD_BASE + 5)
- {"TSO", no_argument, NULL, OPTION_TSO},
-#define OPTION_PSO (OPTION_MD_BASE + 6)
- {"PSO", no_argument, NULL, OPTION_PSO},
-#define OPTION_RMO (OPTION_MD_BASE + 7)
- {"RMO", no_argument, NULL, OPTION_RMO},
-#endif
-#ifdef SPARC_BIENDIAN
-#define OPTION_LITTLE_ENDIAN (OPTION_MD_BASE + 8)
- {"EL", no_argument, NULL, OPTION_LITTLE_ENDIAN},
-#define OPTION_BIG_ENDIAN (OPTION_MD_BASE + 9)
- {"EB", no_argument, NULL, OPTION_BIG_ENDIAN},
-#endif
-#define OPTION_ENFORCE_ALIGNED_DATA (OPTION_MD_BASE + 10)
- {"enforce-aligned-data", no_argument, NULL, OPTION_ENFORCE_ALIGNED_DATA},
-#define OPTION_LITTLE_ENDIAN_DATA (OPTION_MD_BASE + 11)
- {"little-endian-data", no_argument, NULL, OPTION_LITTLE_ENDIAN_DATA},
-#ifdef OBJ_ELF
-#define OPTION_NO_UNDECLARED_REGS (OPTION_MD_BASE + 12)
- {"no-undeclared-regs", no_argument, NULL, OPTION_NO_UNDECLARED_REGS},
-#define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13)
- {"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS},
-#endif
-#define OPTION_RELAX (OPTION_MD_BASE + 14)
- {"relax", no_argument, NULL, OPTION_RELAX},
-#define OPTION_NO_RELAX (OPTION_MD_BASE + 15)
- {"no-relax", no_argument, NULL, OPTION_NO_RELAX},
- {NULL, no_argument, NULL, 0}
-};
-
-size_t md_longopts_size = sizeof (md_longopts);
-
-int
-md_parse_option (c, arg)
- int c;
- char *arg;
-{
- /* We don't get a chance to initialize anything before we're called,
- so handle that now. */
- if (! default_init_p)
- init_default_arch ();
-
- switch (c)
- {
- case OPTION_BUMP:
- warn_on_bump = 1;
- warn_after_architecture = SPARC_OPCODE_ARCH_V6;
- break;
-
- case OPTION_XARCH:
-#ifdef OBJ_ELF
- if (strncmp (arg, "v9", 2) != 0)
- md_parse_option (OPTION_32, NULL);
- else
- md_parse_option (OPTION_64, NULL);
-#endif
- /* Fall through. */
-
- case 'A':
- {
- struct sparc_arch *sa;
- enum sparc_opcode_arch_val opcode_arch;
-
- sa = lookup_arch (arg);
- if (sa == NULL
- || ! sa->user_option_p)
- {
- if (c == OPTION_XARCH)
- as_bad (_("invalid architecture -xarch=%s"), arg);
- else
- as_bad (_("invalid architecture -A%s"), arg);
- return 0;
- }
-
- opcode_arch = sparc_opcode_lookup_arch (sa->opcode_arch);
- if (opcode_arch == SPARC_OPCODE_ARCH_BAD)
- as_fatal (_("Bad opcode table, broken assembler."));
-
- max_architecture = opcode_arch;
- architecture_requested = 1;
- }
- break;
-
- case OPTION_SPARC:
- /* Ignore -sparc, used by SunOS make default .s.o rule. */
- break;
-
- case OPTION_ENFORCE_ALIGNED_DATA:
- enforce_aligned_data = 1;
- break;
-
-#ifdef SPARC_BIENDIAN
- case OPTION_LITTLE_ENDIAN:
- target_big_endian = 0;
- if (default_arch_type != sparclet)
- as_fatal ("This target does not support -EL");
- break;
- case OPTION_LITTLE_ENDIAN_DATA:
- target_little_endian_data = 1;
- target_big_endian = 0;
- if (default_arch_type != sparc86x
- && default_arch_type != v9)
- as_fatal ("This target does not support --little-endian-data");
- break;
- case OPTION_BIG_ENDIAN:
- target_big_endian = 1;
- break;
-#endif
-
-#ifdef OBJ_AOUT
- case 'k':
- sparc_pic_code = 1;
- break;
-#endif
-
-#ifdef OBJ_ELF
- case OPTION_32:
- case OPTION_64:
- {
- const char **list, **l;
-
- sparc_arch_size = c == OPTION_32 ? 32 : 64;
- list = bfd_target_list ();
- for (l = list; *l != NULL; l++)
- {
- if (sparc_arch_size == 32)
- {
- if (strcmp (*l, "elf32-sparc") == 0)
- break;
- }
- else
- {
- if (strcmp (*l, "elf64-sparc") == 0)
- break;
- }
- }
- if (*l == NULL)
- as_fatal (_("No compiled in support for %d bit object file format"),
- sparc_arch_size);
- free (list);
- }
- break;
-
- case OPTION_TSO:
- sparc_memory_model = MM_TSO;
- break;
-
- case OPTION_PSO:
- sparc_memory_model = MM_PSO;
- break;
-
- case OPTION_RMO:
- sparc_memory_model = MM_RMO;
- break;
-
- case 'V':
- print_version_id ();
- break;
-
- case 'Q':
- /* Qy - do emit .comment
- Qn - do not emit .comment. */
- break;
-
- case 's':
- /* Use .stab instead of .stab.excl. */
- break;
-
- case 'q':
- /* quick -- Native assembler does fewer checks. */
- break;
-
- case 'K':
- if (strcmp (arg, "PIC") != 0)
- as_warn (_("Unrecognized option following -K"));
- else
- sparc_pic_code = 1;
- break;
-
- case OPTION_NO_UNDECLARED_REGS:
- no_undeclared_regs = 1;
- break;
-
- case OPTION_UNDECLARED_REGS:
- no_undeclared_regs = 0;
- break;
-#endif
-
- case OPTION_RELAX:
- sparc_relax = 1;
- break;
-
- case OPTION_NO_RELAX:
- sparc_relax = 0;
- break;
-
- default:
- return 0;
- }
-
- return 1;
-}
-
-void
-md_show_usage (stream)
- FILE *stream;
-{
- const struct sparc_arch *arch;
- int column;
-
- /* We don't get a chance to initialize anything before we're called,
- so handle that now. */
- if (! default_init_p)
- init_default_arch ();
-
- fprintf (stream, _("SPARC options:\n"));
- column = 0;
- for (arch = &sparc_arch_table[0]; arch->name; arch++)
- {
- if (!arch->user_option_p)
- continue;
- if (arch != &sparc_arch_table[0])
- fprintf (stream, " | ");
- if (column + strlen (arch->name) > 70)
- {
- column = 0;
- fputc ('\n', stream);
- }
- column += 5 + 2 + strlen (arch->name);
- fprintf (stream, "-A%s", arch->name);
- }
- for (arch = &sparc_arch_table[0]; arch->name; arch++)
- {
- if (!arch->user_option_p)
- continue;
- fprintf (stream, " | ");
- if (column + strlen (arch->name) > 65)
- {
- column = 0;
- fputc ('\n', stream);
- }
- column += 5 + 7 + strlen (arch->name);
- fprintf (stream, "-xarch=%s", arch->name);
- }
- fprintf (stream, _("\n\
- specify variant of SPARC architecture\n\
--bump warn when assembler switches architectures\n\
--sparc ignored\n\
---enforce-aligned-data force .long, etc., to be aligned correctly\n\
--relax relax jumps and branches (default)\n\
--no-relax avoid changing any jumps and branches\n"));
-#ifdef OBJ_AOUT
- fprintf (stream, _("\
--k generate PIC\n"));
-#endif
-#ifdef OBJ_ELF
- fprintf (stream, _("\
--32 create 32 bit object file\n\
--64 create 64 bit object file\n"));
- fprintf (stream, _("\
- [default is %d]\n"), default_arch_size);
- fprintf (stream, _("\
--TSO use Total Store Ordering\n\
--PSO use Partial Store Ordering\n\
--RMO use Relaxed Memory Ordering\n"));
- fprintf (stream, _("\
- [default is %s]\n"), (default_arch_size == 64) ? "RMO" : "TSO");
- fprintf (stream, _("\
--KPIC generate PIC\n\
--V print assembler version number\n\
--undeclared-regs ignore application global register usage without\n\
- appropriate .register directive (default)\n\
--no-undeclared-regs force error on application global register usage\n\
- without appropriate .register directive\n\
--q ignored\n\
--Qy, -Qn ignored\n\
--s ignored\n"));
-#endif
-#ifdef SPARC_BIENDIAN
- fprintf (stream, _("\
--EL generate code for a little endian machine\n\
--EB generate code for a big endian machine\n\
---little-endian-data generate code for a machine having big endian\n\
- instructions and little endian data.\n"));
-#endif
-}
-
-/* Native operand size opcode translation. */
-struct
- {
- char *name;
- char *name32;
- char *name64;
- } native_op_table[] =
-{
- {"ldn", "ld", "ldx"},
- {"ldna", "lda", "ldxa"},
- {"stn", "st", "stx"},
- {"stna", "sta", "stxa"},
- {"slln", "sll", "sllx"},
- {"srln", "srl", "srlx"},
- {"sran", "sra", "srax"},
- {"casn", "cas", "casx"},
- {"casna", "casa", "casxa"},
- {"clrn", "clr", "clrx"},
- {NULL, NULL, NULL},
-};
-
-/* sparc64 privileged and hyperprivileged registers. */
-
-struct priv_reg_entry
-{
- char *name;
- int regnum;
-};
-
-struct priv_reg_entry priv_reg_table[] =
-{
- {"tpc", 0},
- {"tnpc", 1},
- {"tstate", 2},
- {"tt", 3},
- {"tick", 4},
- {"tba", 5},
- {"pstate", 6},
- {"tl", 7},
- {"pil", 8},
- {"cwp", 9},
- {"cansave", 10},
- {"canrestore", 11},
- {"cleanwin", 12},
- {"otherwin", 13},
- {"wstate", 14},
- {"fq", 15},
- {"gl", 16},
- {"ver", 31},
- {"", -1}, /* End marker. */
-};
-
-struct priv_reg_entry hpriv_reg_table[] =
-{
- {"hpstate", 0},
- {"htstate", 1},
- {"hintp", 3},
- {"htba", 5},
- {"hver", 6},
- {"hstick_cmpr", 31},
- {"", -1}, /* End marker. */
-};
-
-/* v9a specific asrs. */
-
-struct priv_reg_entry v9a_asr_table[] =
-{
- {"tick_cmpr", 23},
- {"sys_tick_cmpr", 25},
- {"sys_tick", 24},
- {"softint", 22},
- {"set_softint", 20},
- {"pic", 17},
- {"pcr", 16},
- {"gsr", 19},
- {"dcr", 18},
- {"clear_softint", 21},
- {"", -1}, /* End marker. */
-};
-
-static int
-cmp_reg_entry (parg, qarg)
- const PTR parg;
- const PTR qarg;
-{
- const struct priv_reg_entry *p = (const struct priv_reg_entry *) parg;
- const struct priv_reg_entry *q = (const struct priv_reg_entry *) qarg;
-
- return strcmp (q->name, p->name);
-}
-
-/* This function is called once, at assembler startup time. It should
- set up all the tables, etc. that the MD part of the assembler will
- need. */
-
-void
-md_begin ()
-{
- register const char *retval = NULL;
- int lose = 0;
- register unsigned int i = 0;
-
- /* We don't get a chance to initialize anything before md_parse_option
- is called, and it may not be called, so handle default initialization
- now if not already done. */
- if (! default_init_p)
- init_default_arch ();
-
- sparc_cie_data_alignment = sparc_arch_size == 64 ? -8 : -4;
- op_hash = hash_new ();
-
- while (i < (unsigned int) sparc_num_opcodes)
- {
- const char *name = sparc_opcodes[i].name;
- retval = hash_insert (op_hash, name, (PTR) &sparc_opcodes[i]);
- if (retval != NULL)
- {
- as_bad (_("Internal error: can't hash `%s': %s\n"),
- sparc_opcodes[i].name, retval);
- lose = 1;
- }
- do
- {
- if (sparc_opcodes[i].match & sparc_opcodes[i].lose)
- {
- as_bad (_("Internal error: losing opcode: `%s' \"%s\"\n"),
- sparc_opcodes[i].name, sparc_opcodes[i].args);
- lose = 1;
- }
- ++i;
- }
- while (i < (unsigned int) sparc_num_opcodes
- && !strcmp (sparc_opcodes[i].name, name));
- }
-
- for (i = 0; native_op_table[i].name; i++)
- {
- const struct sparc_opcode *insn;
- char *name = ((sparc_arch_size == 32)
- ? native_op_table[i].name32
- : native_op_table[i].name64);
- insn = (struct sparc_opcode *) hash_find (op_hash, name);
- if (insn == NULL)
- {
- as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"),
- name, native_op_table[i].name);
- lose = 1;
- }
- else
- {
- retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn);
- if (retval != NULL)
- {
- as_bad (_("Internal error: can't hash `%s': %s\n"),
- sparc_opcodes[i].name, retval);
- lose = 1;
- }
- }
- }
-
- if (lose)
- as_fatal (_("Broken assembler. No assembly attempted."));
-
- qsort (priv_reg_table, sizeof (priv_reg_table) / sizeof (priv_reg_table[0]),
- sizeof (priv_reg_table[0]), cmp_reg_entry);
-
- /* If -bump, record the architecture level at which we start issuing
- warnings. The behaviour is different depending upon whether an
- architecture was explicitly specified. If it wasn't, we issue warnings
- for all upwards bumps. If it was, we don't start issuing warnings until
- we need to bump beyond the requested architecture or when we bump between
- conflicting architectures. */
-
- if (warn_on_bump
- && architecture_requested)
- {
- /* `max_architecture' records the requested architecture.
- Issue warnings if we go above it. */
- warn_after_architecture = max_architecture;
-
- /* Find the highest architecture level that doesn't conflict with
- the requested one. */
- for (max_architecture = SPARC_OPCODE_ARCH_MAX;
- max_architecture > warn_after_architecture;
- --max_architecture)
- if (! SPARC_OPCODE_CONFLICT_P (max_architecture,
- warn_after_architecture))
- break;
- }
-}
-
-/* Called after all assembly has been done. */
-
-void
-sparc_md_end ()
-{
- unsigned long mach = bfd_mach_sparc;
-
- if (sparc_arch_size == 64)
- switch (current_architecture)
- {
- case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v9a; break;
- case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v9b; break;
- default: mach = bfd_mach_sparc_v9; break;
- }
- else
- switch (current_architecture)
- {
- case SPARC_OPCODE_ARCH_SPARCLET: mach = bfd_mach_sparc_sparclet; break;
- case SPARC_OPCODE_ARCH_V9: mach = bfd_mach_sparc_v8plus; break;
- case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v8plusa; break;
- case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v8plusb; break;
- /* The sparclite is treated like a normal sparc. Perhaps it shouldn't
- be but for now it is (since that's the way it's always been
- treated). */
- default: break;
- }
- bfd_set_arch_mach (stdoutput, bfd_arch_sparc, mach);
-}
-
-/* Return non-zero if VAL is in the range -(MAX+1) to MAX. */
-
-static INLINE int
-in_signed_range (val, max)
- bfd_signed_vma val, max;
-{
- if (max <= 0)
- abort ();
- /* Sign-extend the value from the architecture word size, so that
- 0xffffffff is always considered -1 on sparc32. */
- if (sparc_arch_size == 32)
- {
- bfd_signed_vma sign = (bfd_signed_vma) 1 << 31;
- val = ((val & U0xffffffff) ^ sign) - sign;
- }
- if (val > max)
- return 0;
- if (val < ~max)
- return 0;
- return 1;
-}
-
-/* Return non-zero if VAL is in the range 0 to MAX. */
-
-static INLINE int
-in_unsigned_range (val, max)
- bfd_vma val, max;
-{
- if (val > max)
- return 0;
- return 1;
-}
-
-/* Return non-zero if VAL is in the range -(MAX/2+1) to MAX.
- (e.g. -15 to +31). */
-
-static INLINE int
-in_bitfield_range (val, max)
- bfd_signed_vma val, max;
-{
- if (max <= 0)
- abort ();
- if (val > max)
- return 0;
- if (val < ~(max >> 1))
- return 0;
- return 1;
-}
-
-static int
-sparc_ffs (mask)
- unsigned int mask;
-{
- int i;
-
- if (mask == 0)
- return -1;
-
- for (i = 0; (mask & 1) == 0; ++i)
- mask >>= 1;
- return i;
-}
-
-/* Implement big shift right. */
-static bfd_vma
-BSR (val, amount)
- bfd_vma val;
- int amount;
-{
- if (sizeof (bfd_vma) <= 4 && amount >= 32)
- as_fatal (_("Support for 64-bit arithmetic not compiled in."));
- return val >> amount;
-}
-
-/* For communication between sparc_ip and get_expression. */
-static char *expr_end;
-
-/* Values for `special_case'.
- Instructions that require wierd handling because they're longer than
- 4 bytes. */
-#define SPECIAL_CASE_NONE 0
-#define SPECIAL_CASE_SET 1
-#define SPECIAL_CASE_SETSW 2
-#define SPECIAL_CASE_SETX 3
-/* FIXME: sparc-opc.c doesn't have necessary "S" trigger to enable this. */
-#define SPECIAL_CASE_FDIV 4
-
-/* Bit masks of various insns. */
-#define NOP_INSN 0x01000000
-#define OR_INSN 0x80100000
-#define XOR_INSN 0x80180000
-#define FMOVS_INSN 0x81A00020
-#define SETHI_INSN 0x01000000
-#define SLLX_INSN 0x81281000
-#define SRA_INSN 0x81380000
-
-/* The last instruction to be assembled. */
-static const struct sparc_opcode *last_insn;
-/* The assembled opcode of `last_insn'. */
-static unsigned long last_opcode;
-
-/* Handle the set and setuw synthetic instructions. */
-
-static void
-synthetize_setuw (insn)
- const struct sparc_opcode *insn;
-{
- int need_hi22_p = 0;
- int rd = (the_insn.opcode & RD (~0)) >> 25;
-
- if (the_insn.exp.X_op == O_constant)
- {
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- {
- if (sizeof (offsetT) > 4
- && (the_insn.exp.X_add_number < 0
- || the_insn.exp.X_add_number > (offsetT) U0xffffffff))
- as_warn (_("set: number not in 0..4294967295 range"));
- }
- else
- {
- if (sizeof (offsetT) > 4
- && (the_insn.exp.X_add_number < -(offsetT) U0x80000000
- || the_insn.exp.X_add_number > (offsetT) U0xffffffff))
- as_warn (_("set: number not in -2147483648..4294967295 range"));
- the_insn.exp.X_add_number = (int) the_insn.exp.X_add_number;
- }
- }
-
- /* See if operand is absolute and small; skip sethi if so. */
- if (the_insn.exp.X_op != O_constant
- || the_insn.exp.X_add_number >= (1 << 12)
- || the_insn.exp.X_add_number < -(1 << 12))
- {
- the_insn.opcode = (SETHI_INSN | RD (rd)
- | ((the_insn.exp.X_add_number >> 10)
- & (the_insn.exp.X_op == O_constant
- ? 0x3fffff : 0)));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_HI22 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- need_hi22_p = 1;
- }
-
- /* See if operand has no low-order bits; skip OR if so. */
- if (the_insn.exp.X_op != O_constant
- || (need_hi22_p && (the_insn.exp.X_add_number & 0x3FF) != 0)
- || ! need_hi22_p)
- {
- the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (rd) : 0)
- | RD (rd) | IMMED
- | (the_insn.exp.X_add_number
- & (the_insn.exp.X_op != O_constant
- ? 0 : need_hi22_p ? 0x3ff : 0x1fff)));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_LO10 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-}
-
-/* Handle the setsw synthetic instruction. */
-
-static void
-synthetize_setsw (insn)
- const struct sparc_opcode *insn;
-{
- int low32, rd, opc;
-
- rd = (the_insn.opcode & RD (~0)) >> 25;
-
- if (the_insn.exp.X_op != O_constant)
- {
- synthetize_setuw (insn);
-
- /* Need to sign extend it. */
- the_insn.opcode = (SRA_INSN | RS1 (rd) | RD (rd));
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- return;
- }
-
- if (sizeof (offsetT) > 4
- && (the_insn.exp.X_add_number < -(offsetT) U0x80000000
- || the_insn.exp.X_add_number > (offsetT) U0xffffffff))
- as_warn (_("setsw: number not in -2147483648..4294967295 range"));
-
- low32 = the_insn.exp.X_add_number;
-
- if (low32 >= 0)
- {
- synthetize_setuw (insn);
- return;
- }
-
- opc = OR_INSN;
-
- the_insn.reloc = BFD_RELOC_NONE;
- /* See if operand is absolute and small; skip sethi if so. */
- if (low32 < -(1 << 12))
- {
- the_insn.opcode = (SETHI_INSN | RD (rd)
- | (((~the_insn.exp.X_add_number) >> 10) & 0x3fffff));
- output_insn (insn, &the_insn);
- low32 = 0x1c00 | (low32 & 0x3ff);
- opc = RS1 (rd) | XOR_INSN;
- }
-
- the_insn.opcode = (opc | RD (rd) | IMMED
- | (low32 & 0x1fff));
- output_insn (insn, &the_insn);
-}
-
-/* Handle the setsw synthetic instruction. */
-
-static void
-synthetize_setx (insn)
- const struct sparc_opcode *insn;
-{
- int upper32, lower32;
- int tmpreg = (the_insn.opcode & RS1 (~0)) >> 14;
- int dstreg = (the_insn.opcode & RD (~0)) >> 25;
- int upper_dstreg;
- int need_hh22_p = 0, need_hm10_p = 0, need_hi22_p = 0, need_lo10_p = 0;
- int need_xor10_p = 0;
-
-#define SIGNEXT32(x) ((((x) & U0xffffffff) ^ U0x80000000) - U0x80000000)
- lower32 = SIGNEXT32 (the_insn.exp.X_add_number);
- upper32 = SIGNEXT32 (BSR (the_insn.exp.X_add_number, 32));
-#undef SIGNEXT32
-
- upper_dstreg = tmpreg;
- /* The tmp reg should not be the dst reg. */
- if (tmpreg == dstreg)
- as_warn (_("setx: temporary register same as destination register"));
-
- /* ??? Obviously there are other optimizations we can do
- (e.g. sethi+shift for 0x1f0000000) and perhaps we shouldn't be
- doing some of these. Later. If you do change things, try to
- change all of this to be table driven as well. */
- /* What to output depends on the number if it's constant.
- Compute that first, then output what we've decided upon. */
- if (the_insn.exp.X_op != O_constant)
- {
- if (sparc_arch_size == 32)
- {
- /* When arch size is 32, we want setx to be equivalent
- to setuw for anything but constants. */
- the_insn.exp.X_add_number &= 0xffffffff;
- synthetize_setuw (insn);
- return;
- }
- need_hh22_p = need_hm10_p = need_hi22_p = need_lo10_p = 1;
- lower32 = 0;
- upper32 = 0;
- }
- else
- {
- /* Reset X_add_number, we've extracted it as upper32/lower32.
- Otherwise fixup_segment will complain about not being able to
- write an 8 byte number in a 4 byte field. */
- the_insn.exp.X_add_number = 0;
-
- /* Only need hh22 if `or' insn can't handle constant. */
- if (upper32 < -(1 << 12) || upper32 >= (1 << 12))
- need_hh22_p = 1;
-
- /* Does bottom part (after sethi) have bits? */
- if ((need_hh22_p && (upper32 & 0x3ff) != 0)
- /* No hh22, but does upper32 still have bits we can't set
- from lower32? */
- || (! need_hh22_p && upper32 != 0 && upper32 != -1))
- need_hm10_p = 1;
-
- /* If the lower half is all zero, we build the upper half directly
- into the dst reg. */
- if (lower32 != 0
- /* Need lower half if number is zero or 0xffffffff00000000. */
- || (! need_hh22_p && ! need_hm10_p))
- {
- /* No need for sethi if `or' insn can handle constant. */
- if (lower32 < -(1 << 12) || lower32 >= (1 << 12)
- /* Note that we can't use a negative constant in the `or'
- insn unless the upper 32 bits are all ones. */
- || (lower32 < 0 && upper32 != -1)
- || (lower32 >= 0 && upper32 == -1))
- need_hi22_p = 1;
-
- if (need_hi22_p && upper32 == -1)
- need_xor10_p = 1;
-
- /* Does bottom part (after sethi) have bits? */
- else if ((need_hi22_p && (lower32 & 0x3ff) != 0)
- /* No sethi. */
- || (! need_hi22_p && (lower32 & 0x1fff) != 0)
- /* Need `or' if we didn't set anything else. */
- || (! need_hi22_p && ! need_hh22_p && ! need_hm10_p))
- need_lo10_p = 1;
- }
- else
- /* Output directly to dst reg if lower 32 bits are all zero. */
- upper_dstreg = dstreg;
- }
-
- if (!upper_dstreg && dstreg)
- as_warn (_("setx: illegal temporary register g0"));
-
- if (need_hh22_p)
- {
- the_insn.opcode = (SETHI_INSN | RD (upper_dstreg)
- | ((upper32 >> 10) & 0x3fffff));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_SPARC_HH22 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-
- if (need_hi22_p)
- {
- the_insn.opcode = (SETHI_INSN | RD (dstreg)
- | (((need_xor10_p ? ~lower32 : lower32)
- >> 10) & 0x3fffff));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_SPARC_LM22 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-
- if (need_hm10_p)
- {
- the_insn.opcode = (OR_INSN
- | (need_hh22_p ? RS1 (upper_dstreg) : 0)
- | RD (upper_dstreg)
- | IMMED
- | (upper32 & (need_hh22_p ? 0x3ff : 0x1fff)));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_SPARC_HM10 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-
- if (need_lo10_p)
- {
- /* FIXME: One nice optimization to do here is to OR the low part
- with the highpart if hi22 isn't needed and the low part is
- positive. */
- the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (dstreg) : 0)
- | RD (dstreg)
- | IMMED
- | (lower32 & (need_hi22_p ? 0x3ff : 0x1fff)));
- the_insn.reloc = (the_insn.exp.X_op != O_constant
- ? BFD_RELOC_LO10 : BFD_RELOC_NONE);
- output_insn (insn, &the_insn);
- }
-
- /* If we needed to build the upper part, shift it into place. */
- if (need_hh22_p || need_hm10_p)
- {
- the_insn.opcode = (SLLX_INSN | RS1 (upper_dstreg) | RD (upper_dstreg)
- | IMMED | 32);
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- }
-
- /* To get -1 in upper32, we do sethi %hi(~x), r; xor r, -0x400 | x, r. */
- if (need_xor10_p)
- {
- the_insn.opcode = (XOR_INSN | RS1 (dstreg) | RD (dstreg) | IMMED
- | 0x1c00 | (lower32 & 0x3ff));
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- }
-
- /* If we needed to build both upper and lower parts, OR them together. */
- else if ((need_hh22_p || need_hm10_p) && (need_hi22_p || need_lo10_p))
- {
- the_insn.opcode = (OR_INSN | RS1 (dstreg) | RS2 (upper_dstreg)
- | RD (dstreg));
- the_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &the_insn);
- }
-}
-
-/* Main entry point to assemble one instruction. */
-
-void
-md_assemble (str)
- char *str;
-{
- const struct sparc_opcode *insn;
- int special_case;
-
- know (str);
- special_case = sparc_ip (str, &insn);
- if (insn == NULL)
- return;
-
- /* We warn about attempts to put a floating point branch in a delay slot,
- unless the delay slot has been annulled. */
- if (last_insn != NULL
- && (insn->flags & F_FBR) != 0
- && (last_insn->flags & F_DELAYED) != 0
- /* ??? This test isn't completely accurate. We assume anything with
- F_{UNBR,CONDBR,FBR} set is annullable. */
- && ((last_insn->flags & (F_UNBR | F_CONDBR | F_FBR)) == 0
- || (last_opcode & ANNUL) == 0))
- as_warn (_("FP branch in delay slot"));
-
- /* SPARC before v9 requires a nop instruction between a floating
- point instruction and a floating point branch. We insert one
- automatically, with a warning. */
- if (max_architecture < SPARC_OPCODE_ARCH_V9
- && last_insn != NULL
- && (insn->flags & F_FBR) != 0
- && (last_insn->flags & F_FLOAT) != 0)
- {
- struct sparc_it nop_insn;
-
- nop_insn.opcode = NOP_INSN;
- nop_insn.reloc = BFD_RELOC_NONE;
- output_insn (insn, &nop_insn);
- as_warn (_("FP branch preceded by FP instruction; NOP inserted"));
- }
-
- switch (special_case)
- {
- case SPECIAL_CASE_NONE:
- /* Normal insn. */
- output_insn (insn, &the_insn);
- break;
-
- case SPECIAL_CASE_SETSW:
- synthetize_setsw (insn);
- break;
-
- case SPECIAL_CASE_SET:
- synthetize_setuw (insn);
- break;
-
- case SPECIAL_CASE_SETX:
- synthetize_setx (insn);
- break;
-
- case SPECIAL_CASE_FDIV:
- {
- int rd = (the_insn.opcode >> 25) & 0x1f;
-
- output_insn (insn, &the_insn);
-
- /* According to information leaked from Sun, the "fdiv" instructions
- on early SPARC machines would produce incorrect results sometimes.
- The workaround is to add an fmovs of the destination register to
- itself just after the instruction. This was true on machines
- with Weitek 1165 float chips, such as the Sun-4/260 and /280. */
- assert (the_insn.reloc == BFD_RELOC_NONE);
- the_insn.opcode = FMOVS_INSN | rd | RD (rd);
- output_insn (insn, &the_insn);
- return;
- }
-
- default:
- as_fatal (_("failed special case insn sanity check"));
- }
-}
-
-/* Subroutine of md_assemble to do the actual parsing. */
-
-static int
-sparc_ip (str, pinsn)
- char *str;
- const struct sparc_opcode **pinsn;
-{
- char *error_message = "";
- char *s;
- const char *args;
- char c;
- const struct sparc_opcode *insn;
- char *argsStart;
- unsigned long opcode;
- unsigned int mask = 0;
- int match = 0;
- int comma = 0;
- int v9_arg_p;
- int special_case = SPECIAL_CASE_NONE;
-
- s = str;
- if (ISLOWER (*s))
- {
- do
- ++s;
- while (ISLOWER (*s) || ISDIGIT (*s));
- }
-
- switch (*s)
- {
- case '\0':
- break;
-
- case ',':
- comma = 1;
- /* Fall through. */
-
- case ' ':
- *s++ = '\0';
- break;
-
- default:
- as_bad (_("Unknown opcode: `%s'"), str);
- *pinsn = NULL;
- return special_case;
- }
- insn = (struct sparc_opcode *) hash_find (op_hash, str);
- *pinsn = insn;
- if (insn == NULL)
- {
- as_bad (_("Unknown opcode: `%s'"), str);
- return special_case;
- }
- if (comma)
- {
- *--s = ',';
- }
-
- argsStart = s;
- for (;;)
- {
- opcode = insn->match;
- memset (&the_insn, '\0', sizeof (the_insn));
- the_insn.reloc = BFD_RELOC_NONE;
- v9_arg_p = 0;
-
- /* Build the opcode, checking as we go to make sure that the
- operands match. */
- for (args = insn->args;; ++args)
- {
- switch (*args)
- {
- case 'K':
- {
- int kmask = 0;
-
- /* Parse a series of masks. */
- if (*s == '#')
- {
- while (*s == '#')
- {
- int mask;
-
- if (! parse_keyword_arg (sparc_encode_membar, &s,
- &mask))
- {
- error_message = _(": invalid membar mask name");
- goto error;
- }
- kmask |= mask;
- while (*s == ' ')
- ++s;
- if (*s == '|' || *s == '+')
- ++s;
- while (*s == ' ')
- ++s;
- }
- }
- else
- {
- if (! parse_const_expr_arg (&s, &kmask))
- {
- error_message = _(": invalid membar mask expression");
- goto error;
- }
- if (kmask < 0 || kmask > 127)
- {
- error_message = _(": invalid membar mask number");
- goto error;
- }
- }
-
- opcode |= MEMBAR (kmask);
- continue;
- }
-
- case '3':
- {
- int smask = 0;
-
- if (! parse_const_expr_arg (&s, &smask))
- {
- error_message = _(": invalid siam mode expression");
- goto error;
- }
- if (smask < 0 || smask > 7)
- {
- error_message = _(": invalid siam mode number");
- goto error;
- }
- opcode |= smask;
- continue;
- }
-
- case '*':
- {
- int fcn = 0;
-
- /* Parse a prefetch function. */
- if (*s == '#')
- {
- if (! parse_keyword_arg (sparc_encode_prefetch, &s, &fcn))
- {
- error_message = _(": invalid prefetch function name");
- goto error;
- }
- }
- else
- {
- if (! parse_const_expr_arg (&s, &fcn))
- {
- error_message = _(": invalid prefetch function expression");
- goto error;
- }
- if (fcn < 0 || fcn > 31)
- {
- error_message = _(": invalid prefetch function number");
- goto error;
- }
- }
- opcode |= RD (fcn);
- continue;
- }
-
- case '!':
- case '?':
- /* Parse a sparc64 privileged register. */
- if (*s == '%')
- {
- struct priv_reg_entry *p = priv_reg_table;
- unsigned int len = 9999999; /* Init to make gcc happy. */
-
- s += 1;
- while (p->name[0] > s[0])
- p++;
- while (p->name[0] == s[0])
- {
- len = strlen (p->name);
- if (strncmp (p->name, s, len) == 0)
- break;
- p++;
- }
- if (p->name[0] != s[0])
- {
- error_message = _(": unrecognizable privileged register");
- goto error;
- }
- if (*args == '?')
- opcode |= (p->regnum << 14);
- else
- opcode |= (p->regnum << 25);
- s += len;
- continue;
- }
- else
- {
- error_message = _(": unrecognizable privileged register");
- goto error;
- }
-
- case '$':
- case '%':
- /* Parse a sparc64 hyperprivileged register. */
- if (*s == '%')
- {
- struct priv_reg_entry *p = hpriv_reg_table;
- unsigned int len = 9999999; /* Init to make gcc happy. */
-
- s += 1;
- while (p->name[0] > s[0])
- p++;
- while (p->name[0] == s[0])
- {
- len = strlen (p->name);
- if (strncmp (p->name, s, len) == 0)
- break;
- p++;
- }
- if (p->name[0] != s[0])
- {
- error_message = _(": unrecognizable hyperprivileged register");
- goto error;
- }
- if (*args == '$')
- opcode |= (p->regnum << 14);
- else
- opcode |= (p->regnum << 25);
- s += len;
- continue;
- }
- else
- {
- error_message = _(": unrecognizable hyperprivileged register");
- goto error;
- }
-
- case '_':
- case '/':
- /* Parse a v9a/v9b ancillary state register. */
- if (*s == '%')
- {
- struct priv_reg_entry *p = v9a_asr_table;
- unsigned int len = 9999999; /* Init to make gcc happy. */
-
- s += 1;
- while (p->name[0] > s[0])
- p++;
- while (p->name[0] == s[0])
- {
- len = strlen (p->name);
- if (strncmp (p->name, s, len) == 0)
- break;
- p++;
- }
- if (p->name[0] != s[0])
- {
- error_message = _(": unrecognizable v9a or v9b ancillary state register");
- goto error;
- }
- if (*args == '/' && (p->regnum == 20 || p->regnum == 21))
- {
- error_message = _(": rd on write only ancillary state register");
- goto error;
- }
- if (p->regnum >= 24
- && (insn->architecture
- & SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A)))
- {
- /* %sys_tick and %sys_tick_cmpr are v9bnotv9a */
- error_message = _(": unrecognizable v9a ancillary state register");
- goto error;
- }
- if (*args == '/')
- opcode |= (p->regnum << 14);
- else
- opcode |= (p->regnum << 25);
- s += len;
- continue;
- }
- else
- {
- error_message = _(": unrecognizable v9a or v9b ancillary state register");
- goto error;
- }
-
- case 'M':
- case 'm':
- if (strncmp (s, "%asr", 4) == 0)
- {
- s += 4;
-
- if (ISDIGIT (*s))
- {
- long num = 0;
-
- while (ISDIGIT (*s))
- {
- num = num * 10 + *s - '0';
- ++s;
- }
-
- if (current_architecture >= SPARC_OPCODE_ARCH_V9)
- {
- if (num < 16 || 31 < num)
- {
- error_message = _(": asr number must be between 16 and 31");
- goto error;
- }
- }
- else
- {
- if (num < 0 || 31 < num)
- {
- error_message = _(": asr number must be between 0 and 31");
- goto error;
- }
- }
-
- opcode |= (*args == 'M' ? RS1 (num) : RD (num));
- continue;
- }
- else
- {
- error_message = _(": expecting %asrN");
- goto error;
- }
- } /* if %asr */
- break;
-
- case 'I':
- the_insn.reloc = BFD_RELOC_SPARC_11;
- goto immediate;
-
- case 'j':
- the_insn.reloc = BFD_RELOC_SPARC_10;
- goto immediate;
-
- case 'X':
- /* V8 systems don't understand BFD_RELOC_SPARC_5. */
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- the_insn.reloc = BFD_RELOC_SPARC_5;
- else
- the_insn.reloc = BFD_RELOC_SPARC13;
- /* These fields are unsigned, but for upward compatibility,
- allow negative values as well. */
- goto immediate;
-
- case 'Y':
- /* V8 systems don't understand BFD_RELOC_SPARC_6. */
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- the_insn.reloc = BFD_RELOC_SPARC_6;
- else
- the_insn.reloc = BFD_RELOC_SPARC13;
- /* These fields are unsigned, but for upward compatibility,
- allow negative values as well. */
- goto immediate;
-
- case 'k':
- the_insn.reloc = /* RELOC_WDISP2_14 */ BFD_RELOC_SPARC_WDISP16;
- the_insn.pcrel = 1;
- goto immediate;
-
- case 'G':
- the_insn.reloc = BFD_RELOC_SPARC_WDISP19;
- the_insn.pcrel = 1;
- goto immediate;
-
- case 'N':
- if (*s == 'p' && s[1] == 'n')
- {
- s += 2;
- continue;
- }
- break;
-
- case 'T':
- if (*s == 'p' && s[1] == 't')
- {
- s += 2;
- continue;
- }
- break;
-
- case 'z':
- if (*s == ' ')
- {
- ++s;
- }
- if (strncmp (s, "%icc", 4) == 0)
- {
- s += 4;
- continue;
- }
- break;
-
- case 'Z':
- if (*s == ' ')
- {
- ++s;
- }
- if (strncmp (s, "%xcc", 4) == 0)
- {
- s += 4;
- continue;
- }
- break;
-
- case '6':
- if (*s == ' ')
- {
- ++s;
- }
- if (strncmp (s, "%fcc0", 5) == 0)
- {
- s += 5;
- continue;
- }
- break;
-
- case '7':
- if (*s == ' ')
- {
- ++s;
- }
- if (strncmp (s, "%fcc1", 5) == 0)
- {
- s += 5;
- continue;
- }
- break;
-
- case '8':
- if (*s == ' ')
- {
- ++s;
- }
- if (strncmp (s, "%fcc2", 5) == 0)
- {
- s += 5;
- continue;
- }
- break;
-
- case '9':
- if (*s == ' ')
- {
- ++s;
- }
- if (strncmp (s, "%fcc3", 5) == 0)
- {
- s += 5;
- continue;
- }
- break;
-
- case 'P':
- if (strncmp (s, "%pc", 3) == 0)
- {
- s += 3;
- continue;
- }
- break;
-
- case 'W':
- if (strncmp (s, "%tick", 5) == 0)
- {
- s += 5;
- continue;
- }
- break;
-
- case '\0': /* End of args. */
- if (s[0] == ',' && s[1] == '%')
- {
- static const struct tls_ops {
- /* The name as it appears in assembler. */
- char *name;
- /* strlen (name), precomputed for speed */
- int len;
- /* The reloc this pseudo-op translates to. */
- int reloc;
- /* 1 if call. */
- int call;
- } tls_ops[] = {
- { "tgd_add", 7, BFD_RELOC_SPARC_TLS_GD_ADD, 0 },
- { "tgd_call", 8, BFD_RELOC_SPARC_TLS_GD_CALL, 1 },
- { "tldm_add", 8, BFD_RELOC_SPARC_TLS_LDM_ADD, 0 },
- { "tldm_call", 9, BFD_RELOC_SPARC_TLS_LDM_CALL, 1 },
- { "tldo_add", 8, BFD_RELOC_SPARC_TLS_LDO_ADD, 0 },
- { "tie_ldx", 7, BFD_RELOC_SPARC_TLS_IE_LDX, 0 },
- { "tie_ld", 6, BFD_RELOC_SPARC_TLS_IE_LD, 0 },
- { "tie_add", 7, BFD_RELOC_SPARC_TLS_IE_ADD, 0 }
- };
- const struct tls_ops *o;
- char *s1;
- int npar = 0;
-
- for (o = tls_ops; o->name; o++)
- if (strncmp (s + 2, o->name, o->len) == 0)
- break;
- if (o->name == NULL)
- break;
-
- if (s[o->len + 2] != '(')
- {
- as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name);
- return special_case;
- }
-
- if (! o->call && the_insn.reloc != BFD_RELOC_NONE)
- {
- as_bad (_("Illegal operands: %%%s cannot be used together with other relocs in the insn ()"),
- o->name);
- return special_case;
- }
-
- if (o->call
- && (the_insn.reloc != BFD_RELOC_32_PCREL_S2
- || the_insn.exp.X_add_number != 0
- || the_insn.exp.X_add_symbol
- != symbol_find_or_make ("__tls_get_addr")))
- {
- as_bad (_("Illegal operands: %%%s can be only used with call __tls_get_addr"),
- o->name);
- return special_case;
- }
-
- the_insn.reloc = o->reloc;
- memset (&the_insn.exp, 0, sizeof (the_insn.exp));
- s += o->len + 3;
-
- for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
- if (*s1 == '(')
- npar++;
- else if (*s1 == ')')
- {
- if (!npar)
- break;
- npar--;
- }
-
- if (*s1 != ')')
- {
- as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name);
- return special_case;
- }
-
- *s1 = '\0';
- (void) get_expression (s);
- *s1 = ')';
- s = s1 + 1;
- }
- if (*s == '\0')
- match = 1;
- break;
-
- case '+':
- if (*s == '+')
- {
- ++s;
- continue;
- }
- if (*s == '-')
- {
- continue;
- }
- break;
-
- case '[': /* These must match exactly. */
- case ']':
- case ',':
- case ' ':
- if (*s++ == *args)
- continue;
- break;
-
- case '#': /* Must be at least one digit. */
- if (ISDIGIT (*s++))
- {
- while (ISDIGIT (*s))
- {
- ++s;
- }
- continue;
- }
- break;
-
- case 'C': /* Coprocessor state register. */
- if (strncmp (s, "%csr", 4) == 0)
- {
- s += 4;
- continue;
- }
- break;
-
- case 'b': /* Next operand is a coprocessor register. */
- case 'c':
- case 'D':
- if (*s++ == '%' && *s++ == 'c' && ISDIGIT (*s))
- {
- mask = *s++;
- if (ISDIGIT (*s))
- {
- mask = 10 * (mask - '0') + (*s++ - '0');
- if (mask >= 32)
- {
- break;
- }
- }
- else
- {
- mask -= '0';
- }
- switch (*args)
- {
-
- case 'b':
- opcode |= mask << 14;
- continue;
-
- case 'c':
- opcode |= mask;
- continue;
-
- case 'D':
- opcode |= mask << 25;
- continue;
- }
- }
- break;
-
- case 'r': /* next operand must be a register */
- case 'O':
- case '1':
- case '2':
- case 'd':
- if (*s++ == '%')
- {
- switch (c = *s++)
- {
-
- case 'f': /* frame pointer */
- if (*s++ == 'p')
- {
- mask = 0x1e;
- break;
- }
- goto error;
-
- case 'g': /* global register */
- c = *s++;
- if (isoctal (c))
- {
- mask = c - '0';
- break;
- }
- goto error;
-
- case 'i': /* in register */
- c = *s++;
- if (isoctal (c))
- {
- mask = c - '0' + 24;
- break;
- }
- goto error;
-
- case 'l': /* local register */
- c = *s++;
- if (isoctal (c))
- {
- mask = (c - '0' + 16);
- break;
- }
- goto error;
-
- case 'o': /* out register */
- c = *s++;
- if (isoctal (c))
- {
- mask = (c - '0' + 8);
- break;
- }
- goto error;
-
- case 's': /* stack pointer */
- if (*s++ == 'p')
- {
- mask = 0xe;
- break;
- }
- goto error;
-
- case 'r': /* any register */
- if (!ISDIGIT ((c = *s++)))
- {
- goto error;
- }
- /* FALLTHROUGH */
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (ISDIGIT (*s))
- {
- if ((c = 10 * (c - '0') + (*s++ - '0')) >= 32)
- {
- goto error;
- }
- }
- else
- {
- c -= '0';
- }
- mask = c;
- break;
-
- default:
- goto error;
- }
-
- if ((mask & ~1) == 2 && sparc_arch_size == 64
- && no_undeclared_regs && ! globals[mask])
- as_bad (_("detected global register use not covered by .register pseudo-op"));
-
- /* Got the register, now figure out where
- it goes in the opcode. */
- switch (*args)
- {
- case '1':
- opcode |= mask << 14;
- continue;
-
- case '2':
- opcode |= mask;
- continue;
-
- case 'd':
- opcode |= mask << 25;
- continue;
-
- case 'r':
- opcode |= (mask << 25) | (mask << 14);
- continue;
-
- case 'O':
- opcode |= (mask << 25) | (mask << 0);
- continue;
- }
- }
- break;
-
- case 'e': /* next operand is a floating point register */
- case 'v':
- case 'V':
-
- case 'f':
- case 'B':
- case 'R':
-
- case 'g':
- case 'H':
- case 'J':
- {
- char format;
-
- if (*s++ == '%'
- && ((format = *s) == 'f')
- && ISDIGIT (*++s))
- {
- for (mask = 0; ISDIGIT (*s); ++s)
- {
- mask = 10 * mask + (*s - '0');
- } /* read the number */
-
- if ((*args == 'v'
- || *args == 'B'
- || *args == 'H')
- && (mask & 1))
- {
- break;
- } /* register must be even numbered */
-
- if ((*args == 'V'
- || *args == 'R'
- || *args == 'J')
- && (mask & 3))
- {
- break;
- } /* register must be multiple of 4 */
-
- if (mask >= 64)
- {
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- error_message = _(": There are only 64 f registers; [0-63]");
- else
- error_message = _(": There are only 32 f registers; [0-31]");
- goto error;
- } /* on error */
- else if (mask >= 32)
- {
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
- {
- if (*args == 'e' || *args == 'f' || *args == 'g')
- {
- error_message
- = _(": There are only 32 single precision f registers; [0-31]");
- goto error;
- }
- v9_arg_p = 1;
- mask -= 31; /* wrap high bit */
- }
- else
- {
- error_message = _(": There are only 32 f registers; [0-31]");
- goto error;
- }
- }
- }
- else
- {
- break;
- } /* if not an 'f' register. */
-
- switch (*args)
- {
- case 'v':
- case 'V':
- case 'e':
- opcode |= RS1 (mask);
- continue;
-
- case 'f':
- case 'B':
- case 'R':
- opcode |= RS2 (mask);
- continue;
-
- case 'g':
- case 'H':
- case 'J':
- opcode |= RD (mask);
- continue;
- } /* Pack it in. */
-
- know (0);
- break;
- } /* float arg */
-
- case 'F':
- if (strncmp (s, "%fsr", 4) == 0)
- {
- s += 4;
- continue;
- }
- break;
-
- case '0': /* 64 bit immediate (set, setsw, setx insn) */
- the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */
- goto immediate;
-
- case 'l': /* 22 bit PC relative immediate */
- the_insn.reloc = BFD_RELOC_SPARC_WDISP22;
- the_insn.pcrel = 1;
- goto immediate;
-
- case 'L': /* 30 bit immediate */
- the_insn.reloc = BFD_RELOC_32_PCREL_S2;
- the_insn.pcrel = 1;
- goto immediate;
-
- case 'h':
- case 'n': /* 22 bit immediate */
- the_insn.reloc = BFD_RELOC_SPARC22;
- goto immediate;
-
- case 'i': /* 13 bit immediate */
- the_insn.reloc = BFD_RELOC_SPARC13;
-
- /* fallthrough */
-
- immediate:
- if (*s == ' ')
- s++;
-
- {
- char *s1;
- char *op_arg = NULL;
- static expressionS op_exp;
- bfd_reloc_code_real_type old_reloc = the_insn.reloc;
-
- /* Check for %hi, etc. */
- if (*s == '%')
- {
- static const struct ops {
- /* The name as it appears in assembler. */
- char *name;
- /* strlen (name), precomputed for speed */
- int len;
- /* The reloc this pseudo-op translates to. */
- int reloc;
- /* Non-zero if for v9 only. */
- int v9_p;
- /* Non-zero if can be used in pc-relative contexts. */
- int pcrel_p;/*FIXME:wip*/
- } ops[] = {
- /* hix/lox must appear before hi/lo so %hix won't be
- mistaken for %hi. */
- { "hix", 3, BFD_RELOC_SPARC_HIX22, 1, 0 },
- { "lox", 3, BFD_RELOC_SPARC_LOX10, 1, 0 },
- { "hi", 2, BFD_RELOC_HI22, 0, 1 },
- { "lo", 2, BFD_RELOC_LO10, 0, 1 },
- { "hh", 2, BFD_RELOC_SPARC_HH22, 1, 1 },
- { "hm", 2, BFD_RELOC_SPARC_HM10, 1, 1 },
- { "lm", 2, BFD_RELOC_SPARC_LM22, 1, 1 },
- { "h44", 3, BFD_RELOC_SPARC_H44, 1, 0 },
- { "m44", 3, BFD_RELOC_SPARC_M44, 1, 0 },
- { "l44", 3, BFD_RELOC_SPARC_L44, 1, 0 },
- { "uhi", 3, BFD_RELOC_SPARC_HH22, 1, 0 },
- { "ulo", 3, BFD_RELOC_SPARC_HM10, 1, 0 },
- { "tgd_hi22", 8, BFD_RELOC_SPARC_TLS_GD_HI22, 0, 0 },
- { "tgd_lo10", 8, BFD_RELOC_SPARC_TLS_GD_LO10, 0, 0 },
- { "tldm_hi22", 9, BFD_RELOC_SPARC_TLS_LDM_HI22, 0, 0 },
- { "tldm_lo10", 9, BFD_RELOC_SPARC_TLS_LDM_LO10, 0, 0 },
- { "tldo_hix22", 10, BFD_RELOC_SPARC_TLS_LDO_HIX22, 0,
- 0 },
- { "tldo_lox10", 10, BFD_RELOC_SPARC_TLS_LDO_LOX10, 0,
- 0 },
- { "tie_hi22", 8, BFD_RELOC_SPARC_TLS_IE_HI22, 0, 0 },
- { "tie_lo10", 8, BFD_RELOC_SPARC_TLS_IE_LO10, 0, 0 },
- { "tle_hix22", 9, BFD_RELOC_SPARC_TLS_LE_HIX22, 0, 0 },
- { "tle_lox10", 9, BFD_RELOC_SPARC_TLS_LE_LOX10, 0, 0 },
- { NULL, 0, 0, 0, 0 }
- };
- const struct ops *o;
-
- for (o = ops; o->name; o++)
- if (strncmp (s + 1, o->name, o->len) == 0)
- break;
- if (o->name == NULL)
- break;
-
- if (s[o->len + 1] != '(')
- {
- as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name);
- return special_case;
- }
-
- op_arg = o->name;
- the_insn.reloc = o->reloc;
- s += o->len + 2;
- v9_arg_p = o->v9_p;
- }
-
- /* Note that if the get_expression() fails, we will still
- have created U entries in the symbol table for the
- 'symbols' in the input string. Try not to create U
- symbols for registers, etc. */
-
- /* This stuff checks to see if the expression ends in
- +%reg. If it does, it removes the register from
- the expression, and re-sets 's' to point to the
- right place. */
-
- if (op_arg)
- {
- int npar = 0;
-
- for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
- if (*s1 == '(')
- npar++;
- else if (*s1 == ')')
- {
- if (!npar)
- break;
- npar--;
- }
-
- if (*s1 != ')')
- {
- as_bad (_("Illegal operands: %%%s requires arguments in ()"), op_arg);
- return special_case;
- }
-
- *s1 = '\0';
- (void) get_expression (s);
- *s1 = ')';
- s = s1 + 1;
- if (*s == ',' || *s == ']' || !*s)
- continue;
- if (*s != '+' && *s != '-')
- {
- as_bad (_("Illegal operands: Can't do arithmetics other than + and - involving %%%s()"), op_arg);
- return special_case;
- }
- *s1 = '0';
- s = s1;
- op_exp = the_insn.exp;
- memset (&the_insn.exp, 0, sizeof (the_insn.exp));
- }
-
- for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
- ;
-
- if (s1 != s && ISDIGIT (s1[-1]))
- {
- if (s1[-2] == '%' && s1[-3] == '+')
- s1 -= 3;
- else if (strchr ("goli0123456789", s1[-2]) && s1[-3] == '%' && s1[-4] == '+')
- s1 -= 4;
- else
- s1 = NULL;
- if (s1)
- {
- *s1 = '\0';
- if (op_arg && s1 == s + 1)
- the_insn.exp.X_op = O_absent;
- else
- (void) get_expression (s);
- *s1 = '+';
- if (op_arg)
- *s = ')';
- s = s1;
- }
- }
- else
- s1 = NULL;
-
- if (!s1)
- {
- (void) get_expression (s);
- if (op_arg)
- *s = ')';
- s = expr_end;
- }
-
- if (op_arg)
- {
- the_insn.exp2 = the_insn.exp;
- the_insn.exp = op_exp;
- if (the_insn.exp2.X_op == O_absent)
- the_insn.exp2.X_op = O_illegal;
- else if (the_insn.exp.X_op == O_absent)
- {
- the_insn.exp = the_insn.exp2;
- the_insn.exp2.X_op = O_illegal;
- }
- else if (the_insn.exp.X_op == O_constant)
- {
- valueT val = the_insn.exp.X_add_number;
- switch (the_insn.reloc)
- {
- default:
- break;
-
- case BFD_RELOC_SPARC_HH22:
- val = BSR (val, 32);
- /* Fall through. */
-
- case BFD_RELOC_SPARC_LM22:
- case BFD_RELOC_HI22:
- val = (val >> 10) & 0x3fffff;
- break;
-
- case BFD_RELOC_SPARC_HM10:
- val = BSR (val, 32);
- /* Fall through. */
-
- case BFD_RELOC_LO10:
- val &= 0x3ff;
- break;
-
- case BFD_RELOC_SPARC_H44:
- val >>= 22;
- val &= 0x3fffff;
- break;
-
- case BFD_RELOC_SPARC_M44:
- val >>= 12;
- val &= 0x3ff;
- break;
-
- case BFD_RELOC_SPARC_L44:
- val &= 0xfff;
- break;
-
- case BFD_RELOC_SPARC_HIX22:
- val = ~val;
- val = (val >> 10) & 0x3fffff;
- break;
-
- case BFD_RELOC_SPARC_LOX10:
- val = (val & 0x3ff) | 0x1c00;
- break;
- }
- the_insn.exp = the_insn.exp2;
- the_insn.exp.X_add_number += val;
- the_insn.exp2.X_op = O_illegal;
- the_insn.reloc = old_reloc;
- }
- else if (the_insn.exp2.X_op != O_constant)
- {
- as_bad (_("Illegal operands: Can't add non-constant expression to %%%s()"), op_arg);
- return special_case;
- }
- else
- {
- if (old_reloc != BFD_RELOC_SPARC13
- || the_insn.reloc != BFD_RELOC_LO10
- || sparc_arch_size != 64
- || sparc_pic_code)
- {
- as_bad (_("Illegal operands: Can't do arithmetics involving %%%s() of a relocatable symbol"), op_arg);
- return special_case;
- }
- the_insn.reloc = BFD_RELOC_SPARC_OLO10;
- }
- }
- }
- /* Check for constants that don't require emitting a reloc. */
- if (the_insn.exp.X_op == O_constant
- && the_insn.exp.X_add_symbol == 0
- && the_insn.exp.X_op_symbol == 0)
- {
- /* For pc-relative call instructions, we reject
- constants to get better code. */
- if (the_insn.pcrel
- && the_insn.reloc == BFD_RELOC_32_PCREL_S2
- && in_signed_range (the_insn.exp.X_add_number, 0x3fff))
- {
- error_message = _(": PC-relative operand can't be a constant");
- goto error;
- }
-
- if (the_insn.reloc >= BFD_RELOC_SPARC_TLS_GD_HI22
- && the_insn.reloc <= BFD_RELOC_SPARC_TLS_TPOFF64)
- {
- error_message = _(": TLS operand can't be a constant");
- goto error;
- }
-
- /* Constants that won't fit are checked in md_apply_fix
- and bfd_install_relocation.
- ??? It would be preferable to install the constants
- into the insn here and save having to create a fixS
- for each one. There already exists code to handle
- all the various cases (e.g. in md_apply_fix and
- bfd_install_relocation) so duplicating all that code
- here isn't right. */
- }
-
- continue;
-
- case 'a':
- if (*s++ == 'a')
- {
- opcode |= ANNUL;
- continue;
- }
- break;
-
- case 'A':
- {
- int asi = 0;
-
- /* Parse an asi. */
- if (*s == '#')
- {
- if (! parse_keyword_arg (sparc_encode_asi, &s, &asi))
- {
- error_message = _(": invalid ASI name");
- goto error;
- }
- }
- else
- {
- if (! parse_const_expr_arg (&s, &asi))
- {
- error_message = _(": invalid ASI expression");
- goto error;
- }
- if (asi < 0 || asi > 255)
- {
- error_message = _(": invalid ASI number");
- goto error;
- }
- }
- opcode |= ASI (asi);
- continue;
- } /* Alternate space. */
-
- case 'p':
- if (strncmp (s, "%psr", 4) == 0)
- {
- s += 4;
- continue;
- }
- break;
-
- case 'q': /* Floating point queue. */
- if (strncmp (s, "%fq", 3) == 0)
- {
- s += 3;
- continue;
- }
- break;
-
- case 'Q': /* Coprocessor queue. */
- if (strncmp (s, "%cq", 3) == 0)
- {
- s += 3;
- continue;
- }
- break;
-
- case 'S':
- if (strcmp (str, "set") == 0
- || strcmp (str, "setuw") == 0)
- {
- special_case = SPECIAL_CASE_SET;
- continue;
- }
- else if (strcmp (str, "setsw") == 0)
- {
- special_case = SPECIAL_CASE_SETSW;
- continue;
- }
- else if (strcmp (str, "setx") == 0)
- {
- special_case = SPECIAL_CASE_SETX;
- continue;
- }
- else if (strncmp (str, "fdiv", 4) == 0)
- {
- special_case = SPECIAL_CASE_FDIV;
- continue;
- }
- break;
-
- case 'o':
- if (strncmp (s, "%asi", 4) != 0)
- break;
- s += 4;
- continue;
-
- case 's':
- if (strncmp (s, "%fprs", 5) != 0)
- break;
- s += 5;
- continue;
-
- case 'E':
- if (strncmp (s, "%ccr", 4) != 0)
- break;
- s += 4;
- continue;
-
- case 't':
- if (strncmp (s, "%tbr", 4) != 0)
- break;
- s += 4;
- continue;
-
- case 'w':
- if (strncmp (s, "%wim", 4) != 0)
- break;
- s += 4;
- continue;
-
- case 'x':
- {
- char *push = input_line_pointer;
- expressionS e;
-
- input_line_pointer = s;
- expression (&e);
- if (e.X_op == O_constant)
- {
- int n = e.X_add_number;
- if (n != e.X_add_number || (n & ~0x1ff) != 0)
- as_bad (_("OPF immediate operand out of range (0-0x1ff)"));
- else
- opcode |= e.X_add_number << 5;
- }
- else
- as_bad (_("non-immediate OPF operand, ignored"));
- s = input_line_pointer;
- input_line_pointer = push;
- continue;
- }
-
- case 'y':
- if (strncmp (s, "%y", 2) != 0)
- break;
- s += 2;
- continue;
-
- case 'u':
- case 'U':
- {
- /* Parse a sparclet cpreg. */
- int cpreg;
- if (! parse_keyword_arg (sparc_encode_sparclet_cpreg, &s, &cpreg))
- {
- error_message = _(": invalid cpreg name");
- goto error;
- }
- opcode |= (*args == 'U' ? RS1 (cpreg) : RD (cpreg));
- continue;
- }
-
- default:
- as_fatal (_("failed sanity check."));
- } /* switch on arg code. */
-
- /* Break out of for() loop. */
- break;
- } /* For each arg that we expect. */
-
- error:
- if (match == 0)
- {
- /* Args don't match. */
- if (&insn[1] - sparc_opcodes < sparc_num_opcodes
- && (insn->name == insn[1].name
- || !strcmp (insn->name, insn[1].name)))
- {
- ++insn;
- s = argsStart;
- continue;
- }
- else
- {
- as_bad (_("Illegal operands%s"), error_message);
- return special_case;
- }
- }
- else
- {
- /* We have a match. Now see if the architecture is OK. */
- int needed_arch_mask = insn->architecture;
-
- if (v9_arg_p)
- {
- needed_arch_mask &=
- ~(SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9) - 1);
- if (! needed_arch_mask)
- needed_arch_mask =
- SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9);
- }
-
- if (needed_arch_mask
- & SPARC_OPCODE_SUPPORTED (current_architecture))
- /* OK. */
- ;
- /* Can we bump up the architecture? */
- else if (needed_arch_mask
- & SPARC_OPCODE_SUPPORTED (max_architecture))
- {
- enum sparc_opcode_arch_val needed_architecture =
- sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture)
- & needed_arch_mask);
-
- assert (needed_architecture <= SPARC_OPCODE_ARCH_MAX);
- if (warn_on_bump
- && needed_architecture > warn_after_architecture)
- {
- as_warn (_("architecture bumped from \"%s\" to \"%s\" on \"%s\""),
- sparc_opcode_archs[current_architecture].name,
- sparc_opcode_archs[needed_architecture].name,
- str);
- warn_after_architecture = needed_architecture;
- }
- current_architecture = needed_architecture;
- }
- /* Conflict. */
- /* ??? This seems to be a bit fragile. What if the next entry in
- the opcode table is the one we want and it is supported?
- It is possible to arrange the table today so that this can't
- happen but what about tomorrow? */
- else
- {
- int arch, printed_one_p = 0;
- char *p;
- char required_archs[SPARC_OPCODE_ARCH_MAX * 16];
-
- /* Create a list of the architectures that support the insn. */
- needed_arch_mask &= ~SPARC_OPCODE_SUPPORTED (max_architecture);
- p = required_archs;
- arch = sparc_ffs (needed_arch_mask);
- while ((1 << arch) <= needed_arch_mask)
- {
- if ((1 << arch) & needed_arch_mask)
- {
- if (printed_one_p)
- *p++ = '|';
- strcpy (p, sparc_opcode_archs[arch].name);
- p += strlen (p);
- printed_one_p = 1;
- }
- ++arch;
- }
-
- as_bad (_("Architecture mismatch on \"%s\"."), str);
- as_tsktsk (_(" (Requires %s; requested architecture is %s.)"),
- required_archs,
- sparc_opcode_archs[max_architecture].name);
- return special_case;
- }
- } /* If no match. */
-
- break;
- } /* Forever looking for a match. */
-
- the_insn.opcode = opcode;
- return special_case;
-}
-
-/* Parse an argument that can be expressed as a keyword.
- (eg: #StoreStore or %ccfr).
- The result is a boolean indicating success.
- If successful, INPUT_POINTER is updated. */
-
-static int
-parse_keyword_arg (lookup_fn, input_pointerP, valueP)
- int (*lookup_fn) PARAMS ((const char *));
- char **input_pointerP;
- int *valueP;
-{
- int value;
- char c, *p, *q;
-
- p = *input_pointerP;
- for (q = p + (*p == '#' || *p == '%');
- ISALNUM (*q) || *q == '_';
- ++q)
- continue;
- c = *q;
- *q = 0;
- value = (*lookup_fn) (p);
- *q = c;
- if (value == -1)
- return 0;
- *valueP = value;
- *input_pointerP = q;
- return 1;
-}
-
-/* Parse an argument that is a constant expression.
- The result is a boolean indicating success. */
-
-static int
-parse_const_expr_arg (input_pointerP, valueP)
- char **input_pointerP;
- int *valueP;
-{
- char *save = input_line_pointer;
- expressionS exp;
-
- input_line_pointer = *input_pointerP;
- /* The next expression may be something other than a constant
- (say if we're not processing the right variant of the insn).
- Don't call expression unless we're sure it will succeed as it will
- signal an error (which we want to defer until later). */
- /* FIXME: It might be better to define md_operand and have it recognize
- things like %asi, etc. but continuing that route through to the end
- is a lot of work. */
- if (*input_line_pointer == '%')
- {
- input_line_pointer = save;
- return 0;
- }
- expression (&exp);
- *input_pointerP = input_line_pointer;
- input_line_pointer = save;
- if (exp.X_op != O_constant)
- return 0;
- *valueP = exp.X_add_number;
- return 1;
-}
-
-/* Subroutine of sparc_ip to parse an expression. */
-
-static int
-get_expression (str)
- char *str;
-{
- char *save_in;
- segT seg;
-
- save_in = input_line_pointer;
- input_line_pointer = str;
- seg = expression (&the_insn.exp);
- if (seg != absolute_section
- && seg != text_section
- && seg != data_section
- && seg != bss_section
- && seg != undefined_section)
- {
- the_insn.error = _("bad segment");
- expr_end = input_line_pointer;
- input_line_pointer = save_in;
- return 1;
- }
- expr_end = input_line_pointer;
- input_line_pointer = save_in;
- return 0;
-}
-
-/* Subroutine of md_assemble to output one insn. */
-
-static void
-output_insn (insn, the_insn)
- const struct sparc_opcode *insn;
- struct sparc_it *the_insn;
-{
- char *toP = frag_more (4);
-
- /* Put out the opcode. */
- if (INSN_BIG_ENDIAN)
- number_to_chars_bigendian (toP, (valueT) the_insn->opcode, 4);
- else
- number_to_chars_littleendian (toP, (valueT) the_insn->opcode, 4);
-
- /* Put out the symbol-dependent stuff. */
- if (the_insn->reloc != BFD_RELOC_NONE)
- {
- fixS *fixP = fix_new_exp (frag_now, /* Which frag. */
- (toP - frag_now->fr_literal), /* Where. */
- 4, /* Size. */
- &the_insn->exp,
- the_insn->pcrel,
- the_insn->reloc);
- /* Turn off overflow checking in fixup_segment. We'll do our
- own overflow checking in md_apply_fix. This is necessary because
- the insn size is 4 and fixup_segment will signal an overflow for
- large 8 byte quantities. */
- fixP->fx_no_overflow = 1;
- if (the_insn->reloc == BFD_RELOC_SPARC_OLO10)
- fixP->tc_fix_data = the_insn->exp2.X_add_number;
- }
-
- last_insn = insn;
- last_opcode = the_insn->opcode;
-
-#ifdef OBJ_ELF
- dwarf2_emit_insn (4);
-#endif
-}
-
-/* This is identical to the md_atof in m68k.c. I think this is right,
- but I'm not sure.
-
- Turn a string in input_line_pointer into a floating point constant
- of type TYPE, and store the appropriate bytes in *LITP. The number
- of LITTLENUMS emitted is stored in *SIZEP. An error message is
- returned, or NULL on OK. */
-
-/* Equal to MAX_PRECISION in atof-ieee.c. */
-#define MAX_LITTLENUMS 6
-
-char *
-md_atof (type, litP, sizeP)
- char type;
- char *litP;
- int *sizeP;
-{
- int i, prec;
- LITTLENUM_TYPE words[MAX_LITTLENUMS];
- char *t;
-
- switch (type)
- {
- case 'f':
- case 'F':
- case 's':
- case 'S':
- prec = 2;
- break;
-
- case 'd':
- case 'D':
- case 'r':
- case 'R':
- prec = 4;
- break;
-
- case 'x':
- case 'X':
- prec = 6;
- break;
-
- case 'p':
- case 'P':
- prec = 6;
- break;
-
- default:
- *sizeP = 0;
- return _("Bad call to MD_ATOF()");
- }
-
- t = atof_ieee (input_line_pointer, type, words);
- if (t)
- input_line_pointer = t;
- *sizeP = prec * sizeof (LITTLENUM_TYPE);
-
- if (target_big_endian)
- {
- for (i = 0; i < prec; i++)
- {
- md_number_to_chars (litP, (valueT) words[i],
- sizeof (LITTLENUM_TYPE));
- litP += sizeof (LITTLENUM_TYPE);
- }
- }
- else
- {
- for (i = prec - 1; i >= 0; i--)
- {
- md_number_to_chars (litP, (valueT) words[i],
- sizeof (LITTLENUM_TYPE));
- litP += sizeof (LITTLENUM_TYPE);
- }
- }
-
- return 0;
-}
-
-/* Write a value out to the object file, using the appropriate
- endianness. */
-
-void
-md_number_to_chars (buf, val, n)
- char *buf;
- valueT val;
- int n;
-{
- if (target_big_endian)
- number_to_chars_bigendian (buf, val, n);
- else if (target_little_endian_data
- && ((n == 4 || n == 2) && ~now_seg->flags & SEC_ALLOC))
- /* Output debug words, which are not in allocated sections, as big
- endian. */
- number_to_chars_bigendian (buf, val, n);
- else if (target_little_endian_data || ! target_big_endian)
- number_to_chars_littleendian (buf, val, n);
-}
-
-/* Apply a fixS to the frags, now that we know the value it ought to
- hold. */
-
-void
-md_apply_fix3 (fixP, valP, segment)
- fixS *fixP;
- valueT *valP;
- segT segment ATTRIBUTE_UNUSED;
-{
- char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- offsetT val = * (offsetT *) valP;
- long insn;
-
- assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
-
- fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
-
-#ifdef OBJ_ELF
- /* SPARC ELF relocations don't use an addend in the data field. */
- if (fixP->fx_addsy != NULL)
- {
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_SPARC_TLS_GD_HI22:
- case BFD_RELOC_SPARC_TLS_GD_LO10:
- case BFD_RELOC_SPARC_TLS_GD_ADD:
- case BFD_RELOC_SPARC_TLS_GD_CALL:
- case BFD_RELOC_SPARC_TLS_LDM_HI22:
- case BFD_RELOC_SPARC_TLS_LDM_LO10:
- case BFD_RELOC_SPARC_TLS_LDM_ADD:
- case BFD_RELOC_SPARC_TLS_LDM_CALL:
- case BFD_RELOC_SPARC_TLS_LDO_HIX22:
- case BFD_RELOC_SPARC_TLS_LDO_LOX10:
- case BFD_RELOC_SPARC_TLS_LDO_ADD:
- case BFD_RELOC_SPARC_TLS_IE_HI22:
- case BFD_RELOC_SPARC_TLS_IE_LO10:
- case BFD_RELOC_SPARC_TLS_IE_LD:
- case BFD_RELOC_SPARC_TLS_IE_LDX:
- case BFD_RELOC_SPARC_TLS_IE_ADD:
- case BFD_RELOC_SPARC_TLS_LE_HIX22:
- case BFD_RELOC_SPARC_TLS_LE_LOX10:
- case BFD_RELOC_SPARC_TLS_DTPMOD32:
- case BFD_RELOC_SPARC_TLS_DTPMOD64:
- case BFD_RELOC_SPARC_TLS_DTPOFF32:
- case BFD_RELOC_SPARC_TLS_DTPOFF64:
- case BFD_RELOC_SPARC_TLS_TPOFF32:
- case BFD_RELOC_SPARC_TLS_TPOFF64:
- S_SET_THREAD_LOCAL (fixP->fx_addsy);
-
- default:
- break;
- }
-
- return;
- }
-#endif
-
- /* This is a hack. There should be a better way to
- handle this. Probably in terms of howto fields, once
- we can look at these fixups in terms of howtos. */
- if (fixP->fx_r_type == BFD_RELOC_32_PCREL_S2 && fixP->fx_addsy)
- val += fixP->fx_where + fixP->fx_frag->fr_address;
-
-#ifdef OBJ_AOUT
- /* FIXME: More ridiculous gas reloc hacking. If we are going to
- generate a reloc, then we just want to let the reloc addend set
- the value. We do not want to also stuff the addend into the
- object file. Including the addend in the object file works when
- doing a static link, because the linker will ignore the object
- file contents. However, the dynamic linker does not ignore the
- object file contents. */
- if (fixP->fx_addsy != NULL
- && fixP->fx_r_type != BFD_RELOC_32_PCREL_S2)
- val = 0;
-
- /* When generating PIC code, we do not want an addend for a reloc
- against a local symbol. We adjust fx_addnumber to cancel out the
- value already included in val, and to also cancel out the
- adjustment which bfd_install_relocation will create. */
- if (sparc_pic_code
- && fixP->fx_r_type != BFD_RELOC_32_PCREL_S2
- && fixP->fx_addsy != NULL
- && ! S_IS_COMMON (fixP->fx_addsy)
- && symbol_section_p (fixP->fx_addsy))
- fixP->fx_addnumber -= 2 * S_GET_VALUE (fixP->fx_addsy);
-
- /* When generating PIC code, we need to fiddle to get
- bfd_install_relocation to do the right thing for a PC relative
- reloc against a local symbol which we are going to keep. */
- if (sparc_pic_code
- && fixP->fx_r_type == BFD_RELOC_32_PCREL_S2
- && fixP->fx_addsy != NULL
- && (S_IS_EXTERNAL (fixP->fx_addsy)
- || S_IS_WEAK (fixP->fx_addsy))
- && S_IS_DEFINED (fixP->fx_addsy)
- && ! S_IS_COMMON (fixP->fx_addsy))
- {
- val = 0;
- fixP->fx_addnumber -= 2 * S_GET_VALUE (fixP->fx_addsy);
- }
-#endif
-
- /* If this is a data relocation, just output VAL. */
-
- if (fixP->fx_r_type == BFD_RELOC_16
- || fixP->fx_r_type == BFD_RELOC_SPARC_UA16)
- {
- md_number_to_chars (buf, val, 2);
- }
- else if (fixP->fx_r_type == BFD_RELOC_32
- || fixP->fx_r_type == BFD_RELOC_SPARC_UA32
- || fixP->fx_r_type == BFD_RELOC_SPARC_REV32)
- {
- md_number_to_chars (buf, val, 4);
- }
- else if (fixP->fx_r_type == BFD_RELOC_64
- || fixP->fx_r_type == BFD_RELOC_SPARC_UA64)
- {
- md_number_to_chars (buf, val, 8);
- }
- else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
- || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
- {
- fixP->fx_done = 0;
- return;
- }
- else
- {
- /* It's a relocation against an instruction. */
-
- if (INSN_BIG_ENDIAN)
- insn = bfd_getb32 ((unsigned char *) buf);
- else
- insn = bfd_getl32 ((unsigned char *) buf);
-
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_32_PCREL_S2:
- val = val >> 2;
- /* FIXME: This increment-by-one deserves a comment of why it's
- being done! */
- if (! sparc_pic_code
- || fixP->fx_addsy == NULL
- || symbol_section_p (fixP->fx_addsy))
- ++val;
-
- insn |= val & 0x3fffffff;
-
- /* See if we have a delay slot. */
- if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
- {
-#define G0 0
-#define O7 15
-#define XCC (2 << 20)
-#define COND(x) (((x)&0xf)<<25)
-#define CONDA COND(0x8)
-#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC)
-#define INSN_BA (F2(0,2) | CONDA)
-#define INSN_OR F3(2, 0x2, 0)
-#define INSN_NOP F2(0,4)
-
- long delay;
-
- /* If the instruction is a call with either:
- restore
- arithmetic instruction with rd == %o7
- where rs1 != %o7 and rs2 if it is register != %o7
- then we can optimize if the call destination is near
- by changing the call into a branch always. */
- if (INSN_BIG_ENDIAN)
- delay = bfd_getb32 ((unsigned char *) buf + 4);
- else
- delay = bfd_getl32 ((unsigned char *) buf + 4);
- if ((insn & OP (~0)) != OP (1) || (delay & OP (~0)) != OP (2))
- break;
- if ((delay & OP3 (~0)) != OP3 (0x3d) /* Restore. */
- && ((delay & OP3 (0x28)) != 0 /* Arithmetic. */
- || ((delay & RD (~0)) != RD (O7))))
- break;
- if ((delay & RS1 (~0)) == RS1 (O7)
- || ((delay & F3I (~0)) == 0
- && (delay & RS2 (~0)) == RS2 (O7)))
- break;
- /* Ensure the branch will fit into simm22. */
- if ((val & 0x3fe00000)
- && (val & 0x3fe00000) != 0x3fe00000)
- break;
- /* Check if the arch is v9 and branch will fit
- into simm19. */
- if (((val & 0x3c0000) == 0
- || (val & 0x3c0000) == 0x3c0000)
- && (sparc_arch_size == 64
- || current_architecture >= SPARC_OPCODE_ARCH_V9))
- /* ba,pt %xcc */
- insn = INSN_BPA | (val & 0x7ffff);
- else
- /* ba */
- insn = INSN_BA | (val & 0x3fffff);
- if (fixP->fx_where >= 4
- && ((delay & (0xffffffff ^ RS1 (~0)))
- == (INSN_OR | RD (O7) | RS2 (G0))))
- {
- long setter;
- int reg;
-
- if (INSN_BIG_ENDIAN)
- setter = bfd_getb32 ((unsigned char *) buf - 4);
- else
- setter = bfd_getl32 ((unsigned char *) buf - 4);
- if ((setter & (0xffffffff ^ RD (~0)))
- != (INSN_OR | RS1 (O7) | RS2 (G0)))
- break;
- /* The sequence was
- or %o7, %g0, %rN
- call foo
- or %rN, %g0, %o7
-
- If call foo was replaced with ba, replace
- or %rN, %g0, %o7 with nop. */
- reg = (delay & RS1 (~0)) >> 14;
- if (reg != ((setter & RD (~0)) >> 25)
- || reg == G0 || reg == O7)
- break;
-
- if (INSN_BIG_ENDIAN)
- bfd_putb32 (INSN_NOP, (unsigned char *) buf + 4);
- else
- bfd_putl32 (INSN_NOP, (unsigned char *) buf + 4);
- }
- }
- break;
-
- case BFD_RELOC_SPARC_11:
- if (! in_signed_range (val, 0x7ff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= val & 0x7ff;
- break;
-
- case BFD_RELOC_SPARC_10:
- if (! in_signed_range (val, 0x3ff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= val & 0x3ff;
- break;
-
- case BFD_RELOC_SPARC_7:
- if (! in_bitfield_range (val, 0x7f))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= val & 0x7f;
- break;
-
- case BFD_RELOC_SPARC_6:
- if (! in_bitfield_range (val, 0x3f))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= val & 0x3f;
- break;
-
- case BFD_RELOC_SPARC_5:
- if (! in_bitfield_range (val, 0x1f))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= val & 0x1f;
- break;
-
- case BFD_RELOC_SPARC_WDISP16:
- /* FIXME: simplify. */
- if (((val > 0) && (val & ~0x3fffc))
- || ((val < 0) && (~(val - 1) & ~0x3fffc)))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- /* FIXME: The +1 deserves a comment. */
- val = (val >> 2) + 1;
- insn |= ((val & 0xc000) << 6) | (val & 0x3fff);
- break;
-
- case BFD_RELOC_SPARC_WDISP19:
- /* FIXME: simplify. */
- if (((val > 0) && (val & ~0x1ffffc))
- || ((val < 0) && (~(val - 1) & ~0x1ffffc)))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- /* FIXME: The +1 deserves a comment. */
- val = (val >> 2) + 1;
- insn |= val & 0x7ffff;
- break;
-
- case BFD_RELOC_SPARC_HH22:
- val = BSR (val, 32);
- /* Fall through. */
-
- case BFD_RELOC_SPARC_LM22:
- case BFD_RELOC_HI22:
- if (!fixP->fx_addsy)
- insn |= (val >> 10) & 0x3fffff;
- else
- /* FIXME: Need comment explaining why we do this. */
- insn &= ~0xffff;
- break;
-
- case BFD_RELOC_SPARC22:
- if (val & ~0x003fffff)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= (val & 0x3fffff);
- break;
-
- case BFD_RELOC_SPARC_HM10:
- val = BSR (val, 32);
- /* Fall through. */
-
- case BFD_RELOC_LO10:
- if (!fixP->fx_addsy)
- insn |= val & 0x3ff;
- else
- /* FIXME: Need comment explaining why we do this. */
- insn &= ~0xff;
- break;
-
- case BFD_RELOC_SPARC_OLO10:
- val &= 0x3ff;
- val += fixP->tc_fix_data;
- /* Fall through. */
-
- case BFD_RELOC_SPARC13:
- if (! in_signed_range (val, 0x1fff))
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("relocation overflow"));
- insn |= val & 0x1fff;
- break;
-
- case BFD_RELOC_SPARC_WDISP22:
- val = (val >> 2) + 1;
- /* Fall through. */
- case BFD_RELOC_SPARC_BASE22:
- insn |= val & 0x3fffff;
- break;
-
- case BFD_RELOC_SPARC_H44:
- if (!fixP->fx_addsy)
- {
- bfd_vma tval = val;
- tval >>= 22;
- insn |= tval & 0x3fffff;
- }
- break;
-
- case BFD_RELOC_SPARC_M44:
- if (!fixP->fx_addsy)
- insn |= (val >> 12) & 0x3ff;
- break;
-
- case BFD_RELOC_SPARC_L44:
- if (!fixP->fx_addsy)
- insn |= val & 0xfff;
- break;
-
- case BFD_RELOC_SPARC_HIX22:
- if (!fixP->fx_addsy)
- {
- val ^= ~(offsetT) 0;
- insn |= (val >> 10) & 0x3fffff;
- }
- break;
-
- case BFD_RELOC_SPARC_LOX10:
- if (!fixP->fx_addsy)
- insn |= 0x1c00 | (val & 0x3ff);
- break;
-
- case BFD_RELOC_NONE:
- default:
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("bad or unhandled relocation type: 0x%02x"),
- fixP->fx_r_type);
- break;
- }
-
- if (INSN_BIG_ENDIAN)
- bfd_putb32 (insn, (unsigned char *) buf);
- else
- bfd_putl32 (insn, (unsigned char *) buf);
- }
-
- /* Are we finished with this relocation now? */
- if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
- fixP->fx_done = 1;
-}
-
-/* Translate internal representation of relocation info to BFD target
- format. */
-
-arelent **
-tc_gen_reloc (section, fixp)
- asection *section ATTRIBUTE_UNUSED;
- fixS *fixp;
-{
- static arelent *relocs[3];
- arelent *reloc;
- bfd_reloc_code_real_type code;
-
- relocs[0] = reloc = (arelent *) xmalloc (sizeof (arelent));
- relocs[1] = NULL;
-
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
- *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
- reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
-
- switch (fixp->fx_r_type)
- {
- case BFD_RELOC_16:
- case BFD_RELOC_32:
- case BFD_RELOC_HI22:
- case BFD_RELOC_LO10:
- case BFD_RELOC_32_PCREL_S2:
- case BFD_RELOC_SPARC13:
- case BFD_RELOC_SPARC22:
- case BFD_RELOC_SPARC_BASE13:
- case BFD_RELOC_SPARC_WDISP16:
- case BFD_RELOC_SPARC_WDISP19:
- case BFD_RELOC_SPARC_WDISP22:
- case BFD_RELOC_64:
- case BFD_RELOC_SPARC_5:
- case BFD_RELOC_SPARC_6:
- case BFD_RELOC_SPARC_7:
- case BFD_RELOC_SPARC_10:
- case BFD_RELOC_SPARC_11:
- case BFD_RELOC_SPARC_HH22:
- case BFD_RELOC_SPARC_HM10:
- case BFD_RELOC_SPARC_LM22:
- case BFD_RELOC_SPARC_PC_HH22:
- case BFD_RELOC_SPARC_PC_HM10:
- case BFD_RELOC_SPARC_PC_LM22:
- case BFD_RELOC_SPARC_H44:
- case BFD_RELOC_SPARC_M44:
- case BFD_RELOC_SPARC_L44:
- case BFD_RELOC_SPARC_HIX22:
- case BFD_RELOC_SPARC_LOX10:
- case BFD_RELOC_SPARC_REV32:
- case BFD_RELOC_SPARC_OLO10:
- case BFD_RELOC_SPARC_UA16:
- case BFD_RELOC_SPARC_UA32:
- case BFD_RELOC_SPARC_UA64:
- case BFD_RELOC_8_PCREL:
- case BFD_RELOC_16_PCREL:
- case BFD_RELOC_32_PCREL:
- case BFD_RELOC_64_PCREL:
- case BFD_RELOC_SPARC_PLT32:
- case BFD_RELOC_SPARC_PLT64:
- case BFD_RELOC_VTABLE_ENTRY:
- case BFD_RELOC_VTABLE_INHERIT:
- case BFD_RELOC_SPARC_TLS_GD_HI22:
- case BFD_RELOC_SPARC_TLS_GD_LO10:
- case BFD_RELOC_SPARC_TLS_GD_ADD:
- case BFD_RELOC_SPARC_TLS_GD_CALL:
- case BFD_RELOC_SPARC_TLS_LDM_HI22:
- case BFD_RELOC_SPARC_TLS_LDM_LO10:
- case BFD_RELOC_SPARC_TLS_LDM_ADD:
- case BFD_RELOC_SPARC_TLS_LDM_CALL:
- case BFD_RELOC_SPARC_TLS_LDO_HIX22:
- case BFD_RELOC_SPARC_TLS_LDO_LOX10:
- case BFD_RELOC_SPARC_TLS_LDO_ADD:
- case BFD_RELOC_SPARC_TLS_IE_HI22:
- case BFD_RELOC_SPARC_TLS_IE_LO10:
- case BFD_RELOC_SPARC_TLS_IE_LD:
- case BFD_RELOC_SPARC_TLS_IE_LDX:
- case BFD_RELOC_SPARC_TLS_IE_ADD:
- case BFD_RELOC_SPARC_TLS_LE_HIX22:
- case BFD_RELOC_SPARC_TLS_LE_LOX10:
- case BFD_RELOC_SPARC_TLS_DTPOFF32:
- case BFD_RELOC_SPARC_TLS_DTPOFF64:
- code = fixp->fx_r_type;
- break;
- default:
- abort ();
- return NULL;
- }
-
-#if defined (OBJ_ELF) || defined (OBJ_AOUT)
- /* If we are generating PIC code, we need to generate a different
- set of relocs. */
-
-#ifdef OBJ_ELF
-#define GOT_NAME "_GLOBAL_OFFSET_TABLE_"
-#else
-#define GOT_NAME "__GLOBAL_OFFSET_TABLE_"
-#endif
-#ifdef TE_VXWORKS
-#define GOTT_BASE "__GOTT_BASE__"
-#define GOTT_INDEX "__GOTT_INDEX__"
-#endif
-
- /* This code must be parallel to the OBJ_ELF tc_fix_adjustable. */
-
- if (sparc_pic_code)
- {
- switch (code)
- {
- case BFD_RELOC_32_PCREL_S2:
- if (generic_force_reloc (fixp))
- code = BFD_RELOC_SPARC_WPLT30;
- break;
- case BFD_RELOC_HI22:
- code = BFD_RELOC_SPARC_GOT22;
- if (fixp->fx_addsy != NULL)
- {
- if (strcmp (S_GET_NAME (fixp->fx_addsy), GOT_NAME) == 0)
- code = BFD_RELOC_SPARC_PC22;
-#ifdef TE_VXWORKS
- if (strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_BASE) == 0
- || strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_INDEX) == 0)
- code = BFD_RELOC_HI22; /* Unchanged. */
-#endif
- }
- break;
- case BFD_RELOC_LO10:
- code = BFD_RELOC_SPARC_GOT10;
- if (fixp->fx_addsy != NULL)
- {
- if (strcmp (S_GET_NAME (fixp->fx_addsy), GOT_NAME) == 0)
- code = BFD_RELOC_SPARC_PC10;
-#ifdef TE_VXWORKS
- if (strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_BASE) == 0
- || strcmp (S_GET_NAME (fixp->fx_addsy), GOTT_INDEX) == 0)
- code = BFD_RELOC_LO10; /* Unchanged. */
-#endif
- }
- break;
- case BFD_RELOC_SPARC13:
- code = BFD_RELOC_SPARC_GOT13;
- break;
- default:
- break;
- }
- }
-#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
-
- if (code == BFD_RELOC_SPARC_OLO10)
- reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10);
- else
- reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
- if (reloc->howto == 0)
- {
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("internal error: can't export reloc type %d (`%s')"),
- fixp->fx_r_type, bfd_get_reloc_code_name (code));
- xfree (reloc);
- relocs[0] = NULL;
- return relocs;
- }
-
- /* @@ Why fx_addnumber sometimes and fx_offset other times? */
-#ifdef OBJ_AOUT
-
- if (reloc->howto->pc_relative == 0
- || code == BFD_RELOC_SPARC_PC10
- || code == BFD_RELOC_SPARC_PC22)
- reloc->addend = fixp->fx_addnumber;
- else if (sparc_pic_code
- && fixp->fx_r_type == BFD_RELOC_32_PCREL_S2
- && fixp->fx_addsy != NULL
- && (S_IS_EXTERNAL (fixp->fx_addsy)
- || S_IS_WEAK (fixp->fx_addsy))
- && S_IS_DEFINED (fixp->fx_addsy)
- && ! S_IS_COMMON (fixp->fx_addsy))
- reloc->addend = fixp->fx_addnumber;
- else
- reloc->addend = fixp->fx_offset - reloc->address;
-
-#else /* elf or coff */
-
- if (code != BFD_RELOC_32_PCREL_S2
- && code != BFD_RELOC_SPARC_WDISP22
- && code != BFD_RELOC_SPARC_WDISP16
- && code != BFD_RELOC_SPARC_WDISP19
- && code != BFD_RELOC_SPARC_WPLT30
- && code != BFD_RELOC_SPARC_TLS_GD_CALL
- && code != BFD_RELOC_SPARC_TLS_LDM_CALL)
- reloc->addend = fixp->fx_addnumber;
- else if (symbol_section_p (fixp->fx_addsy))
- reloc->addend = (section->vma
- + fixp->fx_addnumber
- + md_pcrel_from (fixp));
- else
- reloc->addend = fixp->fx_offset;
-#endif
-
- /* We expand R_SPARC_OLO10 to R_SPARC_LO10 and R_SPARC_13
- on the same location. */
- if (code == BFD_RELOC_SPARC_OLO10)
- {
- relocs[1] = reloc = (arelent *) xmalloc (sizeof (arelent));
- relocs[2] = NULL;
-
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
- *reloc->sym_ptr_ptr
- = symbol_get_bfdsym (section_symbol (absolute_section));
- reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_SPARC13);
- reloc->addend = fixp->tc_fix_data;
- }
-
- return relocs;
-}
-
-/* We have no need to default values of symbols. */
-
-symbolS *
-md_undefined_symbol (name)
- char *name ATTRIBUTE_UNUSED;
-{
- return 0;
-}
-
-/* Round up a section size to the appropriate boundary. */
-
-valueT
-md_section_align (segment, size)
- segT segment ATTRIBUTE_UNUSED;
- valueT size;
-{
-#ifndef OBJ_ELF
- /* This is not right for ELF; a.out wants it, and COFF will force
- the alignment anyways. */
- valueT align = ((valueT) 1
- << (valueT) bfd_get_section_alignment (stdoutput, segment));
- valueT newsize;
-
- /* Turn alignment value into a mask. */
- align--;
- newsize = (size + align) & ~align;
- return newsize;
-#else
- return size;
-#endif
-}
-
-/* Exactly what point is a PC-relative offset relative TO?
- On the sparc, they're relative to the address of the offset, plus
- its size. This gets us to the following instruction.
- (??? Is this right? FIXME-SOON) */
-long
-md_pcrel_from (fixP)
- fixS *fixP;
-{
- long ret;
-
- ret = fixP->fx_where + fixP->fx_frag->fr_address;
- if (! sparc_pic_code
- || fixP->fx_addsy == NULL
- || symbol_section_p (fixP->fx_addsy))
- ret += fixP->fx_size;
- return ret;
-}
-
-/* Return log2 (VALUE), or -1 if VALUE is not an exact positive power
- of two. */
-
-static int
-mylog2 (value)
- int value;
-{
- int shift;
-
- if (value <= 0)
- return -1;
-
- for (shift = 0; (value & 1) == 0; value >>= 1)
- ++shift;
-
- return (value == 1) ? shift : -1;
-}
-
-/* Sort of like s_lcomm. */
-
-#ifndef OBJ_ELF
-static int max_alignment = 15;
-#endif
-
-static void
-s_reserve (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- char *name;
- char *p;
- char c;
- int align;
- int size;
- int temp;
- symbolS *symbolP;
-
- name = input_line_pointer;
- c = get_symbol_end ();
- p = input_line_pointer;
- *p = c;
- SKIP_WHITESPACE ();
-
- if (*input_line_pointer != ',')
- {
- as_bad (_("Expected comma after name"));
- ignore_rest_of_line ();
- return;
- }
-
- ++input_line_pointer;
-
- if ((size = get_absolute_expression ()) < 0)
- {
- as_bad (_("BSS length (%d.) <0! Ignored."), size);
- ignore_rest_of_line ();
- return;
- } /* Bad length. */
-
- *p = 0;
- symbolP = symbol_find_or_make (name);
- *p = c;
-
- if (strncmp (input_line_pointer, ",\"bss\"", 6) != 0
- && strncmp (input_line_pointer, ",\".bss\"", 7) != 0)
- {
- as_bad (_("bad .reserve segment -- expected BSS segment"));
- return;
- }
-
- if (input_line_pointer[2] == '.')
- input_line_pointer += 7;
- else
- input_line_pointer += 6;
- SKIP_WHITESPACE ();
-
- if (*input_line_pointer == ',')
- {
- ++input_line_pointer;
-
- SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
- {
- as_bad (_("missing alignment"));
- ignore_rest_of_line ();
- return;
- }
-
- align = (int) get_absolute_expression ();
-
-#ifndef OBJ_ELF
- if (align > max_alignment)
- {
- align = max_alignment;
- as_warn (_("alignment too large; assuming %d"), align);
- }
-#endif
-
- if (align < 0)
- {
- as_bad (_("negative alignment"));
- ignore_rest_of_line ();
- return;
- }
-
- if (align != 0)
- {
- temp = mylog2 (align);
- if (temp < 0)
- {
- as_bad (_("alignment not a power of 2"));
- ignore_rest_of_line ();
- return;
- }
-
- align = temp;
- }
-
- record_alignment (bss_section, align);
- }
- else
- align = 0;
-
- if (!S_IS_DEFINED (symbolP)
-#ifdef OBJ_AOUT
- && S_GET_OTHER (symbolP) == 0
- && S_GET_DESC (symbolP) == 0
-#endif
- )
- {
- if (! need_pass_2)
- {
- char *pfrag;
- segT current_seg = now_seg;
- subsegT current_subseg = now_subseg;
-
- /* Switch to bss. */
- subseg_set (bss_section, 1);
-
- if (align)
- /* Do alignment. */
- frag_align (align, 0, 0);
-
- /* Detach from old frag. */
- if (S_GET_SEGMENT (symbolP) == bss_section)
- symbol_get_frag (symbolP)->fr_symbol = NULL;
-
- symbol_set_frag (symbolP, frag_now);
- pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
- (offsetT) size, (char *) 0);
- *pfrag = 0;
-
- S_SET_SEGMENT (symbolP, bss_section);
-
- subseg_set (current_seg, current_subseg);
-
-#ifdef OBJ_ELF
- S_SET_SIZE (symbolP, size);
-#endif
- }
- }
- else
- {
- as_warn ("Ignoring attempt to re-define symbol %s",
- S_GET_NAME (symbolP));
- } /* if not redefining. */
-
- demand_empty_rest_of_line ();
-}
-
-static void
-s_common (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- char *name;
- char c;
- char *p;
- offsetT temp, size;
- symbolS *symbolP;
-
- name = input_line_pointer;
- c = get_symbol_end ();
- /* Just after name is now '\0'. */
- p = input_line_pointer;
- *p = c;
- SKIP_WHITESPACE ();
- if (*input_line_pointer != ',')
- {
- as_bad (_("Expected comma after symbol-name"));
- ignore_rest_of_line ();
- return;
- }
-
- /* Skip ','. */
- input_line_pointer++;
-
- if ((temp = get_absolute_expression ()) < 0)
- {
- as_bad (_(".COMMon length (%lu) out of range ignored"),
- (unsigned long) temp);
- ignore_rest_of_line ();
- return;
- }
- size = temp;
- *p = 0;
- symbolP = symbol_find_or_make (name);
- *p = c;
- if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
- {
- as_bad (_("Ignoring attempt to re-define symbol"));
- ignore_rest_of_line ();
- return;
- }
- if (S_GET_VALUE (symbolP) != 0)
- {
- if (S_GET_VALUE (symbolP) != (valueT) size)
- {
- as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
- S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), (long) size);
- }
- }
- else
- {
-#ifndef OBJ_ELF
- S_SET_VALUE (symbolP, (valueT) size);
- S_SET_EXTERNAL (symbolP);
-#endif
- }
- know (symbol_get_frag (symbolP) == &zero_address_frag);
- if (*input_line_pointer != ',')
- {
- as_bad (_("Expected comma after common length"));
- ignore_rest_of_line ();
- return;
- }
- input_line_pointer++;
- SKIP_WHITESPACE ();
- if (*input_line_pointer != '"')
- {
- temp = get_absolute_expression ();
-
-#ifndef OBJ_ELF
- if (temp > max_alignment)
- {
- temp = max_alignment;
- as_warn (_("alignment too large; assuming %ld"), (long) temp);
- }
-#endif
-
- if (temp < 0)
- {
- as_bad (_("negative alignment"));
- ignore_rest_of_line ();
- return;
- }
-
-#ifdef OBJ_ELF
- if (symbol_get_obj (symbolP)->local)
- {
- segT old_sec;
- int old_subsec;
- char *p;
- int align;
-
- old_sec = now_seg;
- old_subsec = now_subseg;
-
- if (temp == 0)
- align = 0;
- else
- align = mylog2 (temp);
-
- if (align < 0)
- {
- as_bad (_("alignment not a power of 2"));
- ignore_rest_of_line ();
- return;
- }
-
- record_alignment (bss_section, align);
- subseg_set (bss_section, 0);
- if (align)
- frag_align (align, 0, 0);
- if (S_GET_SEGMENT (symbolP) == bss_section)
- symbol_get_frag (symbolP)->fr_symbol = 0;
- symbol_set_frag (symbolP, frag_now);
- p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
- (offsetT) size, (char *) 0);
- *p = 0;
- S_SET_SEGMENT (symbolP, bss_section);
- S_CLEAR_EXTERNAL (symbolP);
- S_SET_SIZE (symbolP, size);
- subseg_set (old_sec, old_subsec);
- }
- else
-#endif /* OBJ_ELF */
- {
- allocate_common:
- S_SET_VALUE (symbolP, (valueT) size);
-#ifdef OBJ_ELF
- S_SET_ALIGN (symbolP, temp);
- S_SET_SIZE (symbolP, size);
-#endif
- S_SET_EXTERNAL (symbolP);
- S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
- }
- }
- else
- {
- input_line_pointer++;
- /* @@ Some use the dot, some don't. Can we get some consistency?? */
- if (*input_line_pointer == '.')
- input_line_pointer++;
- /* @@ Some say data, some say bss. */
- if (strncmp (input_line_pointer, "bss\"", 4)
- && strncmp (input_line_pointer, "data\"", 5))
- {
- while (*--input_line_pointer != '"')
- ;
- input_line_pointer--;
- goto bad_common_segment;
- }
- while (*input_line_pointer++ != '"')
- ;
- goto allocate_common;
- }
-
- symbol_get_bfdsym (symbolP)->flags |= BSF_OBJECT;
-
- demand_empty_rest_of_line ();
- return;
-
- {
- bad_common_segment:
- p = input_line_pointer;
- while (*p && *p != '\n')
- p++;
- c = *p;
- *p = '\0';
- as_bad (_("bad .common segment %s"), input_line_pointer + 1);
- *p = c;
- input_line_pointer = p;
- ignore_rest_of_line ();
- return;
- }
-}
-
-/* Handle the .empty pseudo-op. This suppresses the warnings about
- invalid delay slot usage. */
-
-static void
-s_empty (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- /* The easy way to implement is to just forget about the last
- instruction. */
- last_insn = NULL;
-}
-
-static void
-s_seg (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
-
- if (strncmp (input_line_pointer, "\"text\"", 6) == 0)
- {
- input_line_pointer += 6;
- s_text (0);
- return;
- }
- if (strncmp (input_line_pointer, "\"data\"", 6) == 0)
- {
- input_line_pointer += 6;
- s_data (0);
- return;
- }
- if (strncmp (input_line_pointer, "\"data1\"", 7) == 0)
- {
- input_line_pointer += 7;
- s_data1 ();
- return;
- }
- if (strncmp (input_line_pointer, "\"bss\"", 5) == 0)
- {
- input_line_pointer += 5;
- /* We only support 2 segments -- text and data -- for now, so
- things in the "bss segment" will have to go into data for now.
- You can still allocate SEG_BSS stuff with .lcomm or .reserve. */
- subseg_set (data_section, 255); /* FIXME-SOMEDAY. */
- return;
- }
- as_bad (_("Unknown segment type"));
- demand_empty_rest_of_line ();
-}
-
-static void
-s_data1 ()
-{
- subseg_set (data_section, 1);
- demand_empty_rest_of_line ();
-}
-
-static void
-s_proc (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- {
- ++input_line_pointer;
- }
- ++input_line_pointer;
-}
-
-/* This static variable is set by s_uacons to tell sparc_cons_align
- that the expression does not need to be aligned. */
-
-static int sparc_no_align_cons = 0;
-
-/* This static variable is set by sparc_cons to emit requested types
- of relocations in cons_fix_new_sparc. */
-
-static const char *sparc_cons_special_reloc;
-
-/* This handles the unaligned space allocation pseudo-ops, such as
- .uaword. .uaword is just like .word, but the value does not need
- to be aligned. */
-
-static void
-s_uacons (bytes)
- int bytes;
-{
- /* Tell sparc_cons_align not to align this value. */
- sparc_no_align_cons = 1;
- cons (bytes);
- sparc_no_align_cons = 0;
-}
-
-/* This handles the native word allocation pseudo-op .nword.
- For sparc_arch_size 32 it is equivalent to .word, for
- sparc_arch_size 64 it is equivalent to .xword. */
-
-static void
-s_ncons (bytes)
- int bytes ATTRIBUTE_UNUSED;
-{
- cons (sparc_arch_size == 32 ? 4 : 8);
-}
-
-#ifdef OBJ_ELF
-/* Handle the SPARC ELF .register pseudo-op. This sets the binding of a
- global register.
- The syntax is:
-
- .register %g[2367],{#scratch|symbolname|#ignore}
-*/
-
-static void
-s_register (ignore)
- int ignore ATTRIBUTE_UNUSED;
-{
- char c;
- int reg;
- int flags;
- const char *regname;
-
- if (input_line_pointer[0] != '%'
- || input_line_pointer[1] != 'g'
- || ((input_line_pointer[2] & ~1) != '2'
- && (input_line_pointer[2] & ~1) != '6')
- || input_line_pointer[3] != ',')
- as_bad (_("register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"));
- reg = input_line_pointer[2] - '0';
- input_line_pointer += 4;
-
- if (*input_line_pointer == '#')
- {
- ++input_line_pointer;
- regname = input_line_pointer;
- c = get_symbol_end ();
- if (strcmp (regname, "scratch") && strcmp (regname, "ignore"))
- as_bad (_("register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"));
- if (regname[0] == 'i')
- regname = NULL;
- else
- regname = "";
- }
- else
- {
- regname = input_line_pointer;
- c = get_symbol_end ();
- }
- if (sparc_arch_size == 64)
- {
- if (globals[reg])
- {
- if ((regname && globals[reg] != (symbolS *) 1
- && strcmp (S_GET_NAME (globals[reg]), regname))
- || ((regname != NULL) ^ (globals[reg] != (symbolS *) 1)))
- as_bad (_("redefinition of global register"));
- }
- else
- {
- if (regname == NULL)
- globals[reg] = (symbolS *) 1;
- else
- {
- if (*regname)
- {
- if (symbol_find (regname))
- as_bad (_("Register symbol %s already defined."),
- regname);
- }
- globals[reg] = symbol_make (regname);
- flags = symbol_get_bfdsym (globals[reg])->flags;
- if (! *regname)
- flags = flags & ~(BSF_GLOBAL|BSF_LOCAL|BSF_WEAK);
- if (! (flags & (BSF_GLOBAL|BSF_LOCAL|BSF_WEAK)))
- flags |= BSF_GLOBAL;
- symbol_get_bfdsym (globals[reg])->flags = flags;
- S_SET_VALUE (globals[reg], (valueT) reg);
- S_SET_ALIGN (globals[reg], reg);
- S_SET_SIZE (globals[reg], 0);
- /* Although we actually want undefined_section here,
- we have to use absolute_section, because otherwise
- generic as code will make it a COM section.
- We fix this up in sparc_adjust_symtab. */
- S_SET_SEGMENT (globals[reg], absolute_section);
- S_SET_OTHER (globals[reg], 0);
- elf_symbol (symbol_get_bfdsym (globals[reg]))
- ->internal_elf_sym.st_info =
- ELF_ST_INFO(STB_GLOBAL, STT_REGISTER);
- elf_symbol (symbol_get_bfdsym (globals[reg]))
- ->internal_elf_sym.st_shndx = SHN_UNDEF;
- }
- }
- }
-
- *input_line_pointer = c;
-
- demand_empty_rest_of_line ();
-}
-
-/* Adjust the symbol table. We set undefined sections for STT_REGISTER
- symbols which need it. */
-
-void
-sparc_adjust_symtab ()
-{
- symbolS *sym;
-
- for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
- {
- if (ELF_ST_TYPE (elf_symbol (symbol_get_bfdsym (sym))
- ->internal_elf_sym.st_info) != STT_REGISTER)
- continue;
-
- if (ELF_ST_TYPE (elf_symbol (symbol_get_bfdsym (sym))
- ->internal_elf_sym.st_shndx != SHN_UNDEF))
- continue;
-
- S_SET_SEGMENT (sym, undefined_section);
- }
-}
-#endif
-
-/* If the --enforce-aligned-data option is used, we require .word,
- et. al., to be aligned correctly. We do it by setting up an
- rs_align_code frag, and checking in HANDLE_ALIGN to make sure that
- no unexpected alignment was introduced.
-
- The SunOS and Solaris native assemblers enforce aligned data by
- default. We don't want to do that, because gcc can deliberately
- generate misaligned data if the packed attribute is used. Instead,
- we permit misaligned data by default, and permit the user to set an
- option to check for it. */
-
-void
-sparc_cons_align (nbytes)
- int nbytes;
-{
- int nalign;
- char *p;
-
- /* Only do this if we are enforcing aligned data. */
- if (! enforce_aligned_data)
- return;
-
- /* Don't align if this is an unaligned pseudo-op. */
- if (sparc_no_align_cons)
- return;
-
- nalign = mylog2 (nbytes);
- if (nalign == 0)
- return;
-
- assert (nalign > 0);
-
- if (now_seg == absolute_section)
- {
- if ((abs_section_offset & ((1 << nalign) - 1)) != 0)
- as_bad (_("misaligned data"));
- return;
- }
-
- p = frag_var (rs_align_test, 1, 1, (relax_substateT) 0,
- (symbolS *) NULL, (offsetT) nalign, (char *) NULL);
-
- record_alignment (now_seg, nalign);
-}
-
-/* This is called from HANDLE_ALIGN in tc-sparc.h. */
-
-void
-sparc_handle_align (fragp)
- fragS *fragp;
-{
- int count, fix;
- char *p;
-
- count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
-
- switch (fragp->fr_type)
- {
- case rs_align_test:
- if (count != 0)
- as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data"));
- break;
-
- case rs_align_code:
- p = fragp->fr_literal + fragp->fr_fix;
- fix = 0;
-
- if (count & 3)
- {
- fix = count & 3;
- memset (p, 0, fix);
- p += fix;
- count -= fix;
- }
-
- if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8)
- {
- unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */
- if (INSN_BIG_ENDIAN)
- number_to_chars_bigendian (p, wval, 4);
- else
- number_to_chars_littleendian (p, wval, 4);
- p += 4;
- count -= 4;
- fix += 4;
- }
-
- if (INSN_BIG_ENDIAN)
- number_to_chars_bigendian (p, 0x01000000, 4);
- else
- number_to_chars_littleendian (p, 0x01000000, 4);
-
- fragp->fr_fix += fix;
- fragp->fr_var = 4;
- break;
-
- default:
- break;
- }
-}
-
-#ifdef OBJ_ELF
-/* Some special processing for a Sparc ELF file. */
-
-void
-sparc_elf_final_processing ()
-{
- /* Set the Sparc ELF flag bits. FIXME: There should probably be some
- sort of BFD interface for this. */
- if (sparc_arch_size == 64)
- {
- switch (sparc_memory_model)
- {
- case MM_RMO:
- elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_RMO;
- break;
- case MM_PSO:
- elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_PSO;
- break;
- default:
- break;
- }
- }
- else if (current_architecture >= SPARC_OPCODE_ARCH_V9)
- elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS;
- if (current_architecture == SPARC_OPCODE_ARCH_V9A)
- elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1;
- else if (current_architecture == SPARC_OPCODE_ARCH_V9B)
- elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1|EF_SPARC_SUN_US3;
-}
-
-void
-sparc_cons (exp, size)
- expressionS *exp;
- int size;
-{
- char *save;
-
- SKIP_WHITESPACE ();
- sparc_cons_special_reloc = NULL;
- save = input_line_pointer;
- if (input_line_pointer[0] == '%'
- && input_line_pointer[1] == 'r'
- && input_line_pointer[2] == '_')
- {
- if (strncmp (input_line_pointer + 3, "disp", 4) == 0)
- {
- input_line_pointer += 7;
- sparc_cons_special_reloc = "disp";
- }
- else if (strncmp (input_line_pointer + 3, "plt", 3) == 0)
- {
- if (size != 4 && size != 8)
- as_bad (_("Illegal operands: %%r_plt in %d-byte data field"), size);
- else
- {
- input_line_pointer += 6;
- sparc_cons_special_reloc = "plt";
- }
- }
- else if (strncmp (input_line_pointer + 3, "tls_dtpoff", 10) == 0)
- {
- if (size != 4 && size != 8)
- as_bad (_("Illegal operands: %%r_tls_dtpoff in %d-byte data field"), size);
- else
- {
- input_line_pointer += 13;
- sparc_cons_special_reloc = "tls_dtpoff";
- }
- }
- if (sparc_cons_special_reloc)
- {
- int bad = 0;
-
- switch (size)
- {
- case 1:
- if (*input_line_pointer != '8')
- bad = 1;
- input_line_pointer--;
- break;
- case 2:
- if (input_line_pointer[0] != '1' || input_line_pointer[1] != '6')
- bad = 1;
- break;
- case 4:
- if (input_line_pointer[0] != '3' || input_line_pointer[1] != '2')
- bad = 1;
- break;
- case 8:
- if (input_line_pointer[0] != '6' || input_line_pointer[1] != '4')
- bad = 1;
- break;
- default:
- bad = 1;
- break;
- }
-
- if (bad)
- {
- as_bad (_("Illegal operands: Only %%r_%s%d allowed in %d-byte data fields"),
- sparc_cons_special_reloc, size * 8, size);
- }
- else
- {
- input_line_pointer += 2;
- if (*input_line_pointer != '(')
- {
- as_bad (_("Illegal operands: %%r_%s%d requires arguments in ()"),
- sparc_cons_special_reloc, size * 8);
- bad = 1;
- }
- }
-
- if (bad)
- {
- input_line_pointer = save;
- sparc_cons_special_reloc = NULL;
- }
- else
- {
- int c;
- char *end = ++input_line_pointer;
- int npar = 0;
-
- while (! is_end_of_line[(c = *end)])
- {
- if (c == '(')
- npar++;
- else if (c == ')')
- {
- if (!npar)
- break;
- npar--;
- }
- end++;
- }
-
- if (c != ')')
- as_bad (_("Illegal operands: %%r_%s%d requires arguments in ()"),
- sparc_cons_special_reloc, size * 8);
- else
- {
- *end = '\0';
- expression (exp);
- *end = c;
- if (input_line_pointer != end)
- {
- as_bad (_("Illegal operands: %%r_%s%d requires arguments in ()"),
- sparc_cons_special_reloc, size * 8);
- }
- else
- {
- input_line_pointer++;
- SKIP_WHITESPACE ();
- c = *input_line_pointer;
- if (! is_end_of_line[c] && c != ',')
- as_bad (_("Illegal operands: garbage after %%r_%s%d()"),
- sparc_cons_special_reloc, size * 8);
- }
- }
- }
- }
- }
- if (sparc_cons_special_reloc == NULL)
- expression (exp);
-}
-
-#endif
-
-/* This is called by emit_expr via TC_CONS_FIX_NEW when creating a
- reloc for a cons. We could use the definition there, except that
- we want to handle little endian relocs specially. */
-
-void
-cons_fix_new_sparc (frag, where, nbytes, exp)
- fragS *frag;
- int where;
- unsigned int nbytes;
- expressionS *exp;
-{
- bfd_reloc_code_real_type r;
-
- r = (nbytes == 1 ? BFD_RELOC_8 :
- (nbytes == 2 ? BFD_RELOC_16 :
- (nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64)));
-
- if (target_little_endian_data
- && nbytes == 4
- && now_seg->flags & SEC_ALLOC)
- r = BFD_RELOC_SPARC_REV32;
-
- if (sparc_cons_special_reloc)
- {
- if (*sparc_cons_special_reloc == 'd')
- switch (nbytes)
- {
- case 1: r = BFD_RELOC_8_PCREL; break;
- case 2: r = BFD_RELOC_16_PCREL; break;
- case 4: r = BFD_RELOC_32_PCREL; break;
- case 8: r = BFD_RELOC_64_PCREL; break;
- default: abort ();
- }
- else if (*sparc_cons_special_reloc == 'p')
- switch (nbytes)
- {
- case 4: r = BFD_RELOC_SPARC_PLT32; break;
- case 8: r = BFD_RELOC_SPARC_PLT64; break;
- }
- else
- switch (nbytes)
- {
- case 4: r = BFD_RELOC_SPARC_TLS_DTPOFF32; break;
- case 8: r = BFD_RELOC_SPARC_TLS_DTPOFF64; break;
- }
- }
- else if (sparc_no_align_cons)
- {
- switch (nbytes)
- {
- case 2: r = BFD_RELOC_SPARC_UA16; break;
- case 4: r = BFD_RELOC_SPARC_UA32; break;
- case 8: r = BFD_RELOC_SPARC_UA64; break;
- default: abort ();
- }
- }
-
- fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
- sparc_cons_special_reloc = NULL;
-}
-
-void
-sparc_cfi_frame_initial_instructions ()
-{
- cfi_add_CFA_def_cfa (14, sparc_arch_size == 64 ? 0x7ff : 0);
-}
-
-int
-sparc_regname_to_dw2regnum (const char *regname)
-{
- char *p, *q;
-
- if (!regname[0])
- return -1;
-
- q = "goli";
- p = strchr (q, regname[0]);
- if (p)
- {
- if (regname[1] < '0' || regname[1] > '8' || regname[2])
- return -1;
- return (p - q) * 8 + regname[1] - '0';
- }
- if (regname[0] == 's' && regname[1] == 'p' && !regname[2])
- return 14;
- if (regname[0] == 'f' && regname[1] == 'p' && !regname[2])
- return 30;
- if (regname[0] == 'f' || regname[0] == 'r')
- {
- unsigned int regnum;
-
- regnum = strtoul (regname + 1, &q, 10);
- if (p == q || *q)
- return -1;
- if (regnum >= ((regname[0] == 'f'
- && SPARC_OPCODE_ARCH_V9_P (max_architecture))
- ? 64 : 32))
- return -1;
- if (regname[0] == 'f')
- {
- regnum += 32;
- if (regnum >= 64 && (regnum & 1))
- return -1;
- }
- return regnum;
- }
- return -1;
-}
-
-void
-sparc_cfi_emit_pcrel_expr (expressionS *exp, unsigned int nbytes)
-{
- sparc_cons_special_reloc = "disp";
- sparc_no_align_cons = 1;
- emit_expr (exp, nbytes);
- sparc_no_align_cons = 0;
- sparc_cons_special_reloc = NULL;
-}
diff --git a/gnu/usr.bin/binutils/doc/Makefile b/gnu/usr.bin/binutils/doc/Makefile
index b271f19b0a622..38c1b8b33ab78 100644
--- a/gnu/usr.bin/binutils/doc/Makefile
+++ b/gnu/usr.bin/binutils/doc/Makefile
@@ -4,20 +4,19 @@
.PATH: ${SRCDIR}/gas/doc ${SRCDIR}/ld ${SRCDIR}/bfd/doc
-INFO= as ld gasp binutils
+INFO= as ld binutils
INFOSECTION= "Programming & development tools."
INFOENTRY_as= "* As: (as). The GNU assembler."
-INFOENTRY_gasp= "* Gasp: (gasp). The GNU Assembler Macro Preprocessor."
INFOENTRY_ld= "* Ld: (ld). The GNU linker."
INFOENTRY_binutils= "* Binutils: (binutils). The GNU Binary Utilities."
MAKEINFOFLAGS+= --no-validate
-MAKEINFOFLAGS+= -I ${SRCDIR}/gas/doc -I ${SRCDIR}/ld -I ${SRCDIR}/bfd/doc
-MAKEINFOFLAGS+= -I ${SRCDIR}/binutils
+MAKEINFOFLAGS+= -I ${SRCDIR}/libiberty
+MAKEINFOFLAGS+= -I ${SRCDIR}/bfd/doc
-CLEANFILES= configdoc.texi config.texi gasver.texi ldver.texi
+CLEANFILES= bfdver.texi configdoc.texi config.texi gasver.texi ldver.texi
-as.info: as.texinfo asconfig.texi c-i386.texi gasver.texi
+as.info: as.texinfo asconfig.texi bfdver.texi c-i386.texi gasver.texi
ld.info: ld.texinfo bfdsumm.texi ldver.texi configdoc.texi
configdoc.texi: gen-doc.texi
@@ -26,7 +25,7 @@ configdoc.texi: gen-doc.texi
.PATH: ${SRCDIR}/binutils/doc
binutils.info: binutils.texi config.texi
-config.texi gasver.texi ldver.texi:
+bfdver.texi config.texi gasver.texi ldver.texi:
echo "@set VERSION ${VERSION}" > ${.TARGET}
.include <bsd.info.mk>
diff --git a/gnu/usr.bin/binutils/doc/asconfig.texi b/gnu/usr.bin/binutils/doc/asconfig.texi
index 2a7b652f83ea4..55d1bf807a7bc 100644
--- a/gnu/usr.bin/binutils/doc/asconfig.texi
+++ b/gnu/usr.bin/binutils/doc/asconfig.texi
@@ -1,4 +1,6 @@
-@c Copyright 1992, 1993 Free Software Foundation, Inc.
+@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002,
+@c 2003, 2005
+@c Free Software Foundation, Inc.
@c This file is part of the documentation for the GAS manual
@c Configuration settings for all-inclusive version of manual
@@ -18,37 +20,54 @@
@c Object formats of interest
@c ==========================
@clear AOUT
-@clear BOUT
@clear COFF
@set ELF
@clear SOM
@c CPUs of interest
@c ================
-@clear A29K
+@clear ALPHA
@clear ARC
-@clear ARM
+@set ARM
+@clear BFIN
+@clear CRIS
@clear D10V
+@clear D30V
@clear H8/300
-@clear H8/500
-@clear SH
+@clear HPPA
+@clear I370
@set I80386
+@clear I860
@clear I960
-@clear MIPS
+@set IA64
+@clear IP2K
+@clear M32C
@clear M32R
+@clear xc16x
+@clear M68HC11
@clear M680X0
-@clear Z8000
-@clear SPARC
-@clear VAX
-@clear VXWORKS
-@clear HPPA
+@clear MCORE
+@set MIPS
+@clear MMIX
+@clear MS1
+@clear MSP430
+@clear PDP11
+@clear PJ
+@set PPC
+@clear SH
+@set SPARC
+@clear TIC54X
@clear V850
+@clear VAX
+@clear XTENSA
+@clear Z80
+@clear Z8000
-@c Does this version of the assembler use the difference-table kluge?
+@c Does this version of the assembler use the difference-table kludge?
@clear DIFF-TBL-KLUGE
@c Do all machines described use IEEE floating point?
-@set IEEEFLOAT
+@clear IEEEFLOAT
@c Is a word 32 bits, or 16?
@set W32
@@ -65,6 +84,6 @@
@c Name of linker:
@set LD ld
@c Text for target machine (best not used in generic case; but just in case...)
-@set TARGET i386
-@c Name of object format (NOT SET in generic version)
+@set TARGET machine specific
+@c Name of object format NOT SET in generic version
@set OBJ-NAME ELF
diff --git a/gnu/usr.bin/binutils/gasp/Makefile b/gnu/usr.bin/binutils/gasp/Makefile
deleted file mode 100644
index 51ea9d9ec4791..0000000000000
--- a/gnu/usr.bin/binutils/gasp/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# $FreeBSD$
-
-.include "../Makefile.inc0"
-
-.PATH: ${SRCDIR}/gas
-
-PROG= gasp
-SRCS+= gasp.c macro.c sb.c hash.c xregex.h
-WARNS?= 2
-CFLAGS+= -DBFD_ASSEMBLER
-CFLAGS+= -I${.CURDIR}/../as/${TARGET_ARCH}-freebsd -I${.CURDIR}/../as
-CFLAGS+= -I${.CURDIR}
-CFLAGS+= -I${SRCDIR} -I${SRCDIR}/gas -I${SRCDIR}/gas/config
-DPADD= ${RELTOP}/libiberty/libiberty.a
-LDADD= ${DPADD}
-CLEANFILES= xregex.h
-
-xregex.h:
- @echo '#include <regex.h>' >${.TARGET}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/binutils/gasp/gasp.1 b/gnu/usr.bin/binutils/gasp/gasp.1
deleted file mode 100644
index 5aaff9a165bba..0000000000000
--- a/gnu/usr.bin/binutils/gasp/gasp.1
+++ /dev/null
@@ -1,115 +0,0 @@
-.\" Copyright (c) 1999
-.\" The Regents of the University of California. All rights reserved.
-.\" and David E. O'Brien
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd December 29, 1999
-.Dt GASP 1
-.Os
-.Sh NAME
-.Nm gasp
-.Nd the GNU Assembler Macro Preprocessor
-.Sh SYNOPSIS
-.Nm
-.Op Fl adhMpsuv
-.Op Fl c Ar char
-.Op Fl o Ar outfile
-.Op Fl D Ns Ar name=value
-.Op Fl I Ns Ar path
-.Op infile
-.Sh DESCRIPTION
-.Nm
-is the GNU Assembler Macro Preprocessor.
-The argument
-.Ar infile
-is processed and the resulting text is sent to the standard output.
-.Pp
-The options are as follows:
-.Bl -tag -width "-Dname=value"
-.It Fl a
-Enter enter alternate macro mode.
-Also specifiable as
-.Op Fl \-alternate
-.It Fl c Ar char
-Change the comment character from `!'
-Also specifiable as
-.Op Fl \-commentchar\ char
-.It Fl d
-Print limited debugging information.
-Also specifiable as
-.Op Fl \-debug
-.It Fl h
-Print the help message.
-Also specifiable as
-.Op Fl \-help
-.It Fl M
-Enter MRI compatibility mode
-Also specifiable as
-.Op Fl \-mri
-.It Fl o Ar outfile
-Specify the output file.
-Also specifiable as
-.Op Fl \-output\ outfile
-.It Fl p
-Print line numbers.
-Also specifiable as
-.Op Fl \-print
-.It Fl s
-Copy source through as comments.
-Also specifiable as
-.Op Fl \-copysource
-.It Fl u
-Allow unreasonable nesting.
-Also specifiable as
-.Op Fl \-unreasonable
-.It Fl v
-Print the program version and exit.
-Also specifiable as
-.Op Fl \-version
-.It Fl D Ns Ar name=value
-Define the preprocessor symbol
-.Ar name
-to have the value specified by "value".
-.It Fl I Ns Ar path
-Add
-.Ar path
-to the include path list.
-.El
-.Sh SEE ALSO
-.Xr cpp 1 ,
-.Xr m4 1
-.Rs
-.%T The gasp GNU hypertext system info pages
-.Re
-.Sh HISTORY
-The
-.Nm
-command is part of the GNU Binutils package.
-.Sh AUTHORS
-This man page was written by
-.An David E. O'Brien .
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile
deleted file mode 100644
index f51d9e3570457..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile
+++ /dev/null
@@ -1,139 +0,0 @@
-# ex:ts=8
-# $FreeBSD$
-
-.include "../Makefile.inc0"
-
-GDBDIR= ${.CURDIR}/../../../../contrib/gdb
-.PATH: ${GDBDIR}/gdb ${GDBDIR}/gdb/cli ${GDBDIR}/gdb/mi
-.PATH: ${SRCDIR}/opcodes ${SRCDIR}/binutils
-
-# For FSF GDB files, use their CPU (arch) name; for our files use ours.
-GDB_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc.*/rs6000/:C/sparc64/sparc/}
-NO_SHARED?=yes
-PROG= gdb
-XSRCS= annotate.c arch-utils.c ax-general.c ax-gdb.c bcache.c \
- blockframe.c breakpoint.c buildsym.c complaints.c completer.c \
- copying.c corefile.c corelow.c dcache.c doublest.c event-loop.c \
- event-top.c environ.c eval.c exec.c expprint.c fork-child.c \
- frame.c gdb-events.c gdbarch.c gdbtypes.c infcmd.c inflow.c \
- infptrace.c inf-loop.c infrun.c inftarg.c language.c linespec.c \
- main.c maint.c mdebugread.c mem-break.c memattr.c minsyms.c \
- objfiles.c parse.c printcmd.c regcache.c remote.c \
- remote-utils.c signals.c source.c stabsread.c stack.c symfile.c \
- symmisc.c symtab.c target.c thread.c top.c tracepoint.c \
- typeprint.c ui-file.c ui-out.c utils.c valarith.c valops.c \
- varobj.c valprint.c values.c wrapper.c \
- cli-cmds.c cli-cmds.h cli-decode.c cli-decode.h cli-out.c \
- cli-script.c cli-script.h cli-setshow.c cli-setshow.h \
- cli-utils.c cli-utils.h \
- mi-cmd-break.c mi-cmd-disas.c mi-cmd-stack.c mi-cmd-var.c \
- mi-cmds.c mi-console.c mi-getopt.c mi-main.c mi-out.c mi-parse.c\
- serial.c ser-unix.c ser-tcp.c \
- c-exp.y c-lang.c c-typeprint.c c-valprint.c \
- ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c \
- cp-abi.c gnu-v2-abi.c gnu-v3-abi.c cp-valprint.c demangle.c \
- f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
- jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c nlmread.c \
- m2-lang.c m2-exp.y m2-typeprint.c m2-valprint.c \
- scm-exp.c scm-lang.c scm-valprint.c \
- coffread.c dbxread.c dwarfread.c dwarf2read.c elfread.c \
- solib.c solib-svr4.c solib-legacy.c
-XSRCS+= freebsd-uthread.c kvm-fbsd.c kvm-fbsd-machine.h solib-fbsd-kld.c
-SRCS= init.c ${XSRCS} nm.h tm.h xm.h gdbversion.c xregex.h
-
-.include "${.CURDIR}/Makefile.${TARGET_ARCH}"
-
-WARNS?= 0
-.if ${TARGET_ARCH} != ${MACHINE_ARCH}
-CFLAGS+= -DCROSS_COMPILE=1
-.endif
-CFLAGS+= -DDEFAULT_BFD_ARCH=bfd_${GDB_CPU}_arch
-CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH}
-CFLAGS+= -I${SRCDIR}/binutils -I${SRCDIR}/bfd
-CFLAGS+= -I${GDBDIR}/gdb -I${GDBDIR}/gdb/config
-CFLAGS+= -I$(.CURDIR)
-
-YFLAGS=
-
-DPADD= ${LIBKVM} ${LIBM}
-DPADD+= ${RELTOP}/libbfd/libbfd.a ${RELTOP}/libopcodes/libopcodes.a
-DPADD+= ${LIBGNUREGEX}
-DPADD+= ${RELTOP}/libiberty/libiberty.a
-DPADD+= ${LIBREADLINE} ${LIBTERMCAP}
-LDADD= -lkvm -lm
-LDADD+= ${RELTOP}/libbfd/libbfd.a ${RELTOP}/libopcodes/libopcodes.a
-LDADD+= -lgnuregex
-LDADD+= ${RELTOP}/libiberty/libiberty.a
-LDADD+= -lreadline -ltermcap
-
-CLEANFILES= init.c init.c-tmp nm.h tm.h xm.h gdbversion.c xregex.h kvm-fbsd-machine.h
-
-# We do this by grepping through sources. If that turns out to be too slow,
-# maybe we could just require every .o file to have an initialization routine
-# of a given name (remote-udi.o -> _initialize_remote_udi, etc.).
-#
-# Formatting conventions: The name of the _initialize_* routines must start
-# in column zero, and must not be inside #if.
-#
-# Note that the set of files with init functions might change, or the names
-# of the functions might change, so this files needs to depend on all the
-# object files that will be linked into gdb.
-
-init.c: ${XSRCS}
- @${ECHO} Making ${.TARGET}
- @rm -f init.c-tmp
- @echo '/* Do not modify this file. */' >init.c-tmp
- @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
- @echo '#include "defs.h"' >>init.c-tmp
- @echo '#include "call-cmds.h"' >>init.c-tmp
- @echo 'void initialize_all_files () {' >>init.c-tmp
- @for i in ${.ALLSRC} ; do \
- filename=`echo $$i | sed \
- -e '/^Onindy.c/d' \
- -e '/^nindy.c/d' \
- -e '/ttyflush.c/d' \
- -e '/xdr_ld.c/d' \
- -e '/xdr_ptrace.c/d' \
- -e '/xdr_rdb.c/d' \
- -e '/udr.c/d' \
- -e '/udip2soc.c/d' \
- -e '/udi2go32.c/d' \
- -e '/version.c/d' \
- -e '/^[a-z0-9A-Z_]*_[SU].c/d' \
- -e '/[a-z0-9A-Z_]*-exp.tab.c/d'` ; \
- case $$filename in \
- "") ;; \
- *) sed <$$filename >>init.c-tmp -n \
- -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p' ; ;; \
- esac ; \
- done
- @echo '}' >>init.c-tmp
- @mv init.c-tmp ${.TARGET}
-
-.PRECIOUS: init.c
-
-tm.h:
- echo '#include "${GDB_CPU}/tm-fbsd.h"' > ${.TARGET}
-.if exists(${.CURDIR}/fbsd-kgdb-${TARGET_CPUARCH}.h)
- echo '#include "fbsd-kgdb-${TARGET_CPUARCH}.h"' >> ${.TARGET}
-.endif
-
-.for H in nm-fbsd xm-${GDB_CPU}
-${H:C/-.*$//}.h:
- ln -sf ${GDBDIR}/gdb/config/${GDB_CPU}/${H}.h ${.TARGET}
-.endfor
-
-kvm-fbsd-machine.h:
- ln -sf ${.CURDIR}/kvm-fbsd-${TARGET_CPUARCH}.h ${.TARGET}
-
-GDB_VERSION= "5.2.1 (FreeBSD)"
-gdbversion.c: Makefile
- @echo '#include "version.h"' > ${.TARGET}
- @echo 'const char version[] = ${GDB_VERSION};' >>${.TARGET}
- @echo 'const char host_name[] = "${MACHINE_ARCH}-undermydesk-freebsd";' >>${.TARGET}
- @echo 'const char target_name[] = "${TARGET_ARCH}-undermydesk-freebsd";' >>${.TARGET}
-
-xregex.h:
- @echo '#include <gnu/regex.h>' >${.TARGET}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.arm b/gnu/usr.bin/binutils/gdb/Makefile.arm
deleted file mode 100644
index 3a8bcff9b135e..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile.arm
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-XSRCS+= armnbsd-nat.c armnbsd-tdep.c arm-tdep.c \
- core-regset.c
-CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf32_arm_vec
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.i386 b/gnu/usr.bin/binutils/gdb/Makefile.i386
deleted file mode 100644
index 14e7a3fe78564..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile.i386
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-XSRCS+= i386fbsd-nat.c i386bsd-tdep.c i386bsd-nat.c i386-nat.c i386-tdep.c \
- i387-nat.c i387-tdep.c \
- core-regset.c core-aout.c
-
-CFLAGS+= -Dprint_insn_i386=print_insn_i386_att
-CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf32_i386_freebsd_vec
-CFLAGS+= -DGDB_XM_FILE
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.ia64 b/gnu/usr.bin/binutils/gdb/Makefile.ia64
deleted file mode 100644
index 08283c7344b09..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile.ia64
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-XSRCS+= ia64-tdep.c ia64-fbsd-nat.c \
- core-regset.c
-CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_ia64_vec
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.powerpc b/gnu/usr.bin/binutils/gdb/Makefile.powerpc
deleted file mode 100644
index b5f9778667a39..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile.powerpc
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-XSRCS+= ppcnbsd-nat.c ppc-tdep.c \
- core-regset.c
-CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf32_powerpc_vec
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.powerpc64 b/gnu/usr.bin/binutils/gdb/Makefile.powerpc64
deleted file mode 100644
index 4cea11345a120..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile.powerpc64
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-XSRCS+= ppcnbsd-nat.c ppc-tdep.c \
- core-regset.c
-CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_powerpc_vec
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.sparc64 b/gnu/usr.bin/binutils/gdb/Makefile.sparc64
deleted file mode 100644
index 5eb0f2ec7dfe1..0000000000000
--- a/gnu/usr.bin/binutils/gdb/Makefile.sparc64
+++ /dev/null
@@ -1,4 +0,0 @@
-# $FreeBSD$
-
-XSRCS+= sparc-nat.c sparc-tdep.c
-CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_sparc_vec
diff --git a/gnu/usr.bin/binutils/gdb/config.h b/gnu/usr.bin/binutils/gdb/config.h
deleted file mode 100644
index a5731261b088f..0000000000000
--- a/gnu/usr.bin/binutils/gdb/config.h
+++ /dev/null
@@ -1,505 +0,0 @@
-/* $FreeBSD$ */
-
-/* config.h. Generated automatically by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-/* #undef _ALL_SOURCE */
-#endif
-
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
-
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define if the `long double' type works. */
-#define HAVE_LONG_DOUBLE 1
-
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define if you have <vfork.h>. */
-/* #undef HAVE_VFORK_H */
-
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
-
-/* Define as the return type of signal handlers (int or void). */
-#define RETSIGTYPE void
-
-/* Define if the `setpgrp' function takes no argument. */
-/* #undef SETPGRP_VOID */
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
-
-/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-/* #undef STAT_MACROS_BROKEN */
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define vfork as fork if vfork does not work. */
-/* #undef vfork */
-
-/* Define if compiling on Solaris 7. */
-/* #undef _MSE_INT_H */
-
-/* Define if your struct reg has r_fs. */
-#define HAVE_STRUCT_REG_R_FS 1
-
-/* Define if your struct reg has r_gs. */
-#define HAVE_STRUCT_REG_R_GS 1
-
-/* Define if <link.h> exists and defines struct link_map which has
- members with an ``l_'' prefix. (For Solaris, SVR4, and
- SVR4-like systems.) */
-#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
-
-/* Define if <link.h> exists and defines struct link_map which has
- members with an ``lm_'' prefix. (For SunOS.) */
-/* #undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */
-
-/* Define if <link.h> exists and defines a struct so_map which has
- members with an ``som_'' prefix. (Found on older *BSD systems.) */
-/* #undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */
-
-/* Define if <sys/link.h> has struct link_map32 */
-/* #undef HAVE_STRUCT_LINK_MAP32 */
-
-/* Define if the prfpregset_t type is broken. */
-/* #undef PRFPREGSET_T_BROKEN */
-
-/* Define if you want to use new multi-fd /proc interface
- (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
-/* #undef NEW_PROC_API */
-
-/* Define if ioctl argument PIOCSET is available. */
-/* #undef HAVE_PROCFS_PIOCSET */
-
-/* Define if the `long long' type works. */
-#define CC_HAS_LONG_LONG 1
-
-/* Define if the "ll" format works to print long long ints. */
-#define PRINTF_HAS_LONG_LONG 1
-
-/* Define if the "%Lg" format works to print long doubles. */
-#define PRINTF_HAS_LONG_DOUBLE 1
-
-/* Define if the "%Lg" format works to scan long doubles. */
-#define SCANF_HAS_LONG_DOUBLE 1
-
-/* Define if using Solaris thread debugging. */
-/* #undef HAVE_THREAD_DB_LIB */
-
-/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */
-/* #undef START_INFERIOR_TRAPS_EXPECTED */
-/* #undef sys_quotactl */
-
-/* Define if you have HPUX threads */
-/* #undef HAVE_HPUX_THREAD_SUPPORT */
-
-/* Define if you want to use the memory mapped malloc package (mmalloc). */
-/* #undef USE_MMALLOC */
-
-/* Define if the runtime uses a routine from mmalloc before gdb has a chance
- to initialize mmalloc, and we want to force checking to be used anyway.
- This may cause spurious memory corruption messages if the runtime tries
- to explicitly deallocate that memory when gdb calls exit. */
-/* #undef MMCHECK_FORCE */
-
-/* Define if <proc_service.h> on solaris uses int instead of
- size_t, and assorted other type changes. */
-/* #undef PROC_SERVICE_IS_OLD */
-
-/* If you want to specify a default CPU variant, define this to be its
- name, as a C string. */
-/* #undef TARGET_CPU_DEFAULT */
-
-/* Define if the simulator is being linked in. */
-/* #undef WITH_SIM */
-
-/* Set to true if the save_state_t structure is present */
-/* #undef HAVE_STRUCT_SAVE_STATE_T */
-
-/* Set to true if the save_state_t structure has the ss_wide member */
-/* #undef HAVE_STRUCT_MEMBER_SS_WIDE */
-
-/* Define if <sys/ptrace.h> defines the PTRACE_GETREGS request. */
-/* #undef HAVE_PTRACE_GETREGS */
-
-/* Define if <sys/ptrace.h> defines the PTRACE_GETFPXREGS request. */
-/* #undef HAVE_PTRACE_GETFPXREGS */
-
-/* Define if <sys/ptrace.h> defines the PT_GETDBREGS request. */
-#define HAVE_PT_GETDBREGS 1
-
-/* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request. */
-/* #undef HAVE_PT_GETXMMREGS */
-
-/* Define if gnu-regex.c included with GDB should be used. */
-#define USE_INCLUDED_REGEX 1
-
-/* BFD's default architecture. */
-/* #define DEFAULT_BFD_ARCH bfd_alpha_arch */
-
-/* BFD's default target vector. */
-/* #define DEFAULT_BFD_VEC bfd_elf64_alpha_vec */
-
-/* Multi-arch enabled. */
-/* #undef GDB_MULTI_ARCH */
-
-/* hostfile */
-/* #define GDB_XM_FILE 1 */
-
-/* targetfile */
-#define GDB_TM_FILE 1
-
-/* nativefile */
-#define GDB_NM_FILE 1
-
-/* Define if you have the __argz_count function. */
-/* #undef HAVE___ARGZ_COUNT */
-
-/* Define if you have the __argz_next function. */
-/* #undef HAVE___ARGZ_NEXT */
-
-/* Define if you have the __argz_stringify function. */
-/* #undef HAVE___ARGZ_STRINGIFY */
-
-/* Define if you have the bcopy function. */
-#define HAVE_BCOPY 1
-
-/* Define if you have the btowc function. */
-/* #undef HAVE_BTOWC */
-
-/* Define if you have the bzero function. */
-#define HAVE_BZERO 1
-
-/* Define if you have the canonicalize_file_name function. */
-/* #undef HAVE_CANONICALIZE_FILE_NAME */
-
-/* Define if you have the dcgettext function. */
-/* #undef HAVE_DCGETTEXT */
-
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
-
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the isascii function. */
-#define HAVE_ISASCII 1
-
-/* Define if you have the munmap function. */
-#define HAVE_MUNMAP 1
-
-/* Define if you have the poll function. */
-#define HAVE_POLL 1
-
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
-
-/* Define if you have the realpath function. */
-#define HAVE_REALPATH 1
-
-/* Define if you have the sbrk function. */
-#define HAVE_SBRK 1
-
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
-
-/* Define if you have the setpgid function. */
-#define HAVE_SETPGID 1
-
-/* Define if you have the setpgrp function. */
-#define HAVE_SETPGRP 1
-
-/* Define if you have the sigaction function. */
-#define HAVE_SIGACTION 1
-
-/* Define if you have the sigprocmask function. */
-#define HAVE_SIGPROCMASK 1
-
-/* Define if you have the sigsetmask function. */
-#define HAVE_SIGSETMASK 1
-
-/* Define if you have the socketpair function. */
-#define HAVE_SOCKETPAIR 1
-
-/* Define if you have the stpcpy function. */
-#define HAVE_STPCPY 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define if you have the <asm/debugreg.h> header file. */
-/* #undef HAVE_ASM_DEBUGREG_H */
-
-/* Define if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
-/* Define if you have the <curses.h> header file. */
-#define HAVE_CURSES_H 1
-
-/* Define if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <link.h> header file. */
-#define HAVE_LINK_H 1
-
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the <malloc.h> header file. */
-/* #undef HAVE_MALLOC_H */
-
-/* Define if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if you have the <ncurses.h> header file. */
-#define HAVE_NCURSES_H 1
-
-/* Define if you have the <ndir.h> header file. */
-/* #undef HAVE_NDIR_H */
-
-/* Define if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
-
-/* Define if you have the <nlist.h> header file. */
-#define HAVE_NLIST_H 1
-
-/* Define if you have the <objlist.h> header file. */
-/* #undef HAVE_OBJLIST_H */
-
-/* Define if you have the <poll.h> header file. */
-#define HAVE_POLL_H 1
-
-/* Define if you have the <proc_service.h> header file. */
-/* #undef HAVE_PROC_SERVICE_H */
-
-/* Define if you have the <ptrace.h> header file. */
-/* #undef HAVE_PTRACE_H */
-
-/* Define if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H 1
-
-/* Define if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <sys/debugreg.h> header file. */
-/* #undef HAVE_SYS_DEBUGREG_H */
-
-/* Define if you have the <sys/dir.h> header file. */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define if you have the <sys/fault.h> header file. */
-/* #undef HAVE_SYS_FAULT_H */
-
-/* Define if you have the <sys/file.h> header file. */
-#define HAVE_SYS_FILE_H 1
-
-/* Define if you have the <sys/filio.h> header file. */
-#define HAVE_SYS_FILIO_H 1
-
-/* Define if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define if you have the <sys/ndir.h> header file. */
-/* #undef HAVE_SYS_NDIR_H */
-
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define if you have the <sys/poll.h> header file. */
-#define HAVE_SYS_POLL_H 1
-
-/* Define if you have the <sys/procfs.h> header file. */
-#define HAVE_SYS_PROCFS_H 1
-
-/* Define if you have the <sys/ptrace.h> header file. */
-#define HAVE_SYS_PTRACE_H 1
-
-/* Define if you have the <sys/reg.h> header file. */
-/* #undef HAVE_SYS_REG_H */
-
-/* Define if you have the <sys/select.h> header file. */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define if you have the <sys/syscall.h> header file. */
-#define HAVE_SYS_SYSCALL_H 1
-
-/* Define if you have the <sys/user.h> header file. */
-#define HAVE_SYS_USER_H 1
-
-/* Define if you have the <sys/wait.h> header file. */
-#define HAVE_SYS_WAIT_H 1
-
-/* Define if you have the <term.h> header file. */
-#define HAVE_TERM_H 1
-
-/* Define if you have the <termio.h> header file. */
-/* #undef HAVE_TERMIO_H */
-
-/* Define if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H 1
-
-/* Define if you have the <thread_db.h> header file. */
-/* #undef HAVE_THREAD_DB_H */
-
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the <values.h> header file. */
-/* #undef HAVE_VALUES_H */
-
-/* Define if you have the <wait.h> header file. */
-/* #undef HAVE_WAIT_H */
-
-/* Define if you have the <wchar.h> header file. */
-#define HAVE_WCHAR_H 1
-
-/* Define if you have the <wctype.h> header file. */
-#define HAVE_WCTYPE_H 1
-
-/* Define if you have the dl library (-ldl). */
-/* #undef HAVE_LIBDL */
-
-/* Define if you have the m library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define if you have the socket library (-lsocket). */
-/* #undef HAVE_LIBSOCKET */
-
-/* Define if you have the w library (-lw). */
-/* #undef HAVE_LIBW */
-
-/* Define if you have the stpcpy function */
-#define HAVE_STPCPY 1
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
-
-/* Define to 1 if NLS is requested */
-/* #define ENABLE_NLS 1 */
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-/* #undef HAVE_GETTEXT */
-
-/* Define if sigsetjmp is available. */
-#define HAVE_SIGSETJMP 1
-
-/* Define if malloc is not declared in system header files. */
-/* #undef NEED_DECLARATION_MALLOC */
-
-/* Define if realloc is not declared in system header files. */
-/* #undef NEED_DECLARATION_REALLOC */
-
-/* Define if free is not declared in system header files. */
-/* #undef NEED_DECLARATION_FREE */
-
-/* Define if strerror is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRERROR */
-
-/* Define if strdup is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRDUP */
-
-/* Define if strstr is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRSTR */
-
-/* Define if <sys/procfs.h> has pstatus_t. */
-/* #undef HAVE_PSTATUS_T */
-
-/* Define if <sys/procfs.h> has prrun_t. */
-/* #undef HAVE_PRRUN_T */
-
-/* Define if <sys/procfs.h> has gregset_t. */
-#ifndef CROSS_COMPILE
-#define HAVE_GREGSET_T 1
-#endif
-
-/* Define if <sys/procfs.h> has fpregset_t. */
-#define HAVE_FPREGSET_T 1
-
-/* Define if <sys/procfs.h> has prgregset_t. */
-/* #undef HAVE_PRGREGSET_T */
-
-/* Define if <sys/procfs.h> has prfpregset_t. */
-#define HAVE_PRFPREGSET_T 1
-
-/* Define if <sys/procfs.h> has prgregset32_t. */
-/* #undef HAVE_PRGREGSET32_T */
-
-/* Define if <sys/procfs.h> has prfpregset32_t. */
-/* #undef HAVE_PRFPREGSET32_T */
-
-/* Define if <sys/procfs.h> has lwpid_t. */
-/* #undef HAVE_LWPID_T */
-
-/* Define if <sys/procfs.h> has psaddr_t. */
-/* #undef HAVE_PSADDR_T */
-
-/* Define if <sys/procfs.h> has prsysent_t. */
-/* #undef HAVE_PRSYSENT_T */
-
-/* Define if <sys/procfs.h> has pr_sigset_t. */
-/* #undef HAVE_PR_SIGSET_T */
-
-/* Define if <sys/procfs.h> has pr_sigaction64_t. */
-/* #undef HAVE_PR_SIGACTION64_T */
-
-/* Define if <sys/procfs.h> has pr_siginfo64_t. */
-/* #undef HAVE_PR_SIGINFO64_T */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h
deleted file mode 100644
index 6b5cf20a8527d..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_ALPHA_H
-#define FBSD_KGDB_ALPHA_H
-
-#include "alpha/tm-fbsd.h"
-#include "fbsd-kgdb.h"
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(FRAME) \
- (kernel_debugging ? fbsd_kern_frame_saved_pc(FRAME) : \
- alpha_saved_pc_after_call(FRAME))
-
-#endif /* FBSD_KGDB_ALPHA_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-amd64.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-amd64.h
deleted file mode 100644
index ee62200abb770..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-amd64.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_AMD64_H
-#define FBSD_KGDB_AMD64_H
-
-#include "fbsd-kgdb.h"
-
-#endif /* FBSD_KGDB_AMD64_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h
deleted file mode 100644
index 5896125f03c8b..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_ARM_H
-#define FBSD_KGDB_ARM_H
-
-#include "fbsd-kgdb.h"
-
-#endif /* FBSD_KGDB_ARM_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h
deleted file mode 100644
index 3196316d83b91..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_I386_H
-#define FBSD_KGDB_I386_H
-
-#include "i386/tm-fbsd.h"
-#include "fbsd-kgdb.h"
-
-/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(FRAME) \
- (kernel_debugging \
- ? fbsd_kern_frame_saved_pc (FRAME) \
- : i386bsd_frame_saved_pc (FRAME))
-extern CORE_ADDR fbsd_kern_frame_saved_pc(struct frame_info *fr);
-
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-/* DEO:XXX where is this really from??? */
-#define SIGCONTEXT_PC_OFFSET 20
-
-#endif /* FBSD_KGDB_I386_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h
deleted file mode 100644
index 8f198fdfa1b3f..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_IA64_H
-#define FBSD_KGDB_IA64_H
-
-#include "fbsd-kgdb.h"
-
-#endif /* FBSD_KGDB_IA64_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h
deleted file mode 100644
index c6821e109e55e..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_POWERPC_H
-#define FBSD_KGDB_POWERPC_H
-
-#include "fbsd-kgdb.h"
-
-#endif /* FBSD_KGDB_POWERPC_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h
deleted file mode 100644
index 56fd480deffab..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef FBSD_KGDB_SPARC64_H
-#define FBSD_KGDB_SPARC64_H
-
-#include "sparc/tm-fbsd.h"
-#include "fbsd-kgdb.h"
-
-#endif /* FBSD_KGDB_SPARC64_H */
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb.h
deleted file mode 100644
index e7744363106f5..0000000000000
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Native-kernel debugging definitions for FreeBSD.
- * $FreeBSD$
- */
-
-#ifndef FBSD_KGDB_H
-#define FBSD_KGDB_H
-
-extern int kernel_debugging;
-extern int kernel_writablecore;
-extern struct target_so_ops kgdb_so_ops;
-
-#define ADDITIONAL_OPTIONS \
- {"kernel", no_argument, &kernel_debugging, 1}, \
- {"k", no_argument, &kernel_debugging, 1}, \
- {"wcore", no_argument, &kernel_writablecore, 1}, \
- {"w", no_argument, &kernel_writablecore, 1},
-
-#define ADDITIONAL_OPTION_HELP \
- "\
- --kernel Enable kernel debugging.\n\
- --wcore Make core file writable (only works for /dev/mem).\n\
- This option only works while debugging a kernel !!\n\
-"
-
-#define DEFAULT_PROMPT kernel_debugging?"(kgdb) ":"(gdb) "
-
-/* misuse START_PROGRESS to test whether we're running as kgdb */
-/* START_PROGRESS is called at the top of main */
-#undef START_PROGRESS
-#define START_PROGRESS(STR,N) \
- if (!strcmp (STR, "kgdb")) \
- kernel_debugging = 1;
-
-#endif /* FBSD_KGDB_H */
diff --git a/gnu/usr.bin/binutils/gdb/freebsd-uthread.c b/gnu/usr.bin/binutils/gdb/freebsd-uthread.c
deleted file mode 100644
index 0974c3ee04fc6..0000000000000
--- a/gnu/usr.bin/binutils/gdb/freebsd-uthread.c
+++ /dev/null
@@ -1,889 +0,0 @@
-/* Low level interface for debugging FreeBSD user threads for GDB, the GNU debugger.
- Copyright 1996, 1999 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* $FreeBSD$ */
-
-/* This module implements a sort of half target that sits between the
- machine-independent parts of GDB and the ptrace interface (infptrace.c) to
- provide access to the FreeBSD user-mode thread implementation.
-
- FreeBSD threads are true user-mode threads, which are invoked via
- the pthread_* interfaces. These are mostly implemented in
- user-space, with all thread context kept in various structures that
- live in the user's heap. For the most part, the kernel has no
- knowlege of these threads.
-
- Based largely on hpux-thread.c
-
- */
-
-
-#include "defs.h"
-#include <sys/queue.h>
-#include <signal.h>
-#include <setjmp.h>
-#include "gdbthread.h"
-#include "target.h"
-#include "inferior.h"
-#include <fcntl.h>
-#include <ucontext.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include "gdbcore.h"
-
-extern int child_suppress_run;
-extern struct target_ops child_ops; /* target vector for inftarg.c */
-
-extern void _initialize_freebsd_uthread PARAMS ((void));
-
-/* Set to true while we are part-way through attaching */
-static int freebsd_uthread_attaching;
-
-static int freebsd_uthread_active = 0;
-static CORE_ADDR P_thread_list;
-static CORE_ADDR P_thread_run;
-
-/* Pointer to the next function on the objfile event chain. */
-static void (*target_new_objfile_chain) (struct objfile *objfile);
-
-static void freebsd_uthread_resume PARAMS ((ptid_t pid, int step,
- enum target_signal signo));
-
-static void init_freebsd_uthread_ops PARAMS ((void));
-
-static struct target_ops freebsd_uthread_ops;
-
-static ptid_t find_active_ptid PARAMS ((void));
-
-struct cached_pthread {
- u_int64_t uniqueid;
- int state;
- CORE_ADDR name;
- union {
- ucontext_t uc;
- jmp_buf jb;
- } ctx;
-};
-
-static ptid_t cached_ptid;
-static struct cached_pthread cached_pthread;
-static CORE_ADDR cached_pthread_addr;
-
-LIST_HEAD(idmaplist, idmap);
-
-struct idmap {
- LIST_ENTRY(idmap) link;
- u_int64_t uniqueid;
- int tid;
-};
-
-#define MAPHASH_SIZE 257
-#define TID_MIN 1
-#define TID_MAX 16383
-
-static int tid_to_hash[TID_MAX + 1]; /* set to map_hash index */
-static struct idmaplist map_hash[MAPHASH_SIZE];
-static int next_free_tid = TID_MIN; /* first available tid */
-static int last_free_tid = TID_MIN; /* first unavailable */
-
-static CORE_ADDR P_thread_next_offset;
-static CORE_ADDR P_thread_uniqueid_offset;
-static CORE_ADDR P_thread_state_offset;
-static CORE_ADDR P_thread_name_offset;
-static CORE_ADDR P_thread_ctx_offset;
-static CORE_ADDR P_thread_PS_RUNNING_value;
-static CORE_ADDR P_thread_PS_DEAD_value;
-
-static int next_offset;
-static int uniqueid_offset;
-static int state_offset;
-static int name_offset;
-static int ctx_offset;
-static int PS_RUNNING_value;
-static int PS_DEAD_value;
-
-#define UNIQUEID_HASH(id) (id % MAPHASH_SIZE)
-#define TID_ADD1(tid) (((tid) + 1) == TID_MAX + 1 \
- ? TID_MIN : (tid) + 1)
-#define IS_TID_FREE(tid) (tid_to_hash[tid] == -1)
-
-static int
-get_new_tid(int h)
-{
- int tid = next_free_tid;
-
- tid_to_hash[tid] = h;
- next_free_tid = TID_ADD1(next_free_tid);
- if (next_free_tid == last_free_tid)
- {
- int i;
-
- for (i = last_free_tid; TID_ADD1(i) != last_free_tid; i = TID_ADD1(i))
- if (IS_TID_FREE(i))
- break;
- if (TID_ADD1(i) == last_free_tid)
- {
- error("too many threads");
- return 0;
- }
- next_free_tid = i;
- for (i = TID_ADD1(i); IS_TID_FREE(i); i = TID_ADD1(i))
- ;
- last_free_tid = i;
- }
-
- return tid;
-}
-
-static ptid_t
-find_ptid(u_int64_t uniqueid)
-{
- int h = UNIQUEID_HASH(uniqueid);
- struct idmap *im;
-
- LIST_FOREACH(im, &map_hash[h], link)
- if (im->uniqueid == uniqueid)
- return MERGEPID(PIDGET(inferior_ptid), im->tid);
-
- im = xmalloc(sizeof(struct idmap));
- im->uniqueid = uniqueid;
- im->tid = get_new_tid(h);
- LIST_INSERT_HEAD(&map_hash[h], im, link);
-
- return MERGEPID(PIDGET(inferior_ptid), im->tid);
-}
-
-static void
-free_ptid(ptid_t ptid)
-{
- int tid = TIDGET(ptid);
- int h = tid_to_hash[tid];
- struct idmap *im;
-
- if (!tid) return;
-
- LIST_FOREACH(im, &map_hash[h], link)
- if (im->tid == tid)
- break;
-
- if (!im) return;
-
- LIST_REMOVE(im, link);
- tid_to_hash[tid] = -1;
- free(im);
-}
-
-#define READ_OFFSET(field) read_memory(P_thread_##field##_offset, \
- (char *) &field##_offset, \
- sizeof(field##_offset))
-
-#define READ_VALUE(name) read_memory(P_thread_##name##_value, \
- (char *) &name##_value, \
- sizeof(name##_value))
-
-static void
-read_thread_offsets (void)
-{
- READ_OFFSET(next);
- READ_OFFSET(uniqueid);
- READ_OFFSET(state);
- READ_OFFSET(name);
- READ_OFFSET(ctx);
-
- READ_VALUE(PS_RUNNING);
- READ_VALUE(PS_DEAD);
-}
-
-#define READ_FIELD(ptr, T, field, result) \
- read_memory ((ptr) + field##_offset, (char *) &(result), sizeof result)
-
-static u_int64_t
-read_pthread_uniqueid (CORE_ADDR ptr)
-{
- u_int64_t uniqueid;
- READ_FIELD(ptr, u_int64_t, uniqueid, uniqueid);
- return uniqueid;
-}
-
-static CORE_ADDR
-read_pthread_next (CORE_ADDR ptr)
-{
- CORE_ADDR next;
- READ_FIELD(ptr, CORE_ADDR, next, next);
- return next;
-}
-
-static void
-read_cached_pthread (CORE_ADDR ptr, struct cached_pthread *cache)
-{
- READ_FIELD(ptr, u_int64_t, uniqueid, cache->uniqueid);
- READ_FIELD(ptr, int, state, cache->state);
- READ_FIELD(ptr, CORE_ADDR, name, cache->name);
- READ_FIELD(ptr, ucontext_t, ctx, cache->ctx);
-}
-
-static ptid_t
-find_active_ptid (void)
-{
- CORE_ADDR ptr;
-
- read_memory ((CORE_ADDR)P_thread_run,
- (char *)&ptr,
- sizeof ptr);
-
- return find_ptid(read_pthread_uniqueid(ptr));
-}
-
-static CORE_ADDR find_pthread_addr PARAMS ((ptid_t ptid));
-static struct cached_pthread * find_pthread PARAMS ((ptid_t ptid));
-
-static CORE_ADDR
-find_pthread_addr (ptid_t ptid)
-{
- CORE_ADDR ptr;
-
- if (ptid_equal(ptid, cached_ptid))
- return cached_pthread_addr;
-
- read_memory ((CORE_ADDR)P_thread_list,
- (char *)&ptr,
- sizeof ptr);
-
- while (ptr != 0)
- {
- if (ptid_equal(find_ptid(read_pthread_uniqueid(ptr)), ptid))
- {
- cached_ptid = ptid;
- cached_pthread_addr = ptr;
- read_cached_pthread(ptr, &cached_pthread);
- return ptr;
- }
- ptr = read_pthread_next(ptr);
- }
-
- return NULL;
-}
-
-static struct cached_pthread *
-find_pthread (ptid_t ptid)
-{
- CORE_ADDR ptr;
-
- if (ptid_equal(ptid, cached_ptid))
- return &cached_pthread;
-
- read_memory ((CORE_ADDR)P_thread_list,
- (char *)&ptr,
- sizeof ptr);
-
- while (ptr != 0)
- {
- if (ptid_equal(find_ptid(read_pthread_uniqueid(ptr)), ptid))
- {
- cached_ptid = ptid;
- cached_pthread_addr = ptr;
- read_cached_pthread(ptr, &cached_pthread);
- return &cached_pthread;
- }
- ptr = read_pthread_next(ptr);
- }
-
-#if 0
- error ("Can't find pthread %d,%d", PIDGET(ptid), TIDGET(ptid));
-#endif
- return NULL;
-}
-
-
-/* Most target vector functions from here on actually just pass through to
- inftarg.c, as they don't need to do anything specific for threads. */
-
-/* ARGSUSED */
-static void
-freebsd_uthread_open (char *arg, int from_tty)
-{
- child_ops.to_open (arg, from_tty);
-}
-
-/* Attach to process PID, then initialize for debugging it
- and wait for the trace-trap that results from attaching. */
-
-static void
-freebsd_uthread_attach (char *args, int from_tty)
-{
- child_ops.to_attach (args, from_tty);
- push_target (&freebsd_uthread_ops);
- freebsd_uthread_attaching = 1;
-}
-
-/* After an attach, see if the target is threaded */
-
-static void
-freebsd_uthread_post_attach (int pid)
-{
- if (freebsd_uthread_active)
- {
- read_thread_offsets ();
- inferior_ptid = find_active_ptid ();
- add_thread (inferior_ptid);
- }
- else
- {
- unpush_target (&freebsd_uthread_ops);
- push_target (&child_ops);
- }
-
- freebsd_uthread_attaching = 0;
-}
-
-/* Take a program previously attached to and detaches it.
- The program resumes execution and will no longer stop
- on signals, etc. We'd better not have left any breakpoints
- in the program or it'll die when it hits one. For this
- to work, it may be necessary for the process to have been
- previously attached. It *might* work if the program was
- started via the normal ptrace (PTRACE_TRACEME). */
-
-static void
-freebsd_uthread_detach (char *args, int from_tty)
-{
- child_ops.to_detach (args, from_tty);
-}
-
-/* Resume execution of process PID. If STEP is nozero, then
- just single step it. If SIGNAL is nonzero, restart it with that
- signal activated. We may have to convert pid from a thread-id to an LWP id
- for procfs. */
-
-static void
-freebsd_uthread_resume (ptid_t ptid, int step, enum target_signal signo)
-{
- if (freebsd_uthread_attaching)
- {
- child_ops.to_resume (ptid, step, signo);
- return;
- }
-
- child_ops.to_resume (ptid, step, signo);
- cached_ptid = MERGEPID(0, 0);
-}
-
-/* Wait for any threads to stop. We may have to convert PID from a thread id
- to a LWP id, and vice versa on the way out. */
-
-static ptid_t
-freebsd_uthread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
-{
- ptid_t rtnval;
-
- if (freebsd_uthread_attaching)
- {
- return child_ops.to_wait (ptid, ourstatus);
- }
-
- rtnval = child_ops.to_wait (ptid, ourstatus);
-
- if (PIDGET(rtnval) >= 0)
- {
- rtnval = find_active_ptid ();
- if (!in_thread_list (rtnval))
- add_thread (rtnval);
- }
-
- return rtnval;
-}
-
-/* XXX: this needs to be selected by target, not [build] host */
-#ifdef __i386__
-
-static char jmpmap[MAX_NUM_REGS] = /* map reg to jmp_buf */
-{
- 6, /* eax */
- -1, /* ecx */
- -1, /* edx */
- 1, /* ebx */
- 2, /* esp */
- 3, /* ebp */
- 4, /* esi */
- 5, /* edi */
- 0, /* eip */
- -1, /* eflags */
- -1, /* cs */
- -1, /* ss */
- -1, /* ds */
- -1, /* es */
- -1, /* fs */
- -1, /* gs */
- -1, -1, -1, -1, -1, -1, -1, /* st0-st7 */
- -1, -1, -1, -1, -1, -1, -1, /* fctrl-fop */
- -1, -1, -1, -1, -1, -1, -1, /* xmm0-xmm7 */
- -1, /* mxcsr */
-};
-
-#endif
-
-#ifdef __alpha__
-
-static char jmpmap[NUM_REGS] = {
- 4, 5, 6, 7, 8, 9, 10, 11, /* v0 - t6 */
- 12, 13, 14, 15, 16, 17, 18, 19, /* t7 - fp */
- 20, 21, 22, 23, 24, 25, 26, 27, /* a0 - t9 */
- 28, 29, 30, 31, 32, 33, 34, 35, /* t10 - zero */
- 37, 38, 39, 40, 41, 42, 43, 44, /* f0 - f7 */
- 45, 46, 47, 48, 49, 50, 51, 52, /* f8 - f15 */
- 53, 54, 55, 56, 57, 58, 59, 60, /* f16 - f23 */
- 61, 62, 63, 64, 65, 66, 67, 68, /* f24 - f31 */
- 2, -1, /* pc, vfp */
-};
-
-#endif
-
-#ifdef __sparc64__
-
-static char jmpmap[125] = {
- -1
-};
-
-#endif
-
-static void
-freebsd_uthread_fetch_registers (int regno)
-{
- struct cached_pthread *thread;
- int active;
- int first_regno, last_regno;
- register_t *regbase;
- char *regmap;
-
- if (freebsd_uthread_attaching || TIDGET(inferior_ptid) == 0)
- {
- child_ops.to_fetch_registers (regno);
- return;
- }
-
- thread = find_pthread (inferior_ptid);
- active = (ptid_equal(inferior_ptid, find_active_ptid()));
-
- if (active)
- {
- child_ops.to_fetch_registers (regno);
- return;
- }
-
- if (regno == -1)
- {
- first_regno = 0;
- last_regno = NUM_REGS - 1;
- }
- else
- {
- first_regno = regno;
- last_regno = regno;
- }
-
- regbase = (register_t*) &thread->ctx.jb[0];
- regmap = jmpmap;
-
- for (regno = first_regno; regno <= last_regno; regno++)
- {
- if (regmap[regno] == -1)
- child_ops.to_fetch_registers (regno);
- else
- if (thread)
- supply_register (regno, (char*) &regbase[regmap[regno]]);
- else
- supply_register (regno, NULL);
- }
-}
-
-static void
-freebsd_uthread_store_registers (int regno)
-{
- struct cached_pthread *thread;
- CORE_ADDR ptr;
- int first_regno, last_regno;
- u_int32_t *regbase;
- char *regmap;
-
- if (freebsd_uthread_attaching)
- {
- child_ops.to_store_registers (regno);
- return;
- }
-
- thread = find_pthread (inferior_ptid);
-
- if (thread->state == PS_RUNNING_value)
- {
- child_ops.to_store_registers (regno);
- return;
- }
-
- if (regno == -1)
- {
- first_regno = 0;
- last_regno = NUM_REGS - 1;
- }
- else
- {
- first_regno = regno;
- last_regno = regno;
- }
-
- regbase = (u_int32_t*) &thread->ctx.jb[0];
- regmap = jmpmap;
-
- ptr = find_pthread_addr (inferior_ptid);
- for (regno = first_regno; regno <= last_regno; regno++)
- {
- if (regmap[regno] == -1)
- child_ops.to_store_registers (regno);
- else
- {
- u_int32_t *reg = &regbase[regmap[regno]];
- int off;
-
- /* Hang onto cached value */
- memcpy(reg, registers + REGISTER_BYTE (regno),
- REGISTER_RAW_SIZE (regno));
-
- /* And push out to inferior */
- off = (char *) reg - (char *) thread;
- write_memory (ptr + off,
- registers + REGISTER_BYTE (regno),
- REGISTER_RAW_SIZE (regno));
- }
- }
-}
-
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-
-static void
-freebsd_uthread_prepare_to_store (void)
-{
- child_ops.to_prepare_to_store ();
-}
-
-static int
-freebsd_uthread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int dowrite, struct mem_attrib *attrib,
- struct target_ops *target)
-{
- return child_ops.to_xfer_memory (memaddr, myaddr, len, dowrite,
- attrib, target);
-}
-
-/* Print status information about what we're accessing. */
-
-static void
-freebsd_uthread_files_info (struct target_ops *ignore)
-{
- child_ops.to_files_info (ignore);
-}
-
-static void
-freebsd_uthread_kill_inferior (void)
-{
- child_ops.to_kill ();
-}
-
-static void
-freebsd_uthread_notice_signals (ptid_t ptid)
-{
- child_ops.to_notice_signals (ptid);
-}
-
-/* Fork an inferior process, and start debugging it with /proc. */
-
-static void
-freebsd_uthread_create_inferior (char *exec_file, char *allargs, char **env)
-{
- child_ops.to_create_inferior (exec_file, allargs, env);
-
- if (PIDGET(inferior_ptid) && freebsd_uthread_active)
- {
- read_thread_offsets ();
- push_target (&freebsd_uthread_ops);
- inferior_ptid = find_active_ptid ();
- add_thread (inferior_ptid);
- }
-}
-
-/* This routine is called to find out if the inferior is using threads.
- We check for the _thread_run and _thread_list globals. */
-
-void
-freebsd_uthread_new_objfile (struct objfile *objfile)
-{
- struct minimal_symbol *ms;
-
- if (!objfile)
- {
- freebsd_uthread_active = 0;
- return;
- }
-
- ms = lookup_minimal_symbol ("_thread_run", NULL, objfile);
-
- if (!ms)
- return;
-
- P_thread_run = SYMBOL_VALUE_ADDRESS (ms);
-
- ms = lookup_minimal_symbol ("_thread_list", NULL, objfile);
-
- if (!ms)
- return;
-
- P_thread_list = SYMBOL_VALUE_ADDRESS (ms);
-
-#define OFFSET_SYM(field) "_thread_" #field "_offset"
-#define LOOKUP_OFFSET(field) \
- do { \
- ms = lookup_minimal_symbol (OFFSET_SYM(field), NULL, objfile); \
- if (!ms) \
- return; \
- P_thread_##field##_offset = SYMBOL_VALUE_ADDRESS (ms); \
- } while (0);
-
-#define VALUE_SYM(name) "_thread_" #name "_value"
-#define LOOKUP_VALUE(name) \
- do { \
- ms = lookup_minimal_symbol (VALUE_SYM(name), NULL, objfile); \
- if (!ms) \
- return; \
- P_thread_##name##_value = SYMBOL_VALUE_ADDRESS (ms); \
- } while (0);
-
- LOOKUP_OFFSET(next);
- LOOKUP_OFFSET(uniqueid);
- LOOKUP_OFFSET(state);
- LOOKUP_OFFSET(name);
- LOOKUP_OFFSET(ctx);
-
- LOOKUP_VALUE(PS_RUNNING);
- LOOKUP_VALUE(PS_DEAD);
-
- freebsd_uthread_active = 1;
-}
-
-/* Clean up after the inferior dies. */
-
-static void
-freebsd_uthread_mourn_inferior ()
-{
- child_ops.to_mourn_inferior ();
- unpush_target (&freebsd_uthread_ops);
-}
-
-/* Mark our target-struct as eligible for stray "run" and "attach" commands. */
-
-static int
-freebsd_uthread_can_run ()
-{
- return child_suppress_run;
-}
-
-static int
-freebsd_uthread_thread_alive (ptid_t ptid)
-{
- struct cached_pthread *thread;
- int ret = 0;
-
- if (freebsd_uthread_attaching)
- return 1;
-
- /*
- * We can get called from child_ops.to_wait() which passes the underlying
- * pid (without a thread number).
- */
- if (TIDGET(ptid) == 0)
- return 1;
-
- if (find_pthread_addr (ptid) != 0)
- {
- thread = find_pthread (ptid);
- ret = (thread->state != PS_DEAD_value);
- }
-
- if (!ret)
- free_ptid(ptid);
-
- return ret;
-}
-
-static void
-freebsd_uthread_stop (void)
-{
- child_ops.to_stop ();
-}
-
-static void
-freebsd_uthread_find_new_threads (void)
-{
- CORE_ADDR ptr;
- int state;
- u_int64_t uniqueid;
-
- read_memory ((CORE_ADDR)P_thread_list,
- (char *)&ptr,
- sizeof ptr);
-
- while (ptr != 0)
- {
- READ_FIELD(ptr, int, state, state);
- READ_FIELD(ptr, u_int64_t, uniqueid, uniqueid);
- if (state != PS_DEAD_value &&
- !in_thread_list (find_ptid(uniqueid)))
- add_thread (find_ptid(uniqueid));
- ptr = read_pthread_next(ptr);
- }
-}
-
-/* MUST MATCH enum pthread_state */
-static const char *statenames[] = {
- "RUNNING",
- "SIGTHREAD",
- "MUTEX_WAIT",
- "COND_WAIT",
- "FDLR_WAIT",
- "FDLW_WAIT",
- "FDR_WAIT",
- "FDW_WAIT",
- "POLL_WAIT",
- "FILE_WAIT",
- "SELECT_WAIT",
- "SLEEP_WAIT",
- "WAIT_WAIT",
- "SIGSUSPEND",
- "SIGWAIT",
- "SPINBLOCK",
- "JOIN",
- "SUSPENDED",
- "DEAD",
- "DEADLOCK",
-};
-
-#if 0
-
-static int
-freebsd_uthread_get_thread_info (ref, selection, info)
- gdb_threadref *ref;
- int selection;
- struct gdb_ext_thread_info *info;
-{
- int pid = *ref;
- struct cached_pthread *thread = find_pthread (pid);
- struct cleanup *old_chain;
-
- old_chain = save_inferior_pid ();
- inferior_pid = main_pid;
-
- memset(&info->threadid, 0, OPAQUETHREADBYTES);
-
- memcpy(&info->threadid, ref, sizeof *ref);
- info->active = thread->state == PS_RUNNING_value;
- strcpy(info->display, statenames[thread->state]);
- if (thread->name)
- read_memory ((CORE_ADDR) thread->name, info->shortname, 32);
- else
- strcpy(info->shortname, "");
-
- do_cleanups (old_chain);
- return (0);
-}
-
-#endif
-
-char *
-freebsd_uthread_pid_to_str (ptid_t ptid)
-{
- static char buf[30];
-
- if (STREQ (current_target.to_shortname, "freebsd-uthreads"))
- sprintf (buf, "Process %d, Thread %ld",
- PIDGET(ptid), TIDGET(ptid));
- else
- sprintf (buf, "Process %d", PIDGET(ptid));
-
- return buf;
-}
-
-
-static void
-init_freebsd_uthread_ops ()
-{
- freebsd_uthread_ops.to_shortname = "freebsd-uthreads";
- freebsd_uthread_ops.to_longname = "FreeBSD uthreads";
- freebsd_uthread_ops.to_doc = "FreeBSD user threads support.";
- freebsd_uthread_ops.to_open = freebsd_uthread_open;
- freebsd_uthread_ops.to_attach = freebsd_uthread_attach;
- freebsd_uthread_ops.to_post_attach = freebsd_uthread_post_attach;
- freebsd_uthread_ops.to_detach = freebsd_uthread_detach;
- freebsd_uthread_ops.to_resume = freebsd_uthread_resume;
- freebsd_uthread_ops.to_wait = freebsd_uthread_wait;
- freebsd_uthread_ops.to_fetch_registers = freebsd_uthread_fetch_registers;
- freebsd_uthread_ops.to_store_registers = freebsd_uthread_store_registers;
- freebsd_uthread_ops.to_prepare_to_store = freebsd_uthread_prepare_to_store;
- freebsd_uthread_ops.to_xfer_memory = freebsd_uthread_xfer_memory;
- freebsd_uthread_ops.to_files_info = freebsd_uthread_files_info;
- freebsd_uthread_ops.to_insert_breakpoint = memory_insert_breakpoint;
- freebsd_uthread_ops.to_remove_breakpoint = memory_remove_breakpoint;
- freebsd_uthread_ops.to_terminal_init = terminal_init_inferior;
- freebsd_uthread_ops.to_terminal_inferior = terminal_inferior;
- freebsd_uthread_ops.to_terminal_ours_for_output = terminal_ours_for_output;
- freebsd_uthread_ops.to_terminal_ours = terminal_ours;
- freebsd_uthread_ops.to_terminal_info = child_terminal_info;
- freebsd_uthread_ops.to_kill = freebsd_uthread_kill_inferior;
- freebsd_uthread_ops.to_create_inferior = freebsd_uthread_create_inferior;
- freebsd_uthread_ops.to_mourn_inferior = freebsd_uthread_mourn_inferior;
- freebsd_uthread_ops.to_can_run = freebsd_uthread_can_run;
- freebsd_uthread_ops.to_notice_signals = freebsd_uthread_notice_signals;
- freebsd_uthread_ops.to_thread_alive = freebsd_uthread_thread_alive;
- freebsd_uthread_ops.to_stop = freebsd_uthread_stop;
- freebsd_uthread_ops.to_stratum = process_stratum;
- freebsd_uthread_ops.to_has_all_memory = 1;
- freebsd_uthread_ops.to_has_memory = 1;
- freebsd_uthread_ops.to_has_stack = 1;
- freebsd_uthread_ops.to_has_registers = 1;
- freebsd_uthread_ops.to_has_execution = 1;
- freebsd_uthread_ops.to_has_thread_control = 0;
- freebsd_uthread_ops.to_magic = OPS_MAGIC;
- freebsd_uthread_ops.to_find_new_threads = freebsd_uthread_find_new_threads;
- freebsd_uthread_ops.to_pid_to_str = freebsd_uthread_pid_to_str;
-#if 0
- freebsd_uthread_vec.get_thread_info = freebsd_uthread_get_thread_info;
-#endif
-}
-
-void
-_initialize_freebsd_uthread ()
-{
- init_freebsd_uthread_ops ();
- add_target (&freebsd_uthread_ops);
-
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = freebsd_uthread_new_objfile;
-
- child_suppress_run = 1;
-}
diff --git a/gnu/usr.bin/binutils/gdb/gdb.1 b/gnu/usr.bin/binutils/gdb/gdb.1
deleted file mode 100644
index b6cd3cc47d763..0000000000000
--- a/gnu/usr.bin/binutils/gdb/gdb.1
+++ /dev/null
@@ -1,385 +0,0 @@
-.\" Copyright (c) 1991 Free Software Foundation
-.\" See section COPYING for conditions for redistribution
-.\" $FreeBSD$
-.TH gdb 1 "4nov1991" "GNU Tools" "GNU Tools"
-.SH NAME
-gdb \- The GNU Debugger
-.SH SYNOPSIS
-.na
-.TP
-.B gdb
-.RB "[\|" \-help "\|]"
-.RB "[\|" \-nx "\|]"
-.RB "[\|" \-q "\|]"
-.RB "[\|" \-batch "\|]"
-.RB "[\|" \-cd=\c
-.I dir\c
-\|]
-.RB "[\|" \-f "\|]"
-.RB "[\|" \-k "\|]"
-.RB "[\|" \-wcore "\|]"
-.RB "[\|" "\-b\ "\c
-.IR bps "\|]"
-.RB "[\|" "\-tty="\c
-.IR dev "\|]"
-.RB "[\|" "\-s "\c
-.I symfile\c
-\&\|]
-.RB "[\|" "\-e "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-se "\c
-.I prog\c
-\&\|]
-.RB "[\|" "\-c "\c
-.I core\c
-\&\|]
-.RB "[\|" "\-x "\c
-.I cmds\c
-\&\|]
-.RB "[\|" "\-d "\c
-.I dir\c
-\&\|]
-.RB "[\|" \c
-.I prog\c
-.RB "[\|" \c
-.IR core \||\| procID\c
-\&\|]\&\|]
-.ad b
-.SH DESCRIPTION
-The purpose of a debugger such as GDB is to allow you to see what is
-going on ``inside'' another program while it executes\(em\&or what another
-program was doing at the moment it crashed.
-
-GDB can do four main kinds of things (plus other things in support of
-these) to help you catch bugs in the act:
-
-.TP
-\ \ \ \(bu
-Start your program, specifying anything that might affect its behavior.
-
-.TP
-\ \ \ \(bu
-Make your program stop on specified conditions.
-
-.TP
-\ \ \ \(bu
-Examine what has happened, when your program has stopped.
-
-.TP
-\ \ \ \(bu
-Change things in your program, so you can experiment with correcting the
-effects of one bug and go on to learn about another.
-.PP
-
-You can use GDB to debug programs written in C, C++, and Modula-2.
-Fortran support will be added when a GNU Fortran compiler is ready.
-
-GDB is invoked with the shell command \c
-.B gdb\c
-\&. Once started, it reads
-commands from the terminal until you tell it to exit with the GDB
-command \c
-.B quit\c
-\&. You can get online help from \c
-.B gdb\c
-\& itself
-by using the command \c
-.B help\c
-\&.
-
-You can run \c
-.B gdb\c
-\& with no arguments or options; but the most
-usual way to start GDB is with one argument or two, specifying an
-executable program as the argument:
-.sp
-.br
-gdb\ program
-.br
-.sp
-
-You can also start with both an executable program and a core file specified:
-.sp
-.br
-gdb\ program\ core
-.br
-.sp
-
-You can, instead, specify a process ID as a second argument, if you want
-to debug a running process:
-.sp
-.br
-gdb\ program\ 1234
-.br
-.sp
-
-would attach GDB to process \c
-.B 1234\c
-\& (unless you also have a file
-named `\|\c
-.B 1234\c
-\&\|'; GDB does check for a core file first).
-
-Here are some of the most frequently needed GDB commands:
-.TP
-.B break \fR[\|\fIfile\fB:\fR\|]\fIfunction
-\&
-Set a breakpoint at \c
-.I function\c
-\& (in \c
-.I file\c
-\&).
-.TP
-.B run \fR[\|\fIarglist\fR\|]
-Start your program (with \c
-.I arglist\c
-\&, if specified).
-.TP
-.B bt
-Backtrace: display the program stack.
-.TP
-.BI print " expr"\c
-\&
-Display the value of an expression.
-.TP
-.B c
-Continue running your program (after stopping, e.g. at a breakpoint).
-.TP
-.B next
-Execute next program line (after stopping); step \c
-.I over\c
-\& any
-function calls in the line.
-.TP
-.B step
-Execute next program line (after stopping); step \c
-.I into\c
-\& any
-function calls in the line.
-.TP
-.B help \fR[\|\fIname\fR\|]
-Show information about GDB command \c
-.I name\c
-\&, or general information
-about using GDB.
-.TP
-.B quit
-Exit from GDB.
-.PP
-For full details on GDB, see \c
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-\&, by Richard M. Stallman and Roland H. Pesch. The same text is available online
-as the \c
-.B gdb\c
-\& entry in the \c
-.B info\c
-\& program.
-.SH OPTIONS
-Any arguments other than options specify an executable
-file and core file (or process ID); that is, the first argument
-encountered with no
-associated option flag is equivalent to a `\|\c
-.B \-se\c
-\&\|' option, and the
-second, if any, is equivalent to a `\|\c
-.B \-c\c
-\&\|' option if it's the name of a file. Many options have
-both long and short forms; both are shown here. The long forms are also
-recognized if you truncate them, so long as enough of the option is
-present to be unambiguous. (If you prefer, you can flag option
-arguments with `\|\c
-.B +\c
-\&\|' rather than `\|\c
-.B \-\c
-\&\|', though we illustrate the
-more usual convention.)
-
-All the options and command line arguments you give are processed
-in sequential order. The order makes a difference when the
-`\|\c
-.B \-x\c
-\&\|' option is used.
-
-.TP
-.B \-help
-.TP
-.B \-h
-List all options, with brief explanations.
-
-.TP
-.BI "\-symbols=" "file"\c
-.TP
-.BI "\-s " "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\&.
-
-.TP
-.BI "\-exec=" "file"\c
-.TP
-.BI "\-e " "file"\c
-\&
-Use file \c
-.I file\c
-\& as the executable file to execute when
-appropriate, and for examining pure data in conjunction with a core
-dump.
-
-.TP
-.BI "\-se=" "file"\c
-\&
-Read symbol table from file \c
-.I file\c
-\& and use it as the executable
-file.
-
-.TP
-.BI "\-core=" "file"\c
-.TP
-.BI "\-c " "file"\c
-\&
-Use file \c
-.I file\c
-\& as a core dump to examine.
-
-.TP
-.BI "\-command=" "file"\c
-.TP
-.BI "\-x " "file"\c
-\&
-Execute GDB commands from file \c
-.I file\c
-\&.
-
-.TP
-.BI "\-directory=" "directory"\c
-.TP
-.BI "\-d " "directory"\c
-\&
-Add \c
-.I directory\c
-\& to the path to search for source files.
-.PP
-
-.TP
-.B \-nx
-.TP
-.B \-n
-Do not execute commands from any `\|\c
-.B .gdbinit\c
-\&\|' initialization files.
-Normally, the commands in these files are executed after all the
-command options and arguments have been processed.
-
-
-.TP
-.B \-quiet
-.TP
-.B \-q
-``Quiet''. Do not print the introductory and copyright messages. These
-messages are also suppressed in batch mode.
-
-.TP
-.B \-batch
-Run in batch mode. Exit with status \c
-.B 0\c
-\& after processing all the command
-files specified with `\|\c
-.B \-x\c
-\&\|' (and `\|\c
-.B .gdbinit\c
-\&\|', if not inhibited).
-Exit with nonzero status if an error occurs in executing the GDB
-commands in the command files.
-
-Batch mode may be useful for running GDB as a filter, for example to
-download and run a program on another computer; in order to make this
-more useful, the message
-.sp
-.br
-Program\ exited\ normally.
-.br
-.sp
-
-(which is ordinarily issued whenever a program running under GDB control
-terminates) is not issued when running in batch mode.
-
-.TP
-.BI "\-cd=" "directory"\c
-\&
-Run GDB using \c
-.I directory\c
-\& as its working directory,
-instead of the current directory.
-
-.TP
-.B \-fullname
-.TP
-.B \-f
-Emacs sets this option when it runs GDB as a subprocess. It tells GDB
-to output the full file name and line number in a standard,
-recognizable fashion each time a stack frame is displayed (which
-includes each time the program stops). This recognizable format looks
-like two `\|\c
-.B \032\c
-\&\|' characters, followed by the file name, line number
-and character position separated by colons, and a newline. The
-Emacs-to-GDB interface program uses the two `\|\c
-.B \032\c
-\&\|' characters as
-a signal to display the source code for the frame.
-
-.TP
-.B \-kernel
-.TP
-.B \-k
-Use gdb in kernel debugging mode. The prompt is set to ``(kgdb)''.
-
-.TP
-.B \-wcore
-This option may only be used in kernel debugging mode while
-debugging a ``live'' kernel and makes the corefile (/dev/mem)
-writable.
-
-.TP
-.BI "\-b " "bps"\c
-\&
-Set the line speed (baud rate or bits per second) of any serial
-interface used by GDB for remote debugging.
-
-.TP
-.BI "\-tty=" "device"\c
-\&
-Run using \c
-.I device\c
-\& for your program's standard input and output.
-.PP
-
-.SH "SEE ALSO"
-.RB "`\|" gdb "\|'"
-entry in
-.B info\c
-\&;
-.I
-Using GDB: A Guide to the GNU Source-Level Debugger\c
-, Richard M. Stallman and Roland H. Pesch, July 1991.
-.SH COPYING
-Copyright (c) 1991 Free Software Foundation, Inc.
-.PP
-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.
-.PP
-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.
-.PP
-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 included in
-translations approved by the Free Software Foundation instead of in
-the original English.
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd-alpha.h b/gnu/usr.bin/binutils/gdb/kvm-fbsd-alpha.h
deleted file mode 100644
index 11260acec53a4..0000000000000
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd-alpha.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Kernel core dump functions below target vector, for GDB on FreeBSD/Alpha.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-__FBSDID("$FreeBSD$");
-
-#include "alpha/tm-alpha.h"
-
-#ifndef S0_REGNUM
-#define S0_REGNUM (T7_REGNUM+1)
-#endif
-
-static void
-fetch_kcore_registers (struct pcb *pcbp)
-{
-
- /* First clear out any garbage. */
- memset (registers, '\0', REGISTER_BYTES);
-
- /* SP */
- *(long *) &registers[REGISTER_BYTE (SP_REGNUM)] =
- pcbp->pcb_hw.apcb_ksp;
-
- /* S0 through S6 */
- memcpy (&registers[REGISTER_BYTE (S0_REGNUM)],
- &pcbp->pcb_context[0], 7 * sizeof (long));
-
- /* PC */
- *(long *) &registers[REGISTER_BYTE (PC_REGNUM)] =
- pcbp->pcb_context[7];
-
- registers_fetched ();
-}
-
-CORE_ADDR
-fbsd_kern_frame_saved_pc (struct frame_info *fi)
-{
- struct minimal_symbol *sym;
- CORE_ADDR this_saved_pc;
-
- this_saved_pc = alpha_frame_saved_pc (fi);
-
- sym = lookup_minimal_symbol_by_pc (this_saved_pc);
-
- if (sym != NULL &&
- (strcmp (SYMBOL_NAME (sym), "XentArith") == 0 ||
- strcmp (SYMBOL_NAME (sym), "XentIF") == 0 ||
- strcmp (SYMBOL_NAME (sym), "XentInt") == 0 ||
- strcmp (SYMBOL_NAME (sym), "XentMM") == 0 ||
- strcmp (SYMBOL_NAME (sym), "XentSys") == 0 ||
- strcmp (SYMBOL_NAME (sym), "XentUna") == 0 ||
- strcmp (SYMBOL_NAME (sym), "XentRestart") == 0))
- {
- return (read_memory_integer (fi->frame + 32 * 8, 8));
- }
- else
- {
- return (this_saved_pc);
- }
-}
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd-i386.h b/gnu/usr.bin/binutils/gdb/kvm-fbsd-i386.h
deleted file mode 100644
index b7e4a204108de..0000000000000
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd-i386.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Kernel core dump functions below target vector, for GDB on FreeBSD/i386.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-__FBSDID("$FreeBSD$");
-
-#include <machine/frame.h>
-
-static CORE_ADDR
-ksym_maxuseraddr (void)
-{
- static CORE_ADDR maxuseraddr;
- struct minimal_symbol *sym;
-
- if (maxuseraddr == 0)
- {
- sym = lookup_minimal_symbol ("PTmap", NULL, NULL);
- if (sym == NULL) {
- maxuseraddr = VM_MAXUSER_ADDRESS;
- } else {
- maxuseraddr = SYMBOL_VALUE_ADDRESS (sym);
- }
- }
- return maxuseraddr;
-}
-
-
-/* Symbol names of kernel entry points. Use special frames. */
-#define KSYM_TRAP "calltrap"
-#define KSYM_INTR "Xintr"
-#define KSYM_FASTINTR "Xfastintr"
-#define KSYM_OLDSYSCALL "Xlcall_syscall"
-#define KSYM_SYSCALL "Xint0x80_syscall"
-
-/* The following is FreeBSD-specific hackery to decode special frames
- and elide the assembly-language stub. This could be made faster by
- defining a frame_type field in the machine-dependent frame information,
- but we don't think that's too important right now. */
-enum frametype { tf_normal, tf_trap, tf_interrupt, tf_syscall };
-
-CORE_ADDR
-fbsd_kern_frame_saved_pc (struct frame_info *fi)
-{
- struct minimal_symbol *sym;
- CORE_ADDR this_saved_pc;
- enum frametype frametype;
-
- this_saved_pc = read_memory_integer (fi->frame + 4, 4);
- sym = lookup_minimal_symbol_by_pc (this_saved_pc);
- frametype = tf_normal;
- if (sym != NULL)
- {
- if (strcmp (SYMBOL_NAME (sym), KSYM_TRAP) == 0)
- frametype = tf_trap;
- else
- if (strncmp (SYMBOL_NAME (sym), KSYM_INTR,
- strlen (KSYM_INTR)) == 0 || strncmp (SYMBOL_NAME(sym),
- KSYM_FASTINTR, strlen (KSYM_FASTINTR)) == 0)
- frametype = tf_interrupt;
- else
- if (strcmp (SYMBOL_NAME (sym), KSYM_SYSCALL) == 0 ||
- strcmp (SYMBOL_NAME (sym), KSYM_OLDSYSCALL) == 0)
- frametype = tf_syscall;
- }
-
- switch (frametype)
- {
- case tf_normal:
- return (this_saved_pc);
-#define oEIP offsetof (struct trapframe, tf_eip)
-
- case tf_trap:
- return (read_memory_integer (fi->frame + 8 + oEIP, 4));
-
- case tf_interrupt:
- return (read_memory_integer (fi->frame + 12 + oEIP, 4));
-
- case tf_syscall:
- return (read_memory_integer (fi->frame + 8 + oEIP, 4));
-#undef oEIP
- }
-}
-
-static void
-fetch_kcore_registers (struct pcb *pcb)
-{
- int i;
- int noreg;
-
- /* Get the register values out of the sys pcb and store them where
- `read_register' will find them. */
- /*
- * XXX many registers aren't available.
- * XXX for the non-core case, the registers are stale - they are for
- * the last context switch to the debugger.
- * XXX gcc's register numbers aren't all #defined in tm-i386.h.
- */
- noreg = 0;
- for (i = 0; i < 3; ++i) /* eax,ecx,edx */
- supply_register (i, (char *)&noreg);
-
- supply_register (3, (char *) &pcb->pcb_ebx);
- supply_register (SP_REGNUM, (char *) &pcb->pcb_esp);
- supply_register (FP_REGNUM, (char *) &pcb->pcb_ebp);
- supply_register (6, (char *) &pcb->pcb_esi);
- supply_register (7, (char *) &pcb->pcb_edi);
- supply_register (PC_REGNUM, (char *) &pcb->pcb_eip);
-
- for (i = 9; i < 14; ++i) /* eflags, cs, ss, ds, es, fs */
- supply_register (i, (char *) &noreg);
- supply_register (15, (char *) &pcb->pcb_gs);
-
- /* XXX 80387 registers? */
-}
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd-sparc64.h b/gnu/usr.bin/binutils/gdb/kvm-fbsd-sparc64.h
deleted file mode 100644
index 52ed91cf09381..0000000000000
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd-sparc64.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Kernel core dump functions below target vector, for GDB on FreeBSD/sparc64.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-__FBSDID("$FreeBSD$");
-
-#define SPARC_INTREG_SIZE 8
-
-static void
-fetch_kcore_registers (struct pcb *pcbp)
-{
- static struct frame top;
- CORE_ADDR f_addr;
- int i;
-
- /* Get the register values out of the sys pcb and store them where
- `read_register' will find them. */
- /*
- * XXX many registers aren't available.
- * XXX for the non-core case, the registers are stale - they are for
- * the last context switch to the debugger.
- * XXX do something with the floating-point registers?
- */
- supply_register (SP_REGNUM, (char *)&pcbp->pcb_ufp);
- supply_register (PC_REGNUM, (char *)&pcbp->pcb_pc);
- f_addr = extract_address (&pcbp->pcb_ufp, SPARC_INTREG_SIZE);
- /* Load the previous frame by hand (XXX) and supply it. */
- read_memory (f_addr + SPOFF, (char *)&top, sizeof (top));
- for (i = 0; i < 8; i++)
- supply_register (i + L0_REGNUM, (char *)&top.fr_local[i]);
- for (i = 0; i < 8; i++)
- supply_register (i + I0_REGNUM, (char *)&top.fr_in[i]);
-}
-
-CORE_ADDR
-fbsd_kern_frame_saved_pc (struct frame_info *fi)
-{
- struct minimal_symbol *sym;
- CORE_ADDR frame, pc_addr, pc;
- char *buf;
-
- buf = alloca (MAX_REGISTER_RAW_SIZE);
- /* XXX: duplicates fi->extra_info->bottom. */
- frame = (fi->next != NULL) ? fi->next->frame : read_sp ();
- pc_addr = frame + offsetof (struct frame, fr_in[7]);
-
-#define READ_PC(pc, a, b) do { \
- read_memory (a, b, SPARC_INTREG_SIZE); \
- pc = extract_address (b, SPARC_INTREG_SIZE); \
-} while (0)
-
- READ_PC (pc, pc_addr, buf);
-
- sym = lookup_minimal_symbol_by_pc (pc);
- if (sym != NULL)
- {
- if (strncmp (SYMBOL_NAME (sym), "tl0_", 4) == 0 ||
- strcmp (SYMBOL_NAME (sym), "btext") == 0 ||
- strcmp (SYMBOL_NAME (sym), "mp_startup") == 0 ||
- strcmp (SYMBOL_NAME (sym), "fork_trampoline") == 0)
- {
- /*
- * Ugly kluge: user space addresses aren't separated from kernel
- * ones by range; if encountering a trap from user space, just
- * return a 0 to stop the trace.
- * Do the same for entry points of kernel processes to avoid
- * printing garbage.
- */
- pc = 0;
- }
- if (strncmp (SYMBOL_NAME (sym), "tl1_", 4) == 0)
- {
- pc_addr = fi->frame + sizeof (struct frame) +
- offsetof (struct trapframe, tf_tpc);
- READ_PC (pc, pc_addr, buf);
- }
- }
- return (pc);
-}
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
deleted file mode 100644
index 93395a7f9040c..0000000000000
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ /dev/null
@@ -1,502 +0,0 @@
-/* Kernel core dump functions below target vector, for GDB.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-/*
- * This works like "remote" but, you use it like this:
- * target kcore /dev/mem
- * or
- * target kcore /var/crash/host/core.0
- *
- * This way makes it easy to short-circut the whole bfd monster,
- * and direct the inferior stuff to our libkvm implementation.
- *
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <kvm.h>
-#include <sys/sysctl.h>
-#include <paths.h>
-
-#include "defs.h"
-#include <readline/tilde.h>
-#include "gdb_string.h"
-#include "frame.h" /* required by inferior.h */
-#include "inferior.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "command.h"
-#include "bfd.h"
-#include "gdbcore.h"
-#include "solist.h"
-
-#include "kvm-fbsd-machine.h"
-
-static void
-kcore_files_info (struct target_ops *);
-
-static void
-kcore_close (int);
-
-static void
-get_kcore_registers (int);
-
-static int
-xfer_umem (CORE_ADDR, char *, int, int);
-
-#ifdef SOLIB_ADD
-static int kcore_solib_add_stub (PTR);
-#endif
-
-static char *core_file;
-static kvm_t *core_kd;
-static struct pcb cur_pcb;
-static struct kinfo_proc *cur_proc;
-
-static struct target_ops kcore_ops;
-
-int kernel_debugging;
-int kernel_writablecore;
-
-/* Read the "thing" at kernel address 'addr' into the space pointed to
- by point. The length of the "thing" is determined by the type of p.
- Result is non-zero if transfer fails. */
-
-#define kvread(addr, p) \
- (target_read_memory ((CORE_ADDR) (addr), (char *) (p), sizeof (*(p))))
-
-static CORE_ADDR
-ksym_kernbase (void)
-{
- static CORE_ADDR kernbase;
- struct minimal_symbol *sym;
-
- if (kernbase == 0)
- {
- sym = lookup_minimal_symbol ("kernbase", NULL, NULL);
- if (sym == NULL) {
- kernbase = KERNBASE;
- } else {
- kernbase = SYMBOL_VALUE_ADDRESS (sym);
- }
- }
- return kernbase;
-}
-
-#define KERNOFF (ksym_kernbase ())
-#define INKERNEL(x) ((x) >= KERNOFF)
-
-static CORE_ADDR
-ksym_lookup(const char *name)
-{
- struct minimal_symbol *sym;
-
- sym = lookup_minimal_symbol (name, NULL, NULL);
- if (sym == NULL)
- error ("kernel symbol `%s' not found.", name);
-
- return SYMBOL_VALUE_ADDRESS (sym);
-}
-
-/* Provide the address of an initial PCB to use.
- If this is a crash dump, try for "dumppcb".
- If no "dumppcb" or it's /dev/mem, use proc0.
- Return the core address of the PCB we found. */
-
-static CORE_ADDR
-initial_pcb (void)
-{
- struct minimal_symbol *sym;
- CORE_ADDR addr;
- void *val;
-
- /* Make sure things are open... */
- if (!core_kd || !core_file)
- return (0);
-
- /* If this is NOT /dev/mem try for dumppcb. */
- if (strncmp (core_file, _PATH_DEV, sizeof _PATH_DEV - 1))
- {
- sym = lookup_minimal_symbol ("dumppcb", NULL, NULL);
- if (sym != NULL)
- {
- addr = SYMBOL_VALUE_ADDRESS (sym);
- return (addr);
- }
- }
-
- /* OK, just use thread0's pcb. Note that curproc might
- not exist, and if it does, it will point to gdb.
- Therefore, just use proc0 and let the user set
- some other context if they care about it. */
-
- addr = ksym_lookup ("thread0");
- if (kvread (addr, &val))
- {
- error ("cannot read thread0 pointer at %x\n", addr);
- val = 0;
- }
- else
- {
- /* Read the PCB address in thread structure. */
- addr += offsetof (struct thread, td_pcb);
- if (kvread (addr, &val))
- {
- error ("cannot read thread0->td_pcb pointer at %x\n", addr);
- val = 0;
- }
- }
-
- /* thread0 is wholly in the kernel and cur_proc is only used for
- reading user mem, so no point in setting this up. */
- cur_proc = 0;
-
- return ((CORE_ADDR)val);
-}
-
-/* Set the current context to that of the PCB struct at the system address
- passed. */
-
-static int
-set_context (CORE_ADDR addr)
-{
- if (kvread (addr, &cur_pcb))
- error ("cannot read pcb at %#x", addr);
-
- /* Fetch all registers from core file. */
- target_fetch_registers (-1);
-
- /* Now, set up the frame cache, and print the top of stack. */
- flush_cached_frames ();
- set_current_frame (create_new_frame (read_fp (), read_pc ()));
- select_frame (get_current_frame (), 0);
- return (0);
-}
-
-/* Discard all vestiges of any previous core file and mark data and stack
- spaces as empty. */
-
-/* ARGSUSED */
-static void
-kcore_close (int quitting)
-{
-
- inferior_ptid = null_ptid; /* Avoid confusion from thread stuff. */
-
- /* Clear out solib state while the bfd is still open. See
- comments in clear_solib in solib.c. */
-#ifdef CLEAR_SOLIB
- CLEAR_SOLIB ();
-#endif
-
- if (core_kd)
- {
- kvm_close (core_kd);
- free (core_file);
- core_file = NULL;
- core_kd = NULL;
- }
-}
-
-/* This routine opens and sets up the core file bfd. */
-
-static void
-kcore_open (char *filename /* the core file */, int from_tty)
-{
- kvm_t *kd;
- const char *p;
- struct cleanup *old_chain;
- char buf[256], *cp;
- int ontop;
- CORE_ADDR addr;
-
- target_preopen (from_tty);
-
- /* The exec file is required for symbols. */
- if (exec_bfd == NULL)
- error ("No kernel exec file specified");
-
- if (core_kd)
- {
- error ("No core file specified."
- " (Use `detach' to stop debugging a core file.)");
- return;
- }
-
- if (!filename)
- {
- error ("No core file specified.");
- return;
- }
-
- filename = tilde_expand (filename);
- if (filename[0] != '/')
- {
- cp = concat (current_directory, "/", filename, NULL);
- free (filename);
- filename = cp;
- }
-
- old_chain = make_cleanup (free, filename);
-
- kd = kvm_open (bfd_get_filename(exec_bfd), filename, NULL,
- kernel_writablecore ? O_RDWR: O_RDONLY, 0);
- if (kd == NULL)
- {
- perror_with_name (filename);
- return;
- }
-
- /* Looks semi-reasonable. Toss the old core file and work on the new. */
-
- discard_cleanups (old_chain); /* Don't free filename any more. */
- core_file = filename;
- unpush_target (&kcore_ops);
- ontop = !push_target (&kcore_ops);
-
- /* Note unpush_target (above) calls kcore_close. */
- core_kd = kd;
-
- /* Print out the panic string if there is one. */
- if (kvread (ksym_lookup ("panicstr"), &addr) == 0 &&
- addr != 0 &&
- target_read_memory (addr, buf, sizeof(buf)) == 0)
- {
-
- for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
- if (!isascii (*cp) || (!isprint (*cp) && !isspace (*cp)))
- *cp = '?';
- *cp = '\0';
- if (buf[0] != '\0')
- printf_filtered ("panic: %s\n", buf);
- }
-
- /* Print all the panic messages if possible. */
- if (symfile_objfile != NULL)
- {
- printf ("panic messages:\n---\n");
- snprintf (buf, sizeof buf,
- "/sbin/dmesg -N %s -M %s | \
- /usr/bin/awk '/^(panic:|Fatal trap) / { printing = 1 } \
- { if (printing) print $0 }'",
- symfile_objfile->name, filename);
- fflush (stdout);
- system (buf);
- printf ("---\n");
- }
-
- if (ontop)
- {
- /* Add symbols and section mappings for any kernel modules. */
-#ifdef SOLIB_ADD
- current_target_so_ops = &kgdb_so_ops;
- catch_errors (kcore_solib_add_stub, &from_tty, (char *) 0,
- RETURN_MASK_ALL);
-#endif
- }
- else
- {
- warning ("you won't be able to access this core file until you terminate\n"
- "your %s; do ``info files''", target_longname);
- return;
- }
-
- /* Now, set up process context, and print the top of stack. */
- (void)set_context (initial_pcb());
- print_stack_frame (selected_frame, selected_frame_level, 1);
-}
-
-static void
-kcore_detach (char *args, int from_tty)
-{
- if (args)
- error ("Too many arguments");
- unpush_target (&kcore_ops);
- reinit_frame_cache ();
- if (from_tty)
- printf_filtered ("No kernel core file now.\n");
-}
-
-/* Get the registers out of a core file. This is the machine-
- independent part. Fetch_core_registers is the machine-dependent
- part, typically implemented in the xm-file for each architecture. */
-
-/* We just get all the registers, so we don't use regno. */
-
-/* ARGSUSED */
-static void
-get_kcore_registers (int regno)
-{
-
- /* XXX - Only read the pcb when set_context() is called.
- When looking at a live kernel this may be a problem,
- but the user can do another "proc" or "pcb" command to
- grab a new copy of the pcb... */
-
- /* Zero out register set then fill in the ones we know about. */
- fetch_kcore_registers (&cur_pcb);
-}
-
-static void
-kcore_files_info (t)
- struct target_ops *t;
-{
- printf_filtered ("\t`%s'\n", core_file);
-}
-
-static int
-xfer_kmem (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- int n;
-
-
- if (!INKERNEL (memaddr))
- return xfer_umem (memaddr, myaddr, len, write);
-
- if (core_kd == NULL)
- return 0;
-
- if (write)
- n = kvm_write (core_kd, memaddr, myaddr, len);
- else
- n = kvm_read (core_kd, memaddr, myaddr, len) ;
- if (n < 0) {
- fprintf_unfiltered (gdb_stderr, "can not access 0x%x, %s\n",
- (unsigned)memaddr, kvm_geterr (core_kd));
- n = 0;
- }
-
- return n;
-}
-
-
-static int
-xfer_umem (CORE_ADDR memaddr, char *myaddr, int len, int write /* ignored */)
-{
- int n = 0;
-
- if (cur_proc == 0)
- {
- error ("---Can't read userspace from dump, or kernel process---\n");
- return 0;
- }
-
- if (write)
- error ("kvm_uwrite unimplemented\n");
- else
- n = kvm_uread (core_kd, cur_proc, memaddr, myaddr, len) ;
-
- if (n < 0)
- return 0;
-
- return n;
-}
-
-static void
-set_proc_cmd (char *arg, int from_tty)
-{
- CORE_ADDR addr, pid_addr, first_td;
- void *val;
- struct kinfo_proc *kp;
- int cnt;
- pid_t pid;
-
- if (!arg)
- error_no_arg ("proc address for the new context");
-
- if (core_kd == NULL)
- error ("no kernel core file");
-
- addr = (CORE_ADDR) parse_and_eval_address (arg);
-
- if (!INKERNEL (addr))
- {
- kp = kvm_getprocs (core_kd, KERN_PROC_PID, addr, &cnt);
- if (!cnt)
- error ("invalid pid");
- addr = (CORE_ADDR)kp->ki_paddr;
- cur_proc = kp;
- }
- else
- {
- /* Update cur_proc. */
- pid_addr = addr + offsetof (struct proc, p_pid);
- if (kvread (pid_addr, &pid))
- error ("cannot read pid ptr");
- cur_proc = kvm_getprocs (core_kd, KERN_PROC_PID, pid, &cnt);
- if (!cnt)
- error("invalid pid");
- }
-
- /* Find the first thread in the process. XXXKSE */
- addr += offsetof (struct proc, p_threads.tqh_first);
- if (kvread (addr, &first_td))
- error ("cannot read thread ptr");
-
- /* Read the PCB address in thread structure. */
- addr = first_td + offsetof (struct thread, td_pcb);
- if (kvread (addr, &val))
- error("cannot read pcb ptr");
-
- /* Read the PCB address in proc structure. */
- if (set_context ((CORE_ADDR) val))
- error ("invalid proc address");
-}
-
-#ifdef SOLIB_ADD
-static int
-kcore_solib_add_stub (PTR from_ttyp)
-{
- SOLIB_ADD (NULL, *(int *) from_ttyp, &current_target, auto_solib_add);
- return 0;
-}
-#endif /* SOLIB_ADD */
-
-void
-_initialize_kcorelow (void)
-{
- kcore_ops.to_shortname = "kcore";
- kcore_ops.to_longname = "Kernel core dump file";
- kcore_ops.to_doc =
- "Use a core file as a target. Specify the filename of the core file.";
- kcore_ops.to_open = kcore_open;
- kcore_ops.to_close = kcore_close;
- kcore_ops.to_attach = find_default_attach;
- kcore_ops.to_detach = kcore_detach;
- kcore_ops.to_fetch_registers = get_kcore_registers;
- kcore_ops.to_xfer_memory = xfer_kmem;
- kcore_ops.to_files_info = kcore_files_info;
- kcore_ops.to_create_inferior = find_default_create_inferior;
- kcore_ops.to_stratum = kcore_stratum;
- kcore_ops.to_has_memory = 1;
- kcore_ops.to_has_stack = 1;
- kcore_ops.to_has_registers = 1;
- kcore_ops.to_magic = OPS_MAGIC;
-
- add_target (&kcore_ops);
- add_com ("proc", class_obscure, set_proc_cmd, "Set current process context");
-}
diff --git a/gnu/usr.bin/binutils/gdb/solib-fbsd-kld.c b/gnu/usr.bin/binutils/gdb/solib-fbsd-kld.c
deleted file mode 100644
index 190e6e6687164..0000000000000
--- a/gnu/usr.bin/binutils/gdb/solib-fbsd-kld.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/* Handle FreeBSD kernel modules as shared libraries.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* $FreeBSD$ */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/stat.h>
-#define _KERNEL
-#include <sys/linker.h>
-#undef _KERNEL
-
-/* XXX, kludge to avoid duplicate definitions while sys/linker.h is used. */
-#define _ELF_COMMON_H
-
-#include "defs.h"
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "inferior.h"
-
-#include "solist.h"
-
-struct lm_info
- {
- CORE_ADDR address;
- };
-
-static int try_modpath (char *buf, int buflen, char *fmt, ...);
-static char *guess_modpath (char *modname);
-
-static void
-kgdb_relocate_section_addresses (struct so_list *so,
- struct section_table *sec)
-{
- sec->addr += so->lm_info->address;
- sec->endaddr += so->lm_info->address;
-}
-
-static int
-kgdb_open_symbol_file_object (void *from_ttyp)
-{
- warning ("kgdb_open_symbol_file_object called\n");
- return 0;
-}
-
-static struct so_list *
-kgdb_current_sos (void)
-{
- linker_file_list_t linker_files;
- struct linker_file lfile;
- struct minimal_symbol *msymbol;
- struct linker_file *lfilek;
- struct so_list *head = NULL;
- struct so_list **link_ptr = &head;
-
- CORE_ADDR lfiles_addr;
-
- msymbol = lookup_minimal_symbol ("linker_files", NULL, symfile_objfile);
- if (msymbol == NULL || SYMBOL_VALUE_ADDRESS (msymbol) == 0)
- {
- warning ("failed to find linker_files symbol\n");
- return 0;
- }
- lfiles_addr = SYMBOL_VALUE_ADDRESS (msymbol);
- if (target_read_memory (lfiles_addr, (char *)&linker_files,
- sizeof (linker_files)))
- {
- warning ("failed to read linker_files data\n");
- return 0;
- }
- for (lfilek = TAILQ_FIRST (&linker_files); lfilek != NULL;
- lfilek = TAILQ_NEXT (&lfile, link))
- {
- struct so_list *new;
- struct cleanup *old_chain;
- char *buf;
- int errcode;
-
- if (target_read_memory ((CORE_ADDR) lfilek, (char *) &lfile,
- sizeof (lfile)))
- {
- warning ("failed to read linker file data at %p\n", lfilek);
- return 0;
- }
- target_read_string ((CORE_ADDR) lfile.filename, &buf,
- SO_NAME_MAX_PATH_SIZE - 1, &errcode);
- if (errcode != 0)
- {
- warning ("cannot read linker file pathname: %s\n",
- safe_strerror (errcode));
- return 0;
- }
- if (strlen (buf) < 3 || strcmp (&buf[strlen (buf) - 3], ".ko") != 0)
- {
- xfree (buf);
- continue;
- }
-
- new = (struct so_list *) xmalloc (sizeof (struct so_list));
- old_chain = make_cleanup (xfree, new);
-
- memset (new, 0, sizeof (*new));
-
- new->lm_info = xmalloc (sizeof (struct lm_info));
- make_cleanup (xfree, new->lm_info);
-
- new->lm_info->address = (CORE_ADDR) lfile.address;
-
- strncpy (new->so_original_name, buf, SO_NAME_MAX_PATH_SIZE - 1);
- new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
- xfree (buf);
- snprintf (new->so_name, SO_NAME_MAX_PATH_SIZE, "%s",
- guess_modpath (new->so_original_name));
-
- new->next = NULL;
- *link_ptr = new;
- link_ptr = &new->next;
-
- discard_cleanups (old_chain);
- }
- return head;
-}
-
-static int
-kgdb_in_dynsym_resolve_code (CORE_ADDR pc)
-{
- warning ("kgdb_in_dynsym_resolve_code called\n");
- return 0;
-}
-
-static void
-kgdb_special_symbol_handling (void)
-{
-}
-
-static void
-kgdb_solib_create_inferior_hook (void)
-{
- struct so_list *inferior_sos;
-
- inferior_sos = kgdb_current_sos ();
- if (inferior_sos)
- {
- solib_add (NULL, /*from_tty*/0, NULL, auto_solib_add);
- }
-}
-
-static void
-kgdb_clear_solib (void)
-{
-}
-
-static void
-kgdb_free_so (struct so_list *so)
-{
- xfree (so->lm_info);
-}
-
-static int
-try_modpath (char *buf, int buflen, char *fmt, ...)
-{
- struct stat sb;
- va_list ap;
-
- va_start (ap, fmt);
- vsnprintf (buf, buflen, fmt, ap);
- va_end(ap);
-
- return (stat (buf, &sb) == 0);
-}
-
-static char *
-guess_modpath (char *modname)
-{
- static char buf[2048], moddir[128], syspath[1024];
- struct minimal_symbol *msymbol;
- char *kernpath, *objpath, *p, *version;
- int errcode, n, syspathlen;
-
- /* Set default module location */
- snprintf (buf, sizeof (buf), "/boot/kernel/%s", modname);
-
- /* Guess at the subdirectory off sys/modules. XXX, only sometimes correct */
- n = strlen (modname);
- if (n > 3 && strcmp (&modname[n - 3], ".ko") == 0)
- n -= 3;
- snprintf (moddir, sizeof (moddir), "%.*s", n, modname);
-
- /* Try to locate the kernel compile location from version[] */
- msymbol = lookup_minimal_symbol ("version", NULL, symfile_objfile);
- if (msymbol == NULL || SYMBOL_VALUE_ADDRESS (msymbol) == 0)
- {
- warning("cannot find `version' symbol; using default module path\n");
- return buf;
- }
- target_read_string (SYMBOL_VALUE_ADDRESS (msymbol), &version, 2048, &errcode);
- if (errcode != 0)
- {
- warning ("cannot read `version' string; using default module path: %s\n",
- safe_strerror (errcode));
- return buf;
- }
-
- /* Find the kernel build path after user@host: on the second line. */
- if ((p = strchr (version, '\n')) == NULL ||
- (kernpath = strchr (p, ':')) == NULL ||
- (p = strchr (kernpath, '\n')) == NULL)
- {
- warning ("cannot parse version[]; using default module path\n");
- xfree (version);
- return buf;
- }
- kernpath++;
- *p = '\0';
-
- /*
- * Find the absolute path to src/sys by skipping back over path
- * components until we find a "/sys/".
- */
- syspathlen = 0;
- while (p > kernpath && syspathlen == 0)
- {
- while (p > kernpath && *p != '/')
- p--;
- if (strncmp (p, "/sys/", 5) == 0)
- syspathlen = p - kernpath + 4;
- else if (p > kernpath)
- p--;
- }
- if (syspathlen == 0)
- {
- warning ("cannot find /sys/ in `%s'; using default module path\n",
- kernpath);
- xfree (version);
- return buf;
- }
- /*
- * For kernels compiled with buildkernel, the object path will have
- * been prepended to the /sys/ path in `kernpath'.
- */
- objpath = getenv ("MAKEOBJDIRPREFIX");
- if (objpath == NULL)
- objpath = "/usr/obj";
- n = strlen (objpath);
- if (syspathlen > n + 1 && strncmp (kernpath, objpath, n) == 0 &&
- kernpath[n] == '/')
- snprintf (syspath, sizeof (syspath), "%.*s", syspathlen - n, kernpath + n);
- else
- snprintf (syspath, sizeof (syspath), "%.*s", syspathlen, kernpath);
-
- /* Now try to find the module file */
- if (!try_modpath (buf, sizeof (buf), "./%s.debug", modname) &&
- !try_modpath (buf, sizeof (buf), "./%s", modname) && !try_modpath (buf,
- sizeof (buf), "%s/modules%s/modules/%s/%s.debug", kernpath, syspath,
- moddir, modname) && !try_modpath (buf, sizeof (buf),
- "%s/modules%s/modules/%s/%s", kernpath, syspath, moddir, modname) &&
- !try_modpath (buf, sizeof (buf), "/boot/kernel/%s.debug", modname) &&
- !try_modpath (buf, sizeof (buf), "/boot/kernel/%s", modname))
- {
- warning ("cannot find file for module %s\n", modname);
- snprintf (buf, sizeof (buf), "%s", modname);
- }
- xfree (version);
-
- return buf;
-}
-
-struct target_so_ops kgdb_so_ops;
-
-void
-_initialize_kgdb_solib (void)
-{
- kgdb_so_ops.relocate_section_addresses = kgdb_relocate_section_addresses;
- kgdb_so_ops.free_so = kgdb_free_so;
- kgdb_so_ops.clear_solib = kgdb_clear_solib;
- kgdb_so_ops.solib_create_inferior_hook = kgdb_solib_create_inferior_hook;
- kgdb_so_ops.special_symbol_handling = kgdb_special_symbol_handling;
- kgdb_so_ops.current_sos = kgdb_current_sos;
- kgdb_so_ops.open_symbol_file_object = kgdb_open_symbol_file_object;
- kgdb_so_ops.in_dynsym_resolve_code = kgdb_in_dynsym_resolve_code;
-}
diff --git a/gnu/usr.bin/binutils/gdbreplay/Makefile b/gnu/usr.bin/binutils/gdbreplay/Makefile
deleted file mode 100644
index 107051a118739..0000000000000
--- a/gnu/usr.bin/binutils/gdbreplay/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# $FreeBSD$
-
-.include "../Makefile.inc0"
-
-# Not elf specific so don't install in /usr/libexec/elf
-BINDIR=/usr/bin
-
-GDBDIR= ${.CURDIR}/../../../../contrib/gdb
-.PATH: ${GDBDIR}/gdb/gdbserver
-.PATH: ${GDBDIR}/gdb
-
-PROG= gdbreplay
-NO_MAN=
-
-SRCS= gdbreplay.c
-
-CFLAGS+= -I${.CURDIR}/../gdb
-CFLAGS+= -I${GDBDIR}/gdb
-CFLAGS+= -I${GDBDIR}/gdb/config
-CFLAGS+= -I${GDBDIR}/gdb/gdbserver
-CFLAGS+= -DNO_MMALLOC
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/binutils/ld/Makefile b/gnu/usr.bin/binutils/ld/Makefile
index 7774822774351..80467b832545b 100644
--- a/gnu/usr.bin/binutils/ld/Makefile
+++ b/gnu/usr.bin/binutils/ld/Makefile
@@ -10,11 +10,22 @@ CFLAGS+= -O1
PROG= ld
SCRIPTDIR= /usr/libdata/ldscripts
-SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \
- ldgram.y ldlang.c ldlex.l ldmain.c ldmisc.c \
- ldver.c ldwrite.c lexsup.c mri.c
+SRCS+= ldcref.c \
+ ldctor.c \
+ ldemul-list.h \
+ ldemul.c \
+ ldexp.c \
+ ldfile.c \
+ ldgram.y \
+ ldlang.c \
+ ldlex.l \
+ ldmain.c \
+ ldmisc.c \
+ ldver.c \
+ ldwrite.c \
+ lexsup.c \
+ mri.c
-WARNS?= 0 # ldemul.h problem (`struct option' declared inside parameter list)
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\"
@@ -32,7 +43,7 @@ CLEANFILES+= ldemul-list.h stringify.sed
HOST= ${TARGET_TUPLE}
LIBSERACHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
-ELF_SCR_EXT= x xbn xn xr xs xu xc xsc xd xdc
+ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
.for ext in ${ELF_SCR_EXT}
LDSCRIPTS+= ${NATIVE_EMULATION}.${ext}
.endfor
diff --git a/gnu/usr.bin/binutils/ld/armelf_fbsd.sh b/gnu/usr.bin/binutils/ld/armelf_fbsd.sh
index 197180c8bd09e..a7f4740651da4 100644
--- a/gnu/usr.bin/binutils/ld/armelf_fbsd.sh
+++ b/gnu/usr.bin/binutils/ld/armelf_fbsd.sh
@@ -6,10 +6,3 @@ GENERATE_PIE_SCRIPT=yes
unset STACK_ADDR
unset EMBEDDED
-. ${srcdir}/emulparams/armelf.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-MAXPAGESIZE=0x8000
-GENERATE_PIE_SCRIPT=yes
-
-unset STACK_ADDR
-unset EMBEDDED
diff --git a/gnu/usr.bin/binutils/ld/armelfb_fbsd.sh b/gnu/usr.bin/binutils/ld/armelfb_fbsd.sh
index a67fb3820d7c8..72aae1544d3f4 100644
--- a/gnu/usr.bin/binutils/ld/armelfb_fbsd.sh
+++ b/gnu/usr.bin/binutils/ld/armelfb_fbsd.sh
@@ -11,15 +11,3 @@ GENERATE_PIE_SCRIPT=yes
unset STACK_ADDR
unset EMBEDDED
OUTPUT_FORMAT="elf32-bigarm"
-#XXX: This should be used once those bits are merged back in the FSF repo.
-#. ${srcdir}/emulparams/armelf_fbsd.sh
-#
-#OUTPUT_FORMAT="elf32-bigarm"
-. ${srcdir}/emulparams/armelf.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
-MAXPAGESIZE=0x8000
-GENERATE_PIE_SCRIPT=yes
-
-unset STACK_ADDR
-unset EMBEDDED
-OUTPUT_FORMAT="elf32-bigarm"
diff --git a/gnu/usr.bin/binutils/ld/config.h b/gnu/usr.bin/binutils/ld/config.h
index c645f91ea2ec2..42a7f778cf6c0 100644
--- a/gnu/usr.bin/binutils/ld/config.h
+++ b/gnu/usr.bin/binutils/ld/config.h
@@ -1,180 +1,141 @@
/* $FreeBSD$ */
-/* config.h. Generated automatically by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.h. Generated by configure. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
+/* Additional extension a shared object might have. */
+/* #undef EXTRA_SHLIB_EXTENSION */
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#define HAVE_DECL_ENVIRON 0
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
+/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
+ */
+#define HAVE_DECL_FREE 1
-/* Define if you need to in order for stat and other things to work. */
-/* #undef _POSIX_SOURCE */
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#define HAVE_DECL_GETENV 1
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#define HAVE_DECL_GETOPT 1
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#define HAVE_DECL_SBRK 1
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#define HAVE_DECL_STRSTR 1
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#define YYTEXT_POINTER 1
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
-/* Define if you have the __argz_count function. */
-/* #undef HAVE___ARGZ_COUNT */
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
-/* Define if you have the __argz_next function. */
-/* #undef HAVE___ARGZ_NEXT */
+/* Define to 1 if you have the <elf-hints.h> header file. */
+#define HAVE_ELF_HINTS_H 1
-/* Define if you have the __argz_stringify function. */
-/* #undef HAVE___ARGZ_STRINGIFY */
+/* Define to 1 if you have the `glob' function. */
+#define HAVE_GLOB 1
-/* Define if you have the dcgettext function. */
-/* #undef HAVE_DCGETTEXT */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
-/* Define if you have the munmap function. */
-#define HAVE_MUNMAP 1
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
-/* Define if you have the realpath function. */
+/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1
-/* Define if you have the sbrk function. */
+/* Define to 1 if you have the `sbrk' function. */
#define HAVE_SBRK 1
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
-/* Define if you have the stpcpy function. */
-#define HAVE_STPCPY 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the <malloc.h> header file. */
-/* #undef HAVE_MALLOC_H */
-
-/* Define if you have the <ndir.h> header file. */
-/* #undef HAVE_NDIR_H */
-
-/* Define if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
-
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
-/* Define if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
/* #undef HAVE_SYS_DIR_H */
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
/* #undef HAVE_SYS_NDIR_H */
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
-/* Define if you have the <values.h> header file. */
-/* #undef HAVE_VALUES_H */
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
-/* Name of package */
-#define PACKAGE "ld"
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
-/* Version number of package */
-/* #define VERSION "2.15" */
+/* Define to 1 if you have the `waitpid' function. */
+#define HAVE_WAITPID 1
-/* Define if you have the stpcpy function */
-#define HAVE_STPCPY 1
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
-/* Define if your locale.h file contains LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
+/* Name of package */
+#define PACKAGE "ld"
-/* Define to 1 if NLS is requested */
-/* #define ENABLE_NLS 1 */
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-/* #undef HAVE_GETTEXT */
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
-/* Use b modifier when opening binary files? */
-/* #undef USE_BINARY_FOPEN */
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
-/* Define if strstr is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRSTR */
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
-/* Define if free is not declared in system header files. */
-/* #undef NEED_DECLARATION_FREE */
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
-/* Define if sbrk is not declared in system header files. */
-/* #undef NEED_DECLARATION_SBRK */
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
-/* Define if getenv is not declared in system header files. */
-/* #undef NEED_DECLARATION_GETENV */
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
-/* Define if environ is not declared in system header files. */
-#define NEED_DECLARATION_ENVIRON 1
+/* Use b modifier when opening binary files? */
+/* #undef USE_BINARY_FOPEN */
-/* Additional extension a shared object might have. */
-/* #undef EXTRA_SHLIB_EXTENSION */
+/* Version number of package */
+/* #define VERSION "2.17.50" */
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#define YYTEXT_POINTER 1
diff --git a/gnu/usr.bin/binutils/ld/genscripts.sh b/gnu/usr.bin/binutils/ld/genscripts.sh
index 6f8da9f7f2cb9..5090cd3f8779f 100755
--- a/gnu/usr.bin/binutils/ld/genscripts.sh
+++ b/gnu/usr.bin/binutils/ld/genscripts.sh
@@ -70,7 +70,6 @@ fi
# To force a logically empty LIB_PATH, do LIBPATH=":".
LIB_SEARCH_DIRS=`echo ${libdir} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\1);/g'`
-#2.13: LIB_SEARCH_DIRS=`echo ${libdir} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
# Generate 5 or 6 script files from a master script template in
# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
@@ -97,11 +96,10 @@ if [ "x$SCRIPT_NAME" = "xelf" ]; then
GENERATE_COMBRELOC_SCRIPT=yes
fi
-#2.13: SEGMENT_SIZE=${SEGMENT_SIZE-${TARGET_PAGE_SIZE}}
SEGMENT_SIZE=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
# Determine DATA_ALIGNMENT for the 5 variants, using
-# values specified in the emulparams/<emulation>.sh file or default.
+# values specified in the emulparams/<script_to_run>.sh file or default.
DATA_ALIGNMENT_="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
DATA_ALIGNMENT_n="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
@@ -157,7 +155,16 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
rm -f ${COMBRELOC}
+ LD_FLAG=w
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp
+ ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
if test -n "$GENERATE_SHLIB_SCRIPT"; then
@@ -173,13 +180,22 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cshared
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsc.tmp
( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
rm -f ${COMBRELOC}
+ LD_FLAG=wshared
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp
+ ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
unset CREATE_SHLIB
fi
@@ -197,13 +213,22 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=cpie
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdc.tmp
( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
rm -f ${COMBRELOC}
+ LD_FLAG=wpie
+ RELRO_NOW=" "
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp
+ ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw
+ rm -f ${COMBRELOC}
COMBRELOC=
+ unset RELRO_NOW
fi
unset CREATE_PIE
fi
diff --git a/gnu/usr.bin/binutils/ld/ld.1 b/gnu/usr.bin/binutils/ld/ld.1
new file mode 100644
index 0000000000000..d1e29b8987ade
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/ld.1
@@ -0,0 +1,2156 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "LD 1"
+.TH LD 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+ld \- The GNU linker
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+ld [\fBoptions\fR] \fIobjfile\fR ...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBld\fR combines a number of object and archive files, relocates
+their data and ties up symbol references. Usually the last step in
+compiling a program is to run \fBld\fR.
+.PP
+\&\fBld\fR accepts Linker Command Language files written in
+a superset of \s-1AT&T\s0's Link Editor Command Language syntax,
+to provide explicit and total control over the linking process.
+.PP
+This man page does not describe the command language; see the
+\&\fBld\fR entry in \f(CW\*(C`info\*(C'\fR for full details on the command
+language and on other aspects of the \s-1GNU\s0 linker.
+.PP
+This version of \fBld\fR uses the general purpose \s-1BFD\s0 libraries
+to operate on object files. This allows \fBld\fR to read, combine, and
+write object files in many different formats\-\-\-for example, \s-1COFF\s0 or
+\&\f(CW\*(C`a.out\*(C'\fR. Different formats may be linked together to produce any
+available kind of object file.
+.PP
+Aside from its flexibility, the \s-1GNU\s0 linker is more helpful than other
+linkers in providing diagnostic information. Many linkers abandon
+execution immediately upon encountering an error; whenever possible,
+\&\fBld\fR continues executing, allowing you to identify other errors
+(or, in some cases, to get an output file in spite of the error).
+.PP
+The \s-1GNU\s0 linker \fBld\fR is meant to cover a broad range of situations,
+and to be as compatible as possible with other linkers. As a result,
+you have many choices to control its behavior.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The linker supports a plethora of command-line options, but in actual
+practice few of them are used in any particular context.
+For instance, a frequent use of \fBld\fR is to link standard Unix
+object files on a standard, supported Unix system. On such a system, to
+link a file \f(CW\*(C`hello.o\*(C'\fR:
+.PP
+.Vb 1
+\& ld \-o <output> /lib/crt0.o hello.o \-lc
+.Ve
+.PP
+This tells \fBld\fR to produce a file called \fIoutput\fR as the
+result of linking the file \f(CW\*(C`/lib/crt0.o\*(C'\fR with \f(CW\*(C`hello.o\*(C'\fR and
+the library \f(CW\*(C`libc.a\*(C'\fR, which will come from the standard search
+directories. (See the discussion of the \fB\-l\fR option below.)
+.PP
+Some of the command-line options to \fBld\fR may be specified at any
+point in the command line. However, options which refer to files, such
+as \fB\-l\fR or \fB\-T\fR, cause the file to be read at the point at
+which the option appears in the command line, relative to the object
+files and other file options. Repeating non-file options with a
+different argument will either have no further effect, or override prior
+occurrences (those further to the left on the command line) of that
+option. Options which may be meaningfully specified more than once are
+noted in the descriptions below.
+.PP
+Non-option arguments are object files or archives which are to be linked
+together. They may follow, precede, or be mixed in with command-line
+options, except that an object file argument may not be placed between
+an option and its argument.
+.PP
+Usually the linker is invoked with at least one object file, but you can
+specify other forms of binary input files using \fB\-l\fR, \fB\-R\fR,
+and the script command language. If \fIno\fR binary input files at all
+are specified, the linker does not produce any output, and issues the
+message \fBNo input files\fR.
+.PP
+If the linker cannot recognize the format of an object file, it will
+assume that it is a linker script. A script specified in this way
+augments the main linker script used for the link (either the default
+linker script or the one specified by using \fB\-T\fR). This feature
+permits the linker to link against a file which appears to be an object
+or an archive, but actually merely defines some symbol values, or uses
+\&\f(CW\*(C`INPUT\*(C'\fR or \f(CW\*(C`GROUP\*(C'\fR to load other objects. Note that
+specifying a script in this way merely augments the main linker script;
+use the \fB\-T\fR option to replace the default linker script entirely.
+.PP
+For options whose names are a single letter,
+option arguments must either follow the option letter without intervening
+whitespace, or be given as separate arguments immediately following the
+option that requires them.
+.PP
+For options whose names are multiple letters, either one dash or two can
+precede the option name; for example, \fB\-trace\-symbol\fR and
+\&\fB\-\-trace\-symbol\fR are equivalent. Note\-\-\-there is one exception to
+this rule. Multiple letter options that start with a lower case 'o' can
+only be preceded by two dashes. This is to reduce confusion with the
+\&\fB\-o\fR option. So for example \fB\-omagic\fR sets the output file
+name to \fBmagic\fR whereas \fB\-\-omagic\fR sets the \s-1NMAGIC\s0 flag on the
+output.
+.PP
+Arguments to multiple-letter options must either be separated from the
+option name by an equals sign, or be given as separate arguments
+immediately following the option that requires them. For example,
+\&\fB\-\-trace\-symbol foo\fR and \fB\-\-trace\-symbol=foo\fR are equivalent.
+Unique abbreviations of the names of multiple-letter options are
+accepted.
+.PP
+Note\-\-\-if the linker is being invoked indirectly, via a compiler driver
+(e.g. \fBgcc\fR) then all the linker command line options should be
+prefixed by \fB\-Wl,\fR (or whatever is appropriate for the particular
+compiler driver) like this:
+.PP
+.Vb 1
+\& gcc \-Wl,\-\-startgroup foo.o bar.o \-Wl,\-\-endgroup
+.Ve
+.PP
+This is important, because otherwise the compiler driver program may
+silently drop the linker options, resulting in a bad link.
+.PP
+Here is a table of the generic command line switches accepted by the \s-1GNU\s0
+linker:
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.IP "\fB\-a\fR\fIkeyword\fR" 4
+.IX Item "-akeyword"
+This option is supported for \s-1HP/UX\s0 compatibility. The \fIkeyword\fR
+argument must be one of the strings \fBarchive\fR, \fBshared\fR, or
+\&\fBdefault\fR. \fB\-aarchive\fR is functionally equivalent to
+\&\fB\-Bstatic\fR, and the other two keywords are functionally equivalent
+to \fB\-Bdynamic\fR. This option may be used any number of times.
+.IP "\fB\-A\fR\fIarchitecture\fR" 4
+.IX Item "-Aarchitecture"
+.PD 0
+.IP "\fB\-\-architecture=\fR\fIarchitecture\fR" 4
+.IX Item "--architecture=architecture"
+.PD
+In the current release of \fBld\fR, this option is useful only for the
+Intel 960 family of architectures. In that \fBld\fR configuration, the
+\&\fIarchitecture\fR argument identifies the particular architecture in
+the 960 family, enabling some safeguards and modifying the
+archive-library search path.
+.Sp
+Future releases of \fBld\fR may support similar functionality for
+other architecture families.
+.IP "\fB\-b\fR \fIinput-format\fR" 4
+.IX Item "-b input-format"
+.PD 0
+.IP "\fB\-\-format=\fR\fIinput-format\fR" 4
+.IX Item "--format=input-format"
+.PD
+\&\fBld\fR may be configured to support more than one kind of object
+file. If your \fBld\fR is configured this way, you can use the
+\&\fB\-b\fR option to specify the binary format for input object files
+that follow this option on the command line. Even when \fBld\fR is
+configured to support alternative object formats, you don't usually need
+to specify this, as \fBld\fR should be configured to expect as a
+default input format the most usual format on each machine.
+\&\fIinput-format\fR is a text string, the name of a particular format
+supported by the \s-1BFD\s0 libraries. (You can list the available binary
+formats with \fBobjdump \-i\fR.)
+.Sp
+You may want to use this option if you are linking files with an unusual
+binary format. You can also use \fB\-b\fR to switch formats explicitly (when
+linking object files of different formats), by including
+\&\fB\-b\fR \fIinput-format\fR before each group of object files in a
+particular format.
+.Sp
+The default format is taken from the environment variable
+\&\f(CW\*(C`GNUTARGET\*(C'\fR.
+.Sp
+You can also define the input format from a script, using the command
+\&\f(CW\*(C`TARGET\*(C'\fR;
+.IP "\fB\-c\fR \fIMRI-commandfile\fR" 4
+.IX Item "-c MRI-commandfile"
+.PD 0
+.IP "\fB\-\-mri\-script=\fR\fIMRI-commandfile\fR" 4
+.IX Item "--mri-script=MRI-commandfile"
+.PD
+For compatibility with linkers produced by \s-1MRI\s0, \fBld\fR accepts script
+files written in an alternate, restricted command language, described in
+the \s-1MRI\s0 Compatible Script Files section of \s-1GNU\s0 ld documentation.
+Introduce \s-1MRI\s0 script files with
+the option \fB\-c\fR; use the \fB\-T\fR option to run linker
+scripts written in the general-purpose \fBld\fR scripting language.
+If \fIMRI-cmdfile\fR does not exist, \fBld\fR looks for it in the directories
+specified by any \fB\-L\fR options.
+.IP "\fB\-d\fR" 4
+.IX Item "-d"
+.PD 0
+.IP "\fB\-dc\fR" 4
+.IX Item "-dc"
+.IP "\fB\-dp\fR" 4
+.IX Item "-dp"
+.PD
+These three options are equivalent; multiple forms are supported for
+compatibility with other linkers. They assign space to common symbols
+even if a relocatable output file is specified (with \fB\-r\fR). The
+script command \f(CW\*(C`FORCE_COMMON_ALLOCATION\*(C'\fR has the same effect.
+.IP "\fB\-e\fR \fIentry\fR" 4
+.IX Item "-e entry"
+.PD 0
+.IP "\fB\-\-entry=\fR\fIentry\fR" 4
+.IX Item "--entry=entry"
+.PD
+Use \fIentry\fR as the explicit symbol for beginning execution of your
+program, rather than the default entry point. If there is no symbol
+named \fIentry\fR, the linker will try to parse \fIentry\fR as a number,
+and use that as the entry address (the number will be interpreted in
+base 10; you may use a leading \fB0x\fR for base 16, or a leading
+\&\fB0\fR for base 8).
+.IP "\fB\-\-exclude\-libs\fR \fIlib\fR\fB,\fR\fIlib\fR\fB,...\fR" 4
+.IX Item "--exclude-libs lib,lib,..."
+Specifies a list of archive libraries from which symbols should not be automatically
+exported. The library names may be delimited by commas or colons. Specifying
+\&\f(CW\*(C`\-\-exclude\-libs ALL\*(C'\fR excludes symbols in all archive libraries from
+automatic export. This option is available only for the i386 \s-1PE\s0 targeted
+port of the linker and for \s-1ELF\s0 targeted ports. For i386 \s-1PE\s0, symbols
+explicitly listed in a .def file are still exported, regardless of this
+option. For \s-1ELF\s0 targeted ports, symbols affected by this option will
+be treated as hidden.
+.IP "\fB\-E\fR" 4
+.IX Item "-E"
+.PD 0
+.IP "\fB\-\-export\-dynamic\fR" 4
+.IX Item "--export-dynamic"
+.PD
+When creating a dynamically linked executable, add all symbols to the
+dynamic symbol table. The dynamic symbol table is the set of symbols
+which are visible from dynamic objects at run time.
+.Sp
+If you do not use this option, the dynamic symbol table will normally
+contain only those symbols which are referenced by some dynamic object
+mentioned in the link.
+.Sp
+If you use \f(CW\*(C`dlopen\*(C'\fR to load a dynamic object which needs to refer
+back to the symbols defined by the program, rather than some other
+dynamic object, then you will probably need to use this option when
+linking the program itself.
+.Sp
+You can also use the dynamic list to control what symbols should
+be added to the dynamic symbol table if the output format supports it.
+See the description of \fB\-\-dynamic\-list\fR.
+.IP "\fB\-EB\fR" 4
+.IX Item "-EB"
+Link big-endian objects. This affects the default output format.
+.IP "\fB\-EL\fR" 4
+.IX Item "-EL"
+Link little-endian objects. This affects the default output format.
+.IP "\fB\-f\fR" 4
+.IX Item "-f"
+.PD 0
+.IP "\fB\-\-auxiliary\fR \fIname\fR" 4
+.IX Item "--auxiliary name"
+.PD
+When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_AUXILIARY\s0 field
+to the specified name. This tells the dynamic linker that the symbol
+table of the shared object should be used as an auxiliary filter on the
+symbol table of the shared object \fIname\fR.
+.Sp
+If you later link a program against this filter object, then, when you
+run the program, the dynamic linker will see the \s-1DT_AUXILIARY\s0 field. If
+the dynamic linker resolves any symbols from the filter object, it will
+first check whether there is a definition in the shared object
+\&\fIname\fR. If there is one, it will be used instead of the definition
+in the filter object. The shared object \fIname\fR need not exist.
+Thus the shared object \fIname\fR may be used to provide an alternative
+implementation of certain functions, perhaps for debugging or for
+machine specific performance.
+.Sp
+This option may be specified more than once. The \s-1DT_AUXILIARY\s0 entries
+will be created in the order in which they appear on the command line.
+.IP "\fB\-F\fR \fIname\fR" 4
+.IX Item "-F name"
+.PD 0
+.IP "\fB\-\-filter\fR \fIname\fR" 4
+.IX Item "--filter name"
+.PD
+When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_FILTER\s0 field to
+the specified name. This tells the dynamic linker that the symbol table
+of the shared object which is being created should be used as a filter
+on the symbol table of the shared object \fIname\fR.
+.Sp
+If you later link a program against this filter object, then, when you
+run the program, the dynamic linker will see the \s-1DT_FILTER\s0 field. The
+dynamic linker will resolve symbols according to the symbol table of the
+filter object as usual, but it will actually link to the definitions
+found in the shared object \fIname\fR. Thus the filter object can be
+used to select a subset of the symbols provided by the object
+\&\fIname\fR.
+.Sp
+Some older linkers used the \fB\-F\fR option throughout a compilation
+toolchain for specifying object-file format for both input and output
+object files.
+The \s-1GNU\s0 linker uses other mechanisms for this purpose: the
+\&\fB\-b\fR, \fB\-\-format\fR, \fB\-\-oformat\fR options, the
+\&\f(CW\*(C`TARGET\*(C'\fR command in linker scripts, and the \f(CW\*(C`GNUTARGET\*(C'\fR
+environment variable.
+The \s-1GNU\s0 linker will ignore the \fB\-F\fR option when not
+creating an \s-1ELF\s0 shared object.
+.IP "\fB\-fini\fR \fIname\fR" 4
+.IX Item "-fini name"
+When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
+executable or shared object is unloaded, by setting \s-1DT_FINI\s0 to the
+address of the function. By default, the linker uses \f(CW\*(C`_fini\*(C'\fR as
+the function to call.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+Ignored. Provided for compatibility with other tools.
+.IP "\fB\-G\fR\fIvalue\fR" 4
+.IX Item "-Gvalue"
+.PD 0
+.IP "\fB\-\-gpsize=\fR\fIvalue\fR" 4
+.IX Item "--gpsize=value"
+.PD
+Set the maximum size of objects to be optimized using the \s-1GP\s0 register to
+\&\fIsize\fR. This is only meaningful for object file formats such as
+\&\s-1MIPS\s0 \s-1ECOFF\s0 which supports putting large and small objects into different
+sections. This is ignored for other object file formats.
+.IP "\fB\-h\fR\fIname\fR" 4
+.IX Item "-hname"
+.PD 0
+.IP "\fB\-soname=\fR\fIname\fR" 4
+.IX Item "-soname=name"
+.PD
+When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_SONAME\s0 field to
+the specified name. When an executable is linked with a shared object
+which has a \s-1DT_SONAME\s0 field, then when the executable is run the dynamic
+linker will attempt to load the shared object specified by the \s-1DT_SONAME\s0
+field rather than the using the file name given to the linker.
+.IP "\fB\-i\fR" 4
+.IX Item "-i"
+Perform an incremental link (same as option \fB\-r\fR).
+.IP "\fB\-init\fR \fIname\fR" 4
+.IX Item "-init name"
+When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
+executable or shared object is loaded, by setting \s-1DT_INIT\s0 to the address
+of the function. By default, the linker uses \f(CW\*(C`_init\*(C'\fR as the
+function to call.
+.IP "\fB\-l\fR\fInamespec\fR" 4
+.IX Item "-lnamespec"
+.PD 0
+.IP "\fB\-\-library=\fR\fInamespec\fR" 4
+.IX Item "--library=namespec"
+.PD
+Add the archive or object file specified by \fInamespec\fR to the
+list of files to link. This option may be used any number of times.
+If \fInamespec\fR is of the form \fI:\fIfilename\fI\fR, \fBld\fR
+will search the library path for a file called \fIfilename\fR, otherise it
+will search the library path for a file called \fIlib\fInamespec\fI.a\fR.
+.Sp
+On systems which support shared libraries, \fBld\fR may also search for
+files other than \fIlib\fInamespec\fI.a\fR. Specifically, on \s-1ELF\s0
+and SunOS systems, \fBld\fR will search a directory for a library
+called \fIlib\fInamespec\fI.so\fR before searching for one called
+\&\fIlib\fInamespec\fI.a\fR. (By convention, a \f(CW\*(C`.so\*(C'\fR extension
+indicates a shared library.) Note that this behavior does not apply
+to \fI:\fIfilename\fI\fR, which always specifies a file called
+\&\fIfilename\fR.
+.Sp
+The linker will search an archive only once, at the location where it is
+specified on the command line. If the archive defines a symbol which
+was undefined in some object which appeared before the archive on the
+command line, the linker will include the appropriate file(s) from the
+archive. However, an undefined symbol in an object appearing later on
+the command line will not cause the linker to search the archive again.
+.Sp
+See the \fB\-(\fR option for a way to force the linker to search
+archives multiple times.
+.Sp
+You may list the same archive multiple times on the command line.
+.Sp
+This type of archive searching is standard for Unix linkers. However,
+if you are using \fBld\fR on \s-1AIX\s0, note that it is different from the
+behaviour of the \s-1AIX\s0 linker.
+.IP "\fB\-L\fR\fIsearchdir\fR" 4
+.IX Item "-Lsearchdir"
+.PD 0
+.IP "\fB\-\-library\-path=\fR\fIsearchdir\fR" 4
+.IX Item "--library-path=searchdir"
+.PD
+Add path \fIsearchdir\fR to the list of paths that \fBld\fR will search
+for archive libraries and \fBld\fR control scripts. You may use this
+option any number of times. The directories are searched in the order
+in which they are specified on the command line. Directories specified
+on the command line are searched before the default directories. All
+\&\fB\-L\fR options apply to all \fB\-l\fR options, regardless of the
+order in which the options appear.
+.Sp
+If \fIsearchdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
+by the \fIsysroot prefix\fR, a path specified when the linker is configured.
+.Sp
+The default set of paths searched (without being specified with
+\&\fB\-L\fR) depends on which emulation mode \fBld\fR is using, and in
+some cases also on how it was configured.
+.Sp
+The paths can also be specified in a link script with the
+\&\f(CW\*(C`SEARCH_DIR\*(C'\fR command. Directories specified this way are searched
+at the point in which the linker script appears in the command line.
+.IP "\fB\-m\fR\fIemulation\fR" 4
+.IX Item "-memulation"
+Emulate the \fIemulation\fR linker. You can list the available
+emulations with the \fB\-\-verbose\fR or \fB\-V\fR options.
+.Sp
+If the \fB\-m\fR option is not used, the emulation is taken from the
+\&\f(CW\*(C`LDEMULATION\*(C'\fR environment variable, if that is defined.
+.Sp
+Otherwise, the default emulation depends upon how the linker was
+configured.
+.IP "\fB\-M\fR" 4
+.IX Item "-M"
+.PD 0
+.IP "\fB\-\-print\-map\fR" 4
+.IX Item "--print-map"
+.PD
+Print a link map to the standard output. A link map provides
+information about the link, including the following:
+.RS 4
+.IP "\(bu" 4
+Where object files are mapped into memory.
+.IP "\(bu" 4
+How common symbols are allocated.
+.IP "\(bu" 4
+All archive members included in the link, with a mention of the symbol
+which caused the archive member to be brought in.
+.IP "\(bu" 4
+The values assigned to symbols.
+.Sp
+Note \- symbols whose values are computed by an expression which
+involves a reference to a previous value of the same symbol may not
+have correct result displayed in the link map. This is because the
+linker discards intermediate results and only retains the final value
+of an expression. Under such circumstances the linker will display
+the final value enclosed by square brackets. Thus for example a
+linker script containing:
+.Sp
+.Vb 3
+\& foo = 1
+\& foo = foo * 4
+\& foo = foo + 8
+.Ve
+.Sp
+will produce the following output in the link map if the \fB\-M\fR
+option is used:
+.Sp
+.Vb 3
+\& 0x00000001 foo = 0x1
+\& [0x0000000c] foo = (foo * 0x4)
+\& [0x0000000c] foo = (foo + 0x8)
+.Ve
+.Sp
+See \fBExpressions\fR for more information about expressions in linker
+scripts.
+.RE
+.RS 4
+.RE
+.IP "\fB\-n\fR" 4
+.IX Item "-n"
+.PD 0
+.IP "\fB\-\-nmagic\fR" 4
+.IX Item "--nmagic"
+.PD
+Turn off page alignment of sections, and mark the output as
+\&\f(CW\*(C`NMAGIC\*(C'\fR if possible.
+.IP "\fB\-N\fR" 4
+.IX Item "-N"
+.PD 0
+.IP "\fB\-\-omagic\fR" 4
+.IX Item "--omagic"
+.PD
+Set the text and data sections to be readable and writable. Also, do
+not page-align the data segment, and disable linking against shared
+libraries. If the output format supports Unix style magic numbers,
+mark the output as \f(CW\*(C`OMAGIC\*(C'\fR. Note: Although a writable text section
+is allowed for PE-COFF targets, it does not conform to the format
+specification published by Microsoft.
+.IP "\fB\-\-no\-omagic\fR" 4
+.IX Item "--no-omagic"
+This option negates most of the effects of the \fB\-N\fR option. It
+sets the text section to be read-only, and forces the data segment to
+be page-aligned. Note \- this option does not enable linking against
+shared libraries. Use \fB\-Bdynamic\fR for this.
+.IP "\fB\-o\fR \fIoutput\fR" 4
+.IX Item "-o output"
+.PD 0
+.IP "\fB\-\-output=\fR\fIoutput\fR" 4
+.IX Item "--output=output"
+.PD
+Use \fIoutput\fR as the name for the program produced by \fBld\fR; if this
+option is not specified, the name \fIa.out\fR is used by default. The
+script command \f(CW\*(C`OUTPUT\*(C'\fR can also specify the output file name.
+.IP "\fB\-O\fR \fIlevel\fR" 4
+.IX Item "-O level"
+If \fIlevel\fR is a numeric values greater than zero \fBld\fR optimizes
+the output. This might take significantly longer and therefore probably
+should only be enabled for the final binary.
+.IP "\fB\-q\fR" 4
+.IX Item "-q"
+.PD 0
+.IP "\fB\-\-emit\-relocs\fR" 4
+.IX Item "--emit-relocs"
+.PD
+Leave relocation sections and contents in fully linked executables.
+Post link analysis and optimization tools may need this information in
+order to perform correct modifications of executables. This results
+in larger executables.
+.Sp
+This option is currently only supported on \s-1ELF\s0 platforms.
+.IP "\fB\-\-force\-dynamic\fR" 4
+.IX Item "--force-dynamic"
+Force the output file to have dynamic sections. This option is specific
+to VxWorks targets.
+.IP "\fB\-r\fR" 4
+.IX Item "-r"
+.PD 0
+.IP "\fB\-\-relocatable\fR" 4
+.IX Item "--relocatable"
+.PD
+Generate relocatable output\-\-\-i.e., generate an output file that can in
+turn serve as input to \fBld\fR. This is often called \fIpartial
+linking\fR. As a side effect, in environments that support standard Unix
+magic numbers, this option also sets the output file's magic number to
+\&\f(CW\*(C`OMAGIC\*(C'\fR.
+If this option is not specified, an absolute file is produced. When
+linking \*(C+ programs, this option \fIwill not\fR resolve references to
+constructors; to do that, use \fB\-Ur\fR.
+.Sp
+When an input file does not have the same format as the output file,
+partial linking is only supported if that input file does not contain any
+relocations. Different output formats can have further restrictions; for
+example some \f(CW\*(C`a.out\*(C'\fR\-based formats do not support partial linking
+with input files in other formats at all.
+.Sp
+This option does the same thing as \fB\-i\fR.
+.IP "\fB\-R\fR \fIfilename\fR" 4
+.IX Item "-R filename"
+.PD 0
+.IP "\fB\-\-just\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--just-symbols=filename"
+.PD
+Read symbol names and their addresses from \fIfilename\fR, but do not
+relocate it or include it in the output. This allows your output file
+to refer symbolically to absolute locations of memory defined in other
+programs. You may use this option more than once.
+.Sp
+For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
+followed by a directory name, rather than a file name, it is treated as
+the \fB\-rpath\fR option.
+.IP "\fB\-s\fR" 4
+.IX Item "-s"
+.PD 0
+.IP "\fB\-\-strip\-all\fR" 4
+.IX Item "--strip-all"
+.PD
+Omit all symbol information from the output file.
+.IP "\fB\-S\fR" 4
+.IX Item "-S"
+.PD 0
+.IP "\fB\-\-strip\-debug\fR" 4
+.IX Item "--strip-debug"
+.PD
+Omit debugger symbol information (but not all symbols) from the output file.
+.IP "\fB\-t\fR" 4
+.IX Item "-t"
+.PD 0
+.IP "\fB\-\-trace\fR" 4
+.IX Item "--trace"
+.PD
+Print the names of the input files as \fBld\fR processes them.
+.IP "\fB\-T\fR \fIscriptfile\fR" 4
+.IX Item "-T scriptfile"
+.PD 0
+.IP "\fB\-\-script=\fR\fIscriptfile\fR" 4
+.IX Item "--script=scriptfile"
+.PD
+Use \fIscriptfile\fR as the linker script. This script replaces
+\&\fBld\fR's default linker script (rather than adding to it), so
+\&\fIcommandfile\fR must specify everything necessary to describe the
+output file. If \fIscriptfile\fR does not exist in
+the current directory, \f(CW\*(C`ld\*(C'\fR looks for it in the directories
+specified by any preceding \fB\-L\fR options. Multiple \fB\-T\fR
+options accumulate.
+.IP "\fB\-dT\fR \fIscriptfile\fR" 4
+.IX Item "-dT scriptfile"
+.PD 0
+.IP "\fB\-\-default\-script=\fR\fIscriptfile\fR" 4
+.IX Item "--default-script=scriptfile"
+.PD
+Use \fIscriptfile\fR as the default linker script.
+.Sp
+This option is similar to the \fB\-\-script\fR option except that
+processing of the script is delayed until after the rest of the
+command line has been processed. This allows options placed after the
+\&\fB\-\-default\-script\fR option on the command line to affect the
+behaviour of the linker script, which can be important when the linker
+command line cannot be directly controlled by the user. (eg because
+the command line is being constructed by another tool, such as
+\&\fBgcc\fR).
+.IP "\fB\-u\fR \fIsymbol\fR" 4
+.IX Item "-u symbol"
+.PD 0
+.IP "\fB\-\-undefined=\fR\fIsymbol\fR" 4
+.IX Item "--undefined=symbol"
+.PD
+Force \fIsymbol\fR to be entered in the output file as an undefined
+symbol. Doing this may, for example, trigger linking of additional
+modules from standard libraries. \fB\-u\fR may be repeated with
+different option arguments to enter additional undefined symbols. This
+option is equivalent to the \f(CW\*(C`EXTERN\*(C'\fR linker script command.
+.IP "\fB\-Ur\fR" 4
+.IX Item "-Ur"
+For anything other than \*(C+ programs, this option is equivalent to
+\&\fB\-r\fR: it generates relocatable output\-\-\-i.e., an output file that can in
+turn serve as input to \fBld\fR. When linking \*(C+ programs, \fB\-Ur\fR
+\&\fIdoes\fR resolve references to constructors, unlike \fB\-r\fR.
+It does not work to use \fB\-Ur\fR on files that were themselves linked
+with \fB\-Ur\fR; once the constructor table has been built, it cannot
+be added to. Use \fB\-Ur\fR only for the last partial link, and
+\&\fB\-r\fR for the others.
+.IP "\fB\-\-unique[=\fR\fI\s-1SECTION\s0\fR\fB]\fR" 4
+.IX Item "--unique[=SECTION]"
+Creates a separate output section for every input section matching
+\&\fI\s-1SECTION\s0\fR, or if the optional wildcard \fI\s-1SECTION\s0\fR argument is
+missing, for every orphan input section. An orphan section is one not
+specifically mentioned in a linker script. You may use this option
+multiple times on the command line; It prevents the normal merging of
+input sections with the same name, overriding output section assignments
+in a linker script.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD
+Display the version number for \fBld\fR. The \fB\-V\fR option also
+lists the supported emulations.
+.IP "\fB\-x\fR" 4
+.IX Item "-x"
+.PD 0
+.IP "\fB\-\-discard\-all\fR" 4
+.IX Item "--discard-all"
+.PD
+Delete all local symbols.
+.IP "\fB\-X\fR" 4
+.IX Item "-X"
+.PD 0
+.IP "\fB\-\-discard\-locals\fR" 4
+.IX Item "--discard-locals"
+.PD
+Delete all temporary local symbols. (These symbols start with
+system-specific local label prefixes, typically \fB.L\fR for \s-1ELF\s0 systems
+or \fBL\fR for traditional a.out systems.)
+.IP "\fB\-y\fR \fIsymbol\fR" 4
+.IX Item "-y symbol"
+.PD 0
+.IP "\fB\-\-trace\-symbol=\fR\fIsymbol\fR" 4
+.IX Item "--trace-symbol=symbol"
+.PD
+Print the name of each linked file in which \fIsymbol\fR appears. This
+option may be given any number of times. On many systems it is necessary
+to prepend an underscore.
+.Sp
+This option is useful when you have an undefined symbol in your link but
+don't know where the reference is coming from.
+.IP "\fB\-Y\fR \fIpath\fR" 4
+.IX Item "-Y path"
+Add \fIpath\fR to the default library search path. This option exists
+for Solaris compatibility.
+.IP "\fB\-z\fR \fIkeyword\fR" 4
+.IX Item "-z keyword"
+The recognized keywords are:
+.RS 4
+.IP "\fBcombreloc\fR" 4
+.IX Item "combreloc"
+Combines multiple reloc sections and sorts them to make dynamic symbol
+lookup caching possible.
+.IP "\fBdefs\fR" 4
+.IX Item "defs"
+Disallows undefined symbols in object files. Undefined symbols in
+shared libraries are still allowed.
+.IP "\fBexecstack\fR" 4
+.IX Item "execstack"
+Marks the object as requiring executable stack.
+.IP "\fBinitfirst\fR" 4
+.IX Item "initfirst"
+This option is only meaningful when building a shared object.
+It marks the object so that its runtime initialization will occur
+before the runtime initialization of any other objects brought into
+the process at the same time. Similarly the runtime finalization of
+the object will occur after the runtime finalization of any other
+objects.
+.IP "\fBinterpose\fR" 4
+.IX Item "interpose"
+Marks the object that its symbol table interposes before all symbols
+but the primary executable.
+.IP "\fBlazy\fR" 4
+.IX Item "lazy"
+When generating an executable or shared library, mark it to tell the
+dynamic linker to defer function call resolution to the point when
+the function is called (lazy binding), rather than at load time.
+Lazy binding is the default.
+.IP "\fBloadfltr\fR" 4
+.IX Item "loadfltr"
+Marks the object that its filters be processed immediately at
+runtime.
+.IP "\fBmuldefs\fR" 4
+.IX Item "muldefs"
+Allows multiple definitions.
+.IP "\fBnocombreloc\fR" 4
+.IX Item "nocombreloc"
+Disables multiple reloc sections combining.
+.IP "\fBnocopyreloc\fR" 4
+.IX Item "nocopyreloc"
+Disables production of copy relocs.
+.IP "\fBnodefaultlib\fR" 4
+.IX Item "nodefaultlib"
+Marks the object that the search for dependencies of this object will
+ignore any default library search paths.
+.IP "\fBnodelete\fR" 4
+.IX Item "nodelete"
+Marks the object shouldn't be unloaded at runtime.
+.IP "\fBnodlopen\fR" 4
+.IX Item "nodlopen"
+Marks the object not available to \f(CW\*(C`dlopen\*(C'\fR.
+.IP "\fBnodump\fR" 4
+.IX Item "nodump"
+Marks the object can not be dumped by \f(CW\*(C`dldump\*(C'\fR.
+.IP "\fBnoexecstack\fR" 4
+.IX Item "noexecstack"
+Marks the object as not requiring executable stack.
+.IP "\fBnorelro\fR" 4
+.IX Item "norelro"
+Don't create an \s-1ELF\s0 \f(CW\*(C`PT_GNU_RELRO\*(C'\fR segment header in the object.
+.IP "\fBnow\fR" 4
+.IX Item "now"
+When generating an executable or shared library, mark it to tell the
+dynamic linker to resolve all symbols when the program is started, or
+when the shared library is linked to using dlopen, instead of
+deferring function call resolution to the point when the function is
+first called.
+.IP "\fBorigin\fR" 4
+.IX Item "origin"
+Marks the object may contain \f(CW$ORIGIN\fR.
+.IP "\fBrelro\fR" 4
+.IX Item "relro"
+Create an \s-1ELF\s0 \f(CW\*(C`PT_GNU_RELRO\*(C'\fR segment header in the object.
+.IP "\fBmax\-page\-size=\fR\fIvalue\fR" 4
+.IX Item "max-page-size=value"
+Set the emulation maximum page size to \fIvalue\fR.
+.IP "\fBcommon\-page\-size=\fR\fIvalue\fR" 4
+.IX Item "common-page-size=value"
+Set the emulation common page size to \fIvalue\fR.
+.RE
+.RS 4
+.Sp
+Other keywords are ignored for Solaris compatibility.
+.RE
+.IP "\fB\-(\fR \fIarchives\fR \fB\-)\fR" 4
+.IX Item "-( archives -)"
+.PD 0
+.IP "\fB\-\-start\-group\fR \fIarchives\fR \fB\-\-end\-group\fR" 4
+.IX Item "--start-group archives --end-group"
+.PD
+The \fIarchives\fR should be a list of archive files. They may be
+either explicit file names, or \fB\-l\fR options.
+.Sp
+The specified archives are searched repeatedly until no new undefined
+references are created. Normally, an archive is searched only once in
+the order that it is specified on the command line. If a symbol in that
+archive is needed to resolve an undefined symbol referred to by an
+object in an archive that appears later on the command line, the linker
+would not be able to resolve that reference. By grouping the archives,
+they all be searched repeatedly until all possible references are
+resolved.
+.Sp
+Using this option has a significant performance cost. It is best to use
+it only when there are unavoidable circular references between two or
+more archives.
+.IP "\fB\-\-accept\-unknown\-input\-arch\fR" 4
+.IX Item "--accept-unknown-input-arch"
+.PD 0
+.IP "\fB\-\-no\-accept\-unknown\-input\-arch\fR" 4
+.IX Item "--no-accept-unknown-input-arch"
+.PD
+Tells the linker to accept input files whose architecture cannot be
+recognised. The assumption is that the user knows what they are doing
+and deliberately wants to link in these unknown input files. This was
+the default behaviour of the linker, before release 2.14. The default
+behaviour from release 2.14 onwards is to reject such input files, and
+so the \fB\-\-accept\-unknown\-input\-arch\fR option has been added to
+restore the old behaviour.
+.IP "\fB\-\-as\-needed\fR" 4
+.IX Item "--as-needed"
+.PD 0
+.IP "\fB\-\-no\-as\-needed\fR" 4
+.IX Item "--no-as-needed"
+.PD
+This option affects \s-1ELF\s0 \s-1DT_NEEDED\s0 tags for dynamic libraries mentioned
+on the command line after the \fB\-\-as\-needed\fR option. Normally,
+the linker will add a \s-1DT_NEEDED\s0 tag for each dynamic library mentioned
+on the command line, regardless of whether the library is actually
+needed. \fB\-\-as\-needed\fR causes \s-1DT_NEEDED\s0 tags to only be emitted
+for libraries that satisfy some symbol reference from regular objects
+which is undefined at the point that the library was linked.
+\&\fB\-\-no\-as\-needed\fR restores the default behaviour.
+.IP "\fB\-\-add\-needed\fR" 4
+.IX Item "--add-needed"
+.PD 0
+.IP "\fB\-\-no\-add\-needed\fR" 4
+.IX Item "--no-add-needed"
+.PD
+This option affects the treatment of dynamic libraries from \s-1ELF\s0
+\&\s-1DT_NEEDED\s0 tags in dynamic libraries mentioned on the command line after
+the \fB\-\-no\-add\-needed\fR option. Normally, the linker will add
+a \s-1DT_NEEDED\s0 tag for each dynamic library from \s-1DT_NEEDED\s0 tags.
+\&\fB\-\-no\-add\-needed\fR causes \s-1DT_NEEDED\s0 tags will never be emitted
+for those libraries from \s-1DT_NEEDED\s0 tags. \fB\-\-add\-needed\fR restores
+the default behaviour.
+.IP "\fB\-assert\fR \fIkeyword\fR" 4
+.IX Item "-assert keyword"
+This option is ignored for SunOS compatibility.
+.IP "\fB\-Bdynamic\fR" 4
+.IX Item "-Bdynamic"
+.PD 0
+.IP "\fB\-dy\fR" 4
+.IX Item "-dy"
+.IP "\fB\-call_shared\fR" 4
+.IX Item "-call_shared"
+.PD
+Link against dynamic libraries. This is only meaningful on platforms
+for which shared libraries are supported. This option is normally the
+default on such platforms. The different variants of this option are
+for compatibility with various systems. You may use this option
+multiple times on the command line: it affects library searching for
+\&\fB\-l\fR options which follow it.
+.IP "\fB\-Bgroup\fR" 4
+.IX Item "-Bgroup"
+Set the \f(CW\*(C`DF_1_GROUP\*(C'\fR flag in the \f(CW\*(C`DT_FLAGS_1\*(C'\fR entry in the dynamic
+section. This causes the runtime linker to handle lookups in this
+object and its dependencies to be performed only inside the group.
+\&\fB\-\-unresolved\-symbols=report\-all\fR is implied. This option is
+only meaningful on \s-1ELF\s0 platforms which support shared libraries.
+.IP "\fB\-Bstatic\fR" 4
+.IX Item "-Bstatic"
+.PD 0
+.IP "\fB\-dn\fR" 4
+.IX Item "-dn"
+.IP "\fB\-non_shared\fR" 4
+.IX Item "-non_shared"
+.IP "\fB\-static\fR" 4
+.IX Item "-static"
+.PD
+Do not link against shared libraries. This is only meaningful on
+platforms for which shared libraries are supported. The different
+variants of this option are for compatibility with various systems. You
+may use this option multiple times on the command line: it affects
+library searching for \fB\-l\fR options which follow it. This
+option also implies \fB\-\-unresolved\-symbols=report\-all\fR. This
+option can be used with \fB\-shared\fR. Doing so means that a
+shared library is being created but that all of the library's external
+references must be resolved by pulling in entries from static
+libraries.
+.IP "\fB\-Bsymbolic\fR" 4
+.IX Item "-Bsymbolic"
+When creating a shared library, bind references to global symbols to the
+definition within the shared library, if any. Normally, it is possible
+for a program linked against a shared library to override the definition
+within the shared library. This option is only meaningful on \s-1ELF\s0
+platforms which support shared libraries.
+.IP "\fB\-Bsymbolic\-functions\fR" 4
+.IX Item "-Bsymbolic-functions"
+When creating a shared library, bind references to global function
+symbols to the definition within the shared library, if any.
+This option is only meaningful on \s-1ELF\s0 platforms which support shared
+libraries.
+.IP "\fB\-\-dynamic\-list=\fR\fIdynamic-list-file\fR" 4
+.IX Item "--dynamic-list=dynamic-list-file"
+Specify the name of a dynamic list file to the linker. This is
+typically used when creating shared libraries to specify a list of
+global symbols whose references shouldn't be bound to the definition
+within the shared library, or creating dynamically linked executables
+to specify a list of symbols which should be added to the symbol table
+in the executable. This option is only meaningful on \s-1ELF\s0 platforms
+which support shared libraries.
+.Sp
+The format of the dynamic list is the same as the version node without
+scope and node name. See \fB\s-1VERSION\s0\fR for more information.
+.IP "\fB\-\-dynamic\-list\-data\fR" 4
+.IX Item "--dynamic-list-data"
+Include all global data symbols to the dynamic list.
+.IP "\fB\-\-dynamic\-list\-cpp\-new\fR" 4
+.IX Item "--dynamic-list-cpp-new"
+Provide the builtin dynamic list for \*(C+ operator new and delete. It
+is mainly useful for building shared libstdc++.
+.IP "\fB\-\-dynamic\-list\-cpp\-typeinfo\fR" 4
+.IX Item "--dynamic-list-cpp-typeinfo"
+Provide the builtin dynamic list for \*(C+ runtime type identification.
+.IP "\fB\-\-check\-sections\fR" 4
+.IX Item "--check-sections"
+.PD 0
+.IP "\fB\-\-no\-check\-sections\fR" 4
+.IX Item "--no-check-sections"
+.PD
+Asks the linker \fInot\fR to check section addresses after they have
+been assigned to see if there are any overlaps. Normally the linker will
+perform this check, and if it finds any overlaps it will produce
+suitable error messages. The linker does know about, and does make
+allowances for sections in overlays. The default behaviour can be
+restored by using the command line switch \fB\-\-check\-sections\fR.
+.IP "\fB\-\-cref\fR" 4
+.IX Item "--cref"
+Output a cross reference table. If a linker map file is being
+generated, the cross reference table is printed to the map file.
+Otherwise, it is printed on the standard output.
+.Sp
+The format of the table is intentionally simple, so that it may be
+easily processed by a script if necessary. The symbols are printed out,
+sorted by name. For each symbol, a list of file names is given. If the
+symbol is defined, the first file listed is the location of the
+definition. The remaining files contain references to the symbol.
+.IP "\fB\-\-no\-define\-common\fR" 4
+.IX Item "--no-define-common"
+This option inhibits the assignment of addresses to common symbols.
+The script command \f(CW\*(C`INHIBIT_COMMON_ALLOCATION\*(C'\fR has the same effect.
+.Sp
+The \fB\-\-no\-define\-common\fR option allows decoupling
+the decision to assign addresses to Common symbols from the choice
+of the output file type; otherwise a non-Relocatable output type
+forces assigning addresses to Common symbols.
+Using \fB\-\-no\-define\-common\fR allows Common symbols that are referenced
+from a shared library to be assigned addresses only in the main program.
+This eliminates the unused duplicate space in the shared library,
+and also prevents any possible confusion over resolving to the wrong
+duplicate when there are many dynamic modules with specialized search
+paths for runtime symbol resolution.
+.IP "\fB\-\-defsym\fR \fIsymbol\fR\fB=\fR\fIexpression\fR" 4
+.IX Item "--defsym symbol=expression"
+Create a global symbol in the output file, containing the absolute
+address given by \fIexpression\fR. You may use this option as many
+times as necessary to define multiple symbols in the command line. A
+limited form of arithmetic is supported for the \fIexpression\fR in this
+context: you may give a hexadecimal constant or the name of an existing
+symbol, or use \f(CW\*(C`+\*(C'\fR and \f(CW\*(C`\-\*(C'\fR to add or subtract hexadecimal
+constants or symbols. If you need more elaborate expressions, consider
+using the linker command language from a script. \fINote:\fR there should be no white
+space between \fIsymbol\fR, the equals sign ("\fB=\fR"), and
+\&\fIexpression\fR.
+.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
+.IX Item "--demangle[=style]"
+.PD 0
+.IP "\fB\-\-no\-demangle\fR" 4
+.IX Item "--no-demangle"
+.PD
+These options control whether to demangle symbol names in error messages
+and other output. When the linker is told to demangle, it tries to
+present symbol names in a readable fashion: it strips leading
+underscores if they are used by the object file format, and converts \*(C+
+mangled symbol names into user readable names. Different compilers have
+different mangling styles. The optional demangling style argument can be used
+to choose an appropriate demangling style for your compiler. The linker will
+demangle by default unless the environment variable \fB\s-1COLLECT_NO_DEMANGLE\s0\fR
+is set. These options may be used to override the default.
+.IP "\fB\-\-dynamic\-linker\fR \fIfile\fR" 4
+.IX Item "--dynamic-linker file"
+Set the name of the dynamic linker. This is only meaningful when
+generating dynamically linked \s-1ELF\s0 executables. The default dynamic
+linker is normally correct; don't use this unless you know what you are
+doing.
+.IP "\fB\-\-fatal\-warnings\fR" 4
+.IX Item "--fatal-warnings"
+Treat all warnings as errors.
+.IP "\fB\-\-force\-exe\-suffix\fR" 4
+.IX Item "--force-exe-suffix"
+Make sure that an output file has a .exe suffix.
+.Sp
+If a successfully built fully linked output file does not have a
+\&\f(CW\*(C`.exe\*(C'\fR or \f(CW\*(C`.dll\*(C'\fR suffix, this option forces the linker to copy
+the output file to one of the same name with a \f(CW\*(C`.exe\*(C'\fR suffix. This
+option is useful when using unmodified Unix makefiles on a Microsoft
+Windows host, since some versions of Windows won't run an image unless
+it ends in a \f(CW\*(C`.exe\*(C'\fR suffix.
+.IP "\fB\-\-gc\-sections\fR" 4
+.IX Item "--gc-sections"
+.PD 0
+.IP "\fB\-\-no\-gc\-sections\fR" 4
+.IX Item "--no-gc-sections"
+.PD
+Enable garbage collection of unused input sections. It is ignored on
+targets that do not support this option. This option is not compatible
+with \fB\-r\fR or \fB\-\-emit\-relocs\fR. The default behaviour (of not
+performing this garbage collection) can be restored by specifying
+\&\fB\-\-no\-gc\-sections\fR on the command line.
+.IP "\fB\-\-print\-gc\-sections\fR" 4
+.IX Item "--print-gc-sections"
+.PD 0
+.IP "\fB\-\-no\-print\-gc\-sections\fR" 4
+.IX Item "--no-print-gc-sections"
+.PD
+List all sections removed by garbage collection. The listing is
+printed on stderr. This option is only effective if garbage
+collection has been enabled via the \fB\-\-gc\-sections\fR) option. The
+default behaviour (of not listing the sections that are removed) can
+be restored by specifying \fB\-\-no\-print\-gc\-sections\fR on the command
+line.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Print a summary of the command-line options on the standard output and exit.
+.IP "\fB\-\-target\-help\fR" 4
+.IX Item "--target-help"
+Print a summary of all target specific options on the standard output and exit.
+.IP "\fB\-Map\fR \fImapfile\fR" 4
+.IX Item "-Map mapfile"
+Print a link map to the file \fImapfile\fR. See the description of the
+\&\fB\-M\fR option, above.
+.IP "\fB\-\-no\-keep\-memory\fR" 4
+.IX Item "--no-keep-memory"
+\&\fBld\fR normally optimizes for speed over memory usage by caching the
+symbol tables of input files in memory. This option tells \fBld\fR to
+instead optimize for memory usage, by rereading the symbol tables as
+necessary. This may be required if \fBld\fR runs out of memory space
+while linking a large executable.
+.IP "\fB\-\-no\-undefined\fR" 4
+.IX Item "--no-undefined"
+.PD 0
+.IP "\fB\-z defs\fR" 4
+.IX Item "-z defs"
+.PD
+Report unresolved symbol references from regular object files. This
+is done even if the linker is creating a non-symbolic shared library.
+The switch \fB\-\-[no\-]allow\-shlib\-undefined\fR controls the
+behaviour for reporting unresolved references found in shared
+libraries being linked in.
+.IP "\fB\-\-allow\-multiple\-definition\fR" 4
+.IX Item "--allow-multiple-definition"
+.PD 0
+.IP "\fB\-z muldefs\fR" 4
+.IX Item "-z muldefs"
+.PD
+Normally when a symbol is defined multiple times, the linker will
+report a fatal error. These options allow multiple definitions and the
+first definition will be used.
+.IP "\fB\-\-allow\-shlib\-undefined\fR" 4
+.IX Item "--allow-shlib-undefined"
+.PD 0
+.IP "\fB\-\-no\-allow\-shlib\-undefined\fR" 4
+.IX Item "--no-allow-shlib-undefined"
+.PD
+Allows (the default) or disallows undefined symbols in shared libraries.
+This switch is similar to \fB\-\-no\-undefined\fR except that it
+determines the behaviour when the undefined symbols are in a
+shared library rather than a regular object file. It does not affect
+how undefined symbols in regular object files are handled.
+.Sp
+The reason that \fB\-\-allow\-shlib\-undefined\fR is the default is that
+the shared library being specified at link time may not be the same as
+the one that is available at load time, so the symbols might actually be
+resolvable at load time. Plus there are some systems, (eg BeOS) where
+undefined symbols in shared libraries is normal. (The kernel patches
+them at load time to select which function is most appropriate
+for the current architecture. This is used for example to dynamically
+select an appropriate memset function). Apparently it is also normal
+for \s-1HPPA\s0 shared libraries to have undefined symbols.
+.IP "\fB\-\-no\-undefined\-version\fR" 4
+.IX Item "--no-undefined-version"
+Normally when a symbol has an undefined version, the linker will ignore
+it. This option disallows symbols with undefined version and a fatal error
+will be issued instead.
+.IP "\fB\-\-default\-symver\fR" 4
+.IX Item "--default-symver"
+Create and use a default symbol version (the soname) for unversioned
+exported symbols.
+.IP "\fB\-\-default\-imported\-symver\fR" 4
+.IX Item "--default-imported-symver"
+Create and use a default symbol version (the soname) for unversioned
+imported symbols.
+.IP "\fB\-\-no\-warn\-mismatch\fR" 4
+.IX Item "--no-warn-mismatch"
+Normally \fBld\fR will give an error if you try to link together input
+files that are mismatched for some reason, perhaps because they have
+been compiled for different processors or for different endiannesses.
+This option tells \fBld\fR that it should silently permit such possible
+errors. This option should only be used with care, in cases when you
+have taken some special action that ensures that the linker errors are
+inappropriate.
+.IP "\fB\-\-no\-warn\-search\-mismatch\fR" 4
+.IX Item "--no-warn-search-mismatch"
+Normally \fBld\fR will give a warning if it finds an incompatible
+library during a library search. This option silences the warning.
+.IP "\fB\-\-no\-whole\-archive\fR" 4
+.IX Item "--no-whole-archive"
+Turn off the effect of the \fB\-\-whole\-archive\fR option for subsequent
+archive files.
+.IP "\fB\-\-noinhibit\-exec\fR" 4
+.IX Item "--noinhibit-exec"
+Retain the executable output file whenever it is still usable.
+Normally, the linker will not produce an output file if it encounters
+errors during the link process; it exits without writing an output file
+when it issues any error whatsoever.
+.IP "\fB\-nostdlib\fR" 4
+.IX Item "-nostdlib"
+Only search library directories explicitly specified on the
+command line. Library directories specified in linker scripts
+(including linker scripts specified on the command line) are ignored.
+.IP "\fB\-\-oformat\fR \fIoutput-format\fR" 4
+.IX Item "--oformat output-format"
+\&\fBld\fR may be configured to support more than one kind of object
+file. If your \fBld\fR is configured this way, you can use the
+\&\fB\-\-oformat\fR option to specify the binary format for the output
+object file. Even when \fBld\fR is configured to support alternative
+object formats, you don't usually need to specify this, as \fBld\fR
+should be configured to produce as a default output format the most
+usual format on each machine. \fIoutput-format\fR is a text string, the
+name of a particular format supported by the \s-1BFD\s0 libraries. (You can
+list the available binary formats with \fBobjdump \-i\fR.) The script
+command \f(CW\*(C`OUTPUT_FORMAT\*(C'\fR can also specify the output format, but
+this option overrides it.
+.IP "\fB\-pie\fR" 4
+.IX Item "-pie"
+.PD 0
+.IP "\fB\-\-pic\-executable\fR" 4
+.IX Item "--pic-executable"
+.PD
+Create a position independent executable. This is currently only supported on
+\&\s-1ELF\s0 platforms. Position independent executables are similar to shared
+libraries in that they are relocated by the dynamic linker to the virtual
+address the \s-1OS\s0 chooses for them (which can vary between invocations). Like
+normal dynamically linked executables they can be executed and symbols
+defined in the executable cannot be overridden by shared libraries.
+.IP "\fB\-qmagic\fR" 4
+.IX Item "-qmagic"
+This option is ignored for Linux compatibility.
+.IP "\fB\-Qy\fR" 4
+.IX Item "-Qy"
+This option is ignored for \s-1SVR4\s0 compatibility.
+.IP "\fB\-\-relax\fR" 4
+.IX Item "--relax"
+An option with machine dependent effects.
+This option is only supported on a few targets.
+.Sp
+On some platforms, the \fB\-\-relax\fR option performs global
+optimizations that become possible when the linker resolves addressing
+in the program, such as relaxing address modes and synthesizing new
+instructions in the output object file.
+.Sp
+On some platforms these link time global optimizations may make symbolic
+debugging of the resulting executable impossible.
+This is known to be
+the case for the Matsushita \s-1MN10200\s0 and \s-1MN10300\s0 family of processors.
+.Sp
+On platforms where this is not supported, \fB\-\-relax\fR is accepted,
+but ignored.
+.IP "\fB\-\-retain\-symbols\-file\fR \fIfilename\fR" 4
+.IX Item "--retain-symbols-file filename"
+Retain \fIonly\fR the symbols listed in the file \fIfilename\fR,
+discarding all others. \fIfilename\fR is simply a flat file, with one
+symbol name per line. This option is especially useful in environments
+(such as VxWorks)
+where a large global symbol table is accumulated gradually, to conserve
+run-time memory.
+.Sp
+\&\fB\-\-retain\-symbols\-file\fR does \fInot\fR discard undefined symbols,
+or symbols needed for relocations.
+.Sp
+You may only specify \fB\-\-retain\-symbols\-file\fR once in the command
+line. It overrides \fB\-s\fR and \fB\-S\fR.
+.IP "\fB\-rpath\fR \fIdir\fR" 4
+.IX Item "-rpath dir"
+Add a directory to the runtime library search path. This is used when
+linking an \s-1ELF\s0 executable with shared objects. All \fB\-rpath\fR
+arguments are concatenated and passed to the runtime linker, which uses
+them to locate shared objects at runtime. The \fB\-rpath\fR option is
+also used when locating shared objects which are needed by shared
+objects explicitly included in the link; see the description of the
+\&\fB\-rpath\-link\fR option. If \fB\-rpath\fR is not used when linking an
+\&\s-1ELF\s0 executable, the contents of the environment variable
+\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR will be used if it is defined.
+.Sp
+The \fB\-rpath\fR option may also be used on SunOS. By default, on
+SunOS, the linker will form a runtime search patch out of all the
+\&\fB\-L\fR options it is given. If a \fB\-rpath\fR option is used, the
+runtime search path will be formed exclusively using the \fB\-rpath\fR
+options, ignoring the \fB\-L\fR options. This can be useful when using
+gcc, which adds many \fB\-L\fR options which may be on \s-1NFS\s0 mounted
+file systems.
+.Sp
+For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
+followed by a directory name, rather than a file name, it is treated as
+the \fB\-rpath\fR option.
+.IP "\fB\-rpath\-link\fR \fI\s-1DIR\s0\fR" 4
+.IX Item "-rpath-link DIR"
+When using \s-1ELF\s0 or SunOS, one shared library may require another. This
+happens when an \f(CW\*(C`ld \-shared\*(C'\fR link includes a shared library as one
+of the input files.
+.Sp
+When the linker encounters such a dependency when doing a non-shared,
+non-relocatable link, it will automatically try to locate the required
+shared library and include it in the link, if it is not included
+explicitly. In such a case, the \fB\-rpath\-link\fR option
+specifies the first set of directories to search. The
+\&\fB\-rpath\-link\fR option may specify a sequence of directory names
+either by specifying a list of names separated by colons, or by
+appearing multiple times.
+.Sp
+This option should be used with caution as it overrides the search path
+that may have been hard compiled into a shared library. In such a case it
+is possible to use unintentionally a different search path than the
+runtime linker would do.
+.Sp
+The linker uses the following search paths to locate required shared
+libraries:
+.RS 4
+.IP "1." 4
+Any directories specified by \fB\-rpath\-link\fR options.
+.IP "2." 4
+Any directories specified by \fB\-rpath\fR options. The difference
+between \fB\-rpath\fR and \fB\-rpath\-link\fR is that directories
+specified by \fB\-rpath\fR options are included in the executable and
+used at runtime, whereas the \fB\-rpath\-link\fR option is only effective
+at link time. Searching \fB\-rpath\fR in this way is only supported
+by native linkers and cross linkers which have been configured with
+the \fB\-\-with\-sysroot\fR option.
+.IP "3." 4
+On an \s-1ELF\s0 system, if the \fB\-rpath\fR and \f(CW\*(C`rpath\-link\*(C'\fR options
+were not used, search the contents of the environment variable
+\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR. It is for the native linker only.
+.IP "4." 4
+On SunOS, if the \fB\-rpath\fR option was not used, search any
+directories specified using \fB\-L\fR options.
+.IP "5." 4
+For a native linker, the contents of the environment variable
+\&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR.
+.IP "6." 4
+For a native \s-1ELF\s0 linker, the directories in \f(CW\*(C`DT_RUNPATH\*(C'\fR or
+\&\f(CW\*(C`DT_RPATH\*(C'\fR of a shared library are searched for shared
+libraries needed by it. The \f(CW\*(C`DT_RPATH\*(C'\fR entries are ignored if
+\&\f(CW\*(C`DT_RUNPATH\*(C'\fR entries exist.
+.IP "7." 4
+The default directories, normally \fI/lib\fR and \fI/usr/lib\fR.
+.IP "8." 4
+For a native linker on an \s-1ELF\s0 system, if the file \fI/etc/ld.so.conf\fR
+exists, the list of directories found in that file.
+.RE
+.RS 4
+.Sp
+If the required shared library is not found, the linker will issue a
+warning and continue with the link.
+.RE
+.IP "\fB\-shared\fR" 4
+.IX Item "-shared"
+.PD 0
+.IP "\fB\-Bshareable\fR" 4
+.IX Item "-Bshareable"
+.PD
+Create a shared library. This is currently only supported on \s-1ELF\s0, \s-1XCOFF\s0
+and SunOS platforms. On SunOS, the linker will automatically create a
+shared library if the \fB\-e\fR option is not used and there are
+undefined symbols in the link.
+.IP "\fB\-\-sort\-common\fR" 4
+.IX Item "--sort-common"
+This option tells \fBld\fR to sort the common symbols by size when it
+places them in the appropriate output sections. First come all the one
+byte symbols, then all the two byte, then all the four byte, and then
+everything else. This is to prevent gaps between symbols due to
+alignment constraints.
+.IP "\fB\-\-sort\-section name\fR" 4
+.IX Item "--sort-section name"
+This option will apply \f(CW\*(C`SORT_BY_NAME\*(C'\fR to all wildcard section
+patterns in the linker script.
+.IP "\fB\-\-sort\-section alignment\fR" 4
+.IX Item "--sort-section alignment"
+This option will apply \f(CW\*(C`SORT_BY_ALIGNMENT\*(C'\fR to all wildcard section
+patterns in the linker script.
+.IP "\fB\-\-split\-by\-file [\fR\fIsize\fR\fB]\fR" 4
+.IX Item "--split-by-file [size]"
+Similar to \fB\-\-split\-by\-reloc\fR but creates a new output section for
+each input file when \fIsize\fR is reached. \fIsize\fR defaults to a
+size of 1 if not given.
+.IP "\fB\-\-split\-by\-reloc [\fR\fIcount\fR\fB]\fR" 4
+.IX Item "--split-by-reloc [count]"
+Tries to creates extra sections in the output file so that no single
+output section in the file contains more than \fIcount\fR relocations.
+This is useful when generating huge relocatable files for downloading into
+certain real time kernels with the \s-1COFF\s0 object file format; since \s-1COFF\s0
+cannot represent more than 65535 relocations in a single section. Note
+that this will fail to work with object file formats which do not
+support arbitrary sections. The linker will not split up individual
+input sections for redistribution, so if a single input section contains
+more than \fIcount\fR relocations one output section will contain that
+many relocations. \fIcount\fR defaults to a value of 32768.
+.IP "\fB\-\-stats\fR" 4
+.IX Item "--stats"
+Compute and display statistics about the operation of the linker, such
+as execution time and memory usage.
+.IP "\fB\-\-sysroot=\fR\fIdirectory\fR" 4
+.IX Item "--sysroot=directory"
+Use \fIdirectory\fR as the location of the sysroot, overriding the
+configure-time default. This option is only supported by linkers
+that were configured using \fB\-\-with\-sysroot\fR.
+.IP "\fB\-\-traditional\-format\fR" 4
+.IX Item "--traditional-format"
+For some targets, the output of \fBld\fR is different in some ways from
+the output of some existing linker. This switch requests \fBld\fR to
+use the traditional format instead.
+.Sp
+For example, on SunOS, \fBld\fR combines duplicate entries in the
+symbol string table. This can reduce the size of an output file with
+full debugging information by over 30 percent. Unfortunately, the SunOS
+\&\f(CW\*(C`dbx\*(C'\fR program can not read the resulting program (\f(CW\*(C`gdb\*(C'\fR has no
+trouble). The \fB\-\-traditional\-format\fR switch tells \fBld\fR to not
+combine duplicate entries.
+.IP "\fB\-\-section\-start\fR \fIsectionname\fR\fB=\fR\fIorg\fR" 4
+.IX Item "--section-start sectionname=org"
+Locate a section in the output file at the absolute
+address given by \fIorg\fR. You may use this option as many
+times as necessary to locate multiple sections in the command
+line.
+\&\fIorg\fR must be a single hexadecimal integer;
+for compatibility with other linkers, you may omit the leading
+\&\fB0x\fR usually associated with hexadecimal values. \fINote:\fR there
+should be no white space between \fIsectionname\fR, the equals
+sign ("\fB=\fR"), and \fIorg\fR.
+.IP "\fB\-Tbss\fR \fIorg\fR" 4
+.IX Item "-Tbss org"
+.PD 0
+.IP "\fB\-Tdata\fR \fIorg\fR" 4
+.IX Item "-Tdata org"
+.IP "\fB\-Ttext\fR \fIorg\fR" 4
+.IX Item "-Ttext org"
+.PD
+Same as \-\-section\-start, with \f(CW\*(C`.bss\*(C'\fR, \f(CW\*(C`.data\*(C'\fR or
+\&\f(CW\*(C`.text\*(C'\fR as the \fIsectionname\fR.
+.IP "\fB\-\-unresolved\-symbols=\fR\fImethod\fR" 4
+.IX Item "--unresolved-symbols=method"
+Determine how to handle unresolved symbols. There are four possible
+values for \fBmethod\fR:
+.RS 4
+.IP "\fBignore-all\fR" 4
+.IX Item "ignore-all"
+Do not report any unresolved symbols.
+.IP "\fBreport-all\fR" 4
+.IX Item "report-all"
+Report all unresolved symbols. This is the default.
+.IP "\fBignore-in-object-files\fR" 4
+.IX Item "ignore-in-object-files"
+Report unresolved symbols that are contained in shared libraries, but
+ignore them if they come from regular object files.
+.IP "\fBignore-in-shared-libs\fR" 4
+.IX Item "ignore-in-shared-libs"
+Report unresolved symbols that come from regular object files, but
+ignore them if they come from shared libraries. This can be useful
+when creating a dynamic binary and it is known that all the shared
+libraries that it should be referencing are included on the linker's
+command line.
+.RE
+.RS 4
+.Sp
+The behaviour for shared libraries on their own can also be controlled
+by the \fB\-\-[no\-]allow\-shlib\-undefined\fR option.
+.Sp
+Normally the linker will generate an error message for each reported
+unresolved symbol but the option \fB\-\-warn\-unresolved\-symbols\fR
+can change this to a warning.
+.RE
+.IP "\fB\-\-dll\-verbose\fR" 4
+.IX Item "--dll-verbose"
+.PD 0
+.IP "\fB\-\-verbose\fR" 4
+.IX Item "--verbose"
+.PD
+Display the version number for \fBld\fR and list the linker emulations
+supported. Display which input files can and cannot be opened. Display
+the linker script being used by the linker.
+.IP "\fB\-\-version\-script=\fR\fIversion-scriptfile\fR" 4
+.IX Item "--version-script=version-scriptfile"
+Specify the name of a version script to the linker. This is typically
+used when creating shared libraries to specify additional information
+about the version hierarchy for the library being created. This option
+is only meaningful on \s-1ELF\s0 platforms which support shared libraries.
+.IP "\fB\-\-warn\-common\fR" 4
+.IX Item "--warn-common"
+Warn when a common symbol is combined with another common symbol or with
+a symbol definition. Unix linkers allow this somewhat sloppy practise,
+but linkers on some other operating systems do not. This option allows
+you to find potential problems from combining global symbols.
+Unfortunately, some C libraries use this practise, so you may get some
+warnings about symbols in the libraries as well as in your programs.
+.Sp
+There are three kinds of global symbols, illustrated here by C examples:
+.RS 4
+.IP "\fBint i = 1;\fR" 4
+.IX Item "int i = 1;"
+A definition, which goes in the initialized data section of the output
+file.
+.IP "\fBextern int i;\fR" 4
+.IX Item "extern int i;"
+An undefined reference, which does not allocate space.
+There must be either a definition or a common symbol for the
+variable somewhere.
+.IP "\fBint i;\fR" 4
+.IX Item "int i;"
+A common symbol. If there are only (one or more) common symbols for a
+variable, it goes in the uninitialized data area of the output file.
+The linker merges multiple common symbols for the same variable into a
+single symbol. If they are of different sizes, it picks the largest
+size. The linker turns a common symbol into a declaration, if there is
+a definition of the same variable.
+.RE
+.RS 4
+.Sp
+The \fB\-\-warn\-common\fR option can produce five kinds of warnings.
+Each warning consists of a pair of lines: the first describes the symbol
+just encountered, and the second describes the previous symbol
+encountered with the same name. One or both of the two symbols will be
+a common symbol.
+.IP "1." 4
+Turning a common symbol into a reference, because there is already a
+definition for the symbol.
+.Sp
+.Vb 3
+\& <file>(<section>): warning: common of \`<symbol>\*(Aq
+\& overridden by definition
+\& <file>(<section>): warning: defined here
+.Ve
+.IP "2." 4
+Turning a common symbol into a reference, because a later definition for
+the symbol is encountered. This is the same as the previous case,
+except that the symbols are encountered in a different order.
+.Sp
+.Vb 3
+\& <file>(<section>): warning: definition of \`<symbol>\*(Aq
+\& overriding common
+\& <file>(<section>): warning: common is here
+.Ve
+.IP "3." 4
+Merging a common symbol with a previous same-sized common symbol.
+.Sp
+.Vb 3
+\& <file>(<section>): warning: multiple common
+\& of \`<symbol>\*(Aq
+\& <file>(<section>): warning: previous common is here
+.Ve
+.IP "4." 4
+Merging a common symbol with a previous larger common symbol.
+.Sp
+.Vb 3
+\& <file>(<section>): warning: common of \`<symbol>\*(Aq
+\& overridden by larger common
+\& <file>(<section>): warning: larger common is here
+.Ve
+.IP "5." 4
+Merging a common symbol with a previous smaller common symbol. This is
+the same as the previous case, except that the symbols are
+encountered in a different order.
+.Sp
+.Vb 3
+\& <file>(<section>): warning: common of \`<symbol>\*(Aq
+\& overriding smaller common
+\& <file>(<section>): warning: smaller common is here
+.Ve
+.RE
+.RS 4
+.RE
+.IP "\fB\-\-warn\-constructors\fR" 4
+.IX Item "--warn-constructors"
+Warn if any global constructors are used. This is only useful for a few
+object file formats. For formats like \s-1COFF\s0 or \s-1ELF\s0, the linker can not
+detect the use of global constructors.
+.IP "\fB\-\-warn\-multiple\-gp\fR" 4
+.IX Item "--warn-multiple-gp"
+Warn if multiple global pointer values are required in the output file.
+This is only meaningful for certain processors, such as the Alpha.
+Specifically, some processors put large-valued constants in a special
+section. A special register (the global pointer) points into the middle
+of this section, so that constants can be loaded efficiently via a
+base-register relative addressing mode. Since the offset in
+base-register relative mode is fixed and relatively small (e.g., 16
+bits), this limits the maximum size of the constant pool. Thus, in
+large programs, it is often necessary to use multiple global pointer
+values in order to be able to address all possible constants. This
+option causes a warning to be issued whenever this case occurs.
+.IP "\fB\-\-warn\-once\fR" 4
+.IX Item "--warn-once"
+Only warn once for each undefined symbol, rather than once per module
+which refers to it.
+.IP "\fB\-\-warn\-section\-align\fR" 4
+.IX Item "--warn-section-align"
+Warn if the address of an output section is changed because of
+alignment. Typically, the alignment will be set by an input section.
+The address will only be changed if it not explicitly specified; that
+is, if the \f(CW\*(C`SECTIONS\*(C'\fR command does not specify a start address for
+the section.
+.IP "\fB\-\-warn\-shared\-textrel\fR" 4
+.IX Item "--warn-shared-textrel"
+Warn if the linker adds a \s-1DT_TEXTREL\s0 to a shared object.
+.IP "\fB\-\-warn\-unresolved\-symbols\fR" 4
+.IX Item "--warn-unresolved-symbols"
+If the linker is going to report an unresolved symbol (see the option
+\&\fB\-\-unresolved\-symbols\fR) it will normally generate an error.
+This option makes it generate a warning instead.
+.IP "\fB\-\-error\-unresolved\-symbols\fR" 4
+.IX Item "--error-unresolved-symbols"
+This restores the linker's default behaviour of generating errors when
+it is reporting unresolved symbols.
+.IP "\fB\-\-whole\-archive\fR" 4
+.IX Item "--whole-archive"
+For each archive mentioned on the command line after the
+\&\fB\-\-whole\-archive\fR option, include every object file in the archive
+in the link, rather than searching the archive for the required object
+files. This is normally used to turn an archive file into a shared
+library, forcing every object to be included in the resulting shared
+library. This option may be used more than once.
+.Sp
+Two notes when using this option from gcc: First, gcc doesn't know
+about this option, so you have to use \fB\-Wl,\-whole\-archive\fR.
+Second, don't forget to use \fB\-Wl,\-no\-whole\-archive\fR after your
+list of archives, because gcc will add its own list of archives to
+your link and you may not want this flag to affect those as well.
+.IP "\fB\-\-wrap\fR \fIsymbol\fR" 4
+.IX Item "--wrap symbol"
+Use a wrapper function for \fIsymbol\fR. Any undefined reference to
+\&\fIsymbol\fR will be resolved to \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR. Any
+undefined reference to \f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR will be resolved to
+\&\fIsymbol\fR.
+.Sp
+This can be used to provide a wrapper for a system function. The
+wrapper function should be called \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR. If it
+wishes to call the system function, it should call
+\&\f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR.
+.Sp
+Here is a trivial example:
+.Sp
+.Vb 6
+\& void *
+\& _\|_wrap_malloc (size_t c)
+\& {
+\& printf ("malloc called with %zu\en", c);
+\& return _\|_real_malloc (c);
+\& }
+.Ve
+.Sp
+If you link other code with this file using \fB\-\-wrap malloc\fR, then
+all calls to \f(CW\*(C`malloc\*(C'\fR will call the function \f(CW\*(C`_\|_wrap_malloc\*(C'\fR
+instead. The call to \f(CW\*(C`_\|_real_malloc\*(C'\fR in \f(CW\*(C`_\|_wrap_malloc\*(C'\fR will
+call the real \f(CW\*(C`malloc\*(C'\fR function.
+.Sp
+You may wish to provide a \f(CW\*(C`_\|_real_malloc\*(C'\fR function as well, so that
+links without the \fB\-\-wrap\fR option will succeed. If you do this,
+you should not put the definition of \f(CW\*(C`_\|_real_malloc\*(C'\fR in the same
+file as \f(CW\*(C`_\|_wrap_malloc\*(C'\fR; if you do, the assembler may resolve the
+call before the linker has a chance to wrap it to \f(CW\*(C`malloc\*(C'\fR.
+.IP "\fB\-\-eh\-frame\-hdr\fR" 4
+.IX Item "--eh-frame-hdr"
+Request creation of \f(CW\*(C`.eh_frame_hdr\*(C'\fR section and \s-1ELF\s0
+\&\f(CW\*(C`PT_GNU_EH_FRAME\*(C'\fR segment header.
+.IP "\fB\-\-enable\-new\-dtags\fR" 4
+.IX Item "--enable-new-dtags"
+.PD 0
+.IP "\fB\-\-disable\-new\-dtags\fR" 4
+.IX Item "--disable-new-dtags"
+.PD
+This linker can create the new dynamic tags in \s-1ELF\s0. But the older \s-1ELF\s0
+systems may not understand them. If you specify
+\&\fB\-\-enable\-new\-dtags\fR, the dynamic tags will be created as needed.
+If you specify \fB\-\-disable\-new\-dtags\fR, no new dynamic tags will be
+created. By default, the new dynamic tags are not created. Note that
+those options are only available for \s-1ELF\s0 systems.
+.IP "\fB\-\-hash\-size=\fR\fInumber\fR" 4
+.IX Item "--hash-size=number"
+Set the default size of the linker's hash tables to a prime number
+close to \fInumber\fR. Increasing this value can reduce the length of
+time it takes the linker to perform its tasks, at the expense of
+increasing the linker's memory requirements. Similarly reducing this
+value can reduce the memory requirements at the expense of speed.
+.IP "\fB\-\-hash\-style=\fR\fIstyle\fR" 4
+.IX Item "--hash-style=style"
+Set the type of linker's hash table(s). \fIstyle\fR can be either
+\&\f(CW\*(C`sysv\*(C'\fR for classic \s-1ELF\s0 \f(CW\*(C`.hash\*(C'\fR section, \f(CW\*(C`gnu\*(C'\fR for
+new style \s-1GNU\s0 \f(CW\*(C`.gnu.hash\*(C'\fR section or \f(CW\*(C`both\*(C'\fR for both
+the classic \s-1ELF\s0 \f(CW\*(C`.hash\*(C'\fR and new style \s-1GNU\s0 \f(CW\*(C`.gnu.hash\*(C'\fR
+hash tables. The default is \f(CW\*(C`sysv\*(C'\fR.
+.IP "\fB\-\-reduce\-memory\-overheads\fR" 4
+.IX Item "--reduce-memory-overheads"
+This option reduces memory requirements at ld runtime, at the expense of
+linking speed. This was introduced to select the old O(n^2) algorithm
+for link map file generation, rather than the new O(n) algorithm which uses
+about 40% more memory for symbol storage.
+.Sp
+Another effect of the switch is to set the default hash table size to
+1021, which again saves memory at the cost of lengthening the linker's
+run time. This is not done however if the \fB\-\-hash\-size\fR switch
+has been used.
+.Sp
+The \fB\-\-reduce\-memory\-overheads\fR switch may be also be used to
+enable other tradeoffs in future versions of the linker.
+.PP
+The i386 \s-1PE\s0 linker supports the \fB\-shared\fR option, which causes
+the output to be a dynamically linked library (\s-1DLL\s0) instead of a
+normal executable. You should name the output \f(CW\*(C`*.dll\*(C'\fR when you
+use this option. In addition, the linker fully supports the standard
+\&\f(CW\*(C`*.def\*(C'\fR files, which may be specified on the linker command line
+like an object file (in fact, it should precede archives it exports
+symbols from, to ensure that they get linked in, just like a normal
+object file).
+.PP
+In addition to the options common to all targets, the i386 \s-1PE\s0 linker
+support additional command line options that are specific to the i386
+\&\s-1PE\s0 target. Options that take values may be separated from their
+values by either a space or an equals sign.
+.IP "\fB\-\-add\-stdcall\-alias\fR" 4
+.IX Item "--add-stdcall-alias"
+If given, symbols with a stdcall suffix (@\fInn\fR) will be exported
+as-is and also with the suffix stripped.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-base\-file\fR \fIfile\fR" 4
+.IX Item "--base-file file"
+Use \fIfile\fR as the name of a file in which to save the base
+addresses of all the relocations needed for generating DLLs with
+\&\fIdlltool\fR.
+[This is an i386 \s-1PE\s0 specific option]
+.IP "\fB\-\-dll\fR" 4
+.IX Item "--dll"
+Create a \s-1DLL\s0 instead of a regular executable. You may also use
+\&\fB\-shared\fR or specify a \f(CW\*(C`LIBRARY\*(C'\fR in a given \f(CW\*(C`.def\*(C'\fR
+file.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-enable\-stdcall\-fixup\fR" 4
+.IX Item "--enable-stdcall-fixup"
+.PD 0
+.IP "\fB\-\-disable\-stdcall\-fixup\fR" 4
+.IX Item "--disable-stdcall-fixup"
+.PD
+If the link finds a symbol that it cannot resolve, it will attempt to
+do \*(L"fuzzy linking\*(R" by looking for another defined symbol that differs
+only in the format of the symbol name (cdecl vs stdcall) and will
+resolve that symbol by linking to the match. For example, the
+undefined symbol \f(CW\*(C`_foo\*(C'\fR might be linked to the function
+\&\f(CW\*(C`_foo@12\*(C'\fR, or the undefined symbol \f(CW\*(C`_bar@16\*(C'\fR might be linked
+to the function \f(CW\*(C`_bar\*(C'\fR. When the linker does this, it prints a
+warning, since it normally should have failed to link, but sometimes
+import libraries generated from third-party dlls may need this feature
+to be usable. If you specify \fB\-\-enable\-stdcall\-fixup\fR, this
+feature is fully enabled and warnings are not printed. If you specify
+\&\fB\-\-disable\-stdcall\-fixup\fR, this feature is disabled and such
+mismatches are considered to be errors.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-export\-all\-symbols\fR" 4
+.IX Item "--export-all-symbols"
+If given, all global symbols in the objects used to build a \s-1DLL\s0 will
+be exported by the \s-1DLL\s0. Note that this is the default if there
+otherwise wouldn't be any exported symbols. When symbols are
+explicitly exported via \s-1DEF\s0 files or implicitly exported via function
+attributes, the default is to not export anything else unless this
+option is given. Note that the symbols \f(CW\*(C`DllMain@12\*(C'\fR,
+\&\f(CW\*(C`DllEntryPoint@0\*(C'\fR, \f(CW\*(C`DllMainCRTStartup@12\*(C'\fR, and
+\&\f(CW\*(C`impure_ptr\*(C'\fR will not be automatically
+exported. Also, symbols imported from other DLLs will not be
+re-exported, nor will symbols specifying the \s-1DLL\s0's internal layout
+such as those beginning with \f(CW\*(C`_head_\*(C'\fR or ending with
+\&\f(CW\*(C`_iname\*(C'\fR. In addition, no symbols from \f(CW\*(C`libgcc\*(C'\fR,
+\&\f(CW\*(C`libstd++\*(C'\fR, \f(CW\*(C`libmingw32\*(C'\fR, or \f(CW\*(C`crtX.o\*(C'\fR will be exported.
+Symbols whose names begin with \f(CW\*(C`_\|_rtti_\*(C'\fR or \f(CW\*(C`_\|_builtin_\*(C'\fR will
+not be exported, to help with \*(C+ DLLs. Finally, there is an
+extensive list of cygwin-private symbols that are not exported
+(obviously, this applies on when building DLLs for cygwin targets).
+These cygwin-excludes are: \f(CW\*(C`_cygwin_dll_entry@12\*(C'\fR,
+\&\f(CW\*(C`_cygwin_crt0_common@8\*(C'\fR, \f(CW\*(C`_cygwin_noncygwin_dll_entry@12\*(C'\fR,
+\&\f(CW\*(C`_fmode\*(C'\fR, \f(CW\*(C`_impure_ptr\*(C'\fR, \f(CW\*(C`cygwin_attach_dll\*(C'\fR,
+\&\f(CW\*(C`cygwin_premain0\*(C'\fR, \f(CW\*(C`cygwin_premain1\*(C'\fR, \f(CW\*(C`cygwin_premain2\*(C'\fR,
+\&\f(CW\*(C`cygwin_premain3\*(C'\fR, and \f(CW\*(C`environ\*(C'\fR.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-exclude\-symbols\fR \fIsymbol\fR\fB,\fR\fIsymbol\fR\fB,...\fR" 4
+.IX Item "--exclude-symbols symbol,symbol,..."
+Specifies a list of symbols which should not be automatically
+exported. The symbol names may be delimited by commas or colons.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-file\-alignment\fR" 4
+.IX Item "--file-alignment"
+Specify the file alignment. Sections in the file will always begin at
+file offsets which are multiples of this number. This defaults to
+512.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-heap\fR \fIreserve\fR" 4
+.IX Item "--heap reserve"
+.PD 0
+.IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
+.IX Item "--heap reserve,commit"
+.PD
+Specify the amount of memory to reserve (and optionally commit) to be
+used as heap for this program. The default is 1Mb reserved, 4K
+committed.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
+.IX Item "--image-base value"
+Use \fIvalue\fR as the base address of your program or dll. This is
+the lowest memory location that will be used when your program or dll
+is loaded. To reduce the need to relocate and improve performance of
+your dlls, each should have a unique base address and not overlap any
+other dlls. The default is 0x400000 for executables, and 0x10000000
+for dlls.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-kill\-at\fR" 4
+.IX Item "--kill-at"
+If given, the stdcall suffixes (@\fInn\fR) will be stripped from
+symbols before they are exported.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-large\-address\-aware\fR" 4
+.IX Item "--large-address-aware"
+If given, the appropriate bit in the \*(L"Characteristics\*(R" field of the \s-1COFF\s0
+header is set to indicate that this executable supports virtual addresses
+greater than 2 gigabytes. This should be used in conjunction with the /3GB
+or /USERVA=\fIvalue\fR megabytes switch in the \*(L"[operating systems]\*(R"
+section of the \s-1BOOT\s0.INI. Otherwise, this bit has no effect.
+[This option is specific to \s-1PE\s0 targeted ports of the linker]
+.IP "\fB\-\-major\-image\-version\fR \fIvalue\fR" 4
+.IX Item "--major-image-version value"
+Sets the major number of the \*(L"image version\*(R". Defaults to 1.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-major\-os\-version\fR \fIvalue\fR" 4
+.IX Item "--major-os-version value"
+Sets the major number of the \*(L"os version\*(R". Defaults to 4.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-major\-subsystem\-version\fR \fIvalue\fR" 4
+.IX Item "--major-subsystem-version value"
+Sets the major number of the \*(L"subsystem version\*(R". Defaults to 4.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-minor\-image\-version\fR \fIvalue\fR" 4
+.IX Item "--minor-image-version value"
+Sets the minor number of the \*(L"image version\*(R". Defaults to 0.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-minor\-os\-version\fR \fIvalue\fR" 4
+.IX Item "--minor-os-version value"
+Sets the minor number of the \*(L"os version\*(R". Defaults to 0.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-minor\-subsystem\-version\fR \fIvalue\fR" 4
+.IX Item "--minor-subsystem-version value"
+Sets the minor number of the \*(L"subsystem version\*(R". Defaults to 0.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-output\-def\fR \fIfile\fR" 4
+.IX Item "--output-def file"
+The linker will create the file \fIfile\fR which will contain a \s-1DEF\s0
+file corresponding to the \s-1DLL\s0 the linker is generating. This \s-1DEF\s0 file
+(which should be called \f(CW\*(C`*.def\*(C'\fR) may be used to create an import
+library with \f(CW\*(C`dlltool\*(C'\fR or may be used as a reference to
+automatically or implicitly exported symbols.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-out\-implib\fR \fIfile\fR" 4
+.IX Item "--out-implib file"
+The linker will create the file \fIfile\fR which will contain an
+import lib corresponding to the \s-1DLL\s0 the linker is generating. This
+import lib (which should be called \f(CW\*(C`*.dll.a\*(C'\fR or \f(CW\*(C`*.a\*(C'\fR
+may be used to link clients against the generated \s-1DLL\s0; this behaviour
+makes it possible to skip a separate \f(CW\*(C`dlltool\*(C'\fR import library
+creation step.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-enable\-auto\-image\-base\fR" 4
+.IX Item "--enable-auto-image-base"
+Automatically choose the image base for DLLs, unless one is specified
+using the \f(CW\*(C`\-\-image\-base\*(C'\fR argument. By using a hash generated
+from the dllname to create unique image bases for each \s-1DLL\s0, in-memory
+collisions and relocations which can delay program execution are
+avoided.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-disable\-auto\-image\-base\fR" 4
+.IX Item "--disable-auto-image-base"
+Do not automatically generate a unique image base. If there is no
+user-specified image base (\f(CW\*(C`\-\-image\-base\*(C'\fR) then use the platform
+default.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-dll\-search\-prefix\fR \fIstring\fR" 4
+.IX Item "--dll-search-prefix string"
+When linking dynamically to a dll without an import library,
+search for \f(CW\*(C`<string><basename>.dll\*(C'\fR in preference to
+\&\f(CW\*(C`lib<basename>.dll\*(C'\fR. This behaviour allows easy distinction
+between DLLs built for the various \*(L"subplatforms\*(R": native, cygwin,
+uwin, pw, etc. For instance, cygwin DLLs typically use
+\&\f(CW\*(C`\-\-dll\-search\-prefix=cyg\*(C'\fR.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-enable\-auto\-import\fR" 4
+.IX Item "--enable-auto-import"
+Do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to \f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for
+\&\s-1DATA\s0 imports from DLLs, and create the necessary thunking symbols when
+building the import libraries with those \s-1DATA\s0 exports. Note: Use of the
+\&'auto\-import' extension will cause the text section of the image file
+to be made writable. This does not conform to the PE-COFF format
+specification published by Microsoft.
+.Sp
+Using 'auto\-import' generally will 'just work' \*(-- but sometimes you may
+see this message:
+.Sp
+"variable '<var>' can't be auto-imported. Please read the
+documentation for ld's \f(CW\*(C`\-\-enable\-auto\-import\*(C'\fR for details."
+.Sp
+This message occurs when some (sub)expression accesses an address
+ultimately given by the sum of two constants (Win32 import tables only
+allow one). Instances where this may occur include accesses to member
+fields of struct variables imported from a \s-1DLL\s0, as well as using a
+constant index into an array variable imported from a \s-1DLL\s0. Any
+multiword variable (arrays, structs, long long, etc) may trigger
+this error condition. However, regardless of the exact data type
+of the offending exported variable, ld will always detect it, issue
+the warning, and exit.
+.Sp
+There are several ways to address this difficulty, regardless of the
+data type of the exported variable:
+.Sp
+One way is to use \-\-enable\-runtime\-pseudo\-reloc switch. This leaves the task
+of adjusting references in your client code for runtime environment, so
+this method works only when runtime environment supports this feature.
+.Sp
+A second solution is to force one of the 'constants' to be a variable \*(--
+that is, unknown and un-optimizable at compile time. For arrays,
+there are two possibilities: a) make the indexee (the array's address)
+a variable, or b) make the 'constant' index a variable. Thus:
+.Sp
+.Vb 3
+\& extern type extern_array[];
+\& extern_array[1] \-\->
+\& { volatile type *t=extern_array; t[1] }
+.Ve
+.Sp
+or
+.Sp
+.Vb 3
+\& extern type extern_array[];
+\& extern_array[1] \-\->
+\& { volatile int t=1; extern_array[t] }
+.Ve
+.Sp
+For structs (and most other multiword data types) the only option
+is to make the struct itself (or the long long, or the ...) variable:
+.Sp
+.Vb 3
+\& extern struct s extern_struct;
+\& extern_struct.field \-\->
+\& { volatile struct s *t=&extern_struct; t\->field }
+.Ve
+.Sp
+or
+.Sp
+.Vb 3
+\& extern long long extern_ll;
+\& extern_ll \-\->
+\& { volatile long long * local_ll=&extern_ll; *local_ll }
+.Ve
+.Sp
+A third method of dealing with this difficulty is to abandon
+\&'auto\-import' for the offending symbol and mark it with
+\&\f(CW\*(C`_\|_declspec(dllimport)\*(C'\fR. However, in practise that
+requires using compile-time #defines to indicate whether you are
+building a \s-1DLL\s0, building client code that will link to the \s-1DLL\s0, or
+merely building/linking to a static library. In making the choice
+between the various methods of resolving the 'direct address with
+constant offset' problem, you should consider typical real-world usage:
+.Sp
+Original:
+.Sp
+.Vb 7
+\& \-\-foo.h
+\& extern int arr[];
+\& \-\-foo.c
+\& #include "foo.h"
+\& void main(int argc, char **argv){
+\& printf("%d\en",arr[1]);
+\& }
+.Ve
+.Sp
+Solution 1:
+.Sp
+.Vb 9
+\& \-\-foo.h
+\& extern int arr[];
+\& \-\-foo.c
+\& #include "foo.h"
+\& void main(int argc, char **argv){
+\& /* This workaround is for win32 and cygwin; do not "optimize" */
+\& volatile int *parr = arr;
+\& printf("%d\en",parr[1]);
+\& }
+.Ve
+.Sp
+Solution 2:
+.Sp
+.Vb 10
+\& \-\-foo.h
+\& /* Note: auto\-export is assumed (no _\|_declspec(dllexport)) */
+\& #if (defined(_WIN32) || defined(_\|_CYGWIN_\|_)) && \e
+\& !(defined(FOO_BUILD_DLL) || defined(FOO_STATIC))
+\& #define FOO_IMPORT _\|_declspec(dllimport)
+\& #else
+\& #define FOO_IMPORT
+\& #endif
+\& extern FOO_IMPORT int arr[];
+\& \-\-foo.c
+\& #include "foo.h"
+\& void main(int argc, char **argv){
+\& printf("%d\en",arr[1]);
+\& }
+.Ve
+.Sp
+A fourth way to avoid this problem is to re-code your
+library to use a functional interface rather than a data interface
+for the offending variables (e.g. \fIset_foo()\fR and \fIget_foo()\fR accessor
+functions).
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-disable\-auto\-import\fR" 4
+.IX Item "--disable-auto-import"
+Do not attempt to do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to
+\&\f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for \s-1DATA\s0 imports from DLLs.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-enable\-runtime\-pseudo\-reloc\fR" 4
+.IX Item "--enable-runtime-pseudo-reloc"
+If your code contains expressions described in \-\-enable\-auto\-import section,
+that is, \s-1DATA\s0 imports from \s-1DLL\s0 with non-zero offset, this switch will create
+a vector of 'runtime pseudo relocations' which can be used by runtime
+environment to adjust references to such data in your client code.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-disable\-runtime\-pseudo\-reloc\fR" 4
+.IX Item "--disable-runtime-pseudo-reloc"
+Do not create pseudo relocations for non-zero offset \s-1DATA\s0 imports from
+DLLs. This is the default.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-enable\-extra\-pe\-debug\fR" 4
+.IX Item "--enable-extra-pe-debug"
+Show additional debug info related to auto-import symbol thunking.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-section\-alignment\fR" 4
+.IX Item "--section-alignment"
+Sets the section alignment. Sections in memory will always begin at
+addresses which are a multiple of this number. Defaults to 0x1000.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-stack\fR \fIreserve\fR" 4
+.IX Item "--stack reserve"
+.PD 0
+.IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
+.IX Item "--stack reserve,commit"
+.PD
+Specify the amount of memory to reserve (and optionally commit) to be
+used as stack for this program. The default is 2Mb reserved, 4K
+committed.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
+.IX Item "--subsystem which"
+.PD 0
+.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
+.IX Item "--subsystem which:major"
+.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
+.IX Item "--subsystem which:major.minor"
+.PD
+Specifies the subsystem under which your program will execute. The
+legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
+\&\f(CW\*(C`console\*(C'\fR, \f(CW\*(C`posix\*(C'\fR, and \f(CW\*(C`xbox\*(C'\fR. You may optionally set
+the subsystem version also. Numeric values are also accepted for
+\&\fIwhich\fR.
+[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
+.PP
+The 68HC11 and 68HC12 linkers support specific options to control the
+memory bank switching mapping and trampoline code generation.
+.IP "\fB\-\-no\-trampoline\fR" 4
+.IX Item "--no-trampoline"
+This option disables the generation of trampoline. By default a trampoline
+is generated for each far function which is called using a \f(CW\*(C`jsr\*(C'\fR
+instruction (this happens when a pointer to a far function is taken).
+.IP "\fB\-\-bank\-window\fR \fIname\fR" 4
+.IX Item "--bank-window name"
+This option indicates to the linker the name of the memory region in
+the \fB\s-1MEMORY\s0\fR specification that describes the memory bank window.
+The definition of such region is then used by the linker to compute
+paging and addresses within the memory window.
+.SH "ENVIRONMENT"
+.IX Header "ENVIRONMENT"
+You can change the behaviour of \fBld\fR with the environment variables
+\&\f(CW\*(C`GNUTARGET\*(C'\fR,
+\&\f(CW\*(C`LDEMULATION\*(C'\fR and \f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR.
+.PP
+\&\f(CW\*(C`GNUTARGET\*(C'\fR determines the input-file object format if you don't
+use \fB\-b\fR (or its synonym \fB\-\-format\fR). Its value should be one
+of the \s-1BFD\s0 names for an input format. If there is no
+\&\f(CW\*(C`GNUTARGET\*(C'\fR in the environment, \fBld\fR uses the natural format
+of the target. If \f(CW\*(C`GNUTARGET\*(C'\fR is set to \f(CW\*(C`default\*(C'\fR then \s-1BFD\s0
+attempts to discover the input format by examining binary input files;
+this method often succeeds, but there are potential ambiguities, since
+there is no method of ensuring that the magic number used to specify
+object-file formats is unique. However, the configuration procedure for
+\&\s-1BFD\s0 on each system places the conventional format for that system first
+in the search-list, so ambiguities are resolved in favor of convention.
+.PP
+\&\f(CW\*(C`LDEMULATION\*(C'\fR determines the default emulation if you don't use the
+\&\fB\-m\fR option. The emulation can affect various aspects of linker
+behaviour, particularly the default linker script. You can list the
+available emulations with the \fB\-\-verbose\fR or \fB\-V\fR options. If
+the \fB\-m\fR option is not used, and the \f(CW\*(C`LDEMULATION\*(C'\fR environment
+variable is not defined, the default emulation depends upon how the
+linker was configured.
+.PP
+Normally, the linker will default to demangling symbols. However, if
+\&\f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR is set in the environment, then it will
+default to not demangling symbols. This environment variable is used in
+a similar fashion by the \f(CW\*(C`gcc\*(C'\fR linker wrapper program. The default
+may be overridden by the \fB\-\-demangle\fR and \fB\-\-no\-demangle\fR
+options.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjcopy\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1) and
+the Info entries for \fIbinutils\fR and
+\&\fIld\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/libbfd/Makefile b/gnu/usr.bin/binutils/libbfd/Makefile
index 8ace1e24cd26d..9b8489d58430a 100644
--- a/gnu/usr.bin/binutils/libbfd/Makefile
+++ b/gnu/usr.bin/binutils/libbfd/Makefile
@@ -5,12 +5,43 @@
.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
LIB= bfd
-SRCS+= archive.c archive64.c archures.c bfd.c bfdwin.c binary.c cache.c \
- coffgen.c corefile.c elf.c elf-eh-frame.c elf-strtab.c format.c \
- hash.c ihex.c init.c libbfd.c linker.c merge.c opncls.c reloc.c \
- section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \
- targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c
-WARNS?= 0
+SRCS+= archive.c \
+ archive64.c \
+ archures.c \
+ bfd.c \
+ bfdio.c \
+ bfdver.h \
+ bfdwin.c \
+ binary.c \
+ cache.c \
+ coffgen.c \
+ config.h \
+ corefile.c \
+ dwarf1.c \
+ dwarf2.c \
+ elf-attrs.c \
+ elf-eh-frame.c \
+ elf-strtab.c \
+ elf-vxworks.c \
+ elf.c \
+ format.c \
+ hash.c \
+ ihex.c \
+ init.c \
+ libbfd.c \
+ linker.c \
+ merge.c \
+ opncls.c \
+ reloc.c \
+ section.c \
+ simple.c \
+ srec.c \
+ stab-syms.c \
+ stabs.c \
+ syms.c \
+ targets.c \
+ targmatch.h \
+ tekhex.c
.if (${TARGET_ARCH} == "ia64" || ${TARGET_ARCH} == "sparc64")
WARNS?= 2
.endif
@@ -48,12 +79,14 @@ SELVEC+= ,&${_v}
.endfor
CFLAGS+= -DSELECT_VECS="${SELVEC}"
CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
+CFLAGS+= -DDEBUGDIR="NULL"
# XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}...
bfdver.h: Makefile
- echo '#define BFD_VERSION 215000000' > ${.TARGET}
- echo '#define BFD_VERSION_DATE 20040517' >> ${.TARGET}
+ echo '#define BFD_VERSION 217500000' > ${.TARGET}
+ echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET}
echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET}
+ echo '#define REPORT_BUGS_TO "<http://www.freebsd.org/send-pr.html>"' >> ${.TARGET}
targmatch.h: targmatch.sed config.bfd
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.amd64 b/gnu/usr.bin/binutils/libbfd/Makefile.amd64
index 1e2589069f828..83baa94353730 100644
--- a/gnu/usr.bin/binutils/libbfd/Makefile.amd64
+++ b/gnu/usr.bin/binutils/libbfd/Makefile.amd64
@@ -5,29 +5,27 @@
# Get the i386 DEFAULT_VECTOR and VECS.
I386_VECS:= ${DEFAULT_VECTOR} # ${VECS}
-DEFAULT_VECTOR= bfd_elf64_x86_64_vec
+DEFAULT_VECTOR= bfd_elf64_x86_64_freebsd_vec
-SRCS+= elf64-amd64-fbsd.c \
+SRCS+= elf64-x86-64.c \
efi-app-x86_64.c \
efi-app-ia32.c \
elf64.c \
elf64-gen.c \
elf64-target.h \
- pepigen.c # peigen.c
+ pepigen.c \
+ pex64igen.c
VECS= ${DEFAULT_VECTOR} \
+ bfd_elf64_x86_64_vec \
bfd_efi_app_x86_64_vec \
bfd_efi_app_ia32_vec \
${I386_VECS}
-CLEANFILES+= elf64-amd64-fbsd.c pepigen.c peigen.c
-
-elf64-amd64-fbsd.c: ${.CURDIR}/elf-fbsd-brand.c ${SRCDIR}/bfd/elf64-x86-64.c
- cat ${.ALLSRC:M*elf-fbsd-brand.c} > ${.TARGET}
- echo "#define elf_backend_post_process_headers elf_fbsd_post_process_headers" \
- >> ${.TARGET}
- cat ${.ALLSRC:M*elf64-x86-64.c} >> ${.TARGET}
+CLEANFILES+= pepigen.c pex64igen.c
pepigen.c: peXXigen.c
sed -e s/XX/pep/g ${.ALLSRC} > ${.TARGET}
+pex64igen.c: peXXigen.c
+ sed -e s/XX/pex64/g ${.ALLSRC} > ${.TARGET}
diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.arm b/gnu/usr.bin/binutils/libbfd/Makefile.arm
index b14b7f10ea72c..4910f38086313 100644
--- a/gnu/usr.bin/binutils/libbfd/Makefile.arm
+++ b/gnu/usr.bin/binutils/libbfd/Makefile.arm
@@ -8,7 +8,7 @@ DEFAULT_VECTOR= bfd_elf32_littlearm_vec
SRCS+= cpu-arm.c \
elf32.c \
- elf32-arm-fbsd.c \
+ elf32-arm.c \
elf32-gen.c \
elf32-target.h \
elflink.c
@@ -19,27 +19,3 @@ VECS+= bfd_elf32_littlearm_vec
.else
VECS+= bfd_elf32_bigarm_vec
.endif
-
-CLEANFILES+= elf32-arm-fbsd.c
-
-# XXX: We should really add the FreeBSD case in elf32_arm_nabi_grok_prstatus
-# instead of defining our own elf32_fbsd_arm_grok_prstatus.
-#
-elf32-arm-fbsd.c: elfarm-nabi.c
- cat ${.ALLSRC} | sed \
- -e s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g \
- -e "s/\(.*#define.*\)elf32_arm_nabi_grok_prstatus/\1elf32_fbsd_arm_grok_prstatus/" \
- -e s/"#include.*elf32-arm.h.*//" >${.TARGET}
- echo ' \
- static bfd_boolean \
- elf32_fbsd_arm_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) \
- { size_t raw_size =68 ; int offset = 28; \
- if (note->descsz != 96) return (FALSE); \
- if (elf_tdata(abfd)->core_signal == 0) \
- elf_tdata (abfd)->core_signal = ((int *)(note->descdata))[5]; \
- elf_tdata (abfd)->core_pid = ((int *)(note->descdata))[6]; \
- /* Make a ".reg/999" section. */ \
- return _bfd_elfcore_make_pseudosection (abfd, ".reg",raw_size, \
- note->descpos + offset); \
- }' >> ${.TARGET}
- echo '#include "elf32-arm.h"' >> ${.TARGET}
diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.ia64 b/gnu/usr.bin/binutils/libbfd/Makefile.ia64
index d45f7913f80c5..22e310c34ae92 100644
--- a/gnu/usr.bin/binutils/libbfd/Makefile.ia64
+++ b/gnu/usr.bin/binutils/libbfd/Makefile.ia64
@@ -13,7 +13,8 @@ SRCS+= cofflink.c \
elf64-ia64.c \
elf64-target.h \
elflink.c \
- pepigen.c # peigen.c
+ pepigen.c \
+ pex64igen.c
VECS+= ${DEFAULT_VECTOR} \
bfd_efi_app_ia64_vec \
@@ -21,13 +22,13 @@ VECS+= ${DEFAULT_VECTOR} \
bfd_elf64_little_generic_vec bfd_elf64_big_generic_vec \
bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec
-CLEANFILES+= elf64-ia64.c pepigen.c # peigen.c
+CLEANFILES+= elf64-ia64.c pepigen.c pex64igen.c
-elf64-ia64.c: elfxx-ia64.c elf-fbsd-brand.c
- cat ${.ALLSRC} | sed -e s/NN/64/g > ${.TARGET}
+elf64-ia64.c: elf-fbsd-brand.c elfxx-ia64.c
+ sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
pepigen.c: peXXigen.c
sed -e s/XX/pep/g ${.ALLSRC} > ${.TARGET}
-peigen.c: peXXigen.c
- sed -e s/XX/pe/g ${.ALLSRC} > ${.TARGET}
+pex64igen.c: peXXigen.c
+ sed -e s/XX/pex64/g ${.ALLSRC} > ${.TARGET}
diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.sparc64 b/gnu/usr.bin/binutils/libbfd/Makefile.sparc64
index 9a3fc03d4f2b1..f41c1eb1726a7 100644
--- a/gnu/usr.bin/binutils/libbfd/Makefile.sparc64
+++ b/gnu/usr.bin/binutils/libbfd/Makefile.sparc64
@@ -1,6 +1,6 @@
# $FreeBSD$
-DEFAULT_VECTOR= bfd_elf64_sparc_vec
+DEFAULT_VECTOR= bfd_elf64_sparc_freebsd_vec
SRCS+= aout32.c \
cpu-sparc.c \
@@ -11,10 +11,13 @@ SRCS+= aout32.c \
elf64-sparc.c \
elf64-target.h \
elflink.c \
+ elfxx-sparc.c \
+ elfxx-sparc.h \
sparcnetbsd.c \
sunos.c
VECS= ${DEFAULT_VECTOR} \
+ bfd_elf64_sparc_vec \
bfd_elf32_sparc_vec \
sparcnetbsd_vec \
sunos_big_vec
diff --git a/gnu/usr.bin/binutils/libbfd/bfd.h b/gnu/usr.bin/binutils/libbfd/bfd.h
index 5812cebbea385..c9dfef54ae267 100644
--- a/gnu/usr.bin/binutils/libbfd/bfd.h
+++ b/gnu/usr.bin/binutils/libbfd/bfd.h
@@ -10,7 +10,8 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -28,7 +29,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@@ -51,12 +52,35 @@ extern "C" {
#endif
#endif
+/* This is a utility macro to handle the situation where the code
+ wants to place a constant string into the code, followed by a
+ comma and then the length of the string. Doing this by hand
+ is error prone, so using this macro is safer. The macro will
+ also safely handle the case where a NULL is passed as the arg. */
+#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
+ to create the arguments to another macro, since the preprocessor
+ will mis-count the number of arguments to the outer macro (by not
+ evaluating STRING_COMMA_LEN and so missing the comma). This is a
+ problem for example when trying to use STRING_COMMA_LEN to build
+ the arguments to the strncmp() macro. Hence this alternative
+ definition of strncmp is provided here.
+
+ Note - these macros do NOT work if STR2 is not a constant string. */
+#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
+ /* strcpy() can have a similar problem, but since we know we are
+ copying a constant string, we can use memcpy which will be faster
+ since there is no need to check for a NUL byte inside STR. We
+ can also save time if we do not need to copy the terminating NUL. */
+#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
+#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
+
+
/* The word size used by BFD on the host. This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd. */
#define BFD_ARCH_SIZE 64
-
#if defined(__i386__) || defined(__powerpc__) || defined(__arm__) || defined(__mips__)
#define BFD_HOST_64BIT_LONG 0
#define BFD_HOST_64_BIT long long
@@ -103,14 +127,6 @@ typedef int bfd_boolean;
#define FALSE 0
#define TRUE 1
-#if 0
-/* Poison. */
-#undef false
-#undef true
-#define false dont_use_false_in_bfd
-#define true dont_use_true_in_bfd
-#endif
-
#ifdef BFD64
#ifndef BFD_HOST_64_BIT
@@ -158,6 +174,9 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
+#define HALF_BFD_SIZE_TYPE \
+ (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2))
+
#ifndef BFD_HOST_64_BIT
/* Fall back on a 32 bit type. The idea is to make these types always
available for function return types, but in the case that
@@ -252,6 +271,10 @@ bfd_format;
/* The sections in this BFD specify a memory page. */
#define HAS_LOAD_PAGE 0x1000
+
+/* This BFD has been created by the linker and doesn't correspond
+ to any input file. */
+#define BFD_LINKER_CREATED 0x2000
/* Symbols and relocation. */
@@ -322,7 +345,8 @@ typedef struct bfd_section *sec_ptr;
#define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0)
#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
+#define bfd_section_size(bfd, ptr) ((ptr)->size)
+#define bfd_get_section_size(ptr) ((ptr)->size)
#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
@@ -334,8 +358,20 @@ typedef struct bfd_section *sec_ptr;
#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
-
-typedef struct stat stat_type;
+/* Find the address one past the end of SEC. */
+#define bfd_get_section_limit(bfd, sec) \
+ (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
+ / bfd_octets_per_byte (bfd))
+
+/* Return TRUE if section has been discarded. */
+#define elf_discarded_section(sec) \
+ (!bfd_is_abs_section (sec) \
+ && bfd_is_abs_section ((sec)->output_section) \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+
+/* Forward define. */
+struct stat;
typedef enum bfd_print_symbol
{
@@ -383,8 +419,6 @@ struct bfd_hash_table
{
/* The hash array. */
struct bfd_hash_entry **table;
- /* The number of slots in the hash table. */
- unsigned int size;
/* A function used to create new elements in the hash table. The
first entry is itself a pointer to an element. When this
function is first invoked, this pointer will be NULL. However,
@@ -397,6 +431,14 @@ struct bfd_hash_table
/* An objalloc for this hash table. This is a struct objalloc *,
but we use void * to avoid requiring the inclusion of objalloc.h. */
void *memory;
+ /* The number of slots in the hash table. */
+ unsigned int size;
+ /* The number of entries in the hash table. */
+ unsigned int count;
+ /* The size of elements. */
+ unsigned int entsize;
+ /* If non-zero, don't grow the hash table. */
+ unsigned int frozen:1;
};
/* Initialize a hash table. */
@@ -404,7 +446,8 @@ extern bfd_boolean bfd_hash_table_init
(struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
- const char *));
+ const char *),
+ unsigned int);
/* Initialize a hash table specifying a size. */
extern bfd_boolean bfd_hash_table_init_n
@@ -412,7 +455,7 @@ extern bfd_boolean bfd_hash_table_init_n
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *),
- unsigned int size);
+ unsigned int, unsigned int);
/* Free up a hash table. */
extern void bfd_hash_table_free
@@ -447,6 +490,24 @@ extern void bfd_hash_traverse
bfd_boolean (*) (struct bfd_hash_entry *, void *),
void *info);
+/* Allows the default size of a hash table to be configured. New hash
+ tables allocated using bfd_hash_table_init will be created with
+ this size. */
+extern void bfd_hash_set_default_size (bfd_size_type);
+
+/* This structure is used to keep track of stabs in sections
+ information while linking. */
+
+struct stab_info
+{
+ /* A hash table used to hold stabs strings. */
+ struct bfd_strtab_hash *strings;
+ /* The header file hash table. */
+ struct bfd_hash_table includes;
+ /* The first .stabstr section. */
+ struct bfd_section *stabstr;
+};
+
#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
/* User program access to BFD facilities. */
@@ -519,6 +580,8 @@ extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
+extern bfd_boolean bfd_cache_close_all (void);
+
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
@@ -548,6 +611,9 @@ void bfd_putl16 (bfd_vma, void *);
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
+
+extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern void bfd_section_already_linked_table_free (void);
/* Externally visible ECOFF routines. */
@@ -601,8 +667,6 @@ extern bfd_boolean bfd_ecoff_write_accumulated_debug
(void *handle, bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
struct bfd_link_info *info, file_ptr where);
-extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -616,28 +680,44 @@ struct bfd_link_needed_list
enum dynamic_lib_link_class {
DYN_NORMAL = 0,
DYN_AS_NEEDED = 1,
- DYN_DT_NEEDED = 2
+ DYN_DT_NEEDED = 2,
+ DYN_NO_ADD_NEEDED = 4,
+ DYN_NO_NEEDED = 8
+};
+
+enum notice_asneeded_action {
+ notice_as_needed,
+ notice_not_needed,
+ notice_needed
};
extern bfd_boolean bfd_elf_record_link_assignment
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean);
+ (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
+ bfd_boolean);
extern struct bfd_link_needed_list *bfd_elf_get_needed_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
extern bfd_boolean bfd_elf_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **,
+ struct bfd_elf_version_tree *);
+extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr
+ (bfd *, struct bfd_link_info *);
extern void bfd_elf_set_dt_needed_name
(bfd *, const char *);
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
- (bfd *, int);
+ (bfd *, enum dynamic_lib_link_class);
+extern int bfd_elf_get_dyn_lib_class
+ (bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_info
(bfd *, struct bfd_link_info *);
+extern unsigned int _bfd_elf_default_action_discarded
+ (struct bfd_section *);
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -669,7 +749,7 @@ extern int bfd_get_elf_phdrs
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
/* Return the arch_size field of an elf bfd, or -1 if not elf. */
extern int bfd_get_arch_size
@@ -682,10 +762,20 @@ extern int bfd_get_sign_extend_vma
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
+extern void _bfd_fix_excluded_sec_syms
+ (bfd *, struct bfd_link_info *);
+
+extern unsigned bfd_m68k_mach_to_features (int);
+
+extern int bfd_m68k_features_to_mach (unsigned);
+
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+ char **);
+
+extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+ char **);
/* SunOS shared library support routines for the linker. */
@@ -694,7 +784,8 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
extern bfd_boolean bfd_sunos_record_link_assignment
(bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **);
+ (bfd *, struct bfd_link_info *, struct bfd_section **,
+ struct bfd_section **, struct bfd_section **);
/* Linux shared library support routines for the linker. */
@@ -775,6 +866,27 @@ extern bfd_boolean bfd_coff_set_symbol_class
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
+/* ARM VFP11 erratum workaround support. */
+typedef enum
+{
+ BFD_ARM_VFP11_FIX_DEFAULT,
+ BFD_ARM_VFP11_FIX_NONE,
+ BFD_ARM_VFP11_FIX_SCALAR,
+ BFD_ARM_VFP11_FIX_VECTOR
+} bfd_arm_vfp11_fix;
+
+extern void bfd_elf32_arm_init_maps
+ (bfd *);
+
+extern void bfd_elf32_arm_set_vfp11_fix
+ (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
+ (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_vfp11_fix_veneer_locations
+ (bfd *, struct bfd_link_info *);
+
/* ARM Interworking support. Called from linker. */
extern bfd_boolean bfd_arm_allocate_interworking_sections
(struct bfd_link_info *);
@@ -800,7 +912,11 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
+ (bfd *, struct bfd_link_info *);
+
+void bfd_elf32_arm_set_target_relocs
+ (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
+ int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
@@ -808,6 +924,16 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
(bfd *, struct bfd_link_info *);
+/* ELF ARM mapping symbol support */
+#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
+#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
+#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
+#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
+extern bfd_boolean bfd_is_arm_special_symbol_name
+ (const char * name, int type);
+
+extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int);
+
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
(bfd *, bfd *);
@@ -836,16 +962,54 @@ extern void bfd_elf32_ia64_after_parse
extern void bfd_elf64_ia64_after_parse
(int);
+/* This structure is used for a comdat section, as in PE. A comdat
+ section is associated with a particular symbol. When the linker
+ sees a comdat section, it keeps only one of the sections with a
+ given name and associated with a given symbol. */
+
+struct coff_comdat_info
+{
+ /* The name of the symbol associated with a comdat section. */
+ const char *name;
+
+ /* The local symbol table index of the symbol associated with a
+ comdat section. This is only meaningful to the object file format
+ specific code; it is not an index into the list returned by
+ bfd_canonicalize_symtab. */
+ long symbol;
+};
+
+extern struct coff_comdat_info *bfd_coff_get_comdat_section
+ (bfd *, struct bfd_section *);
+
/* Extracted from init.c. */
void bfd_init (void);
/* Extracted from opncls.c. */
+bfd *bfd_fopen (const char *filename, const char *target,
+ const char *mode, int fd);
+
bfd *bfd_openr (const char *filename, const char *target);
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
bfd *bfd_openstreamr (const char *, const char *, void *);
+bfd *bfd_openr_iovec (const char *filename, const char *target,
+ void *(*open) (struct bfd *nbfd,
+ void *open_closure),
+ void *open_closure,
+ file_ptr (*pread) (struct bfd *nbfd,
+ void *stream,
+ void *buf,
+ file_ptr nbytes,
+ file_ptr offset),
+ int (*close) (struct bfd *nbfd,
+ void *stream),
+ int (*stat) (struct bfd *abfd,
+ void *stream,
+ struct stat *sb));
+
bfd *bfd_openw (const char *filename, const char *target);
bfd_boolean bfd_close (bfd *abfd);
@@ -985,27 +1149,10 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section
/* Extracted from bfdio.c. */
long bfd_get_mtime (bfd *abfd);
-long bfd_get_size (bfd *abfd);
+file_ptr bfd_get_size (bfd *abfd);
/* Extracted from bfdwin.c. */
/* Extracted from section.c. */
-/* This structure is used for a comdat section, as in PE. A comdat
- section is associated with a particular symbol. When the linker
- sees a comdat section, it keeps only one of the sections with a
- given name and associated with a given symbol. */
-
-struct bfd_comdat_info
-{
- /* The name of the symbol associated with a comdat section. */
- const char *name;
-
- /* The local symbol table index of the symbol associated with a
- comdat section. This is only meaningful to the object file format
- specific code; it is not an index into the list returned by
- bfd_canonicalize_symtab. */
- long symbol;
-};
-
typedef struct bfd_section
{
/* The name of the section; the name isn't a copy, the pointer is
@@ -1021,6 +1168,9 @@ typedef struct bfd_section
/* The next section in the list belonging to the BFD, or NULL. */
struct bfd_section *next;
+ /* The previous section in the list belonging to the BFD, or NULL. */
+ struct bfd_section *prev;
+
/* The field flags contains attributes of the section. Some
flags are read in from the object file, and some are
synthesized from other information. */
@@ -1040,23 +1190,17 @@ typedef struct bfd_section
some relocation information too. */
#define SEC_RELOC 0x004
- /* ELF reserves 4 processor specific bits and 8 operating system
- specific bits in sh_flags; at present we can get away with just
- one in communicating between the assembler and BFD, but this
- isn't a good long-term solution. */
-#define SEC_ARCH_BIT_0 0x008
-
/* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x010
+#define SEC_READONLY 0x008
/* The section contains code only. */
-#define SEC_CODE 0x020
+#define SEC_CODE 0x010
/* The section contains data only. */
-#define SEC_DATA 0x040
+#define SEC_DATA 0x020
/* The section will reside in ROM. */
-#define SEC_ROM 0x080
+#define SEC_ROM 0x040
/* The section contains constructor information. This section
type is used by the linker to create lists of constructors and
@@ -1068,30 +1212,19 @@ typedef struct bfd_section
sections called <<__CTOR_LIST__>> and relocate the data
contained within - exactly the operations it would peform on
standard data. */
-#define SEC_CONSTRUCTOR 0x100
+#define SEC_CONSTRUCTOR 0x080
/* The section has contents - a data section could be
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
<<SEC_HAS_CONTENTS>> */
-#define SEC_HAS_CONTENTS 0x200
+#define SEC_HAS_CONTENTS 0x100
/* An instruction to the linker to not output the section
even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x400
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x800
+#define SEC_NEVER_LOAD 0x200
/* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x1000
+#define SEC_THREAD_LOCAL 0x400
/* The section has GOT references. This flag is only for the
linker, and is currently only used by the elf32-hppa back end.
@@ -1099,46 +1232,46 @@ typedef struct bfd_section
in this section, which indicate to the linker that the section
contains PIC code, and must be handled specially when doing a
static link. */
-#define SEC_HAS_GOT_REF 0x4000
+#define SEC_HAS_GOT_REF 0x800
/* The section contains common symbols (symbols may be defined
multiple times, the value of a symbol is the amount of
space it requires, and the largest symbol value is the one
used). Most targets have exactly one of these (which we
translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x8000
+#define SEC_IS_COMMON 0x1000
/* The section contains only debugging information. For
example, this is set for ELF .debug and .stab sections.
strip tests this flag to see if a section can be
discarded. */
-#define SEC_DEBUGGING 0x10000
+#define SEC_DEBUGGING 0x2000
/* The contents of this section are held in memory pointed to
by the contents field. This is checked by bfd_get_section_contents,
and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x20000
+#define SEC_IN_MEMORY 0x4000
/* The contents of this section are to be excluded by the
linker for executable and shared objects unless those
objects are to be further relocated. */
-#define SEC_EXCLUDE 0x40000
+#define SEC_EXCLUDE 0x8000
/* The contents of this section are to be sorted based on the sum of
the symbol and addend values specified by the associated relocation
entries. Entries without associated relocation entries will be
appended to the end of the section in an unspecified order. */
-#define SEC_SORT_ENTRIES 0x80000
+#define SEC_SORT_ENTRIES 0x10000
/* When linking, duplicate sections of the same name should be
discarded, rather than being combined into a single section as
is usually done. This is similar to how common symbols are
handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x100000
+#define SEC_LINK_ONCE 0x20000
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0x600000
+#define SEC_LINK_DUPLICATES 0x40000
/* This value for SEC_LINK_DUPLICATES means that duplicate
sections with the same name should simply be discarded. */
@@ -1147,55 +1280,71 @@ typedef struct bfd_section
/* This value for SEC_LINK_DUPLICATES means that the linker
should warn if there are any duplicate sections, although
it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
+#define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
/* This value for SEC_LINK_DUPLICATES means that the linker
should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
+#define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
/* This value for SEC_LINK_DUPLICATES means that the linker
should warn if any duplicate sections contain different
contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
+#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
+ (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
/* This section was created by the linker as part of dynamic
relocation or other arcane processing. It is skipped when
going through the first-pass output, trusting that someone
else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x800000
+#define SEC_LINKER_CREATED 0x200000
- /* This section should not be subject to garbage collection. */
-#define SEC_KEEP 0x1000000
+ /* This section should not be subject to garbage collection.
+ Also set to inform the linker that this section should not be
+ listed in the link map as discarded. */
+#define SEC_KEEP 0x400000
/* This section contains "short" data, and should be placed
"near" the GP. */
-#define SEC_SMALL_DATA 0x2000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. */
-#define SEC_SHARED 0x4000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more, it
- should be aligned on a page boundary. */
-#define SEC_BLOCK 0x8000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. */
-#define SEC_CLINK 0x10000000
+#define SEC_SMALL_DATA 0x800000
/* Attempt to merge identical entities in the section.
Entity size is given in the entsize field. */
-#define SEC_MERGE 0x20000000
+#define SEC_MERGE 0x1000000
/* If given with SEC_MERGE, entities to merge are zero terminated
strings where entsize specifies character size instead of fixed
size entries. */
-#define SEC_STRINGS 0x40000000
+#define SEC_STRINGS 0x2000000
/* This section contains data about section groups. */
-#define SEC_GROUP 0x80000000
+#define SEC_GROUP 0x4000000
+
+ /* The section is a COFF shared library section. This flag is
+ only for the linker. If this type of section appears in
+ the input file, the linker must copy it to the output file
+ without changing the vma or size. FIXME: Although this
+ was originally intended to be general, it really is COFF
+ specific (and the flag was renamed to indicate this). It
+ might be cleaner to have some more general mechanism to
+ allow the back end to control what the linker does with
+ sections. */
+#define SEC_COFF_SHARED_LIBRARY 0x10000000
+
+ /* This section contains data which may be shared with other
+ executables or shared objects. This is for COFF only. */
+#define SEC_COFF_SHARED 0x20000000
+
+ /* When a section with this flag is being linked, then if the size of
+ the input section is less than a page, it should not cross a page
+ boundary. If the size of the input section is one page or more,
+ it should be aligned on a page boundary. This is for TI
+ TMS320C54X only. */
+#define SEC_TIC54X_BLOCK 0x40000000
+
+ /* Conditionally link this section; do not link if there are no
+ references found to any symbol in the section. This is for TI
+ TMS320C54X only. */
+#define SEC_TIC54X_CLINK 0x80000000
/* End of section flags. */
@@ -1204,9 +1353,6 @@ typedef struct bfd_section
/* See the vma field. */
unsigned int user_set_vma : 1;
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
-
/* A mark flag used by some of the linker backends. */
unsigned int linker_mark : 1;
@@ -1214,8 +1360,9 @@ typedef struct bfd_section
output sections that have an input section. */
unsigned int linker_has_input : 1;
- /* A mark flag used by some linker backends for garbage collection. */
+ /* Mark flags used by some linker backends for garbage collection. */
unsigned int gc_mark : 1;
+ unsigned int gc_mark_from_eh : 1;
/* The following flags are used by the ELF linker. */
@@ -1233,22 +1380,20 @@ typedef struct bfd_section
/* Nonzero if this section uses RELA relocations, rather than REL. */
unsigned int use_rela_p:1;
- /* Bits used by various backends. */
- unsigned int has_tls_reloc:1;
+ /* Bits used by various backends. The generic code doesn't touch
+ these fields. */
- /* Nonzero if this section needs the relax finalize pass. */
- unsigned int need_finalize_relax:1;
+ /* Nonzero if this section has TLS related relocations. */
+ unsigned int has_tls_reloc:1;
/* Nonzero if this section has a gp reloc. */
unsigned int has_gp_reloc:1;
- /* Unused bits. */
- unsigned int flag13:1;
- unsigned int flag14:1;
- unsigned int flag15:1;
- unsigned int flag16:4;
- unsigned int flag20:4;
- unsigned int flag24:8;
+ /* Nonzero if this section needs the relax finalize pass. */
+ unsigned int need_finalize_relax:1;
+
+ /* Whether relocations have been processed. */
+ unsigned int reloc_done : 1;
/* End of internal packed boolean fields. */
@@ -1267,13 +1412,18 @@ typedef struct bfd_section
/* The size of the section in octets, as it will be output.
Contains a value even if the section has no contents (e.g., the
- size of <<.bss>>). This will be filled in after relocation. */
- bfd_size_type _cooked_size;
+ size of <<.bss>>). */
+ bfd_size_type size;
- /* The original size on disk of the section, in octets. Normally this
- value is the same as the size, but if some relaxing has
- been done, then this value will be bigger. */
- bfd_size_type _raw_size;
+ /* For input sections, the original size on disk of the section, in
+ octets. This field is used by the linker relaxation code. It is
+ currently only set for sections where the linker relaxation scheme
+ doesn't cache altered section and reloc contents (stabs, eh_frame,
+ SEC_MERGE, some coff relaxing targets), and thus the original size
+ needs to be kept to read the section multiple times.
+ For output sections, rawsize holds the section size calculated on
+ a previous linker relaxation pass. */
+ bfd_size_type rawsize;
/* If this section is going to be output, then this value is the
offset in *bytes* into the output section of the first byte in the
@@ -1330,9 +1480,6 @@ typedef struct bfd_section
/* Entity size for merging purposes. */
unsigned int entsize;
- /* Optional information about a COMDAT entry; NULL if not COMDAT. */
- struct bfd_comdat_info *comdat;
-
/* Points to the kept section if this section is a link-once section,
and is discarded. */
struct bfd_section *kept_section;
@@ -1357,8 +1504,14 @@ typedef struct bfd_section
struct bfd_symbol *symbol;
struct bfd_symbol **symbol_ptr_ptr;
- struct bfd_link_order *link_order_head;
- struct bfd_link_order *link_order_tail;
+ /* Early in the link process, map_head and map_tail are used to build
+ a list of input sections attached to an output section. Later,
+ output sections use these fields for a list of bfd_link_order
+ structs. */
+ union {
+ struct bfd_link_order *link_order;
+ struct bfd_section *s;
+ } map_head, map_tail;
} asection;
/* These sections are global, and are managed by BFD. The application
@@ -1393,52 +1546,157 @@ extern asection bfd_ind_section;
|| ((SEC) == bfd_com_section_ptr) \
|| ((SEC) == bfd_ind_section_ptr))
-extern const struct bfd_symbol * const bfd_abs_symbol;
-extern const struct bfd_symbol * const bfd_com_symbol;
-extern const struct bfd_symbol * const bfd_und_symbol;
-extern const struct bfd_symbol * const bfd_ind_symbol;
-#define bfd_get_section_size_before_reloc(section) \
- ((section)->_raw_size)
-#define bfd_get_section_size_after_reloc(section) \
- ((section)->reloc_done ? (section)->_cooked_size \
- : (abort (), (bfd_size_type) 1))
-
/* Macros to handle insertion and deletion of a bfd's sections. These
only handle the list pointers, ie. do not adjust section_count,
target_index etc. */
-#define bfd_section_list_remove(ABFD, PS) \
+#define bfd_section_list_remove(ABFD, S) \
+ do \
+ { \
+ asection *_s = S; \
+ asection *_next = _s->next; \
+ asection *_prev = _s->prev; \
+ if (_prev) \
+ _prev->next = _next; \
+ else \
+ (ABFD)->sections = _next; \
+ if (_next) \
+ _next->prev = _prev; \
+ else \
+ (ABFD)->section_last = _prev; \
+ } \
+ while (0)
+#define bfd_section_list_append(ABFD, S) \
do \
{ \
- asection **_ps = PS; \
- asection *_s = *_ps; \
- *_ps = _s->next; \
- if (_s->next == NULL) \
- (ABFD)->section_tail = _ps; \
+ asection *_s = S; \
+ bfd *_abfd = ABFD; \
+ _s->next = NULL; \
+ if (_abfd->section_last) \
+ { \
+ _s->prev = _abfd->section_last; \
+ _abfd->section_last->next = _s; \
+ } \
+ else \
+ { \
+ _s->prev = NULL; \
+ _abfd->sections = _s; \
+ } \
+ _abfd->section_last = _s; \
} \
while (0)
-#define bfd_section_list_insert(ABFD, PS, S) \
+#define bfd_section_list_prepend(ABFD, S) \
do \
{ \
- asection **_ps = PS; \
asection *_s = S; \
- _s->next = *_ps; \
- *_ps = _s; \
- if (_s->next == NULL) \
- (ABFD)->section_tail = &_s->next; \
+ bfd *_abfd = ABFD; \
+ _s->prev = NULL; \
+ if (_abfd->sections) \
+ { \
+ _s->next = _abfd->sections; \
+ _abfd->sections->prev = _s; \
+ } \
+ else \
+ { \
+ _s->next = NULL; \
+ _abfd->section_last = _s; \
+ } \
+ _abfd->sections = _s; \
} \
while (0)
+#define bfd_section_list_insert_after(ABFD, A, S) \
+ do \
+ { \
+ asection *_a = A; \
+ asection *_s = S; \
+ asection *_next = _a->next; \
+ _s->next = _next; \
+ _s->prev = _a; \
+ _a->next = _s; \
+ if (_next) \
+ _next->prev = _s; \
+ else \
+ (ABFD)->section_last = _s; \
+ } \
+ while (0)
+#define bfd_section_list_insert_before(ABFD, B, S) \
+ do \
+ { \
+ asection *_b = B; \
+ asection *_s = S; \
+ asection *_prev = _b->prev; \
+ _s->prev = _prev; \
+ _s->next = _b; \
+ _b->prev = _s; \
+ if (_prev) \
+ _prev->next = _s; \
+ else \
+ (ABFD)->sections = _s; \
+ } \
+ while (0)
+#define bfd_section_removed_from_list(ABFD, S) \
+ ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
+
+#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
+ /* name, id, index, next, prev, flags, user_set_vma, */ \
+ { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
+ \
+ /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh, */ \
+ 0, 0, 1, 0, \
+ \
+ /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \
+ 0, 0, 0, 0, \
+ \
+ /* has_gp_reloc, need_finalize_relax, reloc_done, */ \
+ 0, 0, 0, \
+ \
+ /* vma, lma, size, rawsize */ \
+ 0, 0, 0, 0, \
+ \
+ /* output_offset, output_section, alignment_power, */ \
+ 0, (struct bfd_section *) &SEC, 0, \
+ \
+ /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
+ NULL, NULL, 0, 0, 0, \
+ \
+ /* line_filepos, userdata, contents, lineno, lineno_count, */ \
+ 0, NULL, NULL, NULL, 0, \
+ \
+ /* entsize, kept_section, moving_line_filepos, */ \
+ 0, NULL, 0, \
+ \
+ /* target_index, used_by_bfd, constructor_chain, owner, */ \
+ 0, NULL, NULL, NULL, \
+ \
+ /* symbol, symbol_ptr_ptr, */ \
+ (struct bfd_symbol *) SYM, &SEC.symbol, \
+ \
+ /* map_head, map_tail */ \
+ { NULL }, { NULL } \
+ }
void bfd_section_list_clear (bfd *);
asection *bfd_get_section_by_name (bfd *abfd, const char *name);
+asection *bfd_get_section_by_name_if
+ (bfd *abfd,
+ const char *name,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
char *bfd_get_unique_section_name
(bfd *abfd, const char *templat, int *count);
asection *bfd_make_section_old_way (bfd *abfd, const char *name);
+asection *bfd_make_section_anyway_with_flags
+ (bfd *abfd, const char *name, flagword flags);
+
asection *bfd_make_section_anyway (bfd *abfd, const char *name);
+asection *bfd_make_section_with_flags
+ (bfd *, const char *name, flagword flags);
+
asection *bfd_make_section (bfd *, const char *name);
bfd_boolean bfd_set_section_flags
@@ -1449,6 +1707,11 @@ void bfd_map_over_sections
void (*func) (bfd *abfd, asection *sect, void *obj),
void *obj);
+asection *bfd_sections_find_if
+ (bfd *abfd,
+ bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
bfd_boolean bfd_set_section_size
(bfd *abfd, asection *sec, bfd_size_type val);
@@ -1460,14 +1723,16 @@ bfd_boolean bfd_get_section_contents
(bfd *abfd, asection *section, void *location, file_ptr offset,
bfd_size_type count);
+bfd_boolean bfd_malloc_and_get_section
+ (bfd *abfd, asection *section, bfd_byte **buf);
+
bfd_boolean bfd_copy_private_section_data
(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
(ibfd, isection, obfd, osection))
-void _bfd_strip_section_from_output
- (struct bfd_link_info *info, asection *section);
+bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
@@ -1485,11 +1750,26 @@ enum bfd_architecture
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
-#define bfd_mach_mcf5200 9
-#define bfd_mach_mcf5206e 10
-#define bfd_mach_mcf5307 11
-#define bfd_mach_mcf5407 12
-#define bfd_mach_mcf528x 13
+#define bfd_mach_fido 9
+#define bfd_mach_mcf_isa_a_nodiv 10
+#define bfd_mach_mcf_isa_a 11
+#define bfd_mach_mcf_isa_a_mac 12
+#define bfd_mach_mcf_isa_a_emac 13
+#define bfd_mach_mcf_isa_aplus 14
+#define bfd_mach_mcf_isa_aplus_mac 15
+#define bfd_mach_mcf_isa_aplus_emac 16
+#define bfd_mach_mcf_isa_b_nousp 17
+#define bfd_mach_mcf_isa_b_nousp_mac 18
+#define bfd_mach_mcf_isa_b_nousp_emac 19
+#define bfd_mach_mcf_isa_b 20
+#define bfd_mach_mcf_isa_b_mac 21
+#define bfd_mach_mcf_isa_b_emac 22
+#define bfd_mach_mcf_isa_b_float 23
+#define bfd_mach_mcf_isa_b_float_mac 24
+#define bfd_mach_mcf_isa_b_float_emac 25
+#define bfd_mach_mcf_isa_c 26
+#define bfd_mach_mcf_isa_c_mac 27
+#define bfd_mach_mcf_isa_c_emac 28
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@@ -1511,7 +1791,6 @@ enum bfd_architecture
bfd_arch_or32, /* OpenRISC 32 */
- bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
@@ -1528,6 +1807,11 @@ enum bfd_architecture
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
&& (mach) != bfd_mach_sparc_sparclite_le)
+/* Nonzero if MACH is a 64 bit sparc architecture. */
+#define bfd_mach_sparc_64bit_p(mach) \
+ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+ bfd_arch_spu, /* PowerPC SPU */
+#define bfd_mach_spu 256
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
@@ -1568,7 +1852,6 @@ enum bfd_architecture
bfd_arch_i860, /* Intel 860 */
bfd_arch_i370, /* IBM 360/370 Mainframes */
bfd_arch_romp, /* IBM ROMP PC/RT */
- bfd_arch_alliant, /* Alliant */
bfd_arch_convex, /* Convex */
bfd_arch_m88k, /* Motorola 88xxx */
bfd_arch_m98k, /* Motorola 98xxx */
@@ -1631,12 +1914,20 @@ enum bfd_architecture
#define bfd_mach_sh 1
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
+#define bfd_mach_sh2a 0x2a
+#define bfd_mach_sh2a_nofpu 0x2b
+#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
+#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
+#define bfd_mach_sh2a_or_sh4 0x2a3
+#define bfd_mach_sh2a_or_sh3e 0x2a4
#define bfd_mach_sh2e 0x2e
#define bfd_mach_sh3 0x30
+#define bfd_mach_sh3_nommu 0x31
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
#define bfd_mach_sh4_nofpu 0x41
+#define bfd_mach_sh4_nommu_nofpu 0x42
#define bfd_mach_sh4a 0x4a
#define bfd_mach_sh4a_nofpu 0x4b
#define bfd_mach_sh4al_dsp 0x4d
@@ -1659,6 +1950,7 @@ enum bfd_architecture
#define bfd_mach_arm_XScale 10
#define bfd_mach_arm_ep9312 11
#define bfd_mach_arm_iWMMXt 12
+#define bfd_mach_arm_iWMMXt2 13
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
@@ -1676,6 +1968,9 @@ enum bfd_architecture
#define bfd_mach_arc_6 6
#define bfd_mach_arc_7 7
#define bfd_mach_arc_8 8
+ bfd_arch_m32c, /* Renesas M16C/M32C. */
+#define bfd_mach_m16c 0x75
+#define bfd_mach_m32c 0x78
bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */
#define bfd_mach_m32r 1 /* For backwards compatibility. */
#define bfd_mach_m32rx 'x'
@@ -1692,10 +1987,14 @@ enum bfd_architecture
#define bfd_mach_frvsimple 2
#define bfd_mach_fr300 300
#define bfd_mach_fr400 400
+#define bfd_mach_fr450 450
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
#define bfd_mach_fr550 550
bfd_arch_mcore,
+ bfd_arch_mep,
+#define bfd_mach_mep 1
+#define bfd_mach_mep_h1 0x6831
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 64
#define bfd_mach_ia64_elf32 32
@@ -1705,6 +2004,10 @@ enum bfd_architecture
bfd_arch_iq2000, /* Vitesse IQ2000. */
#define bfd_mach_iq2000 1
#define bfd_mach_iq10 2
+ bfd_arch_mt,
+#define bfd_mach_ms1 1
+#define bfd_mach_mrisc2 2
+#define bfd_mach_ms2 3
bfd_arch_pj,
bfd_arch_avr, /* Atmel AVR microcontrollers. */
#define bfd_mach_avr1 1
@@ -1712,10 +2015,23 @@ enum bfd_architecture
#define bfd_mach_avr3 3
#define bfd_mach_avr4 4
#define bfd_mach_avr5 5
+#define bfd_mach_avr6 6
+ bfd_arch_bfin, /* ADI Blackfin */
+#define bfd_mach_bfin 1
+ bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
+#define bfd_mach_cr16 1
+ bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
+#define bfd_mach_cr16c 1
+ bfd_arch_crx, /* National Semiconductor CRX. */
+#define bfd_mach_crx 1
bfd_arch_cris, /* Axis CRIS */
+#define bfd_mach_cris_v0_v10 255
+#define bfd_mach_cris_v32 32
+#define bfd_mach_cris_v10_v32 1032
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_31 31
#define bfd_mach_s390_64 64
+ bfd_arch_score, /* Sunplus score */
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
@@ -1727,7 +2043,8 @@ enum bfd_architecture
#define bfd_mach_msp13 13
#define bfd_mach_msp14 14
#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
+#define bfd_mach_msp16 16
+#define bfd_mach_msp21 21
#define bfd_mach_msp31 31
#define bfd_mach_msp32 32
#define bfd_mach_msp33 33
@@ -1735,8 +2052,20 @@ enum bfd_architecture
#define bfd_mach_msp42 42
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
+ bfd_arch_xc16x, /* Infineon's XC16X Series. */
+#define bfd_mach_xc16x 1
+#define bfd_mach_xc16xl 2
+#define bfd_mach_xc16xs 3
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
+ bfd_arch_maxq, /* Dallas MAXQ 10/20 */
+#define bfd_mach_maxq10 10
+#define bfd_mach_maxq20 20
+ bfd_arch_z80,
+#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
+#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
+#define bfd_mach_z80full 7 /* All undocumented instructions. */
+#define bfd_mach_r800 11 /* R800: successor with multiplication. */
bfd_arch_last
};
@@ -1850,11 +2179,12 @@ enum complain_overflow
/* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the value overflows when considered as a signed
+ number one bit larger than the field. ie. A bitfield of N bits
+ is allowed to represent -2**n to 2**n-1. */
complain_overflow_bitfield,
- /* Complain if the value overflows when considered as signed
+ /* Complain if the value overflows when considered as a signed
number. */
complain_overflow_signed,
@@ -2032,6 +2362,9 @@ The 24-bit relocation is used in some Intel 960 configurations. */
BFD_RELOC_12_PCREL,
BFD_RELOC_8_PCREL,
+/* Section relative relocations. Some targets need this for DWARF2. */
+ BFD_RELOC_32_SECREL,
+
/* For ELF. */
BFD_RELOC_32_GOT_PCREL,
BFD_RELOC_16_GOT_PCREL,
@@ -2176,6 +2509,22 @@ relocation types already defined. */
BFD_RELOC_SPARC_TLS_TPOFF32,
BFD_RELOC_SPARC_TLS_TPOFF64,
+/* SPU Relocations. */
+ BFD_RELOC_SPU_IMM7,
+ BFD_RELOC_SPU_IMM8,
+ BFD_RELOC_SPU_IMM10,
+ BFD_RELOC_SPU_IMM10W,
+ BFD_RELOC_SPU_IMM16,
+ BFD_RELOC_SPU_IMM16W,
+ BFD_RELOC_SPU_IMM18,
+ BFD_RELOC_SPU_PCREL9a,
+ BFD_RELOC_SPU_PCREL9b,
+ BFD_RELOC_SPU_PCREL16,
+ BFD_RELOC_SPU_LO16,
+ BFD_RELOC_SPU_HI16,
+ BFD_RELOC_SPU_PPU32,
+ BFD_RELOC_SPU_PPU64,
+
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
"addend" in some special way.
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
@@ -2282,11 +2631,26 @@ to compensate for the borrow when the low bits are added. */
/* Low 16 bits. */
BFD_RELOC_LO16,
-/* Like BFD_RELOC_HI16_S, but PC relative. */
- BFD_RELOC_PCREL_HI16_S,
+/* High 16 bits of 32-bit pc-relative value */
+ BFD_RELOC_HI16_PCREL,
+
+/* High 16 bits of 32-bit pc-relative value, adjusted */
+ BFD_RELOC_HI16_S_PCREL,
+
+/* Low 16 bits of pc-relative value */
+ BFD_RELOC_LO16_PCREL,
-/* Like BFD_RELOC_LO16, but PC relative. */
- BFD_RELOC_PCREL_LO16,
+/* MIPS16 high 16 bits of 32-bit value. */
+ BFD_RELOC_MIPS16_HI16,
+
+/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
+extended and added to form the final result. If the low 16
+bits form a negative number, we need to add one to the high value
+to compensate for the borrow when the low bits are added. */
+ BFD_RELOC_MIPS16_HI16_S,
+
+/* MIPS16 low 16 bits. */
+ BFD_RELOC_MIPS16_LO16,
/* Relocation against a MIPS literal section. */
BFD_RELOC_MIPS_LITERAL,
@@ -2313,6 +2677,24 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
+ BFD_RELOC_MIPS_TLS_DTPMOD32,
+ BFD_RELOC_MIPS_TLS_DTPREL32,
+ BFD_RELOC_MIPS_TLS_DTPMOD64,
+ BFD_RELOC_MIPS_TLS_DTPREL64,
+ BFD_RELOC_MIPS_TLS_GD,
+ BFD_RELOC_MIPS_TLS_LDM,
+ BFD_RELOC_MIPS_TLS_DTPREL_HI16,
+ BFD_RELOC_MIPS_TLS_DTPREL_LO16,
+ BFD_RELOC_MIPS_TLS_GOTTPREL,
+ BFD_RELOC_MIPS_TLS_TPREL32,
+ BFD_RELOC_MIPS_TLS_TPREL64,
+ BFD_RELOC_MIPS_TLS_TPREL_HI16,
+ BFD_RELOC_MIPS_TLS_TPREL_LO16,
+
+
+/* MIPS ELF relocations (VxWorks extensions). */
+ BFD_RELOC_MIPS_COPY,
+ BFD_RELOC_MIPS_JUMP_SLOT,
/* Fujitsu Frv Relocations. */
@@ -2339,6 +2721,22 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_FRV_GOTOFF12,
BFD_RELOC_FRV_GOTOFFHI,
BFD_RELOC_FRV_GOTOFFLO,
+ BFD_RELOC_FRV_GETTLSOFF,
+ BFD_RELOC_FRV_TLSDESC_VALUE,
+ BFD_RELOC_FRV_GOTTLSDESC12,
+ BFD_RELOC_FRV_GOTTLSDESCHI,
+ BFD_RELOC_FRV_GOTTLSDESCLO,
+ BFD_RELOC_FRV_TLSMOFF12,
+ BFD_RELOC_FRV_TLSMOFFHI,
+ BFD_RELOC_FRV_TLSMOFFLO,
+ BFD_RELOC_FRV_GOTTLSOFF12,
+ BFD_RELOC_FRV_GOTTLSOFFHI,
+ BFD_RELOC_FRV_GOTTLSOFFLO,
+ BFD_RELOC_FRV_TLSOFF,
+ BFD_RELOC_FRV_TLSDESC_RELAX,
+ BFD_RELOC_FRV_GETTLSOFF_RELAX,
+ BFD_RELOC_FRV_TLSOFF_RELAX,
+ BFD_RELOC_FRV_TLSMOFF,
/* This is a 24bit GOT-relative reloc for the mn10300. */
@@ -2390,6 +2788,9 @@ in the instruction. */
BFD_RELOC_386_TLS_DTPMOD32,
BFD_RELOC_386_TLS_DTPOFF32,
BFD_RELOC_386_TLS_TPOFF32,
+ BFD_RELOC_386_TLS_GOTDESC,
+ BFD_RELOC_386_TLS_DESC_CALL,
+ BFD_RELOC_386_TLS_DESC,
/* x86-64/elf relocations */
BFD_RELOC_X86_64_GOT32,
@@ -2408,6 +2809,16 @@ in the instruction. */
BFD_RELOC_X86_64_DTPOFF32,
BFD_RELOC_X86_64_GOTTPOFF,
BFD_RELOC_X86_64_TPOFF32,
+ BFD_RELOC_X86_64_GOTOFF64,
+ BFD_RELOC_X86_64_GOTPC32,
+ BFD_RELOC_X86_64_GOT64,
+ BFD_RELOC_X86_64_GOTPCREL64,
+ BFD_RELOC_X86_64_GOTPC64,
+ BFD_RELOC_X86_64_GOTPLT64,
+ BFD_RELOC_X86_64_PLTOFF64,
+ BFD_RELOC_X86_64_GOTPC32_TLSDESC,
+ BFD_RELOC_X86_64_TLSDESC_CALL,
+ BFD_RELOC_X86_64_TLSDESC,
/* ns32k relocations */
BFD_RELOC_NS32K_IMM_8,
@@ -2554,39 +2965,146 @@ not stored in the instruction. The 2nd lowest bit comes from a 1 bit
field in the instruction. */
BFD_RELOC_THUMB_PCREL_BLX,
+/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */
+ BFD_RELOC_ARM_PCREL_CALL,
+
+/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */
+ BFD_RELOC_ARM_PCREL_JUMP,
+
+/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
+The lowest bit must be zero and is not stored in the instruction.
+Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
+"nn" one smaller in all cases. Note further that BRANCH23
+corresponds to R_ARM_THM_CALL. */
+ BFD_RELOC_THUMB_PCREL_BRANCH7,
+ BFD_RELOC_THUMB_PCREL_BRANCH9,
+ BFD_RELOC_THUMB_PCREL_BRANCH12,
+ BFD_RELOC_THUMB_PCREL_BRANCH20,
+ BFD_RELOC_THUMB_PCREL_BRANCH23,
+ BFD_RELOC_THUMB_PCREL_BRANCH25,
+
+/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */
+ BFD_RELOC_ARM_OFFSET_IMM,
+
+/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */
+ BFD_RELOC_ARM_THUMB_OFFSET,
+
+/* Pc-relative or absolute relocation depending on target. Used for
+entries in .init_array sections. */
+ BFD_RELOC_ARM_TARGET1,
+
+/* Read-only segment base relative address. */
+ BFD_RELOC_ARM_ROSEGREL32,
+
+/* Data segment base relative address. */
+ BFD_RELOC_ARM_SBREL32,
+
+/* This reloc is used for references to RTTI data from exception handling
+tables. The actual definition depends on the target. It may be a
+pc-relative or some form of GOT-indirect relocation. */
+ BFD_RELOC_ARM_TARGET2,
+
+/* 31-bit PC relative address. */
+ BFD_RELOC_ARM_PREL31,
+
+/* Low and High halfword relocations for MOVW and MOVT instructions. */
+ BFD_RELOC_ARM_MOVW,
+ BFD_RELOC_ARM_MOVT,
+ BFD_RELOC_ARM_MOVW_PCREL,
+ BFD_RELOC_ARM_MOVT_PCREL,
+ BFD_RELOC_ARM_THUMB_MOVW,
+ BFD_RELOC_ARM_THUMB_MOVT,
+ BFD_RELOC_ARM_THUMB_MOVW_PCREL,
+ BFD_RELOC_ARM_THUMB_MOVT_PCREL,
+
+/* Relocations for setting up GOTs and PLTs for shared libraries. */
+ BFD_RELOC_ARM_JUMP_SLOT,
+ BFD_RELOC_ARM_GLOB_DAT,
+ BFD_RELOC_ARM_GOT32,
+ BFD_RELOC_ARM_PLT32,
+ BFD_RELOC_ARM_RELATIVE,
+ BFD_RELOC_ARM_GOTOFF,
+ BFD_RELOC_ARM_GOTPC,
+
+/* ARM thread-local storage relocations. */
+ BFD_RELOC_ARM_TLS_GD32,
+ BFD_RELOC_ARM_TLS_LDO32,
+ BFD_RELOC_ARM_TLS_LDM32,
+ BFD_RELOC_ARM_TLS_DTPOFF32,
+ BFD_RELOC_ARM_TLS_DTPMOD32,
+ BFD_RELOC_ARM_TLS_TPOFF32,
+ BFD_RELOC_ARM_TLS_IE32,
+ BFD_RELOC_ARM_TLS_LE32,
+
+/* ARM group relocations. */
+ BFD_RELOC_ARM_ALU_PC_G0_NC,
+ BFD_RELOC_ARM_ALU_PC_G0,
+ BFD_RELOC_ARM_ALU_PC_G1_NC,
+ BFD_RELOC_ARM_ALU_PC_G1,
+ BFD_RELOC_ARM_ALU_PC_G2,
+ BFD_RELOC_ARM_LDR_PC_G0,
+ BFD_RELOC_ARM_LDR_PC_G1,
+ BFD_RELOC_ARM_LDR_PC_G2,
+ BFD_RELOC_ARM_LDRS_PC_G0,
+ BFD_RELOC_ARM_LDRS_PC_G1,
+ BFD_RELOC_ARM_LDRS_PC_G2,
+ BFD_RELOC_ARM_LDC_PC_G0,
+ BFD_RELOC_ARM_LDC_PC_G1,
+ BFD_RELOC_ARM_LDC_PC_G2,
+ BFD_RELOC_ARM_ALU_SB_G0_NC,
+ BFD_RELOC_ARM_ALU_SB_G0,
+ BFD_RELOC_ARM_ALU_SB_G1_NC,
+ BFD_RELOC_ARM_ALU_SB_G1,
+ BFD_RELOC_ARM_ALU_SB_G2,
+ BFD_RELOC_ARM_LDR_SB_G0,
+ BFD_RELOC_ARM_LDR_SB_G1,
+ BFD_RELOC_ARM_LDR_SB_G2,
+ BFD_RELOC_ARM_LDRS_SB_G0,
+ BFD_RELOC_ARM_LDRS_SB_G1,
+ BFD_RELOC_ARM_LDRS_SB_G2,
+ BFD_RELOC_ARM_LDC_SB_G0,
+ BFD_RELOC_ARM_LDC_SB_G1,
+ BFD_RELOC_ARM_LDC_SB_G2,
+
/* These relocs are only used within the ARM assembler. They are not
(at present) written to any object files. */
BFD_RELOC_ARM_IMMEDIATE,
BFD_RELOC_ARM_ADRL_IMMEDIATE,
- BFD_RELOC_ARM_OFFSET_IMM,
+ BFD_RELOC_ARM_T32_IMMEDIATE,
+ BFD_RELOC_ARM_T32_ADD_IMM,
+ BFD_RELOC_ARM_T32_IMM12,
+ BFD_RELOC_ARM_T32_ADD_PC12,
BFD_RELOC_ARM_SHIFT_IMM,
+ BFD_RELOC_ARM_SMC,
BFD_RELOC_ARM_SWI,
BFD_RELOC_ARM_MULTI,
BFD_RELOC_ARM_CP_OFF_IMM,
BFD_RELOC_ARM_CP_OFF_IMM_S2,
+ BFD_RELOC_ARM_T32_CP_OFF_IMM,
+ BFD_RELOC_ARM_T32_CP_OFF_IMM_S2,
BFD_RELOC_ARM_ADR_IMM,
BFD_RELOC_ARM_LDR_IMM,
BFD_RELOC_ARM_LITERAL,
BFD_RELOC_ARM_IN_POOL,
BFD_RELOC_ARM_OFFSET_IMM8,
+ BFD_RELOC_ARM_T32_OFFSET_U8,
+ BFD_RELOC_ARM_T32_OFFSET_IMM,
BFD_RELOC_ARM_HWLITERAL,
BFD_RELOC_ARM_THUMB_ADD,
BFD_RELOC_ARM_THUMB_IMM,
BFD_RELOC_ARM_THUMB_SHIFT,
- BFD_RELOC_ARM_THUMB_OFFSET,
- BFD_RELOC_ARM_GOT12,
- BFD_RELOC_ARM_GOT32,
- BFD_RELOC_ARM_JUMP_SLOT,
- BFD_RELOC_ARM_COPY,
- BFD_RELOC_ARM_GLOB_DAT,
- BFD_RELOC_ARM_PLT32,
- BFD_RELOC_ARM_RELATIVE,
- BFD_RELOC_ARM_GOTOFF,
- BFD_RELOC_ARM_GOTPC,
/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
BFD_RELOC_SH_PCDISP8BY2,
BFD_RELOC_SH_PCDISP12BY2,
+ BFD_RELOC_SH_IMM3,
+ BFD_RELOC_SH_IMM3U,
+ BFD_RELOC_SH_DISP12,
+ BFD_RELOC_SH_DISP12BY2,
+ BFD_RELOC_SH_DISP12BY4,
+ BFD_RELOC_SH_DISP12BY8,
+ BFD_RELOC_SH_DISP20,
+ BFD_RELOC_SH_DISP20BY8,
BFD_RELOC_SH_IMM4,
BFD_RELOC_SH_IMM4BY2,
BFD_RELOC_SH_IMM4BY4,
@@ -2668,12 +3186,6 @@ field in the instruction. */
BFD_RELOC_SH_TLS_DTPOFF32,
BFD_RELOC_SH_TLS_TPOFF32,
-/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
-be zero and is not stored in the instruction. */
- BFD_RELOC_THUMB_PCREL_BRANCH9,
- BFD_RELOC_THUMB_PCREL_BRANCH12,
- BFD_RELOC_THUMB_PCREL_BRANCH23,
-
/* ARC Cores relocs.
ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
not stored in the instruction. The high 20 bits are installed in bits 26
@@ -2685,6 +3197,121 @@ stored in the instruction. The high 24 bits are installed in bits 23
through 0. */
BFD_RELOC_ARC_B26,
+/* ADI Blackfin 16 bit immediate absolute reloc. */
+ BFD_RELOC_BFIN_16_IMM,
+
+/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */
+ BFD_RELOC_BFIN_16_HIGH,
+
+/* ADI Blackfin 'a' part of LSETUP. */
+ BFD_RELOC_BFIN_4_PCREL,
+
+/* ADI Blackfin. */
+ BFD_RELOC_BFIN_5_PCREL,
+
+/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */
+ BFD_RELOC_BFIN_16_LOW,
+
+/* ADI Blackfin. */
+ BFD_RELOC_BFIN_10_PCREL,
+
+/* ADI Blackfin 'b' part of LSETUP. */
+ BFD_RELOC_BFIN_11_PCREL,
+
+/* ADI Blackfin. */
+ BFD_RELOC_BFIN_12_PCREL_JUMP,
+
+/* ADI Blackfin Short jump, pcrel. */
+ BFD_RELOC_BFIN_12_PCREL_JUMP_S,
+
+/* ADI Blackfin Call.x not implemented. */
+ BFD_RELOC_BFIN_24_PCREL_CALL_X,
+
+/* ADI Blackfin Long Jump pcrel. */
+ BFD_RELOC_BFIN_24_PCREL_JUMP_L,
+
+/* ADI Blackfin FD-PIC relocations. */
+ BFD_RELOC_BFIN_GOT17M4,
+ BFD_RELOC_BFIN_GOTHI,
+ BFD_RELOC_BFIN_GOTLO,
+ BFD_RELOC_BFIN_FUNCDESC,
+ BFD_RELOC_BFIN_FUNCDESC_GOT17M4,
+ BFD_RELOC_BFIN_FUNCDESC_GOTHI,
+ BFD_RELOC_BFIN_FUNCDESC_GOTLO,
+ BFD_RELOC_BFIN_FUNCDESC_VALUE,
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4,
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO,
+ BFD_RELOC_BFIN_GOTOFF17M4,
+ BFD_RELOC_BFIN_GOTOFFHI,
+ BFD_RELOC_BFIN_GOTOFFLO,
+
+/* ADI Blackfin GOT relocation. */
+ BFD_RELOC_BFIN_GOT,
+
+/* ADI Blackfin PLTPC relocation. */
+ BFD_RELOC_BFIN_PLTPC,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_PUSH,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_CONST,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_ADD,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_SUB,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_MULT,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_DIV,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_MOD,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LSHIFT,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_RSHIFT,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_AND,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_OR,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_XOR,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LAND,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LOR,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_LEN,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_NEG,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_COMP,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_PAGE,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_HWPAGE,
+
+/* ADI Blackfin arithmetic relocation. */
+ BFD_ARELOC_BFIN_ADDR,
+
/* Mitsubishi D10V relocs.
This is a 10-bit reloc with the right 2 bits
assumed to be 0. */
@@ -2762,6 +3389,12 @@ of the container. */
/* DLX relocs */
BFD_RELOC_DLX_JMP26,
+/* Renesas M16C/M32C Relocations. */
+ BFD_RELOC_M32C_HI8,
+ BFD_RELOC_M32C_RL_JUMP,
+ BFD_RELOC_M32C_RL_1ADDR,
+ BFD_RELOC_M32C_RL_2ADDR,
+
/* Renesas M32R (formerly Mitsubishi M32R) relocs.
This is a 24 bit absolute address. */
BFD_RELOC_M32R_24,
@@ -2798,6 +3431,9 @@ add3, load, and store instructions. */
BFD_RELOC_M32R_JMP_SLOT,
BFD_RELOC_M32R_RELATIVE,
BFD_RELOC_M32R_GOTOFF,
+ BFD_RELOC_M32R_GOTOFF_HI_ULO,
+ BFD_RELOC_M32R_GOTOFF_HI_SLO,
+ BFD_RELOC_M32R_GOTOFF_LO,
BFD_RELOC_M32R_GOTPC24,
BFD_RELOC_M32R_GOT16_HI_ULO,
BFD_RELOC_M32R_GOT16_HI_SLO,
@@ -2870,6 +3506,10 @@ bits placed non-contiguously in the instruction. */
/* Used to maintain alignment whilst relaxing. */
BFD_RELOC_V850_ALIGN,
+/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
+instructions. */
+ BFD_RELOC_V850_LO16_SPLIT_OFFSET,
+
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
instruction. */
BFD_RELOC_MN10300_32_PCREL,
@@ -2945,6 +3585,29 @@ short offset into 11 bits. */
BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
BFD_RELOC_MCORE_RVA,
+/* Toshiba Media Processor Relocations. */
+ BFD_RELOC_MEP_8,
+ BFD_RELOC_MEP_16,
+ BFD_RELOC_MEP_32,
+ BFD_RELOC_MEP_PCREL8A2,
+ BFD_RELOC_MEP_PCREL12A2,
+ BFD_RELOC_MEP_PCREL17A2,
+ BFD_RELOC_MEP_PCREL24A2,
+ BFD_RELOC_MEP_PCABS24A2,
+ BFD_RELOC_MEP_LOW16,
+ BFD_RELOC_MEP_HI16U,
+ BFD_RELOC_MEP_HI16S,
+ BFD_RELOC_MEP_GPREL,
+ BFD_RELOC_MEP_TPREL,
+ BFD_RELOC_MEP_TPREL7,
+ BFD_RELOC_MEP_TPREL7A2,
+ BFD_RELOC_MEP_TPREL7A4,
+ BFD_RELOC_MEP_UIMM24,
+ BFD_RELOC_MEP_ADDR24A4,
+ BFD_RELOC_MEP_GNU_VTINHERIT,
+ BFD_RELOC_MEP_GNU_VTENTRY,
+
+
/* These are relocations for the GETA instruction. */
BFD_RELOC_MMIX_GETA,
BFD_RELOC_MMIX_GETA_1,
@@ -3018,6 +3681,10 @@ of data memory address) into 8 bit immediate value of LDI insn. */
of program memory address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_HH8_LDI,
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
+of 32 bit value) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_MS8_LDI,
+
/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
(usually data memory address) into 8 bit immediate value of SUBI insn. */
BFD_RELOC_AVR_LO8_LDI_NEG,
@@ -3032,14 +3699,30 @@ SUBI insn. */
of LDI or SUBI insn. */
BFD_RELOC_AVR_HH8_LDI_NEG,
+/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
+of 32 bit value) into 8 bit immediate value of LDI insn. */
+ BFD_RELOC_AVR_MS8_LDI_NEG,
+
/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_LO8_LDI_PM,
+/* This is a 16 bit reloc for the AVR that stores 8 bit value
+(command address) into 8 bit immediate value of LDI insn. If the address
+is beyond the 128k boundary, the linker inserts a jump stub for this reloc
+in the lower 128k. */
+ BFD_RELOC_AVR_LO8_LDI_GS,
+
/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
of command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_HI8_LDI_PM,
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+of command address) into 8 bit immediate value of LDI insn. If the address
+is beyond the 128k boundary, the linker inserts a jump stub for this reloc
+below 128k. */
+ BFD_RELOC_AVR_HI8_LDI_GS,
+
/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
of command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_HH8_LDI_PM,
@@ -3062,6 +3745,18 @@ value of SUBI insn. */
into 22 bits. */
BFD_RELOC_AVR_CALL,
+/* This is a 16 bit reloc for the AVR that stores all needed bits
+for absolute addressing with ldi with overflow check to linktime */
+ BFD_RELOC_AVR_LDI,
+
+/* This is a 6 bit reloc for the AVR that stores offset for ldd/std
+instructions */
+ BFD_RELOC_AVR_6,
+
+/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
+instructions */
+ BFD_RELOC_AVR_6_ADIW,
+
/* Direct 12 bit. */
BFD_RELOC_390_12,
@@ -3168,6 +3863,31 @@ into 22 bits. */
BFD_RELOC_390_GOTPLT20,
BFD_RELOC_390_TLS_GOTIE20,
+/* Score relocations */
+ BFD_RELOC_SCORE_DUMMY1,
+
+/* Low 16 bit for load/store */
+ BFD_RELOC_SCORE_GPREL15,
+
+/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE_DUMMY2,
+ BFD_RELOC_SCORE_JMP,
+
+/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE_BRANCH,
+
+/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE16_JMP,
+
+/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE16_BRANCH,
+
+/* Undocumented Score relocs */
+ BFD_RELOC_SCORE_GOT15,
+ BFD_RELOC_SCORE_GOT_LO16,
+ BFD_RELOC_SCORE_CALL15,
+ BFD_RELOC_SCORE_DUMMY_HI16,
+
/* Scenix IP2K - 9-bit register number / data address */
BFD_RELOC_IP2K_FR9,
@@ -3350,12 +4070,110 @@ to follow the 16K memory bank of 68HC12 (seen as mapped in the window). */
This is the 5 bits of a value. */
BFD_RELOC_M68HC12_5B,
+/* NS CR16C Relocations. */
+ BFD_RELOC_16C_NUM08,
+ BFD_RELOC_16C_NUM08_C,
+ BFD_RELOC_16C_NUM16,
+ BFD_RELOC_16C_NUM16_C,
+ BFD_RELOC_16C_NUM32,
+ BFD_RELOC_16C_NUM32_C,
+ BFD_RELOC_16C_DISP04,
+ BFD_RELOC_16C_DISP04_C,
+ BFD_RELOC_16C_DISP08,
+ BFD_RELOC_16C_DISP08_C,
+ BFD_RELOC_16C_DISP16,
+ BFD_RELOC_16C_DISP16_C,
+ BFD_RELOC_16C_DISP24,
+ BFD_RELOC_16C_DISP24_C,
+ BFD_RELOC_16C_DISP24a,
+ BFD_RELOC_16C_DISP24a_C,
+ BFD_RELOC_16C_REG04,
+ BFD_RELOC_16C_REG04_C,
+ BFD_RELOC_16C_REG04a,
+ BFD_RELOC_16C_REG04a_C,
+ BFD_RELOC_16C_REG14,
+ BFD_RELOC_16C_REG14_C,
+ BFD_RELOC_16C_REG16,
+ BFD_RELOC_16C_REG16_C,
+ BFD_RELOC_16C_REG20,
+ BFD_RELOC_16C_REG20_C,
+ BFD_RELOC_16C_ABS20,
+ BFD_RELOC_16C_ABS20_C,
+ BFD_RELOC_16C_ABS24,
+ BFD_RELOC_16C_ABS24_C,
+ BFD_RELOC_16C_IMM04,
+ BFD_RELOC_16C_IMM04_C,
+ BFD_RELOC_16C_IMM16,
+ BFD_RELOC_16C_IMM16_C,
+ BFD_RELOC_16C_IMM20,
+ BFD_RELOC_16C_IMM20_C,
+ BFD_RELOC_16C_IMM24,
+ BFD_RELOC_16C_IMM24_C,
+ BFD_RELOC_16C_IMM32,
+ BFD_RELOC_16C_IMM32_C,
+
+/* NS CR16 Relocations. */
+ BFD_RELOC_CR16_NUM8,
+ BFD_RELOC_CR16_NUM16,
+ BFD_RELOC_CR16_NUM32,
+ BFD_RELOC_CR16_NUM32a,
+ BFD_RELOC_CR16_REGREL0,
+ BFD_RELOC_CR16_REGREL4,
+ BFD_RELOC_CR16_REGREL4a,
+ BFD_RELOC_CR16_REGREL14,
+ BFD_RELOC_CR16_REGREL14a,
+ BFD_RELOC_CR16_REGREL16,
+ BFD_RELOC_CR16_REGREL20,
+ BFD_RELOC_CR16_REGREL20a,
+ BFD_RELOC_CR16_ABS20,
+ BFD_RELOC_CR16_ABS24,
+ BFD_RELOC_CR16_IMM4,
+ BFD_RELOC_CR16_IMM8,
+ BFD_RELOC_CR16_IMM16,
+ BFD_RELOC_CR16_IMM20,
+ BFD_RELOC_CR16_IMM24,
+ BFD_RELOC_CR16_IMM32,
+ BFD_RELOC_CR16_IMM32a,
+ BFD_RELOC_CR16_DISP4,
+ BFD_RELOC_CR16_DISP8,
+ BFD_RELOC_CR16_DISP16,
+ BFD_RELOC_CR16_DISP20,
+ BFD_RELOC_CR16_DISP24,
+ BFD_RELOC_CR16_DISP24a,
+
+/* NS CRX Relocations. */
+ BFD_RELOC_CRX_REL4,
+ BFD_RELOC_CRX_REL8,
+ BFD_RELOC_CRX_REL8_CMP,
+ BFD_RELOC_CRX_REL16,
+ BFD_RELOC_CRX_REL24,
+ BFD_RELOC_CRX_REL32,
+ BFD_RELOC_CRX_REGREL12,
+ BFD_RELOC_CRX_REGREL22,
+ BFD_RELOC_CRX_REGREL28,
+ BFD_RELOC_CRX_REGREL32,
+ BFD_RELOC_CRX_ABS16,
+ BFD_RELOC_CRX_ABS32,
+ BFD_RELOC_CRX_NUM8,
+ BFD_RELOC_CRX_NUM16,
+ BFD_RELOC_CRX_NUM32,
+ BFD_RELOC_CRX_IMM16,
+ BFD_RELOC_CRX_IMM32,
+ BFD_RELOC_CRX_SWITCH8,
+ BFD_RELOC_CRX_SWITCH16,
+ BFD_RELOC_CRX_SWITCH32,
+
/* These relocs are only used within the CRIS assembler. They are not
(at present) written to any object files. */
BFD_RELOC_CRIS_BDISP8,
BFD_RELOC_CRIS_UNSIGNED_5,
BFD_RELOC_CRIS_SIGNED_6,
BFD_RELOC_CRIS_UNSIGNED_6,
+ BFD_RELOC_CRIS_SIGNED_8,
+ BFD_RELOC_CRIS_UNSIGNED_8,
+ BFD_RELOC_CRIS_SIGNED_16,
+ BFD_RELOC_CRIS_UNSIGNED_16,
+ BFD_RELOC_CRIS_LAPCQ_OFFSET,
BFD_RELOC_CRIS_UNSIGNED_4,
/* Relocs used in ELF shared libraries for CRIS. */
@@ -3436,17 +4254,47 @@ This is the 5 bits of a value. */
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
+/* Self-describing complex relocations. */
+ BFD_RELOC_RELC,
+
+
+/* Infineon Relocations. */
+ BFD_RELOC_XC16X_PAG,
+ BFD_RELOC_XC16X_POF,
+ BFD_RELOC_XC16X_SEG,
+ BFD_RELOC_XC16X_SOF,
+
/* Relocations used by VAX ELF. */
BFD_RELOC_VAX_GLOB_DAT,
BFD_RELOC_VAX_JMP_SLOT,
BFD_RELOC_VAX_RELATIVE,
+/* Morpho MT - 16 bit immediate relocation. */
+ BFD_RELOC_MT_PC16,
+
+/* Morpho MT - Hi 16 bits of an address. */
+ BFD_RELOC_MT_HI16,
+
+/* Morpho MT - Low 16 bits of an address. */
+ BFD_RELOC_MT_LO16,
+
+/* Morpho MT - Used to tell the linker which vtable entries are used. */
+ BFD_RELOC_MT_GNU_VTINHERIT,
+
+/* Morpho MT - Used to tell the linker which vtable entries are used. */
+ BFD_RELOC_MT_GNU_VTENTRY,
+
+/* Morpho MT - 8 bit immediate relocation. */
+ BFD_RELOC_MT_PCINSN8,
+
/* msp430 specific relocation codes */
BFD_RELOC_MSP430_10_PCREL,
BFD_RELOC_MSP430_16_PCREL,
BFD_RELOC_MSP430_16,
BFD_RELOC_MSP430_16_PCREL_BYTE,
BFD_RELOC_MSP430_16_BYTE,
+ BFD_RELOC_MSP430_2X_PCREL,
+ BFD_RELOC_MSP430_RL_PCREL,
/* IQ2000 Relocations. */
BFD_RELOC_IQ2000_OFFSET_16,
@@ -3467,27 +4315,88 @@ to one of its own internal functions or data structures. */
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
BFD_RELOC_XTENSA_PLT,
-/* Generic Xtensa relocations. Only the operand number is encoded
-in the relocation. The details are determined by extracting the
-instruction opcode. */
+/* Xtensa relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing. The field is set to the value of the difference
+assuming no relaxation. The relocation encodes the position of the
+first symbol so the linker can determine whether to adjust the field
+value. */
+ BFD_RELOC_XTENSA_DIFF8,
+ BFD_RELOC_XTENSA_DIFF16,
+ BFD_RELOC_XTENSA_DIFF32,
+
+/* Generic Xtensa relocations for instruction operands. Only the slot
+number is encoded in the relocation. The relocation applies to the
+last PC-relative immediate operand, or if there are no PC-relative
+immediates, to the last immediate operand. */
+ BFD_RELOC_XTENSA_SLOT0_OP,
+ BFD_RELOC_XTENSA_SLOT1_OP,
+ BFD_RELOC_XTENSA_SLOT2_OP,
+ BFD_RELOC_XTENSA_SLOT3_OP,
+ BFD_RELOC_XTENSA_SLOT4_OP,
+ BFD_RELOC_XTENSA_SLOT5_OP,
+ BFD_RELOC_XTENSA_SLOT6_OP,
+ BFD_RELOC_XTENSA_SLOT7_OP,
+ BFD_RELOC_XTENSA_SLOT8_OP,
+ BFD_RELOC_XTENSA_SLOT9_OP,
+ BFD_RELOC_XTENSA_SLOT10_OP,
+ BFD_RELOC_XTENSA_SLOT11_OP,
+ BFD_RELOC_XTENSA_SLOT12_OP,
+ BFD_RELOC_XTENSA_SLOT13_OP,
+ BFD_RELOC_XTENSA_SLOT14_OP,
+
+/* Alternate Xtensa relocations. Only the slot is encoded in the
+relocation. The meaning of these relocations is opcode-specific. */
+ BFD_RELOC_XTENSA_SLOT0_ALT,
+ BFD_RELOC_XTENSA_SLOT1_ALT,
+ BFD_RELOC_XTENSA_SLOT2_ALT,
+ BFD_RELOC_XTENSA_SLOT3_ALT,
+ BFD_RELOC_XTENSA_SLOT4_ALT,
+ BFD_RELOC_XTENSA_SLOT5_ALT,
+ BFD_RELOC_XTENSA_SLOT6_ALT,
+ BFD_RELOC_XTENSA_SLOT7_ALT,
+ BFD_RELOC_XTENSA_SLOT8_ALT,
+ BFD_RELOC_XTENSA_SLOT9_ALT,
+ BFD_RELOC_XTENSA_SLOT10_ALT,
+ BFD_RELOC_XTENSA_SLOT11_ALT,
+ BFD_RELOC_XTENSA_SLOT12_ALT,
+ BFD_RELOC_XTENSA_SLOT13_ALT,
+ BFD_RELOC_XTENSA_SLOT14_ALT,
+
+/* Xtensa relocations for backward compatibility. These have all been
+replaced by BFD_RELOC_XTENSA_SLOT0_OP. */
BFD_RELOC_XTENSA_OP0,
BFD_RELOC_XTENSA_OP1,
BFD_RELOC_XTENSA_OP2,
-/* Xtensa relocation to mark that the assembler expanded the
+/* Xtensa relocation to mark that the assembler expanded the
instructions from an original target. The expansion size is
encoded in the reloc size. */
BFD_RELOC_XTENSA_ASM_EXPAND,
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
+/* Xtensa relocation to mark that the linker should simplify
+assembler-expanded instructions. This is commonly used
+internally by the linker after analysis of a
BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
+
+/* 8 bit signed offset in (ix+d) or (iy+d). */
+ BFD_RELOC_Z80_DISP8,
+
+/* DJNZ offset. */
+ BFD_RELOC_Z8K_DISP7,
+
+/* CALR offset. */
+ BFD_RELOC_Z8K_CALLR,
+
+/* 4 bit value. */
+ BFD_RELOC_Z8K_IMM4L,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *bfd_reloc_type_lookup
(bfd *abfd, bfd_reloc_code_real_type code);
+reloc_howto_type *bfd_reloc_name_lookup
+ (bfd *abfd, const char *reloc_name);
const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
@@ -3600,6 +4509,14 @@ typedef struct bfd_symbol
/* This symbol is thread local. Used in ELF. */
#define BSF_THREAD_LOCAL 0x40000
+ /* This symbol represents a complex relocation expression,
+ with the expression tree serialized in the symbol name. */
+#define BSF_RELC 0x80000
+
+ /* This symbol represents a signed complex relocation expression,
+ with the expression tree serialized in the symbol name. */
+#define BSF_SRELC 0x100000
+
flagword flags;
/* A pointer to the section to which this symbol is
@@ -3627,6 +4544,11 @@ bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
#define bfd_is_local_label_name(abfd, name) \
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
+
+#define bfd_is_target_special_symbol(abfd, sym) \
+ BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
+
#define bfd_canonicalize_symtab(abfd, location) \
BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
@@ -3668,14 +4590,10 @@ struct bfd
/* A pointer to the target jump table. */
const struct bfd_target *xvec;
- /* To avoid dragging too many header files into every file that
- includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
- and MTIME as a "long". Their correct types, to which they
- are cast when used, are "FILE *" and "time_t". The iostream
- is the result of an fopen on the filename. However, if the
- BFD_IN_MEMORY flag is set, then iostream is actually a pointer
- to a bfd_in_memory struct. */
+ /* The IOSTREAM, and corresponding IO vector that provide access
+ to the file backing the BFD. */
void *iostream;
+ const struct bfd_iovec *iovec;
/* Is the file descriptor being cached? That is, can it be closed as
needed, and re-opened when accessed later? */
@@ -3738,8 +4656,8 @@ struct bfd
/* Pointer to linked list of sections. */
struct bfd_section *sections;
- /* The place where we add to the section list. */
- struct bfd_section **section_tail;
+ /* The last section on the section list. */
+ struct bfd_section *section_last;
/* The number of sections. */
unsigned int section_count;
@@ -3760,10 +4678,13 @@ struct bfd
/* Pointer to structure which contains architecture information. */
const struct bfd_arch_info *arch_info;
+ /* Flag set if symbols from this BFD should not be exported. */
+ bfd_boolean no_export;
+
/* Stuff only useful for archives. */
void *arelt_data;
struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *next; /* The next BFD in the archive. */
+ struct bfd *archive_next; /* The next BFD in the archive. */
struct bfd *archive_head; /* The first BFD in the archive. */
bfd_boolean has_armap;
@@ -3845,13 +4766,14 @@ typedef enum bfd_error
bfd_error_bad_value,
bfd_error_file_truncated,
bfd_error_file_too_big,
+ bfd_error_on_input,
bfd_error_invalid_error_code
}
bfd_error_type;
bfd_error_type bfd_get_error (void);
-void bfd_set_error (bfd_error_type error_tag);
+void bfd_set_error (bfd_error_type error_tag, ...);
const char *bfd_errmsg (bfd_error_type error_tag);
@@ -3865,8 +4787,6 @@ void bfd_set_error_program_name (const char *);
bfd_error_handler_type bfd_get_error_handler (void);
-const char *bfd_archive_filename (bfd *);
-
long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
long bfd_canonicalize_reloc
@@ -3889,6 +4809,11 @@ void bfd_set_gp_size (bfd *abfd, unsigned int i);
bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
+bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
+
+#define bfd_copy_private_header_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_copy_private_header_data, \
+ (ibfd, obfd))
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
#define bfd_copy_private_bfd_data(ibfd, obfd) \
@@ -3903,13 +4828,21 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_set_private_flags(abfd, flags) \
BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, reloc) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
+#define bfd_sizeof_headers(abfd, info) \
+ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
BFD_SEND (abfd, _bfd_find_nearest_line, \
(abfd, sec, syms, off, file, func, line))
+#define bfd_find_line(abfd, syms, sym, file, line) \
+ BFD_SEND (abfd, _bfd_find_line, \
+ (abfd, syms, sym, file, line))
+
+#define bfd_find_inliner_info(abfd, file, func, line) \
+ BFD_SEND (abfd, _bfd_find_inliner_info, \
+ (abfd, file, func, line))
+
#define bfd_debug_info_start(abfd) \
BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
@@ -3937,6 +4870,9 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_merge_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+#define bfd_is_group_section(abfd, sec) \
+ BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
+
#define bfd_discard_group(abfd, sec) \
BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
@@ -3949,7 +4885,7 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_link_add_symbols(abfd, info) \
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-#define bfd_link_just_syms(sec, info) \
+#define bfd_link_just_syms(abfd, sec, info) \
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
#define bfd_final_link(abfd, info) \
@@ -3967,6 +4903,10 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
+#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
+ BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
+ dyncount, dynsyms, ret))
+
#define bfd_get_dynamic_reloc_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
@@ -3986,7 +4926,7 @@ struct bfd_preserve
flagword flags;
const struct bfd_arch_info *arch_info;
struct bfd_section *sections;
- struct bfd_section **section_tail;
+ struct bfd_section *section_last;
unsigned int section_count;
struct bfd_hash_table section_htab;
};
@@ -3997,6 +4937,16 @@ void bfd_preserve_restore (bfd *, struct bfd_preserve *);
void bfd_preserve_finish (bfd *, struct bfd_preserve *);
+bfd_vma bfd_emul_get_maxpagesize (const char *);
+
+void bfd_emul_set_maxpagesize (const char *, bfd_vma);
+
+bfd_vma bfd_emul_get_commonpagesize (const char *);
+
+void bfd_emul_set_commonpagesize (const char *, bfd_vma);
+
+char *bfd_demangle (bfd *, const char *, int);
+
/* Extracted from archive.c. */
symindex bfd_get_next_mapent
(bfd *abfd, symindex previous, carsym **sym);
@@ -4013,6 +4963,9 @@ int bfd_core_file_failing_signal (bfd *abfd);
bfd_boolean core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd);
+bfd_boolean generic_core_file_matches_executable_p
+ (bfd *core_bfd, bfd *exec_bfd);
+
/* Extracted from targets.c. */
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
@@ -4101,7 +5054,7 @@ typedef struct bfd_target
unsigned short ar_max_namelen;
/* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD asthe first argument.
+ other entry points, since they don't take a BFD as the first argument.
Certain other handlers could do the same. */
bfd_uint64_t (*bfd_getx64) (const void *);
bfd_int64_t (*bfd_getx_signed_64) (const void *);
@@ -4161,8 +5114,10 @@ typedef struct bfd_target
#define BFD_JUMP_TABLE_COPY(NAME) \
NAME##_bfd_copy_private_bfd_data, \
NAME##_bfd_merge_private_bfd_data, \
+ _bfd_generic_init_private_section_data, \
NAME##_bfd_copy_private_section_data, \
NAME##_bfd_copy_private_symbol_data, \
+ NAME##_bfd_copy_private_header_data, \
NAME##_bfd_set_private_flags, \
NAME##_bfd_print_private_bfd_data
@@ -4172,6 +5127,12 @@ typedef struct bfd_target
/* Called to merge BFD general private data from one object file
to a common output file when linking. */
bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
+ /* Called to initialize BFD private section data from one object file
+ to another. */
+#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
+ BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info))
+ bfd_boolean (*_bfd_init_private_section_data)
+ (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *);
/* Called to copy BFD private section data from one object file
to another. */
bfd_boolean (*_bfd_copy_private_section_data)
@@ -4180,6 +5141,10 @@ typedef struct bfd_target
to another. */
bfd_boolean (*_bfd_copy_private_symbol_data)
(bfd *, asymbol *, bfd *, asymbol *);
+ /* Called to copy BFD private header data from one object file
+ to another. */
+ bfd_boolean (*_bfd_copy_private_header_data)
+ (bfd *, bfd *);
/* Called to set private backend flags. */
bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
@@ -4231,8 +5196,11 @@ typedef struct bfd_target
NAME##_print_symbol, \
NAME##_get_symbol_info, \
NAME##_bfd_is_local_label_name, \
+ NAME##_bfd_is_target_special_symbol, \
NAME##_get_lineno, \
NAME##_find_nearest_line, \
+ _bfd_generic_find_line, \
+ NAME##_find_inliner_info, \
NAME##_bfd_make_debug_symbol, \
NAME##_read_minisymbols, \
NAME##_minisymbol_to_symbol
@@ -4249,11 +5217,16 @@ typedef struct bfd_target
(bfd *, struct bfd_symbol *, symbol_info *);
#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
-
+ bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
bfd_boolean (*_bfd_find_nearest_line)
(bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
const char **, const char **, unsigned int *);
+ bfd_boolean (*_bfd_find_line)
+ (bfd *, struct bfd_symbol **, struct bfd_symbol *,
+ const char **, unsigned int *);
+ bfd_boolean (*_bfd_find_inliner_info)
+ (bfd *, const char **, const char **, unsigned int *);
/* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
when creating COFF files. */
@@ -4272,7 +5245,8 @@ typedef struct bfd_target
#define BFD_JUMP_TABLE_RELOCS(NAME) \
NAME##_get_reloc_upper_bound, \
NAME##_canonicalize_reloc, \
- NAME##_bfd_reloc_type_lookup
+ NAME##_bfd_reloc_type_lookup, \
+ NAME##_bfd_reloc_name_lookup
long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
long (*_bfd_canonicalize_reloc)
@@ -4280,6 +5254,9 @@ typedef struct bfd_target
/* See documentation on reloc types. */
reloc_howto_type *
(*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
+ reloc_howto_type *
+ (*reloc_name_lookup) (bfd *, const char *);
+
/* Routines used when writing an object file. */
#define BFD_JUMP_TABLE_WRITE(NAME) \
@@ -4304,9 +5281,11 @@ typedef struct bfd_target
NAME##_bfd_link_split_section, \
NAME##_bfd_gc_sections, \
NAME##_bfd_merge_sections, \
- NAME##_bfd_discard_group
+ NAME##_bfd_is_group_section, \
+ NAME##_bfd_discard_group, \
+ NAME##_section_already_linked \
- int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
+ int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
bfd_byte * (*_bfd_get_relocated_section_contents)
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, struct bfd_symbol **);
@@ -4341,13 +5320,22 @@ typedef struct bfd_target
/* Attempt to merge SEC_MERGE sections. */
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
+ /* Is this section a member of a group? */
+ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
+
/* Discard members of a group. */
bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
+ /* Check if SEC has been already linked during a reloceatable or
+ final link. */
+ void (*_section_already_linked) (bfd *, struct bfd_section *,
+ struct bfd_link_info *);
+
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
NAME##_get_dynamic_symtab_upper_bound, \
NAME##_canonicalize_dynamic_symtab, \
+ NAME##_get_synthetic_symtab, \
NAME##_get_dynamic_reloc_upper_bound, \
NAME##_canonicalize_dynamic_reloc
@@ -4356,6 +5344,10 @@ typedef struct bfd_target
/* Read in the dynamic symbols. */
long (*_bfd_canonicalize_dynamic_symtab)
(bfd *, struct bfd_symbol **);
+ /* Create synthetized symbols. */
+ long (*_bfd_get_synthetic_symtab)
+ (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
+ struct bfd_symbol **);
/* Get the amount of memory required to hold the dynamic relocs. */
long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
/* Read in the dynamic relocs. */
@@ -4397,6 +5389,12 @@ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
#define bfd_link_split_section(abfd, sec) \
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
+void bfd_section_already_linked (bfd *abfd, asection *sec,
+ struct bfd_link_info *info);
+
+#define bfd_section_already_linked(abfd, sec, info) \
+ BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
+
/* Extracted from simple.c. */
bfd_byte *bfd_simple_get_relocated_section_contents
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
diff --git a/gnu/usr.bin/binutils/libbfd/config.h.fbsd b/gnu/usr.bin/binutils/libbfd/config.h.fbsd
index 1864ef5f3dfee..e1c1cf660f4f9 100644
--- a/gnu/usr.bin/binutils/libbfd/config.h.fbsd
+++ b/gnu/usr.bin/binutils/libbfd/config.h.fbsd
@@ -1,291 +1,297 @@
/* $FreeBSD$ */
-/* config.h. Generated automatically by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.h. Generated by configure. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
+/* Define to 1 if you have the declaration of `basename', and to 0 if you
+ don't. */
+#define HAVE_DECL_BASENAME 0
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
+/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
+#define HAVE_DECL_FFS 1
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
+/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
+ */
+#define HAVE_DECL_FREE 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
+/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't.
+ */
+#define HAVE_DECL_FSEEKO 1
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
+/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you
+ don't. */
+#define HAVE_DECL_FSEEKO64 0
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
+/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
+ */
+#define HAVE_DECL_FTELLO 1
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
+/* Define to 1 if you have the declaration of `ftello64', and to 0 if you
+ don't. */
+#define HAVE_DECL_FTELLO64 0
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#define HAVE_DECL_GETENV 1
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
+/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
+ */
+#define HAVE_DECL_MALLOC 1
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
+/* Define to 1 if you have the declaration of `realloc', and to 0 if you
+ don't. */
+#define HAVE_DECL_REALLOC 1
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_SNPRINTF 1
-/* Define if you have the __argz_count function. */
-/* #undef HAVE___ARGZ_COUNT */
+/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
+ */
+#define HAVE_DECL_STPCPY 1
-/* Define if you have the __argz_next function. */
-/* #undef HAVE___ARGZ_NEXT */
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#define HAVE_DECL_STRSTR 1
-/* Define if you have the __argz_stringify function. */
-/* #undef HAVE___ARGZ_STRINGIFY */
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_VSNPRINTF 1
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
-/* Define if you have the dcgettext function. */
-/* #undef HAVE_DCGETTEXT */
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
-/* Define if you have the fcntl function. */
+/* Define to 1 if you have the `fcntl' function. */
#define HAVE_FCNTL 1
-/* Define if you have the fdopen function. */
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fdopen' function. */
#define HAVE_FDOPEN 1
-/* Define if you have the fseeko function. */
+/* Define to 1 if you have the `fopen64' function. */
+/* #undef HAVE_FOPEN64 */
+
+/* Define to 1 if you have the `fseeko' function. */
#define HAVE_FSEEKO 1
-/* Define if you have the fseeko64 function. */
+/* Define to 1 if you have the `fseeko64' function. */
/* #undef HAVE_FSEEKO64 */
-/* Define if you have the ftello function. */
+/* Define to 1 if you have the `ftello' function. */
#define HAVE_FTELLO 1
-/* Define if you have the ftello64 function. */
+/* Define to 1 if you have the `ftello64' function. */
/* #undef HAVE_FTELLO64 */
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
-
-/* Define if you have the getgid function. */
+/* Define to 1 if you have the `getgid' function. */
#define HAVE_GETGID 1
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
-/* Define if you have the getuid function. */
+/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
-/* Define if you have the madvise function. */
-#define HAVE_MADVISE 1
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
-/* Define if you have the mprotect function. */
-#define HAVE_MPROTECT 1
+/* Define if <sys/procfs.h> has lwpstatus_t. */
+/* #undef HAVE_LWPSTATUS_T */
-/* Define if you have the munmap function. */
-#define HAVE_MUNMAP 1
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
+/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
+/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
+/* #undef HAVE_LWPSTATUS_T_PR_REG */
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
+/* Define if <sys/procfs.h> has lwpxstatus_t. */
+/* #undef HAVE_LWPXSTATUS_T */
-/* Define if you have the setitimer function. */
-#define HAVE_SETITIMER 1
+/* Define to 1 if you have the `madvise' function. */
+#define HAVE_MADVISE 1
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
-/* Define if you have the stpcpy function. */
-#define HAVE_STPCPY 1
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
+/* Define to 1 if you have the `mprotect' function. */
+#define HAVE_MPROTECT 1
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
-/* Define if you have the strtoull function. */
-#define HAVE_STRTOULL 1
+/* Define if <sys/procfs.h> has prpsinfo32_t. */
+/* #undef HAVE_PRPSINFO32_T */
-/* Define if you have the sysconf function. */
-#define HAVE_SYSCONF 1
+/* Define if <sys/procfs.h> has prpsinfo_t. */
+#define HAVE_PRPSINFO_T 1
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
+/* Define if <sys/procfs.h> has prstatus32_t. */
+/* #undef HAVE_PRSTATUS32_T */
-/* Define if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
+/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
+/* #undef HAVE_PRSTATUS32_T_PR_WHO */
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
+/* Define if <sys/procfs.h> has prstatus_t. */
+#define HAVE_PRSTATUS_T 1
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
+/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
+/* #undef HAVE_PRSTATUS_T_PR_WHO */
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
+/* Define if <sys/procfs.h> has psinfo32_t. */
+/* #undef HAVE_PSINFO32_T */
-/* Define if you have the <malloc.h> header file. */
-/* #undef HAVE_MALLOC_H */
+/* Define if <sys/procfs.h> has psinfo_t. */
+/* #undef HAVE_PSINFO_T */
-/* Define if you have the <ndir.h> header file. */
-/* #undef HAVE_NDIR_H */
+/* Define if <sys/procfs.h> has pstatus32_t. */
+/* #undef HAVE_PSTATUS32_T */
-/* Define if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
+/* Define if <sys/procfs.h> has pstatus_t. */
+/* #undef HAVE_PSTATUS_T */
-/* Define if you have the <stddef.h> header file. */
+/* Define if <sys/procfs.h> has pxstatus_t. */
+/* #undef HAVE_PXSTATUS_T */
+
+/* Define to 1 if you have the `setitimer' function. */
+#define HAVE_SETITIMER 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define if you have the <string.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
+/* Define to 1 if you have the `strtoull' function. */
+#define HAVE_STRTOULL 1
-/* Define if you have the <sys/dir.h> header file. */
+/* Define if struct core_dumpx has member c_impl */
+/* #undef HAVE_ST_C_IMPL */
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
/* #undef HAVE_SYS_DIR_H */
-/* Define if you have the <sys/file.h> header file. */
+/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
/* #undef HAVE_SYS_NDIR_H */
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define if you have the <sys/procfs.h> header file. */
+/* Define to 1 if you have the <sys/procfs.h> header file. */
#define HAVE_SYS_PROCFS_H 1
-/* Define if you have the <sys/time.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
-/* Define if you have the <time.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define if you have the <values.h> header file. */
-/* #undef HAVE_VALUES_H */
+/* Define if <sys/procfs.h> has win32_pstatus_t. */
+/* #undef HAVE_WIN32_PSTATUS_T */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "bfd"
-/* Version number of package */
-/* #define VERSION "2.15" */
-
-/* Define if you have the stpcpy function */
-#define HAVE_STPCPY 1
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
-
-/* Define to 1 if NLS is requested */
-/* #define ENABLE_NLS 1 */
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-/* #undef HAVE_GETTEXT */
-
-/* The number of bytes in type long long */
-/* #define SIZEOF_LONG_LONG 8 */
-
-/* The number of bytes in type long */
-/* #define SIZEOF_LONG 8 */
-
-/* Use b modifier when opening binary files? */
-/* #undef USE_BINARY_FOPEN */
-
-/* Define if strstr is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRSTR */
-
-/* Define if malloc is not declared in system header files. */
-/* #undef NEED_DECLARATION_MALLOC */
-
-/* Define if realloc is not declared in system header files. */
-/* #undef NEED_DECLARATION_REALLOC */
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
-/* Define if free is not declared in system header files. */
-/* #undef NEED_DECLARATION_FREE */
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
-/* Define if getenv is not declared in system header files. */
-/* #undef NEED_DECLARATION_GETENV */
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
-/* Define if struct core_dumpx has member c_impl */
-/* #undef HAVE_ST_C_IMPL */
-
-/* Define if <sys/procfs.h> has prstatus_t. */
-#define HAVE_PRSTATUS_T 1
-
-/* Define if <sys/procfs.h> has prstatus32_t. */
-/* #undef HAVE_PRSTATUS32_T */
-
-/* Define if <sys/procfs.h> has prstatus_t.pr_who. */
-/* #undef HAVE_PRSTATUS_T_PR_WHO */
-
-/* Define if <sys/procfs.h> has prstatus32_t.pr_who. */
-/* #undef HAVE_PRSTATUS32_T_PR_WHO */
-
-/* Define if <sys/procfs.h> has pstatus_t. */
-/* #undef HAVE_PSTATUS_T */
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
-/* Define if <sys/procfs.h> has pxstatus_t. */
-/* #undef HAVE_PXSTATUS_T */
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
-/* Define if <sys/procfs.h> has pstatus32_t. */
-/* #undef HAVE_PSTATUS32_T */
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
-/* Define if <sys/procfs.h> has prpsinfo_t. */
-#define HAVE_PRPSINFO_T 1
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
-/* Define if <sys/procfs.h> has prpsinfo32_t. */
-/* #undef HAVE_PRPSINFO32_T */
+/* The size of a `long', as computed by sizeof. */
+/* #define SIZEOF_LONG 4 */
-/* Define if <sys/procfs.h> has psinfo_t. */
-/* #undef HAVE_PSINFO_T */
+/* The size of a `long long', as computed by sizeof. */
+/* #define SIZEOF_LONG_LONG 8 */
-/* Define if <sys/procfs.h> has psinfo32_t. */
-/* #undef HAVE_PSINFO32_T */
+/* The size of a `off_t', as computed by sizeof. */
+/* #define SIZEOF_OFF_T 8 */
-/* Define if <sys/procfs.h> has lwpstatus_t. */
-/* #undef HAVE_LWPSTATUS_T */
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
-/* Define if <sys/procfs.h> has lwpxstatus_t. */
-/* #undef HAVE_LWPXSTATUS_T */
+/* The size of a `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
-/* Define if <sys/procfs.h> has lwpstatus_t.pr_context. */
-/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
-/* Define if <sys/procfs.h> has lwpstatus_t.pr_reg. */
-/* #undef HAVE_LWPSTATUS_T_PR_REG */
+/* Define if you can safely include both <string.h> and <strings.h>. */
+#define STRING_WITH_STRINGS 1
-/* Define if <sys/procfs.h> has win32_pstatus_t. */
-/* #undef HAVE_WIN32_PSTATUS_T */
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
/* Name of host specific header file to include in trad-core.c. */
#define TRAD_HEADER !!TRAD_HEADER!!
-/* The number of bytes in type off_t */
-/* #define SIZEOF_OFF_T 8 */
+/* Use b modifier when opening binary files? */
+/* #undef USE_BINARY_FOPEN */
/* Use mmap if it's available? */
/* #undef USE_MMAP */
+/* Define if we should default to creating read-only plt entries */
+/* #undef USE_SECUREPLT */
+
+/* Version number of package */
+/* #define VERSION "2.17.50" */
+
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
diff --git a/gnu/usr.bin/binutils/libbfd/elf-fbsd-brand.c b/gnu/usr.bin/binutils/libbfd/elf-fbsd-brand.c
index 526ba8cfb2c11..b8ba60e5f7d96 100644
--- a/gnu/usr.bin/binutils/libbfd/elf-fbsd-brand.c
+++ b/gnu/usr.bin/binutils/libbfd/elf-fbsd-brand.c
@@ -26,26 +26,5 @@
* $FreeBSD$
*/
-#include "bfd.h"
-#include "sysdep.h"
-#include "elf-bfd.h"
-
-/* The kernel recognizes executables as valid only if they carry a
- "FreeBSD" label in the ELF header. So we put this label on all
- executables and (for simplicity) also all other object files. */
-
-static void elf_fbsd_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void
-elf_fbsd_post_process_headers (abfd, link_info)
- bfd * abfd;
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED;
-{
- Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
-
- i_ehdrp = elf_elfheader (abfd);
-
- /* Put an ABI label supported by FreeBSD >= 4.1. */
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
-}
+#define ELF_OSABI ELFOSABI_FREEBSD
+#define elf_backend_post_process_headers _bfd_elf_set_osabi
diff --git a/gnu/usr.bin/binutils/libbinutils/Makefile b/gnu/usr.bin/binutils/libbinutils/Makefile
index d8dc0469f5f00..d89f8b003a3d5 100644
--- a/gnu/usr.bin/binutils/libbinutils/Makefile
+++ b/gnu/usr.bin/binutils/libbinutils/Makefile
@@ -5,11 +5,24 @@
.PATH: ${SRCDIR}/binutils
LIB= binutils
-SRCS+= arlex.l arparse.y arsup.c bucomm.c debug.c filemode.c \
- ieee.c rdcoff.c rddbg.c rename.c stabs.c unwind-ia64.c \
- wrstabs.c version.c binemul.c budemang.c emul_vanilla.c
-WARNS?= 0
-CFLAGS+= -DTARGET=\"${BINUTILS_ARCH}-obrien-freebsd\"
+SRCS+= arlex.l \
+ arparse.y \
+ arsup.c \
+ binemul.c \
+ bucomm.c \
+ debug.c \
+ dwarf.c \
+ emul_vanilla.c \
+ filemode.c \
+ ieee.c \
+ rdcoff.c \
+ rddbg.c \
+ rename.c \
+ stabs.c \
+ unwind-ia64.c \
+ version.c \
+ wrstabs.c
+CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/binutils
diff --git a/gnu/usr.bin/binutils/libbinutils/config.h b/gnu/usr.bin/binutils/libbinutils/config.h
index 1b35139f1c667..873ae5b1e4b10 100644
--- a/gnu/usr.bin/binutils/libbinutils/config.h
+++ b/gnu/usr.bin/binutils/libbinutils/config.h
@@ -3,208 +3,213 @@
/* FreeBSD isn't any form of AIX. */
#define bin_dummy_emulation bin_vanilla_emulation
-/* config.h. Generated automatically by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.h. Generated by configure. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
+/* Suffix used for executables, if any. */
+#define EXECUTABLE_SUFFIX ""
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
/* #undef HAVE_ALLOCA_H */
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#define HAVE_DECL_ENVIRON 0
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
-#define HAVE_SYS_WAIT_H 1
+/* Define to 1 if you have the declaration of `fprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_FPRINTF 1
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+ don't. */
+#define HAVE_DECL_GETC_UNLOCKED 1
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#define HAVE_DECL_GETENV 1
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
+/* Is the prototype for getopt in <unistd.h> in the expected format? */
+#define HAVE_DECL_GETOPT 1
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#define HAVE_DECL_SBRK 1
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_SNPRINTF 1
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#define YYTEXT_POINTER 1
-
-/* Define if you have the __argz_count function. */
-/* #undef HAVE___ARGZ_COUNT */
-
-/* Define if you have the __argz_next function. */
-/* #undef HAVE___ARGZ_NEXT */
-
-/* Define if you have the __argz_stringify function. */
-/* #undef HAVE___ARGZ_STRINGIFY */
-
-/* Define if you have the dcgettext function. */
-/* #undef HAVE_DCGETTEXT */
+/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
+ */
+#define HAVE_DECL_STPCPY 1
-/* Define if you have the getc_unlocked function. */
-#define HAVE_GETC_UNLOCKED 1
-
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
-
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
+/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
+ */
+#define HAVE_DECL_STRSTR 1
-/* Define if you have the munmap function. */
-#define HAVE_MUNMAP 1
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_VSNPRINTF 1
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
-/* Define if you have the sbrk function. */
-#define HAVE_SBRK 1
+/* Does the platform use an executable suffix? */
+/* #undef HAVE_EXECUTABLE_SUFFIX */
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
+/* Is fopen64 available? */
+/* #undef HAVE_FOPEN64 */
-/* Define if you have the setmode function. */
-#define HAVE_SETMODE 1
+/* Define to 1 if you have the `getc_unlocked' function. */
+#define HAVE_GETC_UNLOCKED 1
-/* Define if you have the stpcpy function. */
-#define HAVE_STPCPY 1
+/* Does <utime.h> define struct utimbuf? */
+#define HAVE_GOOD_UTIME_H 1
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
+/* Define if you have the iconv() function. */
+/* #undef HAVE_ICONV */
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
-/* Define if you have the strcoll function. */
-#define HAVE_STRCOLL 1
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
-/* Define if you have the utimes function. */
-#define HAVE_UTIMES 1
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
+/* Define to 1 if you have the `mkdtemp' function. */
+#define HAVE_MKDTEMP 1
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
+/* Define to 1 if you have the `sbrk' function. */
+#define HAVE_SBRK 1
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
+/* Define to 1 if you have the `setmode' function. */
+#define HAVE_SETMODE 1
-/* Define if you have the <malloc.h> header file. */
-/* #undef HAVE_MALLOC_H */
+/* Is stat64 available? */
+/* #undef HAVE_STAT64 */
-/* Define if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
+/* Define to 1 if you have the `strcoll' function. */
+#define HAVE_STRCOLL 1
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
-/* Define if you have the <sys/file.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the <values.h> header file. */
-/* #undef HAVE_VALUES_H */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
-/* Name of package */
-#define PACKAGE "binutils"
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
-/* Version number of package */
-/* #define VERSION "2.15" */
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
-/* Define if you have the stpcpy function */
-#define HAVE_STPCPY 1
+/* Is the type time_t defined in <time.h>? */
+#define HAVE_TIME_T_IN_TIME_H 1
-/* Define if your locale.h file contains LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
+/* Is the type time_t defined in <sys/types.h>? */
+#define HAVE_TIME_T_IN_TYPES_H 1
-/* Define to 1 if NLS is requested */
-/* #define ENABLE_NLS 1 */
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-/* #undef HAVE_GETTEXT */
+/* Define to 1 if you have the `utimes' function. */
+#define HAVE_UTIMES 1
-/* Does the platform use an executable suffix? */
-/* #undef HAVE_EXECUTABLE_SUFFIX */
+/* Define as const if the declaration of iconv() needs const. */
+/* #undef ICONV_CONST */
-/* Suffix used for executables, if any. */
-#define EXECUTABLE_SUFFIX ""
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
-/* Is fopen64 available? */
-/* #undef HAVE_FOPEN64 */
+/* Name of package */
+#define PACKAGE "binutils"
-/* Enable LFS */
-/* #undef _LARGEFILE64_SOURCE */
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
-/* Is the type time_t defined in <time.h>? */
-#define HAVE_TIME_T_IN_TIME_H 1
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
-/* Is the type time_t defined in <sys/types.h>? */
-#define HAVE_TIME_T_IN_TYPES_H 1
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
-/* Does <utime.h> define struct utimbuf? */
-#define HAVE_GOOD_UTIME_H 1
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
-/* Define if fprintf is not declared in system header files. */
-/* #undef NEED_DECLARATION_FPRINTF */
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
-/* Define if strstr is not declared in system header files. */
-/* #undef NEED_DECLARATION_STRSTR */
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
-/* Define if sbrk is not declared in system header files. */
-/* #undef NEED_DECLARATION_SBRK */
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
-/* Define if getenv is not declared in system header files. */
-/* #undef NEED_DECLARATION_GETENV */
+/* Configured target name. */
+/* #define TARGET "i386-unknown-freebsd9.0" */
-/* Define if environ is not declared in system header files. */
-#define NEED_DECLARATION_ENVIRON 1
+/* Define to 1 if user symbol names have a leading underscore, 0 if not. */
+#define TARGET_PREPENDS_UNDERSCORE 0
/* Use b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
-/* Configured target name. */
-/* #define TARGET "amd64-unknown-freebsd5.2" */
+/* Version number of package */
+/* #define VERSION "2.17.50" */
-/* Define to 1 if user symbol names have a leading underscore, 0 if not. */
-#define TARGET_PREPENDS_UNDERSCORE 0
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#define YYTEXT_POINTER 1
+
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable LFS */
+/* #undef _LARGEFILE64_SOURCE */
diff --git a/gnu/usr.bin/binutils/libiberty/Makefile b/gnu/usr.bin/binutils/libiberty/Makefile
index 292d1fcbe7339..973154718d4bf 100644
--- a/gnu/usr.bin/binutils/libiberty/Makefile
+++ b/gnu/usr.bin/binutils/libiberty/Makefile
@@ -5,16 +5,37 @@
.PATH: ${SRCDIR}/libiberty
LIB= iberty
-SRCS= argv.c concat.c choose-temp.c cp-demangle.c cp-demint.c \
- cplus-dem.c dyn-string.c getpwd.c getruntime.c floatformat.c \
- hashtab.c hex.c lbasename.c lrealpath.c make-relative-prefix.c \
- make-temp-file.c objalloc.c obstack.c safe-ctype.c xatexit.c \
- xexit.c xmalloc.c xstrdup.c xstrerror.c
+SRCS= argv.c \
+ concat.c \
+ choose-temp.c \
+ cp-demangle.c \
+ cp-demint.c \
+ cplus-dem.c \
+ dyn-string.c \
+ getpwd.c \
+ getruntime.c \
+ filename_cmp.c \
+ floatformat.c \
+ hashtab.c \
+ hex.c \
+ lbasename.c \
+ lrealpath.c \
+ make-relative-prefix.c \
+ make-temp-file.c \
+ objalloc.c \
+ obstack.c \
+ safe-ctype.c \
+ unlink-if-ordinary.c \
+ xatexit.c \
+ xexit.c \
+ xmalloc.c \
+ xstrdup.c \
+ xstrerror.c
# The following files are needed by gdb(1)
SRCS+= splay-tree.c
-WARNS?= 1
+WARNS?= 2
CFLAGS+= -DHAVE_CONFIG_H
INTERNALLIB=
diff --git a/gnu/usr.bin/binutils/libiberty/config.h b/gnu/usr.bin/binutils/libiberty/config.h
index 190bee5e47c0c..2b00517fb17ce 100644
--- a/gnu/usr.bin/binutils/libiberty/config.h
+++ b/gnu/usr.bin/binutils/libiberty/config.h
@@ -2,16 +2,6 @@
/* config.h. Generated by configure. */
/* config.in. Generated from configure.ac by autoheader. */
-/* Define to `unsigned long' if <sys/types.h> doesn't define. */
-/* #undef uintptr_t */
-
-
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
-#if defined(__sparc64__) || defined(__ARMEB__) || defined(TARGET_BIG_ENDIAN)
-#define BYTEORDER 4321
-#else
-#define BYTEORDER 1234
-#endif
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
@@ -50,6 +40,57 @@
/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1
+/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_ASPRINTF 1
+
+/* Define to 1 if you have the declaration of `basename', and to 0 if you
+ don't. */
+#define HAVE_DECL_BASENAME 0
+
+/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't.
+ */
+#define HAVE_DECL_CALLOC 1
+
+/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
+#define HAVE_DECL_FFS 1
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#define HAVE_DECL_GETENV 1
+
+/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
+ */
+#define HAVE_DECL_GETOPT 1
+
+/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
+ */
+#define HAVE_DECL_MALLOC 1
+
+/* Define to 1 if you have the declaration of `realloc', and to 0 if you
+ don't. */
+#define HAVE_DECL_REALLOC 1
+
+/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
+ */
+#define HAVE_DECL_SBRK 1
+
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_SNPRINTF 1
+
+/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRVERSCMP 0
+
+/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_VASPRINTF 1
+
+/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
+ don't. */
+#define HAVE_DECL_VSNPRINTF 1
+
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
@@ -161,6 +202,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+/* #undef HAVE_STDIO_EXT_H */
+
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -168,7 +212,7 @@
#define HAVE_STPCPY 1
/* Define to 1 if you have the `stpncpy' function. */
-/* #undef HAVE_STPNCPY */
+#define HAVE_STPNCPY 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
@@ -191,6 +235,9 @@
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
+/* Define to 1 if you have the `strndup' function. */
+#define HAVE_STRNDUP 1
+
/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1
@@ -209,6 +256,9 @@
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
+/* Define to 1 if you have the `strverscmp' function. */
+/* #undef HAVE_STRVERSCMP */
+
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
@@ -308,6 +358,12 @@
/* Define to 1 if you have the `vsprintf' function. */
#define HAVE_VSPRINTF 1
+/* Define to 1 if you have the `wait3' function. */
+#define HAVE_WAIT3 1
+
+/* Define to 1 if you have the `wait4' function. */
+#define HAVE_WAIT4 1
+
/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1
@@ -323,11 +379,8 @@
/* Define if you have the _system_configuration variable. */
/* #undef HAVE__SYSTEM_CONFIGURATION */
-/* Define if the host machine stores words of multi-word integers in
- big-endian order. */
-#if defined(__sparc64__) || defined(__ARMEB__) || defined(TARGET_BIG_ENDIAN)
-#define HOST_WORDS_BIG_ENDIAN 1
-#endif
+/* Define to 1 if you have the `__fsetlocking' function. */
+/* #undef HAVE___FSETLOCKING */
/* Define if canonicalize_file_name is not declared in system header files. */
#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
@@ -353,6 +406,9 @@
/* Define to the version of this package. */
/* #define PACKAGE_VERSION "" */
+/* The size of a `int', as computed by sizeof. */
+/* #define SIZEOF_INT 4 */
+
/* Define if you know the direction of stack growth for your system; otherwise
it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows
toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses
@@ -365,17 +421,23 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
-/* whether byteorder is bigendian */
-#ifdef __sparc64__
-#define WORDS_BIGENDIAN 1
+/* Define to an unsigned 64-bit type available in the compiler. */
+#define UNSIGNED_64BIT_TYPE uint64_t
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#if defined(__powerpc__) || defined(__sparc64__)
+# define WORDS_BIGENDIAN 1
#endif
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
- if it is not supported. */
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
/* #undef inline */
+#endif
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
diff --git a/gnu/usr.bin/binutils/libopcodes/Makefile b/gnu/usr.bin/binutils/libopcodes/Makefile
index a2b271201d05a..eb6f273bc80a8 100644
--- a/gnu/usr.bin/binutils/libopcodes/Makefile
+++ b/gnu/usr.bin/binutils/libopcodes/Makefile
@@ -5,7 +5,7 @@
.PATH: ${SRCDIR}/opcodes
LIB= opcodes
-SRCS+= dis-buf.c dis-init.c disassemble.c
+SRCS+= dis-buf.c dis-init.c disassemble.c i386-opc.c
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/opcodes -I${SRCDIR}/bfd
INTERNALLIB=
diff --git a/gnu/usr.bin/binutils/libopcodes/config.h b/gnu/usr.bin/binutils/libopcodes/config.h
index 9ad1fc8c3bb35..f77d5e0a42563 100644
--- a/gnu/usr.bin/binutils/libopcodes/config.h
+++ b/gnu/usr.bin/binutils/libopcodes/config.h
@@ -1,135 +1,70 @@
/* $FreeBSD$ */
-/* config.h. Generated automatically by configure. */
-/* config.in. Generated automatically from configure.in by autoheader. */
+/* config.h. Generated by configure. */
+/* config.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
+/* Define to 1 if you have the declaration of `basename', and to 0 if you
+ don't. */
+#define HAVE_DECL_BASENAME 0
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if you have the __argz_count function. */
-/* #undef HAVE___ARGZ_COUNT */
-
-/* Define if you have the __argz_next function. */
-/* #undef HAVE___ARGZ_NEXT */
-
-/* Define if you have the __argz_stringify function. */
-/* #undef HAVE___ARGZ_STRINGIFY */
-
-/* Define if you have the dcgettext function. */
-/* #undef HAVE_DCGETTEXT */
-
-/* Define if you have the getcwd function. */
-#define HAVE_GETCWD 1
-
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the munmap function. */
-#define HAVE_MUNMAP 1
-
-/* Define if you have the putenv function. */
-#define HAVE_PUTENV 1
-
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the setlocale function. */
-#define HAVE_SETLOCALE 1
-
-/* Define if you have the stpcpy function. */
-#define HAVE_STPCPY 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strchr function. */
-#define HAVE_STRCHR 1
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the <malloc.h> header file. */
-/* #undef HAVE_MALLOC_H */
-
-/* Define if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
-
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define if you have the <string.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define if you have the <values.h> header file. */
-/* #undef HAVE_VALUES_H */
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "opcodes"
-/* Version number of package */
-/* #define VERSION "2.15" */
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
-/* Define if you have the stpcpy function */
-#define HAVE_STPCPY 1
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
-/* Define if your locale.h file contains LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
-/* Define to 1 if NLS is requested */
-/* #define ENABLE_NLS 1 */
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-/* #undef HAVE_GETTEXT */
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #define VERSION "2.17.50" */
diff --git a/gnu/usr.bin/binutils/nm/Makefile b/gnu/usr.bin/binutils/nm/Makefile
index 4da4bb2d04235..4ef2b8fdf65a5 100644
--- a/gnu/usr.bin/binutils/nm/Makefile
+++ b/gnu/usr.bin/binutils/nm/Makefile
@@ -6,7 +6,6 @@
PROG= nm
SRCS= nm.c
-WARNS?= 2
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/bfd
diff --git a/gnu/usr.bin/binutils/nm/nm.1 b/gnu/usr.bin/binutils/nm/nm.1
new file mode 100644
index 0000000000000..e94e472f21aae
--- /dev/null
+++ b/gnu/usr.bin/binutils/nm/nm.1
@@ -0,0 +1,450 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "NM 1"
+.TH NM 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+nm \- list symbols from object files
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+nm [\fB\-a\fR|\fB\-\-debug\-syms\fR] [\fB\-g\fR|\fB\-\-extern\-only\fR]
+ [\fB\-B\fR] [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] [\fB\-D\fR|\fB\-\-dynamic\fR]
+ [\fB\-S\fR|\fB\-\-print\-size\fR] [\fB\-s\fR|\fB\-\-print\-armap\fR]
+ [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR][\fB\-\-special\-syms\fR]
+ [\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] [\fB\-p\fR|\fB\-\-no\-sort\fR]
+ [\fB\-r\fR|\fB\-\-reverse\-sort\fR] [\fB\-\-size\-sort\fR] [\fB\-u\fR|\fB\-\-undefined\-only\fR]
+ [\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] [\fB\-P\fR|\fB\-\-portability\fR]
+ [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-f\fR\fIformat\fR|\fB\-\-format=\fR\fIformat\fR]
+ [\fB\-\-defined\-only\fR] [\fB\-l\fR|\fB\-\-line\-numbers\fR] [\fB\-\-no\-demangle\fR]
+ [\fB\-V\fR|\fB\-\-version\fR] [\fB\-X 32_64\fR] [\fB\-\-help\fR] [\fIobjfile\fR...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1GNU\s0 \fBnm\fR lists the symbols from object files \fIobjfile\fR....
+If no object files are listed as arguments, \fBnm\fR assumes the file
+\&\fIa.out\fR.
+.PP
+For each symbol, \fBnm\fR shows:
+.IP "\(bu" 4
+The symbol value, in the radix selected by options (see below), or
+hexadecimal by default.
+.IP "\(bu" 4
+The symbol type. At least the following types are used; others are, as
+well, depending on the object file format. If lowercase, the symbol is
+local; if uppercase, the symbol is global (external).
+.RS 4
+.ie n .IP """A""" 4
+.el .IP "\f(CWA\fR" 4
+.IX Item "A"
+The symbol's value is absolute, and will not be changed by further
+linking.
+.ie n .IP """B""" 4
+.el .IP "\f(CWB\fR" 4
+.IX Item "B"
+The symbol is in the uninitialized data section (known as \s-1BSS\s0).
+.ie n .IP """C""" 4
+.el .IP "\f(CWC\fR" 4
+.IX Item "C"
+The symbol is common. Common symbols are uninitialized data. When
+linking, multiple common symbols may appear with the same name. If the
+symbol is defined anywhere, the common symbols are treated as undefined
+references.
+.ie n .IP """D""" 4
+.el .IP "\f(CWD\fR" 4
+.IX Item "D"
+The symbol is in the initialized data section.
+.ie n .IP """G""" 4
+.el .IP "\f(CWG\fR" 4
+.IX Item "G"
+The symbol is in an initialized data section for small objects. Some
+object file formats permit more efficient access to small data objects,
+such as a global int variable as opposed to a large global array.
+.ie n .IP """I""" 4
+.el .IP "\f(CWI\fR" 4
+.IX Item "I"
+The symbol is an indirect reference to another symbol. This is a \s-1GNU\s0
+extension to the a.out object file format which is rarely used.
+.ie n .IP """N""" 4
+.el .IP "\f(CWN\fR" 4
+.IX Item "N"
+The symbol is a debugging symbol.
+.ie n .IP """R""" 4
+.el .IP "\f(CWR\fR" 4
+.IX Item "R"
+The symbol is in a read only data section.
+.ie n .IP """S""" 4
+.el .IP "\f(CWS\fR" 4
+.IX Item "S"
+The symbol is in an uninitialized data section for small objects.
+.ie n .IP """T""" 4
+.el .IP "\f(CWT\fR" 4
+.IX Item "T"
+The symbol is in the text (code) section.
+.ie n .IP """U""" 4
+.el .IP "\f(CWU\fR" 4
+.IX Item "U"
+The symbol is undefined.
+.ie n .IP """V""" 4
+.el .IP "\f(CWV\fR" 4
+.IX Item "V"
+The symbol is a weak object. When a weak defined symbol is linked with
+a normal defined symbol, the normal defined symbol is used with no error.
+When a weak undefined symbol is linked and the symbol is not defined,
+the value of the weak symbol becomes zero with no error.
+.ie n .IP """W""" 4
+.el .IP "\f(CWW\fR" 4
+.IX Item "W"
+The symbol is a weak symbol that has not been specifically tagged as a
+weak object symbol. When a weak defined symbol is linked with a normal
+defined symbol, the normal defined symbol is used with no error.
+When a weak undefined symbol is linked and the symbol is not defined,
+the value of the symbol is determined in a system-specific manner without
+error. On some systems, uppercase indicates that a default value has been
+specified.
+.ie n .IP """\-""" 4
+.el .IP "\f(CW\-\fR" 4
+.IX Item "-"
+The symbol is a stabs symbol in an a.out object file. In this case, the
+next values printed are the stabs other field, the stabs desc field, and
+the stab type. Stabs symbols are used to hold debugging information.
+.ie n .IP """?""" 4
+.el .IP "\f(CW?\fR" 4
+.IX Item "?"
+The symbol type is unknown, or object file format specific.
+.RE
+.RS 4
+.RE
+.IP "\(bu" 4
+The symbol name.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The long and short forms of options, shown here as alternatives, are
+equivalent.
+.IP "\fB\-A\fR" 4
+.IX Item "-A"
+.PD 0
+.IP "\fB\-o\fR" 4
+.IX Item "-o"
+.IP "\fB\-\-print\-file\-name\fR" 4
+.IX Item "--print-file-name"
+.PD
+Precede each symbol by the name of the input file (or archive member)
+in which it was found, rather than identifying the input file once only,
+before all of its symbols.
+.IP "\fB\-a\fR" 4
+.IX Item "-a"
+.PD 0
+.IP "\fB\-\-debug\-syms\fR" 4
+.IX Item "--debug-syms"
+.PD
+Display all symbols, even debugger-only symbols; normally these are not
+listed.
+.IP "\fB\-B\fR" 4
+.IX Item "-B"
+The same as \fB\-\-format=bsd\fR (for compatibility with the \s-1MIPS\s0 \fBnm\fR).
+.IP "\fB\-C\fR" 4
+.IX Item "-C"
+.PD 0
+.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
+.IX Item "--demangle[=style]"
+.PD
+Decode (\fIdemangle\fR) low-level symbol names into user-level names.
+Besides removing any initial underscore prepended by the system, this
+makes \*(C+ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler.
+.IP "\fB\-\-no\-demangle\fR" 4
+.IX Item "--no-demangle"
+Do not demangle low-level symbol names. This is the default.
+.IP "\fB\-D\fR" 4
+.IX Item "-D"
+.PD 0
+.IP "\fB\-\-dynamic\fR" 4
+.IX Item "--dynamic"
+.PD
+Display the dynamic symbols rather than the normal symbols. This is
+only meaningful for dynamic objects, such as certain types of shared
+libraries.
+.IP "\fB\-f\fR \fIformat\fR" 4
+.IX Item "-f format"
+.PD 0
+.IP "\fB\-\-format=\fR\fIformat\fR" 4
+.IX Item "--format=format"
+.PD
+Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR,
+\&\f(CW\*(C`sysv\*(C'\fR, or \f(CW\*(C`posix\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR.
+Only the first character of \fIformat\fR is significant; it can be
+either upper or lower case.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+.PD 0
+.IP "\fB\-\-extern\-only\fR" 4
+.IX Item "--extern-only"
+.PD
+Display only external symbols.
+.IP "\fB\-l\fR" 4
+.IX Item "-l"
+.PD 0
+.IP "\fB\-\-line\-numbers\fR" 4
+.IX Item "--line-numbers"
+.PD
+For each symbol, use debugging information to try to find a filename and
+line number. For a defined symbol, look for the line number of the
+address of the symbol. For an undefined symbol, look for the line
+number of a relocation entry which refers to the symbol. If line number
+information can be found, print it after the other symbol information.
+.IP "\fB\-n\fR" 4
+.IX Item "-n"
+.PD 0
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.IP "\fB\-\-numeric\-sort\fR" 4
+.IX Item "--numeric-sort"
+.PD
+Sort symbols numerically by their addresses, rather than alphabetically
+by their names.
+.IP "\fB\-p\fR" 4
+.IX Item "-p"
+.PD 0
+.IP "\fB\-\-no\-sort\fR" 4
+.IX Item "--no-sort"
+.PD
+Do not bother to sort the symbols in any order; print them in the order
+encountered.
+.IP "\fB\-P\fR" 4
+.IX Item "-P"
+.PD 0
+.IP "\fB\-\-portability\fR" 4
+.IX Item "--portability"
+.PD
+Use the \s-1POSIX\s0.2 standard output format instead of the default format.
+Equivalent to \fB\-f posix\fR.
+.IP "\fB\-S\fR" 4
+.IX Item "-S"
+.PD 0
+.IP "\fB\-\-print\-size\fR" 4
+.IX Item "--print-size"
+.PD
+Print size, not the value, of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output format.
+.IP "\fB\-s\fR" 4
+.IX Item "-s"
+.PD 0
+.IP "\fB\-\-print\-armap\fR" 4
+.IX Item "--print-armap"
+.PD
+When listing symbols from archive members, include the index: a mapping
+(stored in the archive by \fBar\fR or \fBranlib\fR) of which modules
+contain definitions for which names.
+.IP "\fB\-r\fR" 4
+.IX Item "-r"
+.PD 0
+.IP "\fB\-\-reverse\-sort\fR" 4
+.IX Item "--reverse-sort"
+.PD
+Reverse the order of the sort (whether numeric or alphabetic); let the
+last come first.
+.IP "\fB\-\-size\-sort\fR" 4
+.IX Item "--size-sort"
+Sort symbols by size. The size is computed as the difference between
+the value of the symbol and the value of the symbol with the next higher
+value. If the \f(CW\*(C`bsd\*(C'\fR output format is used the size of the symbol
+is printed, rather than the value, and \fB\-S\fR must be used in order
+both size and value to be printed.
+.IP "\fB\-\-special\-syms\fR" 4
+.IX Item "--special-syms"
+Display symbols which have a target-specific special meaning. These
+symbols are usually used by the target for some special processing and
+are not normally helpful when included included in the normal symbol
+lists. For example for \s-1ARM\s0 targets this option would skip the mapping
+symbols used to mark transitions between \s-1ARM\s0 code, \s-1THUMB\s0 code and
+data.
+.IP "\fB\-t\fR \fIradix\fR" 4
+.IX Item "-t radix"
+.PD 0
+.IP "\fB\-\-radix=\fR\fIradix\fR" 4
+.IX Item "--radix=radix"
+.PD
+Use \fIradix\fR as the radix for printing the symbol values. It must be
+\&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal.
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+Specify an object code format other than your system's default format.
+.IP "\fB\-u\fR" 4
+.IX Item "-u"
+.PD 0
+.IP "\fB\-\-undefined\-only\fR" 4
+.IX Item "--undefined-only"
+.PD
+Display only undefined symbols (those external to each object file).
+.IP "\fB\-\-defined\-only\fR" 4
+.IX Item "--defined-only"
+Display only defined symbols for each object file.
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Show the version number of \fBnm\fR and exit.
+.IP "\fB\-X\fR" 4
+.IX Item "-X"
+This option is ignored for compatibility with the \s-1AIX\s0 version of
+\&\fBnm\fR. It takes one parameter which must be the string
+\&\fB32_64\fR. The default mode of \s-1AIX\s0 \fBnm\fR corresponds
+to \fB\-X 32\fR, which is not supported by \s-1GNU\s0 \fBnm\fR.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Show a summary of the options to \fBnm\fR and exit.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/objcopy/Makefile b/gnu/usr.bin/binutils/objcopy/Makefile
index 977e1d86aece3..66d99f4e75389 100644
--- a/gnu/usr.bin/binutils/objcopy/Makefile
+++ b/gnu/usr.bin/binutils/objcopy/Makefile
@@ -6,7 +6,6 @@
PROG= objcopy
SRCS= objcopy.c not-strip.c
-WARNS?= 2
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils -I${SRCDIR}/bfd
diff --git a/gnu/usr.bin/binutils/objcopy/objcopy.1 b/gnu/usr.bin/binutils/objcopy/objcopy.1
new file mode 100644
index 0000000000000..bf4501711c64f
--- /dev/null
+++ b/gnu/usr.bin/binutils/objcopy/objcopy.1
@@ -0,0 +1,858 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "OBJCOPY 1"
+.TH OBJCOPY 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+objcopy \- copy and translate object files
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
+ [\fB\-I\fR \fIbfdname\fR|\fB\-\-input\-target=\fR\fIbfdname\fR]
+ [\fB\-O\fR \fIbfdname\fR|\fB\-\-output\-target=\fR\fIbfdname\fR]
+ [\fB\-B\fR \fIbfdarch\fR|\fB\-\-binary\-architecture=\fR\fIbfdarch\fR]
+ [\fB\-S\fR|\fB\-\-strip\-all\fR]
+ [\fB\-g\fR|\fB\-\-strip\-debug\fR]
+ [\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-\-localize\-hidden\fR]
+ [\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-w\fR|\fB\-\-wildcard\fR]
+ [\fB\-x\fR|\fB\-\-discard\-all\fR]
+ [\fB\-X\fR|\fB\-\-discard\-locals\fR]
+ [\fB\-b\fR \fIbyte\fR|\fB\-\-byte=\fR\fIbyte\fR]
+ [\fB\-i\fR \fIinterleave\fR|\fB\-\-interleave=\fR\fIinterleave\fR]
+ [\fB\-j\fR \fIsectionname\fR|\fB\-\-only\-section=\fR\fIsectionname\fR]
+ [\fB\-R\fR \fIsectionname\fR|\fB\-\-remove\-section=\fR\fIsectionname\fR]
+ [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
+ [\fB\-\-debugging\fR]
+ [\fB\-\-gap\-fill=\fR\fIval\fR]
+ [\fB\-\-pad\-to=\fR\fIaddress\fR]
+ [\fB\-\-set\-start=\fR\fIval\fR]
+ [\fB\-\-adjust\-start=\fR\fIincr\fR]
+ [\fB\-\-change\-addresses=\fR\fIincr\fR]
+ [\fB\-\-change\-section\-address\fR \fIsection\fR{=,+,\-}\fIval\fR]
+ [\fB\-\-change\-section\-lma\fR \fIsection\fR{=,+,\-}\fIval\fR]
+ [\fB\-\-change\-section\-vma\fR \fIsection\fR{=,+,\-}\fIval\fR]
+ [\fB\-\-change\-warnings\fR] [\fB\-\-no\-change\-warnings\fR]
+ [\fB\-\-set\-section\-flags\fR \fIsection\fR=\fIflags\fR]
+ [\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR]
+ [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]]
+ [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR]
+ [\fB\-\-reverse\-bytes=\fR\fInum\fR]
+ [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR]
+ [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR]
+ [\fB\-\-redefine\-syms=\fR\fIfilename\fR]
+ [\fB\-\-weaken\fR]
+ [\fB\-\-keep\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-strip\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-localize\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-globalize\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-weaken\-symbols=\fR\fIfilename\fR]
+ [\fB\-\-alt\-machine\-code=\fR\fIindex\fR]
+ [\fB\-\-prefix\-symbols=\fR\fIstring\fR]
+ [\fB\-\-prefix\-sections=\fR\fIstring\fR]
+ [\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR]
+ [\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR]
+ [\fB\-\-keep\-file\-symbols\fR]
+ [\fB\-\-only\-keep\-debug\fR]
+ [\fB\-\-extract\-symbol\fR]
+ [\fB\-\-writable\-text\fR]
+ [\fB\-\-readonly\-text\fR]
+ [\fB\-\-pure\fR]
+ [\fB\-\-impure\fR]
+ [\fB\-v\fR|\fB\-\-verbose\fR]
+ [\fB\-V\fR|\fB\-\-version\fR]
+ [\fB\-\-help\fR] [\fB\-\-info\fR]
+ \fIinfile\fR [\fIoutfile\fR]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The \s-1GNU\s0 \fBobjcopy\fR utility copies the contents of an object
+file to another. \fBobjcopy\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to
+read and write the object files. It can write the destination object
+file in a format different from that of the source object file. The
+exact behavior of \fBobjcopy\fR is controlled by command-line options.
+Note that \fBobjcopy\fR should be able to copy a fully linked file
+between any two formats. However, copying a relocatable object file
+between any two formats may not work as expected.
+.PP
+\&\fBobjcopy\fR creates temporary files to do its translations and
+deletes them afterward. \fBobjcopy\fR uses \s-1BFD\s0 to do all its
+translation work; it has access to all the formats described in \s-1BFD\s0
+and thus is able to recognize most formats without being told
+explicitly.
+.PP
+\&\fBobjcopy\fR can be used to generate S\-records by using an output
+target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
+.PP
+\&\fBobjcopy\fR can be used to generate a raw binary file by using an
+output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When
+\&\fBobjcopy\fR generates a raw binary file, it will essentially produce
+a memory dump of the contents of the input object file. All symbols and
+relocation information will be discarded. The memory dump will start at
+the load address of the lowest section copied into the output file.
+.PP
+When generating an S\-record or a raw binary file, it may be helpful to
+use \fB\-S\fR to remove sections containing debugging information. In
+some cases \fB\-R\fR will be useful to remove sections which contain
+information that is not needed by the binary file.
+.PP
+Note\-\-\-\fBobjcopy\fR is not able to change the endianness of its input
+files. If the input format has an endianness (some formats do not),
+\&\fBobjcopy\fR can only copy the inputs into file formats that have the
+same endianness or which have no endianness (e.g., \fBsrec\fR).
+(However, see the \fB\-\-reverse\-bytes\fR option.)
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fIinfile\fR" 4
+.IX Item "infile"
+.PD 0
+.IP "\fIoutfile\fR" 4
+.IX Item "outfile"
+.PD
+The input and output files, respectively.
+If you do not specify \fIoutfile\fR, \fBobjcopy\fR creates a
+temporary file and destructively renames the result with
+the name of \fIinfile\fR.
+.IP "\fB\-I\fR \fIbfdname\fR" 4
+.IX Item "-I bfdname"
+.PD 0
+.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
+.IX Item "--input-target=bfdname"
+.PD
+Consider the source file's object format to be \fIbfdname\fR, rather than
+attempting to deduce it.
+.IP "\fB\-O\fR \fIbfdname\fR" 4
+.IX Item "-O bfdname"
+.PD 0
+.IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4
+.IX Item "--output-target=bfdname"
+.PD
+Write the output file using the object format \fIbfdname\fR.
+.IP "\fB\-F\fR \fIbfdname\fR" 4
+.IX Item "-F bfdname"
+.PD 0
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+.PD
+Use \fIbfdname\fR as the object format for both the input and the output
+file; i.e., simply transfer data from source to destination with no
+translation.
+.IP "\fB\-B\fR \fIbfdarch\fR" 4
+.IX Item "-B bfdarch"
+.PD 0
+.IP "\fB\-\-binary\-architecture=\fR\fIbfdarch\fR" 4
+.IX Item "--binary-architecture=bfdarch"
+.PD
+Useful when transforming a raw binary input file into an object file.
+In this case the output architecture can be set to \fIbfdarch\fR. This
+option will be ignored if the input file has a known \fIbfdarch\fR. You
+can access this binary data inside a program by referencing the special
+symbols that are created by the conversion process. These symbols are
+called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
+_binary_\fIobjfile\fR_size. e.g. you can transform a picture file into
+an object file and then access it in your code using these symbols.
+.IP "\fB\-j\fR \fIsectionname\fR" 4
+.IX Item "-j sectionname"
+.PD 0
+.IP "\fB\-\-only\-section=\fR\fIsectionname\fR" 4
+.IX Item "--only-section=sectionname"
+.PD
+Copy only the named section from the input file to the output file.
+This option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+.IP "\fB\-R\fR \fIsectionname\fR" 4
+.IX Item "-R sectionname"
+.PD 0
+.IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4
+.IX Item "--remove-section=sectionname"
+.PD
+Remove any section named \fIsectionname\fR from the output file. This
+option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+.IP "\fB\-S\fR" 4
+.IX Item "-S"
+.PD 0
+.IP "\fB\-\-strip\-all\fR" 4
+.IX Item "--strip-all"
+.PD
+Do not copy relocation and symbol information from the source file.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+.PD 0
+.IP "\fB\-\-strip\-debug\fR" 4
+.IX Item "--strip-debug"
+.PD
+Do not copy debugging symbols or sections from the source file.
+.IP "\fB\-\-strip\-unneeded\fR" 4
+.IX Item "--strip-unneeded"
+Strip all symbols that are not needed for relocation processing.
+.IP "\fB\-K\fR \fIsymbolname\fR" 4
+.IX Item "-K symbolname"
+.PD 0
+.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--keep-symbol=symbolname"
+.PD
+When stripping symbols, keep symbol \fIsymbolname\fR even if it would
+normally be stripped. This option may be given more than once.
+.IP "\fB\-N\fR \fIsymbolname\fR" 4
+.IX Item "-N symbolname"
+.PD 0
+.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--strip-symbol=symbolname"
+.PD
+Do not copy symbol \fIsymbolname\fR from the source file. This option
+may be given more than once.
+.IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--strip-unneeded-symbol=symbolname"
+Do not copy symbol \fIsymbolname\fR from the source file unless it is needed
+by a relocation. This option may be given more than once.
+.IP "\fB\-G\fR \fIsymbolname\fR" 4
+.IX Item "-G symbolname"
+.PD 0
+.IP "\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--keep-global-symbol=symbolname"
+.PD
+Keep only symbol \fIsymbolname\fR global. Make all other symbols local
+to the file, so that they are not visible externally. This option may
+be given more than once.
+.IP "\fB\-\-localize\-hidden\fR" 4
+.IX Item "--localize-hidden"
+In an \s-1ELF\s0 object, mark all symbols that have hidden or internal visibility
+as local. This option applies on top of symbol-specific localization options
+such as \fB\-L\fR.
+.IP "\fB\-L\fR \fIsymbolname\fR" 4
+.IX Item "-L symbolname"
+.PD 0
+.IP "\fB\-\-localize\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--localize-symbol=symbolname"
+.PD
+Make symbol \fIsymbolname\fR local to the file, so that it is not
+visible externally. This option may be given more than once.
+.IP "\fB\-W\fR \fIsymbolname\fR" 4
+.IX Item "-W symbolname"
+.PD 0
+.IP "\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--weaken-symbol=symbolname"
+.PD
+Make symbol \fIsymbolname\fR weak. This option may be given more than once.
+.IP "\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--globalize-symbol=symbolname"
+Give symbol \fIsymbolname\fR global scoping so that it is visible
+outside of the file in which it is defined. This option may be given
+more than once.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+.PD 0
+.IP "\fB\-\-wildcard\fR" 4
+.IX Item "--wildcard"
+.PD
+Permit regular expressions in \fIsymbolname\fRs used in other command
+line options. The question mark (?), asterisk (*), backslash (\e) and
+square brackets ([]) operators can be used anywhere in the symbol
+name. If the first character of the symbol name is the exclamation
+point (!) then the sense of the switch is reversed for that symbol.
+For example:
+.Sp
+.Vb 1
+\& \-w \-W !foo \-W fo*
+.Ve
+.Sp
+would cause objcopy to weaken all symbols that start with \*(L"fo\*(R"
+except for the symbol \*(L"foo\*(R".
+.IP "\fB\-x\fR" 4
+.IX Item "-x"
+.PD 0
+.IP "\fB\-\-discard\-all\fR" 4
+.IX Item "--discard-all"
+.PD
+Do not copy non-global symbols from the source file.
+.IP "\fB\-X\fR" 4
+.IX Item "-X"
+.PD 0
+.IP "\fB\-\-discard\-locals\fR" 4
+.IX Item "--discard-locals"
+.PD
+Do not copy compiler-generated local symbols.
+(These usually start with \fBL\fR or \fB.\fR.)
+.IP "\fB\-b\fR \fIbyte\fR" 4
+.IX Item "-b byte"
+.PD 0
+.IP "\fB\-\-byte=\fR\fIbyte\fR" 4
+.IX Item "--byte=byte"
+.PD
+Keep only every \fIbyte\fRth byte of the input file (header data is not
+affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1,
+where \fIinterleave\fR is given by the \fB\-i\fR or \fB\-\-interleave\fR
+option, or the default of 4. This option is useful for creating files
+to program \s-1ROM\s0. It is typically used with an \f(CW\*(C`srec\*(C'\fR output
+target.
+.IP "\fB\-i\fR \fIinterleave\fR" 4
+.IX Item "-i interleave"
+.PD 0
+.IP "\fB\-\-interleave=\fR\fIinterleave\fR" 4
+.IX Item "--interleave=interleave"
+.PD
+Only copy one out of every \fIinterleave\fR bytes. Select which byte to
+copy with the \fB\-b\fR or \fB\-\-byte\fR option. The default is 4.
+\&\fBobjcopy\fR ignores this option if you do not specify either \fB\-b\fR or
+\&\fB\-\-byte\fR.
+.IP "\fB\-p\fR" 4
+.IX Item "-p"
+.PD 0
+.IP "\fB\-\-preserve\-dates\fR" 4
+.IX Item "--preserve-dates"
+.PD
+Set the access and modification dates of the output file to be the same
+as those of the input file.
+.IP "\fB\-\-debugging\fR" 4
+.IX Item "--debugging"
+Convert debugging information, if possible. This is not the default
+because only certain debugging formats are supported, and the
+conversion process can be time consuming.
+.IP "\fB\-\-gap\-fill\fR \fIval\fR" 4
+.IX Item "--gap-fill val"
+Fill gaps between sections with \fIval\fR. This operation applies to
+the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing
+the size of the section with the lower address, and filling in the extra
+space created with \fIval\fR.
+.IP "\fB\-\-pad\-to\fR \fIaddress\fR" 4
+.IX Item "--pad-to address"
+Pad the output file up to the load address \fIaddress\fR. This is
+done by increasing the size of the last section. The extra space is
+filled in with the value specified by \fB\-\-gap\-fill\fR (default zero).
+.IP "\fB\-\-set\-start\fR \fIval\fR" 4
+.IX Item "--set-start val"
+Set the start address of the new file to \fIval\fR. Not all object file
+formats support setting the start address.
+.IP "\fB\-\-change\-start\fR \fIincr\fR" 4
+.IX Item "--change-start incr"
+.PD 0
+.IP "\fB\-\-adjust\-start\fR \fIincr\fR" 4
+.IX Item "--adjust-start incr"
+.PD
+Change the start address by adding \fIincr\fR. Not all object file
+formats support setting the start address.
+.IP "\fB\-\-change\-addresses\fR \fIincr\fR" 4
+.IX Item "--change-addresses incr"
+.PD 0
+.IP "\fB\-\-adjust\-vma\fR \fIincr\fR" 4
+.IX Item "--adjust-vma incr"
+.PD
+Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
+address, by adding \fIincr\fR. Some object file formats do not permit
+section addresses to be changed arbitrarily. Note that this does not
+relocate the sections; if the program expects sections to be loaded at a
+certain address, and this option is used to change the sections such
+that they are loaded at a different address, the program may fail.
+.IP "\fB\-\-change\-section\-address\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
+.IX Item "--change-section-address section{=,+,-}val"
+.PD 0
+.IP "\fB\-\-adjust\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
+.IX Item "--adjust-section-vma section{=,+,-}val"
+.PD
+Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named
+\&\fIsection\fR. If \fB=\fR is used, the section address is set to
+\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
+section address. See the comments under \fB\-\-change\-addresses\fR,
+above. If \fIsection\fR does not exist in the input file, a warning will
+be issued, unless \fB\-\-no\-change\-warnings\fR is used.
+.IP "\fB\-\-change\-section\-lma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
+.IX Item "--change-section-lma section{=,+,-}val"
+Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0
+address is the address where the section will be loaded into memory at
+program load time. Normally this is the same as the \s-1VMA\s0 address, which
+is the address of the section at program run time, but on some systems,
+especially those where a program is held in \s-1ROM\s0, the two can be
+different. If \fB=\fR is used, the section address is set to
+\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
+section address. See the comments under \fB\-\-change\-addresses\fR,
+above. If \fIsection\fR does not exist in the input file, a warning
+will be issued, unless \fB\-\-no\-change\-warnings\fR is used.
+.IP "\fB\-\-change\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
+.IX Item "--change-section-vma section{=,+,-}val"
+Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0
+address is the address where the section will be located once the
+program has started executing. Normally this is the same as the \s-1LMA\s0
+address, which is the address where the section will be loaded into
+memory, but on some systems, especially those where a program is held in
+\&\s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address
+is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted
+from the section address. See the comments under
+\&\fB\-\-change\-addresses\fR, above. If \fIsection\fR does not exist in
+the input file, a warning will be issued, unless
+\&\fB\-\-no\-change\-warnings\fR is used.
+.IP "\fB\-\-change\-warnings\fR" 4
+.IX Item "--change-warnings"
+.PD 0
+.IP "\fB\-\-adjust\-warnings\fR" 4
+.IX Item "--adjust-warnings"
+.PD
+If \fB\-\-change\-section\-address\fR or \fB\-\-change\-section\-lma\fR or
+\&\fB\-\-change\-section\-vma\fR is used, and the named section does not
+exist, issue a warning. This is the default.
+.IP "\fB\-\-no\-change\-warnings\fR" 4
+.IX Item "--no-change-warnings"
+.PD 0
+.IP "\fB\-\-no\-adjust\-warnings\fR" 4
+.IX Item "--no-adjust-warnings"
+.PD
+Do not issue a warning if \fB\-\-change\-section\-address\fR or
+\&\fB\-\-adjust\-section\-lma\fR or \fB\-\-adjust\-section\-vma\fR is used, even
+if the named section does not exist.
+.IP "\fB\-\-set\-section\-flags\fR \fIsection\fR\fB=\fR\fIflags\fR" 4
+.IX Item "--set-section-flags section=flags"
+Set the flags for the named section. The \fIflags\fR argument is a
+comma separated string of flag names. The recognized names are
+\&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,
+\&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and
+\&\fBdebug\fR. You can set the \fBcontents\fR flag for a section which
+does not have contents, but it is not meaningful to clear the
+\&\fBcontents\fR flag of a section which does have contents\*(--just remove
+the section instead. Not all flags are meaningful for all object file
+formats.
+.IP "\fB\-\-add\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
+.IX Item "--add-section sectionname=filename"
+Add a new section named \fIsectionname\fR while copying the file. The
+contents of the new section are taken from the file \fIfilename\fR. The
+size of the section will be the size of the file. This option only
+works on file formats which can support sections with arbitrary names.
+.IP "\fB\-\-rename\-section\fR \fIoldname\fR\fB=\fR\fInewname\fR\fB[,\fR\fIflags\fR\fB]\fR" 4
+.IX Item "--rename-section oldname=newname[,flags]"
+Rename a section from \fIoldname\fR to \fInewname\fR, optionally
+changing the section's flags to \fIflags\fR in the process. This has
+the advantage over usng a linker script to perform the rename in that
+the output stays as an object file and does not become a linked
+executable.
+.Sp
+This option is particularly helpful when the input format is binary,
+since this will always create a section called .data. If for example,
+you wanted instead to create a section called .rodata containing binary
+data you could use the following command line to achieve it:
+.Sp
+.Vb 3
+\& objcopy \-I binary \-O <output_format> \-B <architecture> \e
+\& \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e
+\& <input_binary_file> <output_object_file>
+.Ve
+.IP "\fB\-\-change\-leading\-char\fR" 4
+.IX Item "--change-leading-char"
+Some object file formats use special characters at the start of
+symbols. The most common such character is underscore, which compilers
+often add before every symbol. This option tells \fBobjcopy\fR to
+change the leading character of every symbol when it converts between
+object file formats. If the object file formats use the same leading
+character, this option has no effect. Otherwise, it will add a
+character, or remove a character, or change a character, as
+appropriate.
+.IP "\fB\-\-remove\-leading\-char\fR" 4
+.IX Item "--remove-leading-char"
+If the first character of a global symbol is a special symbol leading
+character used by the object file format, remove the character. The
+most common symbol leading character is underscore. This option will
+remove a leading underscore from all global symbols. This can be useful
+if you want to link together objects of different file formats with
+different conventions for symbol names. This is different from
+\&\fB\-\-change\-leading\-char\fR because it always changes the symbol name
+when appropriate, regardless of the object file format of the output
+file.
+.IP "\fB\-\-reverse\-bytes=\fR\fInum\fR" 4
+.IX Item "--reverse-bytes=num"
+Reverse the bytes in a section with output contents. A section length must
+be evenly divisible by the value given in order for the swap to be able to
+take place. Reversing takes place before the interleaving is performed.
+.Sp
+This option is used typically in generating \s-1ROM\s0 images for problematic
+target systems. For example, on some target boards, the 32\-bit words
+fetched from 8\-bit ROMs are re-assembled in little-endian byte order
+regardless of the \s-1CPU\s0 byte order. Depending on the programming model, the
+endianness of the \s-1ROM\s0 may need to be modified.
+.Sp
+Consider a simple file with a section containing the following eight
+bytes: \f(CW12345678\fR.
+.Sp
+Using \fB\-\-reverse\-bytes=2\fR for the above example, the bytes in the
+output file would be ordered \f(CW21436587\fR.
+.Sp
+Using \fB\-\-reverse\-bytes=4\fR for the above example, the bytes in the
+output file would be ordered \f(CW43218765\fR.
+.Sp
+By using \fB\-\-reverse\-bytes=2\fR for the above example, followed by
+\&\fB\-\-reverse\-bytes=4\fR on the output file, the bytes in the second
+output file would be ordered \f(CW34127856\fR.
+.IP "\fB\-\-srec\-len=\fR\fIival\fR" 4
+.IX Item "--srec-len=ival"
+Meaningful only for srec output. Set the maximum length of the Srecords
+being produced to \fIival\fR. This length covers both address, data and
+crc fields.
+.IP "\fB\-\-srec\-forceS3\fR" 4
+.IX Item "--srec-forceS3"
+Meaningful only for srec output. Avoid generation of S1/S2 records,
+creating S3\-only record format.
+.IP "\fB\-\-redefine\-sym\fR \fIold\fR\fB=\fR\fInew\fR" 4
+.IX Item "--redefine-sym old=new"
+Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful
+when one is trying link two things together for which you have no
+source, and there are name collisions.
+.IP "\fB\-\-redefine\-syms=\fR\fIfilename\fR" 4
+.IX Item "--redefine-syms=filename"
+Apply \fB\-\-redefine\-sym\fR to each symbol pair "\fIold\fR \fInew\fR"
+listed in the file \fIfilename\fR. \fIfilename\fR is simply a flat file,
+with one symbol pair per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+.IP "\fB\-\-weaken\fR" 4
+.IX Item "--weaken"
+Change all global symbols in the file to be weak. This can be useful
+when building an object which will be linked against other objects using
+the \fB\-R\fR option to the linker. This option is only effective when
+using an object file format which supports weak symbols.
+.IP "\fB\-\-keep\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--keep-symbols=filename"
+Apply \fB\-\-keep\-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.IP "\fB\-\-strip\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--strip-symbols=filename"
+Apply \fB\-\-strip\-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.IP "\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--strip-unneeded-symbols=filename"
+Apply \fB\-\-strip\-unneeded\-symbol\fR option to each symbol listed in
+the file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
+symbol name per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+.IP "\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--keep-global-symbols=filename"
+Apply \fB\-\-keep\-global\-symbol\fR option to each symbol listed in the
+file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
+symbol name per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+.IP "\fB\-\-localize\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--localize-symbols=filename"
+Apply \fB\-\-localize\-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.IP "\fB\-\-globalize\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--globalize-symbols=filename"
+Apply \fB\-\-globalize\-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.IP "\fB\-\-weaken\-symbols=\fR\fIfilename\fR" 4
+.IX Item "--weaken-symbols=filename"
+Apply \fB\-\-weaken\-symbol\fR option to each symbol listed in the file
+\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+.IP "\fB\-\-alt\-machine\-code=\fR\fIindex\fR" 4
+.IX Item "--alt-machine-code=index"
+If the output architecture has alternate machine codes, use the
+\&\fIindex\fRth code instead of the default one. This is useful in case
+a machine is assigned an official code and the tool-chain adopts the
+new code, but other applications still depend on the original code
+being used. For \s-1ELF\s0 based architectures if the \fIindex\fR
+alternative does not exist then the value is treated as an absolute
+number to be stored in the e_machine field of the \s-1ELF\s0 header.
+.IP "\fB\-\-writable\-text\fR" 4
+.IX Item "--writable-text"
+Mark the output text as writable. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-readonly\-text\fR" 4
+.IX Item "--readonly-text"
+Make the output text write protected. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-pure\fR" 4
+.IX Item "--pure"
+Mark the output file as demand paged. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-impure\fR" 4
+.IX Item "--impure"
+Mark the output file as impure. This option isn't meaningful for all
+object file formats.
+.IP "\fB\-\-prefix\-symbols=\fR\fIstring\fR" 4
+.IX Item "--prefix-symbols=string"
+Prefix all symbols in the output file with \fIstring\fR.
+.IP "\fB\-\-prefix\-sections=\fR\fIstring\fR" 4
+.IX Item "--prefix-sections=string"
+Prefix all section names in the output file with \fIstring\fR.
+.IP "\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR" 4
+.IX Item "--prefix-alloc-sections=string"
+Prefix all the names of all allocated sections in the output file with
+\&\fIstring\fR.
+.IP "\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR" 4
+.IX Item "--add-gnu-debuglink=path-to-file"
+Creates a .gnu_debuglink section which contains a reference to \fIpath-to-file\fR
+and adds it to the output file.
+.IP "\fB\-\-keep\-file\-symbols\fR" 4
+.IX Item "--keep-file-symbols"
+When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
+\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names,
+which would otherwise get stripped.
+.IP "\fB\-\-only\-keep\-debug\fR" 4
+.IX Item "--only-keep-debug"
+Strip a file, removing contents of any sections that would not be
+stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections
+intact. In \s-1ELF\s0 files, this preserves all note sections in the output.
+.Sp
+The intention is that this option will be used in conjunction with
+\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
+stripped binary which will occupy less space in \s-1RAM\s0 and in a
+distribution and the second a debugging information file which is only
+needed if debugging abilities are required. The suggested procedure
+to create these files is as follows:
+.RS 4
+.IP "1.<Link the executable as normal. Assuming that is is called>" 4
+.IX Item "1.<Link the executable as normal. Assuming that is is called>"
+\&\f(CW\*(C`foo\*(C'\fR then...
+.ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
+.IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
+create a file containing the debugging info.
+.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
+.IX Item "1.<Run objcopy --strip-debug foo to create a>"
+stripped executable.
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
+to add a link to the debugging info into the stripped executable.
+.RE
+.RS 4
+.Sp
+Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
+file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
+optional. You could instead do this:
+.IP "1.<Link the executable as normal.>" 4
+.IX Item "1.<Link the executable as normal.>"
+.PD 0
+.ie n .IP "1.<Copy ""foo"" to ""foo.full"">" 4
+.el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
+.IX Item "1.<Copy foo to foo.full>"
+.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR>" 4
+.IX Item "1.<Run objcopy --strip-debug foo>"
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
+.RE
+.RS 4
+.PD
+.Sp
+i.e., the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
+full executable. It does not have to be a file created by the
+\&\fB\-\-only\-keep\-debug\fR switch.
+.Sp
+Note \- this switch is only intended for use on fully linked files. It
+does not make sense to use it on object files where the debugging
+information may be incomplete. Besides the gnu_debuglink feature
+currently only supports the presence of one filename containing
+debugging information, not multiple filenames on a one-per-object-file
+basis.
+.RE
+.IP "\fB\-\-extract\-symbol\fR" 4
+.IX Item "--extract-symbol"
+Keep the file's section flags and symbols but remove all section data.
+Specifically, the option:
+.RS 4
+.IP "*<sets the virtual and load addresses of every section to zero;>" 4
+.IX Item "*<sets the virtual and load addresses of every section to zero;>"
+.PD 0
+.IP "*<removes the contents of all sections;>" 4
+.IX Item "*<removes the contents of all sections;>"
+.IP "*<sets the size of every section to zero; and>" 4
+.IX Item "*<sets the size of every section to zero; and>"
+.IP "*<sets the file's start address to zero.>" 4
+.IX Item "*<sets the file's start address to zero.>"
+.RE
+.RS 4
+.PD
+.Sp
+This option is used to build a \fI.sym\fR file for a VxWorks kernel.
+It can also be a useful way of reducing the size of a \fB\-\-just\-symbols\fR
+linker input file.
+.RE
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Show the version number of \fBobjcopy\fR.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-\-verbose\fR" 4
+.IX Item "--verbose"
+.PD
+Verbose output: list all object files modified. In the case of
+archives, \fBobjcopy \-V\fR lists all members of the archive.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Show a summary of the options to \fBobjcopy\fR.
+.IP "\fB\-\-info\fR" 4
+.IX Item "--info"
+Display a list showing all architectures and object formats available.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/objdump/Makefile b/gnu/usr.bin/binutils/objdump/Makefile
index 7b4b81d966eba..1a0d04625d1a6 100644
--- a/gnu/usr.bin/binutils/objdump/Makefile
+++ b/gnu/usr.bin/binutils/objdump/Makefile
@@ -6,7 +6,6 @@
PROG= objdump
SRCS= objdump.c prdbg.c
-WARNS?= 1
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils
diff --git a/gnu/usr.bin/binutils/objdump/objdump.1 b/gnu/usr.bin/binutils/objdump/objdump.1
new file mode 100644
index 0000000000000..3e339806d0f21
--- /dev/null
+++ b/gnu/usr.bin/binutils/objdump/objdump.1
@@ -0,0 +1,636 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "OBJDUMP 1"
+.TH OBJDUMP 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+objdump \- display information from object files.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+objdump [\fB\-a\fR|\fB\-\-archive\-headers\fR]
+ [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
+ [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR] ]
+ [\fB\-d\fR|\fB\-\-disassemble\fR]
+ [\fB\-D\fR|\fB\-\-disassemble\-all\fR]
+ [\fB\-z\fR|\fB\-\-disassemble\-zeroes\fR]
+ [\fB\-EB\fR|\fB\-EL\fR|\fB\-\-endian=\fR{big | little }]
+ [\fB\-f\fR|\fB\-\-file\-headers\fR]
+ [\fB\-\-file\-start\-context\fR]
+ [\fB\-g\fR|\fB\-\-debugging\fR]
+ [\fB\-e\fR|\fB\-\-debugging\-tags\fR]
+ [\fB\-h\fR|\fB\-\-section\-headers\fR|\fB\-\-headers\fR]
+ [\fB\-i\fR|\fB\-\-info\fR]
+ [\fB\-j\fR \fIsection\fR|\fB\-\-section=\fR\fIsection\fR]
+ [\fB\-l\fR|\fB\-\-line\-numbers\fR]
+ [\fB\-S\fR|\fB\-\-source\fR]
+ [\fB\-m\fR \fImachine\fR|\fB\-\-architecture=\fR\fImachine\fR]
+ [\fB\-M\fR \fIoptions\fR|\fB\-\-disassembler\-options=\fR\fIoptions\fR]
+ [\fB\-p\fR|\fB\-\-private\-headers\fR]
+ [\fB\-r\fR|\fB\-\-reloc\fR]
+ [\fB\-R\fR|\fB\-\-dynamic\-reloc\fR]
+ [\fB\-s\fR|\fB\-\-full\-contents\fR]
+ [\fB\-W\fR|\fB\-\-dwarf\fR]
+ [\fB\-G\fR|\fB\-\-stabs\fR]
+ [\fB\-t\fR|\fB\-\-syms\fR]
+ [\fB\-T\fR|\fB\-\-dynamic\-syms\fR]
+ [\fB\-x\fR|\fB\-\-all\-headers\fR]
+ [\fB\-w\fR|\fB\-\-wide\fR]
+ [\fB\-\-start\-address=\fR\fIaddress\fR]
+ [\fB\-\-stop\-address=\fR\fIaddress\fR]
+ [\fB\-\-prefix\-addresses\fR]
+ [\fB\-\-[no\-]show\-raw\-insn\fR]
+ [\fB\-\-adjust\-vma=\fR\fIoffset\fR]
+ [\fB\-\-special\-syms\fR]
+ [\fB\-V\fR|\fB\-\-version\fR]
+ [\fB\-H\fR|\fB\-\-help\fR]
+ \fIobjfile\fR...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBobjdump\fR displays information about one or more object files.
+The options control what particular information to display. This
+information is mostly useful to programmers who are working on the
+compilation tools, as opposed to programmers who just want their
+program to compile and work.
+.PP
+\&\fIobjfile\fR... are the object files to be examined. When you
+specify archives, \fBobjdump\fR shows information on each of the member
+object files.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The long and short forms of options, shown here as alternatives, are
+equivalent. At least one option from the list
+\&\fB\-a,\-d,\-D,\-e,\-f,\-g,\-G,\-h,\-H,\-p,\-r,\-R,\-s,\-S,\-t,\-T,\-V,\-x\fR must be given.
+.IP "\fB\-a\fR" 4
+.IX Item "-a"
+.PD 0
+.IP "\fB\-\-archive\-header\fR" 4
+.IX Item "--archive-header"
+.PD
+If any of the \fIobjfile\fR files are archives, display the archive
+header information (in a format similar to \fBls \-l\fR). Besides the
+information you could list with \fBar tv\fR, \fBobjdump \-a\fR shows
+the object file format of each archive member.
+.IP "\fB\-\-adjust\-vma=\fR\fIoffset\fR" 4
+.IX Item "--adjust-vma=offset"
+When dumping information, first add \fIoffset\fR to all the section
+addresses. This is useful if the section addresses do not correspond to
+the symbol table, which can happen when putting sections at particular
+addresses when using a format which can not represent section addresses,
+such as a.out.
+.IP "\fB\-b\fR \fIbfdname\fR" 4
+.IX Item "-b bfdname"
+.PD 0
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+.PD
+Specify that the object-code format for the object files is
+\&\fIbfdname\fR. This option may not be necessary; \fIobjdump\fR can
+automatically recognize many formats.
+.Sp
+For example,
+.Sp
+.Vb 1
+\& objdump \-b oasys \-m vax \-h fu.o
+.Ve
+.Sp
+displays summary information from the section headers (\fB\-h\fR) of
+\&\fIfu.o\fR, which is explicitly identified (\fB\-m\fR) as a \s-1VAX\s0 object
+file in the format produced by Oasys compilers. You can list the
+formats available with the \fB\-i\fR option.
+.IP "\fB\-C\fR" 4
+.IX Item "-C"
+.PD 0
+.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
+.IX Item "--demangle[=style]"
+.PD
+Decode (\fIdemangle\fR) low-level symbol names into user-level names.
+Besides removing any initial underscore prepended by the system, this
+makes \*(C+ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+.PD 0
+.IP "\fB\-\-debugging\fR" 4
+.IX Item "--debugging"
+.PD
+Display debugging information. This attempts to parse debugging
+information stored in the file and print it out using a C like syntax.
+Only certain types of debugging information have been implemented.
+Some other types are supported by \fBreadelf \-w\fR.
+.IP "\fB\-e\fR" 4
+.IX Item "-e"
+.PD 0
+.IP "\fB\-\-debugging\-tags\fR" 4
+.IX Item "--debugging-tags"
+.PD
+Like \fB\-g\fR, but the information is generated in a format compatible
+with ctags tool.
+.IP "\fB\-d\fR" 4
+.IX Item "-d"
+.PD 0
+.IP "\fB\-\-disassemble\fR" 4
+.IX Item "--disassemble"
+.PD
+Display the assembler mnemonics for the machine instructions from
+\&\fIobjfile\fR. This option only disassembles those sections which are
+expected to contain instructions.
+.IP "\fB\-D\fR" 4
+.IX Item "-D"
+.PD 0
+.IP "\fB\-\-disassemble\-all\fR" 4
+.IX Item "--disassemble-all"
+.PD
+Like \fB\-d\fR, but disassemble the contents of all sections, not just
+those expected to contain instructions.
+.IP "\fB\-\-prefix\-addresses\fR" 4
+.IX Item "--prefix-addresses"
+When disassembling, print the complete address on each line. This is
+the older disassembly format.
+.IP "\fB\-EB\fR" 4
+.IX Item "-EB"
+.PD 0
+.IP "\fB\-EL\fR" 4
+.IX Item "-EL"
+.IP "\fB\-\-endian={big|little}\fR" 4
+.IX Item "--endian={big|little}"
+.PD
+Specify the endianness of the object files. This only affects
+disassembly. This can be useful when disassembling a file format which
+does not describe endianness information, such as S\-records.
+.IP "\fB\-f\fR" 4
+.IX Item "-f"
+.PD 0
+.IP "\fB\-\-file\-headers\fR" 4
+.IX Item "--file-headers"
+.PD
+Display summary information from the overall header of
+each of the \fIobjfile\fR files.
+.IP "\fB\-\-file\-start\-context\fR" 4
+.IX Item "--file-start-context"
+Specify that when displaying interlisted source code/disassembly
+(assumes \fB\-S\fR) from a file that has not yet been displayed, extend the
+context to the start of the file.
+.IP "\fB\-h\fR" 4
+.IX Item "-h"
+.PD 0
+.IP "\fB\-\-section\-headers\fR" 4
+.IX Item "--section-headers"
+.IP "\fB\-\-headers\fR" 4
+.IX Item "--headers"
+.PD
+Display summary information from the section headers of the
+object file.
+.Sp
+File segments may be relocated to nonstandard addresses, for example by
+using the \fB\-Ttext\fR, \fB\-Tdata\fR, or \fB\-Tbss\fR options to
+\&\fBld\fR. However, some object file formats, such as a.out, do not
+store the starting address of the file segments. In those situations,
+although \fBld\fR relocates the sections correctly, using \fBobjdump
+\&\-h\fR to list the file section headers cannot show the correct addresses.
+Instead, it shows the usual addresses, which are implicit for the
+target.
+.IP "\fB\-H\fR" 4
+.IX Item "-H"
+.PD 0
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+.PD
+Print a summary of the options to \fBobjdump\fR and exit.
+.IP "\fB\-i\fR" 4
+.IX Item "-i"
+.PD 0
+.IP "\fB\-\-info\fR" 4
+.IX Item "--info"
+.PD
+Display a list showing all architectures and object formats available
+for specification with \fB\-b\fR or \fB\-m\fR.
+.IP "\fB\-j\fR \fIname\fR" 4
+.IX Item "-j name"
+.PD 0
+.IP "\fB\-\-section=\fR\fIname\fR" 4
+.IX Item "--section=name"
+.PD
+Display information only for section \fIname\fR.
+.IP "\fB\-l\fR" 4
+.IX Item "-l"
+.PD 0
+.IP "\fB\-\-line\-numbers\fR" 4
+.IX Item "--line-numbers"
+.PD
+Label the display (using debugging information) with the filename and
+source line numbers corresponding to the object code or relocs shown.
+Only useful with \fB\-d\fR, \fB\-D\fR, or \fB\-r\fR.
+.IP "\fB\-m\fR \fImachine\fR" 4
+.IX Item "-m machine"
+.PD 0
+.IP "\fB\-\-architecture=\fR\fImachine\fR" 4
+.IX Item "--architecture=machine"
+.PD
+Specify the architecture to use when disassembling object files. This
+can be useful when disassembling object files which do not describe
+architecture information, such as S\-records. You can list the available
+architectures with the \fB\-i\fR option.
+.IP "\fB\-M\fR \fIoptions\fR" 4
+.IX Item "-M options"
+.PD 0
+.IP "\fB\-\-disassembler\-options=\fR\fIoptions\fR" 4
+.IX Item "--disassembler-options=options"
+.PD
+Pass target specific information to the disassembler. Only supported on
+some targets. If it is necessary to specify more than one
+disassembler option then multiple \fB\-M\fR options can be used or
+can be placed together into a comma separated list.
+.Sp
+If the target is an \s-1ARM\s0 architecture then this switch can be used to
+select which register name set is used during disassembler. Specifying
+\&\fB\-M reg-names-std\fR (the default) will select the register names as
+used in \s-1ARM\s0's instruction set documentation, but with register 13 called
+\&'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying
+\&\fB\-M reg-names-apcs\fR will select the name set used by the \s-1ARM\s0
+Procedure Call Standard, whilst specifying \fB\-M reg-names-raw\fR will
+just use \fBr\fR followed by the register number.
+.Sp
+There are also two variants on the \s-1APCS\s0 register naming scheme enabled
+by \fB\-M reg-names-atpcs\fR and \fB\-M reg-names-special-atpcs\fR which
+use the ARM/Thumb Procedure Call Standard naming conventions. (Either
+with the normal register names or the special register names).
+.Sp
+This option can also be used for \s-1ARM\s0 architectures to force the
+disassembler to interpret all instructions as Thumb instructions by
+using the switch \fB\-\-disassembler\-options=force\-thumb\fR. This can be
+useful when attempting to disassemble thumb code produced by other
+compilers.
+.Sp
+For the x86, some of the options duplicate functions of the \fB\-m\fR
+switch, but allow finer grained control. Multiple selections from the
+following may be specified as a comma separated string.
+\&\fBx86\-64\fR, \fBi386\fR and \fBi8086\fR select disassembly for
+the given architecture. \fBintel\fR and \fBatt\fR select between
+intel syntax mode and \s-1AT&T\s0 syntax mode. \fBaddr64\fR, \fBaddr32\fR,
+\&\fBaddr16\fR, \fBdata32\fR and \fBdata16\fR specify the default
+address size and operand size. These four options will be overridden if
+\&\fBx86\-64\fR, \fBi386\fR or \fBi8086\fR appear later in the
+option string. Lastly, \fBsuffix\fR, when in \s-1AT&T\s0 mode,
+instructs the disassembler to print a mnemonic suffix even when the
+suffix could be inferred by the operands.
+.Sp
+For \s-1PPC\s0, \fBbooke\fR, \fBbooke32\fR and \fBbooke64\fR select
+disassembly of BookE instructions. \fB32\fR and \fB64\fR select
+PowerPC and PowerPC64 disassembly, respectively. \fBe300\fR selects
+disassembly for the e300 family. \fB440\fR selects disassembly for
+the PowerPC 440.
+.Sp
+For \s-1MIPS\s0, this option controls the printing of instruction mnemonic
+names and register names in disassembled instructions. Multiple
+selections from the following may be specified as a comma separated
+string, and invalid options are ignored:
+.RS 4
+.ie n .IP """no\-aliases""" 4
+.el .IP "\f(CWno\-aliases\fR" 4
+.IX Item "no-aliases"
+Print the 'raw' instruction mnemonic instead of some pseudo
+instruction mnemonic. I.e., print 'daddu' or 'or' instead of 'move',
+\&'sll' instead of 'nop', etc.
+.ie n .IP """gpr\-names=\f(CIABI\f(CW""" 4
+.el .IP "\f(CWgpr\-names=\f(CIABI\f(CW\fR" 4
+.IX Item "gpr-names=ABI"
+Print \s-1GPR\s0 (general-purpose register) names as appropriate
+for the specified \s-1ABI\s0. By default, \s-1GPR\s0 names are selected according to
+the \s-1ABI\s0 of the binary being disassembled.
+.ie n .IP """fpr\-names=\f(CIABI\f(CW""" 4
+.el .IP "\f(CWfpr\-names=\f(CIABI\f(CW\fR" 4
+.IX Item "fpr-names=ABI"
+Print \s-1FPR\s0 (floating-point register) names as
+appropriate for the specified \s-1ABI\s0. By default, \s-1FPR\s0 numbers are printed
+rather than names.
+.ie n .IP """cp0\-names=\f(CIARCH\f(CW""" 4
+.el .IP "\f(CWcp0\-names=\f(CIARCH\f(CW\fR" 4
+.IX Item "cp0-names=ARCH"
+Print \s-1CP0\s0 (system control coprocessor; coprocessor 0) register names
+as appropriate for the \s-1CPU\s0 or architecture specified by
+\&\fI\s-1ARCH\s0\fR. By default, \s-1CP0\s0 register names are selected according to
+the architecture and \s-1CPU\s0 of the binary being disassembled.
+.ie n .IP """hwr\-names=\f(CIARCH\f(CW""" 4
+.el .IP "\f(CWhwr\-names=\f(CIARCH\f(CW\fR" 4
+.IX Item "hwr-names=ARCH"
+Print \s-1HWR\s0 (hardware register, used by the \f(CW\*(C`rdhwr\*(C'\fR instruction) names
+as appropriate for the \s-1CPU\s0 or architecture specified by
+\&\fI\s-1ARCH\s0\fR. By default, \s-1HWR\s0 names are selected according to
+the architecture and \s-1CPU\s0 of the binary being disassembled.
+.ie n .IP """reg\-names=\f(CIABI\f(CW""" 4
+.el .IP "\f(CWreg\-names=\f(CIABI\f(CW\fR" 4
+.IX Item "reg-names=ABI"
+Print \s-1GPR\s0 and \s-1FPR\s0 names as appropriate for the selected \s-1ABI\s0.
+.ie n .IP """reg\-names=\f(CIARCH\f(CW""" 4
+.el .IP "\f(CWreg\-names=\f(CIARCH\f(CW\fR" 4
+.IX Item "reg-names=ARCH"
+Print CPU-specific register names (\s-1CP0\s0 register and \s-1HWR\s0 names)
+as appropriate for the selected \s-1CPU\s0 or architecture.
+.RE
+.RS 4
+.Sp
+For any of the options listed above, \fI\s-1ABI\s0\fR or
+\&\fI\s-1ARCH\s0\fR may be specified as \fBnumeric\fR to have numbers printed
+rather than names, for the selected types of registers.
+You can list the available values of \fI\s-1ABI\s0\fR and \fI\s-1ARCH\s0\fR using
+the \fB\-\-help\fR option.
+.Sp
+For \s-1VAX\s0, you can specify function entry addresses with \fB\-M
+entry:0xf00ba\fR. You can use this multiple times to properly
+disassemble \s-1VAX\s0 binary files that don't contain symbol tables (like
+\&\s-1ROM\s0 dumps). In these cases, the function entry mask would otherwise
+be decoded as \s-1VAX\s0 instructions, which would probably lead the rest
+of the function being wrongly disassembled.
+.RE
+.IP "\fB\-p\fR" 4
+.IX Item "-p"
+.PD 0
+.IP "\fB\-\-private\-headers\fR" 4
+.IX Item "--private-headers"
+.PD
+Print information that is specific to the object file format. The exact
+information printed depends upon the object file format. For some
+object file formats, no additional information is printed.
+.IP "\fB\-r\fR" 4
+.IX Item "-r"
+.PD 0
+.IP "\fB\-\-reloc\fR" 4
+.IX Item "--reloc"
+.PD
+Print the relocation entries of the file. If used with \fB\-d\fR or
+\&\fB\-D\fR, the relocations are printed interspersed with the
+disassembly.
+.IP "\fB\-R\fR" 4
+.IX Item "-R"
+.PD 0
+.IP "\fB\-\-dynamic\-reloc\fR" 4
+.IX Item "--dynamic-reloc"
+.PD
+Print the dynamic relocation entries of the file. This is only
+meaningful for dynamic objects, such as certain types of shared
+libraries.
+.IP "\fB\-s\fR" 4
+.IX Item "-s"
+.PD 0
+.IP "\fB\-\-full\-contents\fR" 4
+.IX Item "--full-contents"
+.PD
+Display the full contents of any sections requested. By default all
+non-empty sections are displayed.
+.IP "\fB\-S\fR" 4
+.IX Item "-S"
+.PD 0
+.IP "\fB\-\-source\fR" 4
+.IX Item "--source"
+.PD
+Display source code intermixed with disassembly, if possible. Implies
+\&\fB\-d\fR.
+.IP "\fB\-\-show\-raw\-insn\fR" 4
+.IX Item "--show-raw-insn"
+When disassembling instructions, print the instruction in hex as well as
+in symbolic form. This is the default except when
+\&\fB\-\-prefix\-addresses\fR is used.
+.IP "\fB\-\-no\-show\-raw\-insn\fR" 4
+.IX Item "--no-show-raw-insn"
+When disassembling instructions, do not print the instruction bytes.
+This is the default when \fB\-\-prefix\-addresses\fR is used.
+.IP "\fB\-W\fR" 4
+.IX Item "-W"
+.PD 0
+.IP "\fB\-\-dwarf\fR" 4
+.IX Item "--dwarf"
+.PD
+Displays the contents of the \s-1DWARF\s0 debug sections in the file, if any
+are present.
+.IP "\fB\-G\fR" 4
+.IX Item "-G"
+.PD 0
+.IP "\fB\-\-stabs\fR" 4
+.IX Item "--stabs"
+.PD
+Display the full contents of any sections requested. Display the
+contents of the .stab and .stab.index and .stab.excl sections from an
+\&\s-1ELF\s0 file. This is only useful on systems (such as Solaris 2.0) in which
+\&\f(CW\*(C`.stab\*(C'\fR debugging symbol-table entries are carried in an \s-1ELF\s0
+section. In most other file formats, debugging symbol-table entries are
+interleaved with linkage symbols, and are visible in the \fB\-\-syms\fR
+output.
+.IP "\fB\-\-start\-address=\fR\fIaddress\fR" 4
+.IX Item "--start-address=address"
+Start displaying data at the specified address. This affects the output
+of the \fB\-d\fR, \fB\-r\fR and \fB\-s\fR options.
+.IP "\fB\-\-stop\-address=\fR\fIaddress\fR" 4
+.IX Item "--stop-address=address"
+Stop displaying data at the specified address. This affects the output
+of the \fB\-d\fR, \fB\-r\fR and \fB\-s\fR options.
+.IP "\fB\-t\fR" 4
+.IX Item "-t"
+.PD 0
+.IP "\fB\-\-syms\fR" 4
+.IX Item "--syms"
+.PD
+Print the symbol table entries of the file.
+This is similar to the information provided by the \fBnm\fR program.
+.IP "\fB\-T\fR" 4
+.IX Item "-T"
+.PD 0
+.IP "\fB\-\-dynamic\-syms\fR" 4
+.IX Item "--dynamic-syms"
+.PD
+Print the dynamic symbol table entries of the file. This is only
+meaningful for dynamic objects, such as certain types of shared
+libraries. This is similar to the information provided by the \fBnm\fR
+program when given the \fB\-D\fR (\fB\-\-dynamic\fR) option.
+.IP "\fB\-\-special\-syms\fR" 4
+.IX Item "--special-syms"
+When displaying symbols include those which the target considers to be
+special in some way and which would not normally be of interest to the
+user.
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Print the version number of \fBobjdump\fR and exit.
+.IP "\fB\-x\fR" 4
+.IX Item "-x"
+.PD 0
+.IP "\fB\-\-all\-headers\fR" 4
+.IX Item "--all-headers"
+.PD
+Display all available header information, including the symbol table and
+relocation entries. Using \fB\-x\fR is equivalent to specifying all of
+\&\fB\-a \-f \-h \-p \-r \-t\fR.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+.PD 0
+.IP "\fB\-\-wide\fR" 4
+.IX Item "--wide"
+.PD
+Format some lines for output devices that have more than 80 columns.
+Also do not truncate symbol names when they are displayed.
+.IP "\fB\-z\fR" 4
+.IX Item "-z"
+.PD 0
+.IP "\fB\-\-disassemble\-zeroes\fR" 4
+.IX Item "--disassemble-zeroes"
+.PD
+Normally the disassembly output will skip blocks of zeroes. This
+option directs the disassembler to disassemble those blocks, just like
+any other data.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fInm\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/ranlib/ranlib.1 b/gnu/usr.bin/binutils/ranlib/ranlib.1
new file mode 100644
index 0000000000000..88a10e646b517
--- /dev/null
+++ b/gnu/usr.bin/binutils/ranlib/ranlib.1
@@ -0,0 +1,189 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RANLIB 1"
+.TH RANLIB 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+ranlib \- generate index to archive.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+ranlib [\fB\-vV\fR] \fIarchive\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBranlib\fR generates an index to the contents of an archive and
+stores it in the archive. The index lists each symbol defined by a
+member of an archive that is a relocatable object file.
+.PP
+You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index.
+.PP
+An archive with such an index speeds up linking to the library and
+allows routines in the library to call each other without regard to
+their placement in the archive.
+.PP
+The \s-1GNU\s0 \fBranlib\fR program is another form of \s-1GNU\s0 \fBar\fR; running
+\&\fBranlib\fR is completely equivalent to executing \fBar \-s\fR.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Show the version number of \fBranlib\fR.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIar\fR\|(1), \fInm\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/readelf/Makefile b/gnu/usr.bin/binutils/readelf/Makefile
index 8a50e06304e0e..d90c3bcc9cc9f 100644
--- a/gnu/usr.bin/binutils/readelf/Makefile
+++ b/gnu/usr.bin/binutils/readelf/Makefile
@@ -9,7 +9,6 @@ BINDIR=/usr/bin
PROG= readelf
SRCS= ${PROG}.c
-WARNS?= 0
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils -I${SRCDIR}/binutils
diff --git a/gnu/usr.bin/binutils/readelf/readelf.1 b/gnu/usr.bin/binutils/readelf/readelf.1
new file mode 100644
index 0000000000000..e246d2ce28849
--- /dev/null
+++ b/gnu/usr.bin/binutils/readelf/readelf.1
@@ -0,0 +1,377 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "READELF 1"
+.TH READELF 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+readelf \- Displays information about ELF files.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+readelf [\fB\-a\fR|\fB\-\-all\fR]
+ [\fB\-h\fR|\fB\-\-file\-header\fR]
+ [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
+ [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
+ [\fB\-g\fR|\fB\-\-section\-groups\fR]
+ [\fB\-t\fR|\fB\-\-section\-details\fR]
+ [\fB\-e\fR|\fB\-\-headers\fR]
+ [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
+ [\fB\-n\fR|\fB\-\-notes\fR]
+ [\fB\-r\fR|\fB\-\-relocs\fR]
+ [\fB\-u\fR|\fB\-\-unwind\fR]
+ [\fB\-d\fR|\fB\-\-dynamic\fR]
+ [\fB\-V\fR|\fB\-\-version\-info\fR]
+ [\fB\-A\fR|\fB\-\-arch\-specific\fR]
+ [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
+ [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
+ [\fB\-w[liaprmfFsoR]\fR|
+ \fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]]
+ [\fB\-I\fR|\fB\-histogram\fR]
+ [\fB\-v\fR|\fB\-\-version\fR]
+ [\fB\-W\fR|\fB\-\-wide\fR]
+ [\fB\-H\fR|\fB\-\-help\fR]
+ \fIelffile\fR...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
+files. The options control what particular information to display.
+.PP
+\&\fIelffile\fR... are the object files to be examined. 32\-bit and
+64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
+.PP
+This program performs a similar function to \fBobjdump\fR but it
+goes into more detail and it exists independently of the \s-1BFD\s0
+library, so if there is a bug in \s-1BFD\s0 then readelf will not be
+affected.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The long and short forms of options, shown here as alternatives, are
+equivalent. At least one option besides \fB\-v\fR or \fB\-H\fR must be
+given.
+.IP "\fB\-a\fR" 4
+.IX Item "-a"
+.PD 0
+.IP "\fB\-\-all\fR" 4
+.IX Item "--all"
+.PD
+Equivalent to specifying \fB\-\-file\-header\fR,
+\&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
+\&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR and
+\&\fB\-\-version\-info\fR.
+.IP "\fB\-h\fR" 4
+.IX Item "-h"
+.PD 0
+.IP "\fB\-\-file\-header\fR" 4
+.IX Item "--file-header"
+.PD
+Displays the information contained in the \s-1ELF\s0 header at the start of the
+file.
+.IP "\fB\-l\fR" 4
+.IX Item "-l"
+.PD 0
+.IP "\fB\-\-program\-headers\fR" 4
+.IX Item "--program-headers"
+.IP "\fB\-\-segments\fR" 4
+.IX Item "--segments"
+.PD
+Displays the information contained in the file's segment headers, if it
+has any.
+.IP "\fB\-S\fR" 4
+.IX Item "-S"
+.PD 0
+.IP "\fB\-\-sections\fR" 4
+.IX Item "--sections"
+.IP "\fB\-\-section\-headers\fR" 4
+.IX Item "--section-headers"
+.PD
+Displays the information contained in the file's section headers, if it
+has any.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+.PD 0
+.IP "\fB\-\-section\-groups\fR" 4
+.IX Item "--section-groups"
+.PD
+Displays the information contained in the file's section groups, if it
+has any.
+.IP "\fB\-t\fR" 4
+.IX Item "-t"
+.PD 0
+.IP "\fB\-\-section\-details\fR" 4
+.IX Item "--section-details"
+.PD
+Displays the detailed section information. Implies \fB\-S\fR.
+.IP "\fB\-s\fR" 4
+.IX Item "-s"
+.PD 0
+.IP "\fB\-\-symbols\fR" 4
+.IX Item "--symbols"
+.IP "\fB\-\-syms\fR" 4
+.IX Item "--syms"
+.PD
+Displays the entries in symbol table section of the file, if it has one.
+.IP "\fB\-e\fR" 4
+.IX Item "-e"
+.PD 0
+.IP "\fB\-\-headers\fR" 4
+.IX Item "--headers"
+.PD
+Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR.
+.IP "\fB\-n\fR" 4
+.IX Item "-n"
+.PD 0
+.IP "\fB\-\-notes\fR" 4
+.IX Item "--notes"
+.PD
+Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
+.IP "\fB\-r\fR" 4
+.IX Item "-r"
+.PD 0
+.IP "\fB\-\-relocs\fR" 4
+.IX Item "--relocs"
+.PD
+Displays the contents of the file's relocation section, if it has one.
+.IP "\fB\-u\fR" 4
+.IX Item "-u"
+.PD 0
+.IP "\fB\-\-unwind\fR" 4
+.IX Item "--unwind"
+.PD
+Displays the contents of the file's unwind section, if it has one. Only
+the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
+.IP "\fB\-d\fR" 4
+.IX Item "-d"
+.PD 0
+.IP "\fB\-\-dynamic\fR" 4
+.IX Item "--dynamic"
+.PD
+Displays the contents of the file's dynamic section, if it has one.
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
+.IP "\fB\-\-version\-info\fR" 4
+.IX Item "--version-info"
+.PD
+Displays the contents of the version sections in the file, it they
+exist.
+.IP "\fB\-A\fR" 4
+.IX Item "-A"
+.PD 0
+.IP "\fB\-\-arch\-specific\fR" 4
+.IX Item "--arch-specific"
+.PD
+Displays architecture-specific information in the file, if there
+is any.
+.IP "\fB\-D\fR" 4
+.IX Item "-D"
+.PD 0
+.IP "\fB\-\-use\-dynamic\fR" 4
+.IX Item "--use-dynamic"
+.PD
+When displaying symbols, this option makes \fBreadelf\fR use the
+symbol table in the file's dynamic section, rather than the one in the
+symbols section.
+.IP "\fB\-x <number or name>\fR" 4
+.IX Item "-x <number or name>"
+.PD 0
+.IP "\fB\-\-hex\-dump=<number or name>\fR" 4
+.IX Item "--hex-dump=<number or name>"
+.PD
+Displays the contents of the indicated section as a hexadecimal dump.
+A number identifies a particular section by index in the section table;
+any other string identifies all sections with that name in the object file.
+.IP "\fB\-w[liaprmfFsoR]\fR" 4
+.IX Item "-w[liaprmfFsoR]"
+.PD 0
+.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]\fR" 4
+.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]"
+.PD
+Displays the contents of the debug sections in the file, if any are
+present. If one of the optional letters or words follows the switch
+then only data found in those specific sections will be dumped.
+.IP "\fB\-I\fR" 4
+.IX Item "-I"
+.PD 0
+.IP "\fB\-\-histogram\fR" 4
+.IX Item "--histogram"
+.PD
+Display a histogram of bucket list lengths when displaying the contents
+of the symbol tables.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Display the version number of readelf.
+.IP "\fB\-W\fR" 4
+.IX Item "-W"
+.PD 0
+.IP "\fB\-\-wide\fR" 4
+.IX Item "--wide"
+.PD
+Don't break output lines to fit into 80 columns. By default
+\&\fBreadelf\fR breaks section header and segment listing lines for
+64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
+\&\fBreadelf\fR to print each section header resp. each segment one a
+single line, which is far more readable on terminals wider than 80 columns.
+.IP "\fB\-H\fR" 4
+.IX Item "-H"
+.PD 0
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+.PD
+Display the command line options understood by \fBreadelf\fR.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/size/Makefile b/gnu/usr.bin/binutils/size/Makefile
index dc1f896fb7e6e..c5c19c1908e98 100644
--- a/gnu/usr.bin/binutils/size/Makefile
+++ b/gnu/usr.bin/binutils/size/Makefile
@@ -6,7 +6,6 @@
PROG= size
SRCS= size.c
-WARNS?= 2
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils
diff --git a/gnu/usr.bin/binutils/size/size.1 b/gnu/usr.bin/binutils/size/size.1
new file mode 100644
index 0000000000000..3f90967e59361
--- /dev/null
+++ b/gnu/usr.bin/binutils/size/size.1
@@ -0,0 +1,263 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "SIZE 1"
+.TH SIZE 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+size \- list section sizes and total size.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+size [\fB\-A\fR|\fB\-B\fR|\fB\-\-format=\fR\fIcompatibility\fR]
+ [\fB\-\-help\fR]
+ [\fB\-d\fR|\fB\-o\fR|\fB\-x\fR|\fB\-\-radix=\fR\fInumber\fR]
+ [\fB\-t\fR|\fB\-\-totals\fR]
+ [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-V\fR|\fB\-\-version\fR]
+ [\fIobjfile\fR...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The \s-1GNU\s0 \fBsize\fR utility lists the section sizes\-\-\-and the total
+size\-\-\-for each of the object or archive files \fIobjfile\fR in its
+argument list. By default, one line of output is generated for each
+object file or each module in an archive.
+.PP
+\&\fIobjfile\fR... are the object files to be examined.
+If none are specified, the file \f(CW\*(C`a.out\*(C'\fR will be used.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The command line options have the following meanings:
+.IP "\fB\-A\fR" 4
+.IX Item "-A"
+.PD 0
+.IP "\fB\-B\fR" 4
+.IX Item "-B"
+.IP "\fB\-\-format=\fR\fIcompatibility\fR" 4
+.IX Item "--format=compatibility"
+.PD
+Using one of these options, you can choose whether the output from \s-1GNU\s0
+\&\fBsize\fR resembles output from System V \fBsize\fR (using \fB\-A\fR,
+or \fB\-\-format=sysv\fR), or Berkeley \fBsize\fR (using \fB\-B\fR, or
+\&\fB\-\-format=berkeley\fR). The default is the one-line format similar to
+Berkeley's.
+.Sp
+Here is an example of the Berkeley (default) format of output from
+\&\fBsize\fR:
+.Sp
+.Vb 4
+\& $ size \-\-format=Berkeley ranlib size
+\& text data bss dec hex filename
+\& 294880 81920 11592 388392 5ed28 ranlib
+\& 294880 81920 11888 388688 5ee50 size
+.Ve
+.Sp
+This is the same data, but displayed closer to System V conventions:
+.Sp
+.Vb 7
+\& $ size \-\-format=SysV ranlib size
+\& ranlib :
+\& section size addr
+\& .text 294880 8192
+\& .data 81920 303104
+\& .bss 11592 385024
+\& Total 388392
+\&
+\&
+\& size :
+\& section size addr
+\& .text 294880 8192
+\& .data 81920 303104
+\& .bss 11888 385024
+\& Total 388688
+.Ve
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Show a summary of acceptable arguments and options.
+.IP "\fB\-d\fR" 4
+.IX Item "-d"
+.PD 0
+.IP "\fB\-o\fR" 4
+.IX Item "-o"
+.IP "\fB\-x\fR" 4
+.IX Item "-x"
+.IP "\fB\-\-radix=\fR\fInumber\fR" 4
+.IX Item "--radix=number"
+.PD
+Using one of these options, you can control whether the size of each
+section is given in decimal (\fB\-d\fR, or \fB\-\-radix=10\fR); octal
+(\fB\-o\fR, or \fB\-\-radix=8\fR); or hexadecimal (\fB\-x\fR, or
+\&\fB\-\-radix=16\fR). In \fB\-\-radix=\fR\fInumber\fR, only the three
+values (8, 10, 16) are supported. The total size is always given in two
+radices; decimal and hexadecimal for \fB\-d\fR or \fB\-x\fR output, or
+octal and hexadecimal if you're using \fB\-o\fR.
+.IP "\fB\-t\fR" 4
+.IX Item "-t"
+.PD 0
+.IP "\fB\-\-totals\fR" 4
+.IX Item "--totals"
+.PD
+Show totals of all objects listed (Berkeley format listing mode only).
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+Specify that the object-code format for \fIobjfile\fR is
+\&\fIbfdname\fR. This option may not be necessary; \fBsize\fR can
+automatically recognize many formats.
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Display the version number of \fBsize\fR.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/strings/Makefile b/gnu/usr.bin/binutils/strings/Makefile
index 0f80db4a4a8bf..a432d51ddf654 100644
--- a/gnu/usr.bin/binutils/strings/Makefile
+++ b/gnu/usr.bin/binutils/strings/Makefile
@@ -6,7 +6,6 @@
PROG= strings
SRCS= strings.c
-WARNS?= 2
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils
diff --git a/gnu/usr.bin/binutils/strings/strings.1 b/gnu/usr.bin/binutils/strings/strings.1
new file mode 100644
index 0000000000000..075e3a5d8a58e
--- /dev/null
+++ b/gnu/usr.bin/binutils/strings/strings.1
@@ -0,0 +1,254 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "STRINGS 1"
+.TH STRINGS 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+strings \- print the strings of printable characters in files.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+strings [\fB\-afov\fR] [\fB\-\fR\fImin-len\fR]
+ [\fB\-n\fR \fImin-len\fR] [\fB\-\-bytes=\fR\fImin-len\fR]
+ [\fB\-t\fR \fIradix\fR] [\fB\-\-radix=\fR\fIradix\fR]
+ [\fB\-e\fR \fIencoding\fR] [\fB\-\-encoding=\fR\fIencoding\fR]
+ [\fB\-\fR] [\fB\-\-all\fR] [\fB\-\-print\-file\-name\fR]
+ [\fB\-T\fR \fIbfdname\fR] [\fB\-\-target=\fR\fIbfdname\fR]
+ [\fB\-\-help\fR] [\fB\-\-version\fR] \fIfile\fR...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+For each \fIfile\fR given, \s-1GNU\s0 \fBstrings\fR prints the printable
+character sequences that are at least 4 characters long (or the number
+given with the options below) and are followed by an unprintable
+character. By default, it only prints the strings from the initialized
+and loaded sections of object files; for other types of files, it prints
+the strings from the whole file.
+.PP
+\&\fBstrings\fR is mainly useful for determining the contents of non-text
+files.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-a\fR" 4
+.IX Item "-a"
+.PD 0
+.IP "\fB\-\-all\fR" 4
+.IX Item "--all"
+.IP "\fB\-\fR" 4
+.IX Item "-"
+.PD
+Do not scan only the initialized and loaded sections of object files;
+scan the whole files.
+.IP "\fB\-f\fR" 4
+.IX Item "-f"
+.PD 0
+.IP "\fB\-\-print\-file\-name\fR" 4
+.IX Item "--print-file-name"
+.PD
+Print the name of the file before each string.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Print a summary of the program usage on the standard output and exit.
+.IP "\fB\-\fR\fImin-len\fR" 4
+.IX Item "-min-len"
+.PD 0
+.IP "\fB\-n\fR \fImin-len\fR" 4
+.IX Item "-n min-len"
+.IP "\fB\-\-bytes=\fR\fImin-len\fR" 4
+.IX Item "--bytes=min-len"
+.PD
+Print sequences of characters that are at least \fImin-len\fR characters
+long, instead of the default 4.
+.IP "\fB\-o\fR" 4
+.IX Item "-o"
+Like \fB\-t o\fR. Some other versions of \fBstrings\fR have \fB\-o\fR
+act like \fB\-t d\fR instead. Since we can not be compatible with both
+ways, we simply chose one.
+.IP "\fB\-t\fR \fIradix\fR" 4
+.IX Item "-t radix"
+.PD 0
+.IP "\fB\-\-radix=\fR\fIradix\fR" 4
+.IX Item "--radix=radix"
+.PD
+Print the offset within the file before each string. The single
+character argument specifies the radix of the offset\-\-\-\fBo\fR for
+octal, \fBx\fR for hexadecimal, or \fBd\fR for decimal.
+.IP "\fB\-e\fR \fIencoding\fR" 4
+.IX Item "-e encoding"
+.PD 0
+.IP "\fB\-\-encoding=\fR\fIencoding\fR" 4
+.IX Item "--encoding=encoding"
+.PD
+Select the character encoding of the strings that are to be found.
+Possible values for \fIencoding\fR are: \fBs\fR = single\-7\-bit\-byte
+characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR =
+single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR =
+16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit
+littleendian. Useful for finding wide character strings.
+.IP "\fB\-T\fR \fIbfdname\fR" 4
+.IX Item "-T bfdname"
+.PD 0
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+.PD
+Specify an object code format other than your system's default format.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Print the program version number on the standard output and exit.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), \fIreadelf\fR\|(1)
+and the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/binutils/strip/Makefile b/gnu/usr.bin/binutils/strip/Makefile
index a3ed45aeafe0b..d3cf8c454cdc2 100644
--- a/gnu/usr.bin/binutils/strip/Makefile
+++ b/gnu/usr.bin/binutils/strip/Makefile
@@ -6,7 +6,6 @@
PROG= strip
SRCS= objcopy.c is-strip.c
-WARNS?= 2
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils -I${SRCDIR}/bfd
diff --git a/gnu/usr.bin/binutils/strip/strip.1 b/gnu/usr.bin/binutils/strip/strip.1
new file mode 100644
index 0000000000000..5eb714dd88a5b
--- /dev/null
+++ b/gnu/usr.bin/binutils/strip/strip.1
@@ -0,0 +1,392 @@
+.\" $FreeBSD$
+.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "STRIP 1"
+.TH STRIP 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+strip \- Discard symbols from object files.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR]
+ [\fB\-I\fR \fIbfdname\fR |\fB\-\-input\-target=\fR\fIbfdname\fR]
+ [\fB\-O\fR \fIbfdname\fR |\fB\-\-output\-target=\fR\fIbfdname\fR]
+ [\fB\-s\fR|\fB\-\-strip\-all\fR]
+ [\fB\-S\fR|\fB\-g\fR|\fB\-d\fR|\fB\-\-strip\-debug\fR]
+ [\fB\-K\fR \fIsymbolname\fR |\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-N\fR \fIsymbolname\fR |\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
+ [\fB\-w\fR|\fB\-\-wildcard\fR]
+ [\fB\-x\fR|\fB\-\-discard\-all\fR] [\fB\-X\fR |\fB\-\-discard\-locals\fR]
+ [\fB\-R\fR \fIsectionname\fR |\fB\-\-remove\-section=\fR\fIsectionname\fR]
+ [\fB\-o\fR \fIfile\fR] [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
+ [\fB\-\-keep\-file\-symbols\fR]
+ [\fB\-\-only\-keep\-debug\fR]
+ [\fB\-v\fR |\fB\-\-verbose\fR] [\fB\-V\fR|\fB\-\-version\fR]
+ [\fB\-\-help\fR] [\fB\-\-info\fR]
+ \fIobjfile\fR...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1GNU\s0 \fBstrip\fR discards all symbols from object files
+\&\fIobjfile\fR. The list of object files may include archives.
+At least one object file must be given.
+.PP
+\&\fBstrip\fR modifies the files named in its argument,
+rather than writing modified copies under different names.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-F\fR \fIbfdname\fR" 4
+.IX Item "-F bfdname"
+.PD 0
+.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
+.IX Item "--target=bfdname"
+.PD
+Treat the original \fIobjfile\fR as a file with the object
+code format \fIbfdname\fR, and rewrite it in the same format.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Show a summary of the options to \fBstrip\fR and exit.
+.IP "\fB\-\-info\fR" 4
+.IX Item "--info"
+Display a list showing all architectures and object formats available.
+.IP "\fB\-I\fR \fIbfdname\fR" 4
+.IX Item "-I bfdname"
+.PD 0
+.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
+.IX Item "--input-target=bfdname"
+.PD
+Treat the original \fIobjfile\fR as a file with the object
+code format \fIbfdname\fR.
+.IP "\fB\-O\fR \fIbfdname\fR" 4
+.IX Item "-O bfdname"
+.PD 0
+.IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4
+.IX Item "--output-target=bfdname"
+.PD
+Replace \fIobjfile\fR with a file in the output format \fIbfdname\fR.
+.IP "\fB\-R\fR \fIsectionname\fR" 4
+.IX Item "-R sectionname"
+.PD 0
+.IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4
+.IX Item "--remove-section=sectionname"
+.PD
+Remove any section named \fIsectionname\fR from the output file. This
+option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+.IP "\fB\-s\fR" 4
+.IX Item "-s"
+.PD 0
+.IP "\fB\-\-strip\-all\fR" 4
+.IX Item "--strip-all"
+.PD
+Remove all symbols.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+.PD 0
+.IP "\fB\-S\fR" 4
+.IX Item "-S"
+.IP "\fB\-d\fR" 4
+.IX Item "-d"
+.IP "\fB\-\-strip\-debug\fR" 4
+.IX Item "--strip-debug"
+.PD
+Remove debugging symbols only.
+.IP "\fB\-\-strip\-unneeded\fR" 4
+.IX Item "--strip-unneeded"
+Remove all symbols that are not needed for relocation processing.
+.IP "\fB\-K\fR \fIsymbolname\fR" 4
+.IX Item "-K symbolname"
+.PD 0
+.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--keep-symbol=symbolname"
+.PD
+When stripping symbols, keep symbol \fIsymbolname\fR even if it would
+normally be stripped. This option may be given more than once.
+.IP "\fB\-N\fR \fIsymbolname\fR" 4
+.IX Item "-N symbolname"
+.PD 0
+.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4
+.IX Item "--strip-symbol=symbolname"
+.PD
+Remove symbol \fIsymbolname\fR from the source file. This option may be
+given more than once, and may be combined with strip options other than
+\&\fB\-K\fR.
+.IP "\fB\-o\fR \fIfile\fR" 4
+.IX Item "-o file"
+Put the stripped output in \fIfile\fR, rather than replacing the
+existing file. When this argument is used, only one \fIobjfile\fR
+argument may be specified.
+.IP "\fB\-p\fR" 4
+.IX Item "-p"
+.PD 0
+.IP "\fB\-\-preserve\-dates\fR" 4
+.IX Item "--preserve-dates"
+.PD
+Preserve the access and modification dates of the file.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+.PD 0
+.IP "\fB\-\-wildcard\fR" 4
+.IX Item "--wildcard"
+.PD
+Permit regular expressions in \fIsymbolname\fRs used in other command
+line options. The question mark (?), asterisk (*), backslash (\e) and
+square brackets ([]) operators can be used anywhere in the symbol
+name. If the first character of the symbol name is the exclamation
+point (!) then the sense of the switch is reversed for that symbol.
+For example:
+.Sp
+.Vb 1
+\& \-w \-K !foo \-K fo*
+.Ve
+.Sp
+would cause strip to only keep symbols that start with the letters
+\&\*(L"fo\*(R", but to discard the symbol \*(L"foo\*(R".
+.IP "\fB\-x\fR" 4
+.IX Item "-x"
+.PD 0
+.IP "\fB\-\-discard\-all\fR" 4
+.IX Item "--discard-all"
+.PD
+Remove non-global symbols.
+.IP "\fB\-X\fR" 4
+.IX Item "-X"
+.PD 0
+.IP "\fB\-\-discard\-locals\fR" 4
+.IX Item "--discard-locals"
+.PD
+Remove compiler-generated local symbols.
+(These usually start with \fBL\fR or \fB.\fR.)
+.IP "\fB\-\-keep\-file\-symbols\fR" 4
+.IX Item "--keep-file-symbols"
+When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
+\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names,
+which would otherwise get stripped.
+.IP "\fB\-\-only\-keep\-debug\fR" 4
+.IX Item "--only-keep-debug"
+Strip a file, removing contents of any sections that would not be
+stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections
+intact. In \s-1ELF\s0 files, this preserves all note sections in the output.
+.Sp
+The intention is that this option will be used in conjunction with
+\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
+stripped binary which will occupy less space in \s-1RAM\s0 and in a
+distribution and the second a debugging information file which is only
+needed if debugging abilities are required. The suggested procedure
+to create these files is as follows:
+.RS 4
+.IP "1.<Link the executable as normal. Assuming that is is called>" 4
+.IX Item "1.<Link the executable as normal. Assuming that is is called>"
+\&\f(CW\*(C`foo\*(C'\fR then...
+.ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
+.IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
+create a file containing the debugging info.
+.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
+.IX Item "1.<Run objcopy --strip-debug foo to create a>"
+stripped executable.
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
+to add a link to the debugging info into the stripped executable.
+.RE
+.RS 4
+.Sp
+Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
+file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
+optional. You could instead do this:
+.IP "1.<Link the executable as normal.>" 4
+.IX Item "1.<Link the executable as normal.>"
+.PD 0
+.ie n .IP "1.<Copy ""foo"" to ""foo.full"">" 4
+.el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
+.IX Item "1.<Copy foo to foo.full>"
+.ie n .IP "1.<Run ""strip \-\-strip\-debug foo"">" 4
+.el .IP "1.<Run \f(CWstrip \-\-strip\-debug foo\fR>" 4
+.IX Item "1.<Run strip --strip-debug foo>"
+.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
+.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
+.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
+.RE
+.RS 4
+.PD
+.Sp
+ie the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
+full executable. It does not have to be a file created by the
+\&\fB\-\-only\-keep\-debug\fR switch.
+.Sp
+Note \- this switch is only intended for use on fully linked files. It
+does not make sense to use it on object files where the debugging
+information may be incomplete. Besides the gnu_debuglink feature
+currently only supports the presence of one filename containing
+debugging information, not multiple filenames on a one-per-object-file
+basis.
+.RE
+.IP "\fB\-V\fR" 4
+.IX Item "-V"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Show the version number for \fBstrip\fR.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+.PD 0
+.IP "\fB\-\-verbose\fR" 4
+.IX Item "--verbose"
+.PD
+Verbose output: list all object files modified. In the case of
+archives, \fBstrip \-v\fR lists all members of the archive.
+.IP "\fB@\fR\fIfile\fR" 4
+.IX Item "@file"
+Read command-line options from \fIfile\fR. The options read are
+inserted in place of the original @\fIfile\fR option. If \fIfile\fR
+does not exist, or cannot be read, then the option will be treated
+literally, and not removed.
+.Sp
+Options in \fIfile\fR are separated by whitespace. A whitespace
+character may be included in an option by surrounding the entire
+option in either single or double quotes. Any character (including a
+backslash) may be included by prefixing the character to be included
+with a backslash. The \fIfile\fR may itself contain additional
+@\fIfile\fR options; any such options will be processed recursively.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+the Info entries for \fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h
index 0ed3e972c58f2..bb222307efdeb 100644
--- a/gnu/usr.bin/cc/cc_tools/auto-host.h
+++ b/gnu/usr.bin/cc/cc_tools/auto-host.h
@@ -327,7 +327,7 @@
/* Define 0/1 if your assembler and linker support COMDAT groups. */
#ifndef USED_FOR_TARGET
-#define HAVE_COMDAT_GROUP 0
+#define HAVE_COMDAT_GROUP 1
#endif
@@ -783,7 +783,7 @@
/* Define if your assembler supports .weakref. */
#ifndef USED_FOR_TARGET
-/* #undef HAVE_GAS_WEAKREF */
+#define HAVE_GAS_WEAKREF 1
#endif
@@ -891,7 +891,9 @@
/* Define if your PowerPC64 linker only needs function descriptor syms. */
#ifndef USED_FOR_TARGET
-/* #undef HAVE_LD_NO_DOT_SYMS */
+# ifdef __powerpc64_
+# define HAVE_LD_NO_DOT_SYMS 1
+# endif
#endif
@@ -916,7 +918,7 @@
/* Define if your linker supports --sysroot. */
#ifndef USED_FOR_TARGET
-/* #undef HAVE_LD_SYSROOT */
+#define HAVE_LD_SYSROOT 1
#endif
diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc
index 18dac987c7c9e..2888163467b42 100644
--- a/gnu/usr.bin/gdb/Makefile.inc
+++ b/gnu/usr.bin/gdb/Makefile.inc
@@ -42,8 +42,8 @@ CFLAGS+= -I${TARGET_SUBDIR}
CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_CPUARCH}
CFLAGS+= -I${CNTRB_GDB}/gdb
CFLAGS+= -I${CNTRB_GDB}/gdb/config
-CFLAGS+= -I${CNTRB_GDB}/include
CFLAGS+= -I${CNTRB_BU}/include
+CFLAGS+= -I${CNTRB_GDB}/include
CFLAGS+= -I${CNTRB_BU}/bfd
GENSRCS+= nm.h tm.h
diff --git a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c
index 51890eb48fa0e..129f4f53e35b0 100644
--- a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c
+++ b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c
@@ -42,6 +42,10 @@
#include "gdbcmd.h"
#include "solib-svr4.h"
+#include "gregset.h"
+#ifdef PT_GETXMMREGS
+#include "i387-tdep.h"
+#endif
#define LIBTHREAD_DB_SO "libthread_db.so"
@@ -1660,7 +1664,7 @@ ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid, const prgregset_t gregset)
old_chain = save_inferior_ptid ();
inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
- supply_gregset (gregset);
+ supply_gregset ((gdb_gregset_t *) gregset);
target_store_registers (-1);
do_cleanups (old_chain);
return PS_OK;
@@ -1687,7 +1691,7 @@ ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
old_chain = save_inferior_ptid ();
inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
- supply_fpregset (fpregset);
+ supply_fpregset ((gdb_fpregset_t *) fpregset);
target_store_registers (-1);
do_cleanups (old_chain);
return PS_OK;