From 6028677c969e7e791ff712e60492f0467989f4db Mon Sep 17 00:00:00 2001 From: zrj Date: Sat, 19 Nov 2016 20:50:38 +0200 Subject: [PATCH] binutils227: Add build dirs. It is unclear weather -Wl,z,relro should be on by default in ld.gold. --- gnu/usr.bin/binutils227/Makefile | 13 + gnu/usr.bin/binutils227/Makefile.inc1 | 3 + gnu/usr.bin/binutils227/block1/Makefile | 6 + gnu/usr.bin/binutils227/block1/Makefile.block1 | 39 + gnu/usr.bin/binutils227/block1/bulibs/Makefile | 17 + gnu/usr.bin/binutils227/block1/bulibs/config.h | 284 ++ gnu/usr.bin/binutils227/block1/libbfd/Makefile | 94 + gnu/usr.bin/binutils227/block1/libbfd/config.h | 395 ++ gnu/usr.bin/binutils227/block1/libiberty/Makefile | 70 + gnu/usr.bin/binutils227/block1/libiberty/config.h | 500 +++ gnu/usr.bin/binutils227/block1/libopcodes/Makefile | 20 + gnu/usr.bin/binutils227/block1/libopcodes/config.h | 123 + gnu/usr.bin/binutils227/block2/Makefile | 31 + gnu/usr.bin/binutils227/block2/Makefile.block2 | 32 + gnu/usr.bin/binutils227/block2/addr2line/Makefile | 21 + gnu/usr.bin/binutils227/block2/ar/Makefile | 30 + gnu/usr.bin/binutils227/block2/cxxfilt/Makefile | 21 + gnu/usr.bin/binutils227/block2/cxxfilt/c++filt.1 | 345 ++ gnu/usr.bin/binutils227/block2/elfedit/Makefile | 21 + gnu/usr.bin/binutils227/block2/gas/Makefile | 70 + gnu/usr.bin/binutils227/block2/gas/config.h | 398 ++ .../block2/gas/x86_64-dragonfly/Makefile | 8 + .../block2/gas/x86_64-dragonfly/itbl-cpu.h | 1 + .../block2/gas/x86_64-dragonfly/obj-format.h | 1 + .../block2/gas/x86_64-dragonfly/targ-cpu.h | 1 + .../block2/gas/x86_64-dragonfly/targ-env.h | 1 + gnu/usr.bin/binutils227/block2/gprof/Makefile | 36 + gnu/usr.bin/binutils227/block2/gprof/gconfig.h | 117 + gnu/usr.bin/binutils227/block2/gprof/gprof.1 | 772 ++++ gnu/usr.bin/binutils227/block2/ld/Makefile | 92 + gnu/usr.bin/binutils227/block2/ld/Makefile.x86_64 | 96 + gnu/usr.bin/binutils227/block2/ld/config.h | 238 ++ gnu/usr.bin/binutils227/block2/libgold/Makefile | 60 + gnu/usr.bin/binutils227/block2/libgold/config.h | 284 ++ gnu/usr.bin/binutils227/block2/libgold/yyscript.c | 3872 ++++++++++++++++++++ gnu/usr.bin/binutils227/block2/libgold/yyscript.h | 319 ++ gnu/usr.bin/binutils227/block2/nm/Makefile | 25 + gnu/usr.bin/binutils227/block2/objcopy/Makefile | 24 + gnu/usr.bin/binutils227/block2/objdump/Makefile | 29 + gnu/usr.bin/binutils227/block2/ranlib/Makefile | 30 + gnu/usr.bin/binutils227/block2/readelf/Makefile | 25 + gnu/usr.bin/binutils227/block2/size/Makefile | 21 + gnu/usr.bin/binutils227/block2/strings/Makefile | 20 + gnu/usr.bin/binutils227/block2/strip/Makefile | 24 + gnu/usr.bin/binutils227/block3/Makefile | 8 + gnu/usr.bin/binutils227/block3/Makefile.gld | 47 + .../binutils227/block3/gold-linker/Makefile | 14 + .../binutils227/block3/incremental-dump/Makefile | 20 + 48 files changed, 8718 insertions(+) create mode 100644 gnu/usr.bin/binutils227/Makefile create mode 100644 gnu/usr.bin/binutils227/Makefile.inc1 create mode 100644 gnu/usr.bin/binutils227/block1/Makefile create mode 100644 gnu/usr.bin/binutils227/block1/Makefile.block1 create mode 100644 gnu/usr.bin/binutils227/block1/bulibs/Makefile create mode 100644 gnu/usr.bin/binutils227/block1/bulibs/config.h create mode 100644 gnu/usr.bin/binutils227/block1/libbfd/Makefile create mode 100644 gnu/usr.bin/binutils227/block1/libbfd/config.h create mode 100644 gnu/usr.bin/binutils227/block1/libiberty/Makefile create mode 100644 gnu/usr.bin/binutils227/block1/libiberty/config.h create mode 100644 gnu/usr.bin/binutils227/block1/libopcodes/Makefile create mode 100644 gnu/usr.bin/binutils227/block1/libopcodes/config.h create mode 100644 gnu/usr.bin/binutils227/block2/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/Makefile.block2 create mode 100644 gnu/usr.bin/binutils227/block2/addr2line/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/ar/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/cxxfilt/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/cxxfilt/c++filt.1 create mode 100644 gnu/usr.bin/binutils227/block2/elfedit/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/gas/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/gas/config.h create mode 100644 gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/itbl-cpu.h create mode 100644 gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/obj-format.h create mode 100644 gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-cpu.h create mode 100644 gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-env.h create mode 100644 gnu/usr.bin/binutils227/block2/gprof/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/gprof/gconfig.h create mode 100644 gnu/usr.bin/binutils227/block2/gprof/gprof.1 create mode 100644 gnu/usr.bin/binutils227/block2/ld/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/ld/Makefile.x86_64 create mode 100644 gnu/usr.bin/binutils227/block2/ld/config.h create mode 100644 gnu/usr.bin/binutils227/block2/libgold/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/libgold/config.h create mode 100644 gnu/usr.bin/binutils227/block2/libgold/yyscript.c create mode 100644 gnu/usr.bin/binutils227/block2/libgold/yyscript.h create mode 100644 gnu/usr.bin/binutils227/block2/nm/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/objcopy/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/objdump/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/ranlib/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/readelf/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/size/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/strings/Makefile create mode 100644 gnu/usr.bin/binutils227/block2/strip/Makefile create mode 100644 gnu/usr.bin/binutils227/block3/Makefile create mode 100644 gnu/usr.bin/binutils227/block3/Makefile.gld create mode 100644 gnu/usr.bin/binutils227/block3/gold-linker/Makefile create mode 100644 gnu/usr.bin/binutils227/block3/incremental-dump/Makefile diff --git a/gnu/usr.bin/binutils227/Makefile b/gnu/usr.bin/binutils227/Makefile new file mode 100644 index 0000000000..e47c45ff9e --- /dev/null +++ b/gnu/usr.bin/binutils227/Makefile @@ -0,0 +1,13 @@ +# Binutils 2.27 builds 3 blocks in series +SUBDIR= block1 block2 + +# Don't build gold linker during stage 3 cross-tools unless +# WORLD_LDVER has been set to ld.gold. This same check must be included +# in block 2 where libgold and ld.bfd are built. +.if !defined(SELECT_LINKER) || ${SELECT_LINKER:Mld.gold} +SUBDIR+= block3 +.endif + +SUBDIR_ORDERED= ${SUBDIR} + +.include diff --git a/gnu/usr.bin/binutils227/Makefile.inc1 b/gnu/usr.bin/binutils227/Makefile.inc1 new file mode 100644 index 0000000000..d9f35cd898 --- /dev/null +++ b/gnu/usr.bin/binutils227/Makefile.inc1 @@ -0,0 +1,3 @@ +BINDIR?= /usr/libexec/binutils227/elf +BUVERSION= binutils227 +.include "../Makefile.buo" diff --git a/gnu/usr.bin/binutils227/block1/Makefile b/gnu/usr.bin/binutils227/block1/Makefile new file mode 100644 index 0000000000..68f31d7af2 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/Makefile @@ -0,0 +1,6 @@ +# Build in parallel +SUBDIR= libbfd libiberty libopcodes bulibs + +SUBDIR_ORDERED= + +.include diff --git a/gnu/usr.bin/binutils227/block1/Makefile.block1 b/gnu/usr.bin/binutils227/block1/Makefile.block1 new file mode 100644 index 0000000000..022ad7db24 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/Makefile.block1 @@ -0,0 +1,39 @@ +# This is included explicitly at the top of each sub-Makefile. We can't +# use the normal "Makefile.inc" mechanism, because we need some of these +# definitions before the sub-Makefile is processed. + +RELTOP:= ../.. + +# RELTOP is the relative path to this point in the source or object +# tree, from any subdirectory of same. It gets extra "../" prefixes +# added to it as we descend into subdirectories. + +RELSRC= ${RELTOP}/../../../contrib/binutils-2.27 +SRCDIR= ${.CURDIR}/${RELSRC} + +CFLAGS+= -I${.CURDIR} -I${.OBJDIR} +CFLAGS+= -I${SRCDIR}/include + +TARGET_CANONICAL= x86_64-just-dragonfly +BFD_HOST_64_BIT_DEFINED?= 1 +BFD_HOST_64BIT_LONG?= 1 +BFD_HOST_64BIT_LONG_LONG?= 0 +BFD_HOST_64_BIT?= long +BFD_HOST_U_64_BIT?= unsigned long +BFD_HOSTPTR_T?= unsigned long +BFD_ARCH_SIZE?= 64 +BFD_DEFAULT_TARGET_SIZE?= 64 + +bfd.h: ${SRCDIR}/bfd/bfd-in2.h + sed -e "s/@supports_plugins@/1/g" \ + -e "s/@wordsize@/${BFD_ARCH_SIZE}/g" \ + -e "s/@bfd_default_target_size@/${BFD_DEFAULT_TARGET_SIZE}/g" \ + -e "s/@BFD_HOST_64BIT_LONG@/${BFD_HOST_64BIT_LONG}/g" \ + -e "s/@BFD_HOST_64BIT_LONG_LONG@/${BFD_HOST_64BIT_LONG_LONG}/g" \ + -e "s/@BFD_HOST_64_BIT@/${BFD_HOST_64_BIT}/g" \ + -e "s/@BFD_HOST_U_64_BIT@/${BFD_HOST_U_64_BIT}/g" \ + -e "s/@BFD_HOST_64_BIT_DEFINED@/${BFD_HOST_64_BIT_DEFINED}/g" \ + -e "s/@bfd_file_ptr@/${BFD_HOST_64_BIT}/g" \ + -e "s/@BFD_HOSTPTR_T@/${BFD_HOSTPTR_T}/g" \ + < ${.ALLSRC} > bfd.h.new + mv -f bfd.h.new bfd.h diff --git a/gnu/usr.bin/binutils227/block1/bulibs/Makefile b/gnu/usr.bin/binutils227/block1/bulibs/Makefile new file mode 100644 index 0000000000..e27e6d33e7 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/bulibs/Makefile @@ -0,0 +1,17 @@ +.include "../Makefile.block1" + +.PATH: ${SRCDIR}/binutils + +LIB= bu +SRCS= bucomm.c version.c filemode.c + +CFLAGS+= -DHAVE_CONFIG_H -I${SRCDIR}/bfd \ + -Dbin_dummy_emulation=bin_vanilla_emulation \ + -DTARGET=\"${TARGET_CANONICAL}\" +INTERNALLIB= true + +${SRCS}: bfd.h + +CLEANFILES= bfd.h + +.include diff --git a/gnu/usr.bin/binutils227/block1/bulibs/config.h b/gnu/usr.bin/binutils227/block1/bulibs/config.h new file mode 100644 index 0000000000..5f07381f39 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/bulibs/config.h @@ -0,0 +1,284 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* 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 */ + +/* Should ar and ranlib use -D behavior by default? */ +#define DEFAULT_AR_DETERMINISTIC 1 + +/* Should strings use -a behavior by default? */ +#define DEFAULT_STRINGS_ALL 1 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Suffix used for executables, if any. */ +#define EXECUTABLE_SUFFIX "" + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the declaration of `environ', and to 0 if you + don't. */ +#define HAVE_DECL_ENVIRON 0 + +/* Define to 1 if you have the declaration of `fprintf', and to 0 if you + don't. */ +#define HAVE_DECL_FPRINTF 1 + +/* 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 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 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 `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 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 header file. */ +#define HAVE_DLFCN_H 1 + +/* Does the platform use an executable suffix? */ +/* #undef HAVE_EXECUTABLE_SUFFIX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getc_unlocked' function. */ +#define HAVE_GETC_UNLOCKED 1 + +/* Does define struct utimbuf? */ +#define HAVE_GOOD_UTIME_H 1 + +/* Define if you have the iconv() function. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + +/* Define if mbstate_t exists in wchar.h. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +#define HAVE_MKDTEMP 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setmode' function. */ +#define HAVE_SETMODE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcoll' function. */ +#define HAVE_STRCOLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Is the type time_t defined in ? */ +#define HAVE_TIME_T_IN_TIME_H 1 + +/* Is the type time_t defined in ? */ +#define HAVE_TIME_T_IN_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `utimes' function. */ +#define HAVE_UTIMES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "binutils" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "binutils" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "binutils 2.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "binutils" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.27" + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* 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 runtime. + 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 ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Configured target name. */ +/* #define TARGET "x86_64-pc-dragonfly4.7" */ + +/* 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 */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.27" + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/gnu/usr.bin/binutils227/block1/libbfd/Makefile b/gnu/usr.bin/binutils227/block1/libbfd/Makefile new file mode 100644 index 0000000000..3d0a7892da --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/libbfd/Makefile @@ -0,0 +1,94 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block1" + +LIB= bfd +INTERNALLIB= true + +CONTRIBDIR= ${SRCDIR}/bfd +.PATH: ${CONTRIBDIR} + +CFLAGS+= -I${SRCDIR}/include -I${CONTRIBDIR} -I${.CURDIR} -I${.OBJDIR} +CFLAGS+= -DDEBUGDIR='"/usr/lib/debug"' # no clue why this is needed +FLAGS_GROUPS= target plugins + +# BFD32_LIBS_CFILES +SRCS= archive.c archures.c bfd.c bfdio.c \ + cache.c coffgen.c corefile.c \ + format.c init.c libbfd.c opncls.c reloc.c \ + section.c syms.c targets.c hash.c linker.c \ + srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ + merge.c dwarf2.c simple.c compress.c verilog.c + +# only when USE_MMAP (--with-mmap) +#SRCS+= bfdwin.c + +# from Makefile, BFD64_BACKENDS_CFILES (x86-64 specific) +SRCS+= elf64-x86-64.c elf-ifunc.c elf-nacl.c elf64.c elf.c elflink.c \ + elf-attrs.c elf-strtab.c elf-eh-frame.c dwarf1.c elf32-i386.c \ + elf-vxworks.c elf32.c elf64-gen.c elf32-gen.c pei-x86_64.c \ + pex64igen.c cofflink.c coff-bfd.c + +# ALL_MACHINES_CFILES +SRCS+= cpu-i386.c cpu-l1om.c cpu-k1om.c + +# BFD64_LIBS_CFILES +SRCS+= archive64.c + +VECTORS= x86_64_elf64_vec \ + x86_64_pei_vec \ + i386_elf32_vec \ + iamcu_elf32_vec \ + l1om_elf64_vec \ + k1om_elf64_vec \ + elf64_le_vec \ + elf64_be_vec \ + elf32_le_vec \ + elf32_be_vec + +# plugin support mainly for LTO ar, nm, ranlib +SRCS+= plugin.c +VECTORS+= plugin_vec +plugins_FLAGS+= -DBINDIR=\"${TOOLS_PREFIX}${BINDIR}\" +plugins_FLAGS+= -DRELPLUGINDIR=\"/../bfd-plugins\" # standard one uses lib/bfd-plugins +plugins_FLAGS_FILES= plugin.c + +DEFAULT_VECTOR= x86_64_elf64_vec +ARCHITECTURES= bfd_i386_arch bfd_l1om_arch bfd_k1om_arch + +_selvec= +.for _v in ${VECTORS} +target_FLAGS+= -DHAVE_${_v} +.if !empty(_selvec) +_selvec+= , +.endif +_selvec+= &${_v} +.endfor +target_FLAGS+= -DSELECT_VECS='${_selvec}' +target_FLAGS+= -DSELECT_ARCHITECTURES='${ARCHITECTURES:S/^/\&/:S/$/,/} 0' +target_FLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} +target_FLAGS_FILES= targets.c archures.c + +${SRCS}: bfd.h +targets.c: targmatch.h +elf32-gen.c elf32-i386.c elf64-x86-64.c: elf32-target.h +elf64-gen.c elf64-x86-64.c: elf64-target.h +cache.c elf32-i386.c elf64-x86-64.c: bfd_stdint.h + +bfd_stdint.h: + touch ${.TARGET} + +targmatch.h: config.bfd targmatch.sed + sed -f ${CONTRIBDIR}/targmatch.sed < ${CONTRIBDIR}/config.bfd \ + > ${.TARGET} + +elf32-target.h: elfxx-target.h + sed -e s/NN/32/g < ${CONTRIBDIR}/elfxx-target.h > ${.TARGET} +elf64-target.h: elfxx-target.h + sed -e s/NN/64/g < ${CONTRIBDIR}/elfxx-target.h > ${.TARGET} +pex64igen.c: peXXigen.c + sed -e s/XX/pex64/g < ${CONTRIBDIR}/peXXigen.c > ${.TARGET} + +CLEANFILES= bfd_stdint.h bfd.h elf64-target.h elf32-target.h targmatch.h \ + pex64igen.c + +.include diff --git a/gnu/usr.bin/binutils227/block1/libbfd/config.h b/gnu/usr.bin/binutils227/block1/libbfd/config.h new file mode 100644 index 0000000000..ea20f32cb8 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/libbfd/config.h @@ -0,0 +1,395 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Name of host specific core header file to include in elf.c. */ +/* #undef CORE_HEADER */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALLOCA_H */ + +/* 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 `ffs', and to 0 if you don't. */ +#define HAVE_DECL_FFS 1 + +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. + */ +#define HAVE_DECL_FSEEKO 1 + +/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you + don't. */ +#define HAVE_DECL_FSEEKO64 0 + +/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. + */ +#define HAVE_DECL_FTELLO 1 + +/* Define to 1 if you have the declaration of `ftello64', and to 0 if you + don't. */ +#define HAVE_DECL_FTELLO64 0 + +/* 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 `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 `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 + +/* 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 header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `fcntl' function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fdopen' function. */ +#define HAVE_FDOPEN 1 + +/* Define to 1 if you have the `fileno' function. */ +#define HAVE_FILENO 1 + +/* 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 to 1 if you have the `fseeko64' function. */ +/* #undef HAVE_FSEEKO64 */ + +/* Define to 1 if you have the `ftello' function. */ +#define HAVE_FTELLO 1 + +/* Define to 1 if you have the `ftello64' function. */ +/* #undef HAVE_FTELLO64 */ + +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if has lwpstatus_t. */ +/* #undef HAVE_LWPSTATUS_T */ + +/* Define if has lwpstatus_t.pr_context. */ +/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */ + +/* Define if has lwpstatus_t.pr_fpreg. */ +/* #undef HAVE_LWPSTATUS_T_PR_FPREG */ + +/* Define if has lwpstatus_t.pr_reg. */ +/* #undef HAVE_LWPSTATUS_T_PR_REG */ + +/* Define if has lwpxstatus_t. */ +/* #undef HAVE_LWPXSTATUS_T */ + +/* Define to 1 if you have the `madvise' function. */ +#define HAVE_MADVISE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define if has prpsinfo32_t. */ +/* #undef HAVE_PRPSINFO32_T */ + +/* Define if has prpsinfo32_t.pr_pid. */ +/* #undef HAVE_PRPSINFO32_T_PR_PID */ + +/* Define if has prpsinfo_t. */ +#define HAVE_PRPSINFO_T 1 + +/* Define if has prpsinfo_t.pr_pid. */ +/* #undef HAVE_PRPSINFO_T_PR_PID */ + +/* Define if has prstatus32_t. */ +/* #undef HAVE_PRSTATUS32_T */ + +/* Define if has prstatus32_t.pr_who. */ +/* #undef HAVE_PRSTATUS32_T_PR_WHO */ + +/* Define if has prstatus_t. */ +#define HAVE_PRSTATUS_T 1 + +/* Define if has prstatus_t.pr_who. */ +/* #undef HAVE_PRSTATUS_T_PR_WHO */ + +/* Define if has psinfo32_t. */ +/* #undef HAVE_PSINFO32_T */ + +/* Define if has psinfo32_t.pr_pid. */ +/* #undef HAVE_PSINFO32_T_PR_PID */ + +/* Define if has psinfo_t. */ +/* #undef HAVE_PSINFO_T */ + +/* Define if has psinfo_t.pr_pid. */ +/* #undef HAVE_PSINFO_T_PR_PID */ + +/* Define if has pstatus32_t. */ +/* #undef HAVE_PSTATUS32_T */ + +/* Define if has pstatus_t. */ +/* #undef HAVE_PSTATUS_T */ + +/* Define if 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 header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + +/* 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 header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PROCFS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define if has win32_pstatus_t. */ +/* #undef HAVE_WIN32_PSTATUS_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "bfd" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bfd" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "bfd 2.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bfd" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.27" + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Name of host specific header file to include in trad-core.c. */ +/* #undef TRAD_HEADER */ + +/* Define if we should use 64-bit archives. */ +/* #undef USE_64_BIT_ARCHIVE */ + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Define if we should use leading underscore on 64 bit mingw targets */ +/* #undef USE_MINGW64_LEADING_UNDERSCORES */ + +/* Use mmap if it's available? */ +/* #undef USE_MMAP */ + +/* Define if we should default to creating read-only plt entries */ +#define USE_SECUREPLT 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.27" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/gnu/usr.bin/binutils227/block1/libiberty/Makefile b/gnu/usr.bin/binutils227/block1/libiberty/Makefile new file mode 100644 index 0000000000..99997c7f70 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/libiberty/Makefile @@ -0,0 +1,70 @@ +.include "../Makefile.block1" + +.PATH: ${SRCDIR}/libiberty + +LIB= iberty +SRCS= alloca.c \ + argv.c \ + choose-temp.c \ + concat.c \ + cp-demangle.c \ + cp-demint.c \ + cplus-dem.c \ + crc32.c \ + d-demangle.c \ + dwarfnames.c \ + dyn-string.c \ + fdmatch.c \ + fibheap.c \ + filename_cmp.c \ + floatformat.c \ + fnmatch.c \ + fopen_unlocked.c \ + getopt.c \ + getopt1.c \ + getpwd.c \ + getruntime.c \ + hashtab.c \ + hex.c \ + lbasename.c \ + lrealpath.c \ + make-relative-prefix.c \ + make-temp-file.c \ + md5.c \ + objalloc.c \ + obstack.c \ + partition.c \ + pex-common.c \ + pex-one.c \ + pex-unix.c \ + pexecute.c \ + physmem.c \ + regex.c \ + safe-ctype.c \ + sha1.c \ + simple-object-coff.c \ + simple-object-elf.c \ + simple-object-mach-o.c \ + simple-object-xcoff.c \ + simple-object.c \ + sort.c \ + spaces.c \ + splay-tree.c \ + stack-limit.c \ + strerror.c \ + strsignal.c \ + strverscmp.c \ + timeval-utils.c \ + unlink-if-ordinary.c \ + xatexit.c \ + xexit.c \ + xmalloc.c \ + xmemdup.c \ + xstrdup.c \ + xstrerror.c \ + xstrndup.c \ + +CFLAGS+= -DHAVE_CONFIG_H +INTERNALLIB= true + +.include diff --git a/gnu/usr.bin/binutils227/block1/libiberty/config.h b/gnu/usr.bin/binutils227/block1/libiberty/config.h new file mode 100644 index 0000000000..f43a22493c --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/libiberty/config.h @@ -0,0 +1,500 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* 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 header file. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the `basename' function. */ +#define HAVE_BASENAME 1 + +/* Define to 1 if you have the `bcmp' function. */ +#define HAVE_BCMP 1 + +/* Define to 1 if you have the `bcopy' function. */ +#define HAVE_BCOPY 1 + +/* Define to 1 if you have the `bsearch' function. */ +#define HAVE_BSEARCH 1 + +/* Define to 1 if you have the `bzero' function. */ +#define HAVE_BZERO 1 + +/* Define to 1 if you have the `calloc' function. */ +#define HAVE_CALLOC 1 + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* 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(char *)', 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 `dup3' function. */ +/* #undef HAVE_DUP3 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `ffs' function. */ +#define HAVE_FFS 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `getsysinfo' function. */ +/* #undef HAVE_GETSYSINFO */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `index' function. */ +#define HAVE_INDEX 1 + +/* Define to 1 if you have the `insque' function. */ +#define HAVE_INSQUE 1 + +/* Define to 1 if the system has the type `intptr_t'. */ +#define HAVE_INTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the `memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the `memcmp' function. */ +#define HAVE_MEMCMP 1 + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the `memmem' function. */ +#define HAVE_MEMMEM 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the `mkstemps' function. */ +#define HAVE_MKSTEMPS 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `on_exit' function. */ +/* #undef HAVE_ON_EXIT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PROCESS_H */ + +/* Define to 1 if you have the `psignal' function. */ +#define HAVE_PSIGNAL 1 + +/* Define to 1 if you have the `pstat_getdynamic' function. */ +/* #undef HAVE_PSTAT_GETDYNAMIC */ + +/* Define to 1 if you have the `pstat_getstatic' function. */ +/* #undef HAVE_PSTAT_GETSTATIC */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `rename' function. */ +#define HAVE_RENAME 1 + +/* Define to 1 if you have the `rindex' function. */ +#define HAVE_RINDEX 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setproctitle' function. */ +#define HAVE_SETPROCTITLE 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `spawnve' function. */ +/* #undef HAVE_SPAWNVE */ + +/* Define to 1 if you have the `spawnvpe' function. */ +/* #undef HAVE_SPAWNVPE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDIO_EXT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `stpncpy' function. */ +#define HAVE_STPNCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* 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 `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* 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 + +/* Define to 1 if you have the `sysctl' function. */ +#define HAVE_SYSCTL 1 + +/* Define to 1 if you have the `sysmp' function. */ +/* #undef HAVE_SYSMP */ + +/* Define if you have the sys_errlist variable. */ +#define HAVE_SYS_ERRLIST 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define if you have the sys_nerr variable. */ +#define HAVE_SYS_NERR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PRCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PSTAT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define if you have the sys_siglist variable. */ +#define HAVE_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSMP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSTEMCFG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TABLE_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the `table' function. */ +/* #undef HAVE_TABLE */ + +/* Define to 1 if you have the `times' function. */ +#define HAVE_TIMES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the `tmpnam' function. */ +#define HAVE_TMPNAM 1 + +/* Define if you have the \`uintptr_t' type. */ +#define HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#define HAVE_VASPRINTF 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vfprintf' function. */ +#define HAVE_VFPRINTF 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* 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 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* Define to 1 if you have the `_doprnt' function. */ +/* #undef HAVE__DOPRNT */ + +/* Define if you have the _system_configuration variable. */ +/* #undef HAVE__SYSTEM_CONFIGURATION */ + +/* 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 + +/* Define if errno must be declared even when is included. */ +/* #undef NEED_DECLARATION_ERRNO */ + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* 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 home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* The size of `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 + STACK_DIRECTION = 0 => direction of growth unknown */ +#define STACK_DIRECTION -1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to an unsigned 64-bit type available in the compiler. */ +#define UNSIGNED_64BIT_TYPE uint64_t + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* 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 the type of a signed integer type wide enough to hold a pointer, + if such a type exists, and if the system does not define it. */ +/* #undef intptr_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +/* #undef uintptr_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --git a/gnu/usr.bin/binutils227/block1/libopcodes/Makefile b/gnu/usr.bin/binutils227/block1/libopcodes/Makefile new file mode 100644 index 0000000000..82e2efddef --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/libopcodes/Makefile @@ -0,0 +1,20 @@ +.include "../Makefile.block1" + +LIB= opcodes +INTERNALLIB= true + +CONTRIBDIR= ${SRCDIR}/opcodes +.PATH: ${CONTRIBDIR} + +CFLAGS+= -I${.OBJDIR} +FLAGS_GROUPS= assy +assy_FLAGS= -DARCH_i386 -DARCH_iamcu -DARCH_l1om -DARCH_k1om +assy_FLAGS_FILES= disassemble.c + +SRCS= i386-dis.c i386-opc.c dis-buf.c dis-init.c disassemble.c + +i386-dis.c disassemble.c dis-buf.c: bfd.h + +CLEANFILES= bfd.h + +.include diff --git a/gnu/usr.bin/binutils227/block1/libopcodes/config.h b/gnu/usr.bin/binutils227/block1/libopcodes/config.h new file mode 100644 index 0000000000..3789900573 --- /dev/null +++ b/gnu/usr.bin/binutils227/block1/libopcodes/config.h @@ -0,0 +1,123 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* 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 `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "opcodes" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "opcodes" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "opcodes 2.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "opcodes" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.27" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.27" + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/gnu/usr.bin/binutils227/block2/Makefile b/gnu/usr.bin/binutils227/block2/Makefile new file mode 100644 index 0000000000..22c44e91f6 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/Makefile @@ -0,0 +1,31 @@ +# Build in parallel +SUBDIR= addr2line \ + ar \ + cxxfilt \ + elfedit \ + gas \ + gprof \ + nm \ + objcopy \ + objdump \ + ranlib \ + readelf \ + size \ + strings \ + strip + +# Don't build gold linker during stage 3 cross-tools unless +# WORLD_LDVER has been set to ld.gold (and then don't build ld.bfd) +.if defined(SELECT_LINKER) +. if ${SELECT_LINKER:Mld.gold} +SUBDIR+= libgold +. else +SUBDIR+= ld +. endif +.else +SUBDIR+= ld libgold +.endif + +SUBDIR_ORDERED= + +.include diff --git a/gnu/usr.bin/binutils227/block2/Makefile.block2 b/gnu/usr.bin/binutils227/block2/Makefile.block2 new file mode 100644 index 0000000000..5e151f55a2 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/Makefile.block2 @@ -0,0 +1,32 @@ +# This is included explicitly at the top of each sub-Makefile. We can't +# use the normal "Makefile.inc" mechanism, because we need some of these +# definitions before the sub-Makefile is processed. + +RELTOP:= ../.. + +# RELTOP is the relative path to this point in the source or object +# tree, from any subdirectory of same. It gets extra "../" prefixes +# added to it as we descend into subdirectories. + +RELSRC= ${RELTOP}/../../../contrib/binutils-2.27 +SRCDIR= ${.CURDIR}/${RELSRC} +BINTOP= ${.CURDIR}/${RELTOP} +OBJTOP= ${.OBJDIR}/${RELTOP} + +# Keep these, block2/ld and block2/gas will want to override BULIBS_INC. +_BULIBS_INC= -I${OBJTOP}/block1/bulibs -I${BINTOP}/block1/bulibs +BULIBS_INC= ${_BULIBS_INC} + +CFLAGS+= ${BULIBS_INC} +CFLAGS+= -I${SRCDIR}/include +CFLAGS+= -I${SRCDIR}/bfd + +LDADD_BU= ${OBJTOP}/block1/bulibs/libbu.a +LDADD_BFD= ${OBJTOP}/block1/libbfd/libbfd.a +LDADD_IBERTY= ${OBJTOP}/block1/libiberty/libiberty.a +LDADD_OPCODE= ${OBJTOP}/block1/libopcodes/libopcodes.a + +STD_LDADD= ${LDADD_BU} ${LDADD_BFD} ${LDADD_IBERTY} + +bfd_stdint.h: + touch ${.TARGET} diff --git a/gnu/usr.bin/binutils227/block2/addr2line/Makefile b/gnu/usr.bin/binutils227/block2/addr2line/Makefile new file mode 100644 index 0000000000..6ae6ebdebd --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/addr2line/Makefile @@ -0,0 +1,21 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= addr2line +SRCS= addr2line.c +MFILE= addr2line${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +${MFILE}: ${SRCDIR}/binutils/doc/addr2line.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} addr2line.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/ar/Makefile b/gnu/usr.bin/binutils227/block2/ar/Makefile new file mode 100644 index 0000000000..45feb8a90c --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/ar/Makefile @@ -0,0 +1,30 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= ar +SRCS= ar.c not-ranlib.c arsup.c rename.c binemul.c emul_vanilla.c \ + arparse.y arlex.l +MFILE= ar${MANPAGEVER}.1 +MAN= ${MFILE} +DPADD= ${LIBL} ${LIBZ} +LDADD= ${STD_LDADD} -ll -lz + +CFLAGS+= -I${SRCDIR}/binutils \ + -Dbin_dummy_emulation=bin_vanilla_emulation + +# link-time optimization requires dlopen() which means ar cannot be built +# statically and also support -plugin, not even for cross-tools. +.undef NOSHARED + +${MFILE}: ${SRCDIR}/binutils/doc/ar.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ar.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/cxxfilt/Makefile b/gnu/usr.bin/binutils227/block2/cxxfilt/Makefile new file mode 100644 index 0000000000..6a41356f3b --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/cxxfilt/Makefile @@ -0,0 +1,21 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils + +PROG= c++filt +SRCS= cxxfilt.c +MFILE= c++filt${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +${MFILE}: ${.CURDIR}/c++filt.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} c++filt.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/cxxfilt/c++filt.1 b/gnu/usr.bin/binutils227/block2/cxxfilt/c++filt.1 new file mode 100644 index 0000000000..9498838bb1 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/cxxfilt/c++filt.1 @@ -0,0 +1,345 @@ +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) +.\" +.\" 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" '' +. ds C` +. ds C' +'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. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" 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 "C++FILT 1" +.TH C++FILT 1 "2016-08-03" "binutils-2.27" "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" +c++filt \- Demangle C++ and Java symbols. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +c++filt [\fB\-_\fR|\fB\-\-strip\-underscore\fR] + [\fB\-n\fR|\fB\-\-no\-strip\-underscore\fR] + [\fB\-p\fR|\fB\-\-no\-params\fR] + [\fB\-t\fR|\fB\-\-types\fR] + [\fB\-i\fR|\fB\-\-no\-verbose\fR] + [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR] + [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The \*(C+ and Java languages provide function overloading, which means +that you can write many functions with the same name, providing that +each function takes parameters of different types. In order to be +able to distinguish these similarly named functions \*(C+ and Java +encode them into a low-level assembler name which uniquely identifies +each different version. This process is known as \fImangling\fR. The +\&\fBc++filt\fR +[1] +program does the inverse mapping: it decodes (\fIdemangles\fR) low-level +names into user-level names so that they can be read. +.PP +Every alphanumeric word (consisting of letters, digits, underscores, +dollars, or periods) seen in the input is a potential mangled name. +If the name decodes into a \*(C+ name, the \*(C+ name replaces the +low-level name in the output, otherwise the original word is output. +In this way you can pass an entire assembler source file, containing +mangled names, through \fBc++filt\fR and see the same source file +containing demangled names. +.PP +You can also use \fBc++filt\fR to decipher individual symbols by +passing them on the command line: +.PP +.Vb 1 +\& c++filt +.Ve +.PP +If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol +names from the standard input instead. All the results are printed on +the standard output. The difference between reading names from the +command line versus reading names from the standard input is that +command line arguments are expected to be just mangled names and no +checking is performed to separate them from surrounding text. Thus +for example: +.PP +.Vb 1 +\& c++filt \-n _Z1fv +.Ve +.PP +will work and demangle the name to \*(L"f()\*(R" whereas: +.PP +.Vb 1 +\& c++filt \-n _Z1fv, +.Ve +.PP +will not work. (Note the extra comma at the end of the mangled +name which makes it invalid). This command however will work: +.PP +.Vb 1 +\& echo _Z1fv, | c++filt \-n +.Ve +.PP +and will display \*(L"f(),\*(R", i.e., the demangled name followed by a +trailing comma. This behaviour is because when the names are read +from the standard input it is expected that they might be part of an +assembler source file where there might be extra, extraneous +characters trailing after a mangled name. For example: +.PP +.Vb 1 +\& .type _Z1fv, @function +.Ve +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-_\fR" 4 +.IX Item "-_" +.PD 0 +.IP "\fB\-\-strip\-underscore\fR" 4 +.IX Item "--strip-underscore" +.PD +On some systems, both the C and \*(C+ compilers put an underscore in front +of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level +name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether +\&\fBc++filt\fR removes the underscore by default is target dependent. +.IP "\fB\-n\fR" 4 +.IX Item "-n" +.PD 0 +.IP "\fB\-\-no\-strip\-underscore\fR" 4 +.IX Item "--no-strip-underscore" +.PD +Do not remove the initial underscore. +.IP "\fB\-p\fR" 4 +.IX Item "-p" +.PD 0 +.IP "\fB\-\-no\-params\fR" 4 +.IX Item "--no-params" +.PD +When demangling the name of a function, do not display the types of +the function's parameters. +.IP "\fB\-t\fR" 4 +.IX Item "-t" +.PD 0 +.IP "\fB\-\-types\fR" 4 +.IX Item "--types" +.PD +Attempt to demangle types as well as function names. This is disabled +by default since mangled types are normally only used internally in +the compiler, and they can be confused with non-mangled names. For example, +a function called \*(L"a\*(R" treated as a mangled type name would be +demangled to \*(L"signed char\*(R". +.IP "\fB\-i\fR" 4 +.IX Item "-i" +.PD 0 +.IP "\fB\-\-no\-verbose\fR" 4 +.IX Item "--no-verbose" +.PD +Do not include implementation details (if any) in the demangled +output. +.IP "\fB\-s\fR \fIformat\fR" 4 +.IX Item "-s format" +.PD 0 +.IP "\fB\-\-format=\fR\fIformat\fR" 4 +.IX Item "--format=format" +.PD +\&\fBc++filt\fR can decode various methods of mangling, used by +different compilers. The argument to this option selects which +method it uses: +.RS 4 +.ie n .IP """auto""" 4 +.el .IP "\f(CWauto\fR" 4 +.IX Item "auto" +Automatic selection based on executable (the default method) +.ie n .IP """gnu""" 4 +.el .IP "\f(CWgnu\fR" 4 +.IX Item "gnu" +the one used by the \s-1GNU \*(C+\s0 compiler (g++) +.ie n .IP """lucid""" 4 +.el .IP "\f(CWlucid\fR" 4 +.IX Item "lucid" +the one used by the Lucid compiler (lcc) +.ie n .IP """arm""" 4 +.el .IP "\f(CWarm\fR" 4 +.IX Item "arm" +the one specified by the \*(C+ Annotated Reference Manual +.ie n .IP """hp""" 4 +.el .IP "\f(CWhp\fR" 4 +.IX Item "hp" +the one used by the \s-1HP\s0 compiler (aCC) +.ie n .IP """edg""" 4 +.el .IP "\f(CWedg\fR" 4 +.IX Item "edg" +the one used by the \s-1EDG\s0 compiler +.ie n .IP """gnu\-v3""" 4 +.el .IP "\f(CWgnu\-v3\fR" 4 +.IX Item "gnu-v3" +the one used by the \s-1GNU \*(C+\s0 compiler (g++) with the V3 \s-1ABI.\s0 +.ie n .IP """java""" 4 +.el .IP "\f(CWjava\fR" 4 +.IX Item "java" +the one used by the \s-1GNU\s0 Java compiler (gcj) +.ie n .IP """gnat""" 4 +.el .IP "\f(CWgnat\fR" 4 +.IX Item "gnat" +the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0). +.RE +.RS 4 +.RE +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +Print a summary of the options to \fBc++filt\fR and exit. +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Print the version number of \fBc++filt\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 "FOOTNOTES" +.IX Header "FOOTNOTES" +.IP "1." 4 +MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on +MS-DOS this program is named \fB\s-1CXXFILT\s0\fR. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +the Info entries for \fIbinutils\fR. +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 1991\-2016 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.3 +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/binutils227/block2/elfedit/Makefile b/gnu/usr.bin/binutils227/block2/elfedit/Makefile new file mode 100644 index 0000000000..ade9c4d6fd --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/elfedit/Makefile @@ -0,0 +1,21 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= elfedit +SRCS= elfedit.c version.c elfcomm.c +MFILE= elfedit${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${LDADD_IBERTY} + +${MFILE}: ${SRCDIR}/binutils/doc/elfedit.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} elfedit.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/gas/Makefile b/gnu/usr.bin/binutils227/block2/gas/Makefile new file mode 100644 index 0000000000..f66aac95a8 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/Makefile @@ -0,0 +1,70 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" +.include "x86_64-dragonfly/Makefile" + +.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config + +PROG= as +MFILE= as${MANPAGEVER}.1 +MAN= ${MFILE} +SRCS+= app.c \ + as.c \ + atof-generic.c \ + compress-debug.c \ + cond.c \ + depend.c \ + dwarf2dbg.c \ + dw2gencfi.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 \ + output-file.c \ + read.c \ + remap.c \ + sb.c \ + stabs.c \ + subsegs.c \ + symbols.c \ + write.c +LDADD= ${STD_LDADD} ${LDADD_OPCODE} -lz + +# We need to change CFLAGS, so that not to pick up bulibs's config.h first. +BULIBS_INC:= # empty + +CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/gas/config +CFLAGS+= -I${.OBJDIR} -I${.CURDIR} -I${SRCDIR} +CFLAGS+= -I${.CURDIR}/x86_64-dragonfly +CFLAGS+= ${_BULIBS_INC} # for bfd.h + +CFLAGS+= -DTARGET_ALIAS=\"${TARGET_ALIAS}\" +CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_CANONICAL}\" +CFLAGS+= -DTARGET_CPU=\"${TARGET_CPU}\" +CFLAGS+= -DDEFAULT_ARCH=\"${DEFAULT_ARCH}\" +CFLAGS+= -DTARGET_OS=\"dragonfly\" +CFLAGS+= "-DEMULATIONS=${EMULATIONS}" +CFLAGS+= -DDEFAULT_EMULATION=\"${DEFAULT_EMULATION}\" +CFLAGS+= -DTE_DragonFly -DHAVE_ERRNO_H + +NOSHARED?= yes + +${MFILE}: ${SRCDIR}/gas/doc/as.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} as.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/gas/config.h b/gnu/usr.bin/binutils227/block2/gas/config.h new file mode 100644 index 0000000000..bf104432b6 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/config.h @@ -0,0 +1,398 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if using AIX 5.2 value for C_WEAKEXT. */ +/* #undef AIX_WEAK_SUPPORT */ + +/* 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. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Compiling cross-assembler? */ +/* #undef CROSS_COMPILE */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Default architecture. */ +/* #define DEFAULT_ARCH "x86_64" */ + +/* Default CRIS architecture. */ +/* #undef DEFAULT_CRIS_ARCH */ + +/* Default emulation. */ +/* #define DEFAULT_EMULATION "i386elf" */ + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON + type by default. */ +#define DEFAULT_GENERATE_ELF_STT_COMMON 0 + +/* Define to 1 if you want to generate x86 relax relocations by default. */ +#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1 + +/* Supported emulations. */ +/* #define EMULATIONS &i386elf, */ + +/* Define if you want run-time sanity checks. */ +/* #define ENABLE_CHECKING 1 */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* 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 `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Is the prototype for getopt in in the expected format? */ +#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 `mempcpy', and to 0 if you + don't. */ +#define HAVE_DECL_MEMPCPY 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 `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 1 + +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 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 header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `remove' function. */ +/* #undef HAVE_REMOVE */ + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if has struct stat.st_mtim.tv_nsec */ +#define HAVE_ST_MTIM_TV_NSEC 1 + +/* Define if has struct stat.st_mtim.tv_sec */ +#define HAVE_ST_MTIM_TV_SEC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define if has struct tm.tm_gmtoff. */ +#define HAVE_TM_GMTOFF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unlink' function. */ +#define HAVE_UNLINK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Using i386 COFF? */ +/* #undef I386COFF */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Using m68k COFF? */ +/* #undef M68KCOFF */ + +/* Using m88k COFF? */ +/* #undef M88KCOFF */ + +/* Default CPU for MIPS targets. */ +/* #undef MIPS_CPU_STRING_DEFAULT */ + +/* Generate 64-bit code by default on MIPS targets. */ +/* #undef MIPS_DEFAULT_64BIT */ + +/* Choose a default ABI for MIPS targets. */ +/* #undef MIPS_DEFAULT_ABI */ + +/* Define value for nds32_arch_name */ +/* #undef NDS32_DEFAULT_ARCH_NAME */ + +/* Define default value for nds32_audio_ext */ +/* #undef NDS32_DEFAULT_AUDIO_EXT */ + +/* Define default value for nds32_dx_regs */ +/* #undef NDS32_DEFAULT_DX_REGS */ + +/* Define default value for nds32_perf_ext */ +/* #undef NDS32_DEFAULT_PERF_EXT */ + +/* Define default value for nds32_perf_ext2 */ +/* #undef NDS32_DEFAULT_PERF_EXT2 */ + +/* Define default value for nds32_string_ext */ +/* #undef NDS32_DEFAULT_STRING_EXT */ + +/* Define if environ is not declared in system header files. */ +#define NEED_DECLARATION_ENVIRON 1 + +/* Define if errno is not declared in system header files. */ +/* #undef NEED_DECLARATION_ERRNO */ + +/* Define if ffs is not declared in system header files. */ +/* #undef NEED_DECLARATION_FFS */ + +/* Define if free is not declared in system header files. */ +/* #undef NEED_DECLARATION_FREE */ + +/* 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 */ + +/* b.out support? */ +/* #undef OBJ_MAYBE_BOUT */ + +/* COFF support? */ +/* #undef OBJ_MAYBE_COFF */ + +/* ECOFF support? */ +/* #undef OBJ_MAYBE_ECOFF */ + +/* ELF support? */ +/* #undef OBJ_MAYBE_ELF */ + +/* generic support? */ +/* #undef OBJ_MAYBE_GENERIC */ + +/* SOM support? */ +/* #undef OBJ_MAYBE_SOM */ + +/* Name of package */ +#define PACKAGE "gas" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gas" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gas 2.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gas" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.27" + +/* 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 runtime. + 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 ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Using strict COFF? */ +/* #undef STRICTCOFF */ + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Target alias. */ +/* #define TARGET_ALIAS "x86_64-pc-dragonfly4.7" */ + +/* Define as 1 if big endian. */ +/* #undef TARGET_BYTES_BIG_ENDIAN */ + +/* Canonical target. */ +/* #define TARGET_CANONICAL "x86_64-pc-dragonfly4.7" */ + +/* Target CPU. */ +/* #define TARGET_CPU "x86_64" */ + +/* Target OS. */ +/* #define TARGET_OS "dragonfly4.7" */ + +/* Define if default target is PowerPC Solaris. */ +/* #undef TARGET_SOLARIS_COMMENT */ + +/* Define if target is Symbian OS. */ +/* #undef TARGET_SYMBIAN */ + +/* Target vendor. */ +#define TARGET_VENDOR "pc" + +/* Target specific CPU. */ +/* #undef TARGET_WITH_CPU */ + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Use emulation support? */ +/* #undef USE_EMULATIONS */ + +/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */ +/* #undef USE_E_MIPS_ABI_O32 */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Using cgen code? */ +/* #undef USING_CGEN */ + +/* Version number of package */ +#define VERSION "2.27" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* 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/binutils227/block2/gas/x86_64-dragonfly/Makefile b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/Makefile new file mode 100644 index 0000000000..38b52232ac --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/Makefile @@ -0,0 +1,8 @@ +DEFAULT_ARCH= x86_64 +EMULATIONS= &i386elf, +DEFAULT_EMULATION= i386elf +TARGET_ALIAS= x86_64-just-dragonfly +TARGET_CANONICAL= x86_64-just-dragonfly +TARGET_CPU= x86_64 + +SRCS+= obj-elf.c tc-i386.c atof-ieee.c diff --git a/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/itbl-cpu.h b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/itbl-cpu.h new file mode 100644 index 0000000000..54880214c7 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/itbl-cpu.h @@ -0,0 +1 @@ +#include "itbl-i386.h" diff --git a/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/obj-format.h b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/obj-format.h new file mode 100644 index 0000000000..69c64aac88 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/obj-format.h @@ -0,0 +1 @@ +#include "obj-elf.h" diff --git a/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-cpu.h b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-cpu.h new file mode 100644 index 0000000000..f4be0e50bd --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-cpu.h @@ -0,0 +1 @@ +#include "tc-i386.h" diff --git a/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-env.h b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-env.h new file mode 100644 index 0000000000..6cb636daad --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gas/x86_64-dragonfly/targ-env.h @@ -0,0 +1 @@ +#include "te-dragonfly.h" diff --git a/gnu/usr.bin/binutils227/block2/gprof/Makefile b/gnu/usr.bin/binutils227/block2/gprof/Makefile new file mode 100644 index 0000000000..879d4d1eb9 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gprof/Makefile @@ -0,0 +1,36 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/gprof + +PROG= gprof +SRCS= ${gprof_SOURCES} +MFILE= gprof${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${LDADD_BFD} ${LDADD_IBERTY} -lz + +#verbatim from gprof/Makefile +sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \ + cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \ + search_list.c symtab.c sym_ids.c utils.c \ + i386.c alpha.c vax.c tahoe.c sparc.c mips.c aarch64.c +gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c + +CFLAGS+= -DHAVE_CONFIG_H +CFLAGS+= -I${.CURDIR} + +${MFILE}: ${.CURDIR}/gprof.1 + cp ${.ALLSRC} ${.TARGET} + +flat_bl.c bsd_callg_bl.c fsf_callg_bl.c: + /usr/bin/awk -f ${SRCDIR}/gprof/gen-c-prog.awk > ${.TARGET} \ + FUNCTION=`(echo ${.TARGET:R}|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \ + FILE=flat_bl.m ${SRCDIR}/gprof/${.TARGET:.c=.m} + +CLEANFILES+= ${MFILE} flat_bl.c bsd_callg_bl.c fsf_callg_bl.c + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} gprof.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/gprof/gconfig.h b/gnu/usr.bin/binutils227/block2/gprof/gconfig.h new file mode 100644 index 0000000000..627a363d2b --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gprof/gconfig.h @@ -0,0 +1,117 @@ +/* gconfig.h. Generated from gconfig.in by configure. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `setmode' function. */ +#define HAVE_SETMODE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_GMON_OUT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "gprof" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gprof" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gprof 2.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gprof" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.27" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.27" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/gnu/usr.bin/binutils227/block2/gprof/gprof.1 b/gnu/usr.bin/binutils227/block2/gprof/gprof.1 new file mode 100644 index 0000000000..48f609fbe9 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/gprof/gprof.1 @@ -0,0 +1,772 @@ +.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) +.\" +.\" 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" '' +. ds C` +. ds C' +'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. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" 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 "GPROF 1" +.TH GPROF 1 "2016-08-03" "binutils-2.27" "GNU" +.\" 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" +gprof \- display call graph profile data +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +gprof [ \-[abcDhilLrsTvwxyz] ] [ \-[ACeEfFJnNOpPqQZ][\fIname\fR] ] + [ \-I \fIdirs\fR ] [ \-d[\fInum\fR] ] [ \-k \fIfrom/to\fR ] + [ \-m \fImin-count\fR ] [ \-R \fImap_file\fR ] [ \-t \fItable-length\fR ] + [ \-\-[no\-]annotated\-source[=\fIname\fR] ] + [ \-\-[no\-]exec\-counts[=\fIname\fR] ] + [ \-\-[no\-]flat\-profile[=\fIname\fR] ] [ \-\-[no\-]graph[=\fIname\fR] ] + [ \-\-[no\-]time=\fIname\fR] [ \-\-all\-lines ] [ \-\-brief ] + [ \-\-debug[=\fIlevel\fR] ] [ \-\-function\-ordering ] + [ \-\-file\-ordering \fImap_file\fR ] [ \-\-directory\-path=\fIdirs\fR ] + [ \-\-display\-unused\-functions ] [ \-\-file\-format=\fIname\fR ] + [ \-\-file\-info ] [ \-\-help ] [ \-\-line ] [ \-\-inline\-file\-names ] + [ \-\-min\-count=\fIn\fR ] [ \-\-no\-static ] [ \-\-print\-path ] + [ \-\-separate\-files ] [ \-\-static\-call\-graph ] [ \-\-sum ] + [ \-\-table\-length=\fIlen\fR ] [ \-\-traditional ] [ \-\-version ] + [ \-\-width=\fIn\fR ] [ \-\-ignore\-non\-functions ] + [ \-\-demangle[=\fI\s-1STYLE\s0\fR] ] [ \-\-no\-demangle ] + [\-\-external\-symbol\-table=name] + [ \fIimage-file\fR ] [ \fIprofile-file\fR ... ] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`gprof\*(C'\fR produces an execution profile of C, Pascal, or Fortran77 +programs. The effect of called routines is incorporated in the profile +of each caller. The profile data is taken from the call graph profile file +(\fIgmon.out\fR default) which is created by programs +that are compiled with the \fB\-pg\fR option of +\&\f(CW\*(C`cc\*(C'\fR, \f(CW\*(C`pc\*(C'\fR, and \f(CW\*(C`f77\*(C'\fR. +The \fB\-pg\fR option also links in versions of the library routines +that are compiled for profiling. \f(CW\*(C`Gprof\*(C'\fR reads the given object +file (the default is \f(CW\*(C`a.out\*(C'\fR) and establishes the relation between +its symbol table and the call graph profile from \fIgmon.out\fR. +If more than one profile file is specified, the \f(CW\*(C`gprof\*(C'\fR +output shows the sum of the profile information in the given profile files. +.PP +\&\f(CW\*(C`Gprof\*(C'\fR calculates the amount of time spent in each routine. +Next, these times are propagated along the edges of the call graph. +Cycles are discovered, and calls into a cycle are made to share the time +of the cycle. +.PP +Several forms of output are available from the analysis. +.PP +The \fIflat profile\fR shows how much time your program spent in each function, +and how many times that function was called. If you simply want to know +which functions burn most of the cycles, it is stated concisely here. +.PP +The \fIcall graph\fR shows, for each function, which functions called it, which +other functions it called, and how many times. There is also an estimate +of how much time was spent in the subroutines of each function. This can +suggest places where you might try to eliminate function calls that use a +lot of time. +.PP +The \fIannotated source\fR listing is a copy of the program's +source code, labeled with the number of times each line of the +program was executed. +.SH "OPTIONS" +.IX Header "OPTIONS" +These options specify which of several output formats +\&\f(CW\*(C`gprof\*(C'\fR should produce. +.PP +Many of these options take an optional \fIsymspec\fR to specify +functions to be included or excluded. These options can be +specified multiple times, with different symspecs, to include +or exclude sets of symbols. +.PP +Specifying any of these options overrides the default (\fB\-p \-q\fR), +which prints a flat profile and call graph analysis +for all functions. +.ie n .IP """\-A[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-A[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-A[symspec]" +.PD 0 +.ie n .IP """\-\-annotated\-source[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-annotated\-source[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--annotated-source[=symspec]" +.PD +The \fB\-A\fR option causes \f(CW\*(C`gprof\*(C'\fR to print annotated source code. +If \fIsymspec\fR is specified, print output only for matching symbols. +.ie n .IP """\-b""" 4 +.el .IP "\f(CW\-b\fR" 4 +.IX Item "-b" +.PD 0 +.ie n .IP """\-\-brief""" 4 +.el .IP "\f(CW\-\-brief\fR" 4 +.IX Item "--brief" +.PD +If the \fB\-b\fR option is given, \f(CW\*(C`gprof\*(C'\fR doesn't print the +verbose blurbs that try to explain the meaning of all of the fields in +the tables. This is useful if you intend to print out the output, or +are tired of seeing the blurbs. +.ie n .IP """\-C[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-C[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-C[symspec]" +.PD 0 +.ie n .IP """\-\-exec\-counts[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-exec\-counts[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--exec-counts[=symspec]" +.PD +The \fB\-C\fR option causes \f(CW\*(C`gprof\*(C'\fR to +print a tally of functions and the number of times each was called. +If \fIsymspec\fR is specified, print tally only for matching symbols. +.Sp +If the profile data file contains basic-block count records, specifying +the \fB\-l\fR option, along with \fB\-C\fR, will cause basic-block +execution counts to be tallied and displayed. +.ie n .IP """\-i""" 4 +.el .IP "\f(CW\-i\fR" 4 +.IX Item "-i" +.PD 0 +.ie n .IP """\-\-file\-info""" 4 +.el .IP "\f(CW\-\-file\-info\fR" 4 +.IX Item "--file-info" +.PD +The \fB\-i\fR option causes \f(CW\*(C`gprof\*(C'\fR to display summary information +about the profile data file(s) and then exit. The number of histogram, +call graph, and basic-block count records is displayed. +.ie n .IP """\-I \f(CIdirs\f(CW""" 4 +.el .IP "\f(CW\-I \f(CIdirs\f(CW\fR" 4 +.IX Item "-I dirs" +.PD 0 +.ie n .IP """\-\-directory\-path=\f(CIdirs\f(CW""" 4 +.el .IP "\f(CW\-\-directory\-path=\f(CIdirs\f(CW\fR" 4 +.IX Item "--directory-path=dirs" +.PD +The \fB\-I\fR option specifies a list of search directories in +which to find source files. Environment variable \fI\s-1GPROF_PATH\s0\fR +can also be used to convey this information. +Used mostly for annotated source output. +.ie n .IP """\-J[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-J[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-J[symspec]" +.PD 0 +.ie n .IP """\-\-no\-annotated\-source[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-no\-annotated\-source[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--no-annotated-source[=symspec]" +.PD +The \fB\-J\fR option causes \f(CW\*(C`gprof\*(C'\fR not to +print annotated source code. +If \fIsymspec\fR is specified, \f(CW\*(C`gprof\*(C'\fR prints annotated source, +but excludes matching symbols. +.ie n .IP """\-L""" 4 +.el .IP "\f(CW\-L\fR" 4 +.IX Item "-L" +.PD 0 +.ie n .IP """\-\-print\-path""" 4 +.el .IP "\f(CW\-\-print\-path\fR" 4 +.IX Item "--print-path" +.PD +Normally, source filenames are printed with the path +component suppressed. The \fB\-L\fR option causes \f(CW\*(C`gprof\*(C'\fR +to print the full pathname of +source filenames, which is determined +from symbolic debugging information in the image file +and is relative to the directory in which the compiler +was invoked. +.ie n .IP """\-p[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-p[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-p[symspec]" +.PD 0 +.ie n .IP """\-\-flat\-profile[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-flat\-profile[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--flat-profile[=symspec]" +.PD +The \fB\-p\fR option causes \f(CW\*(C`gprof\*(C'\fR to print a flat profile. +If \fIsymspec\fR is specified, print flat profile only for matching symbols. +.ie n .IP """\-P[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-P[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-P[symspec]" +.PD 0 +.ie n .IP """\-\-no\-flat\-profile[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-no\-flat\-profile[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--no-flat-profile[=symspec]" +.PD +The \fB\-P\fR option causes \f(CW\*(C`gprof\*(C'\fR to suppress printing a flat profile. +If \fIsymspec\fR is specified, \f(CW\*(C`gprof\*(C'\fR prints a flat profile, +but excludes matching symbols. +.ie n .IP """\-q[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-q[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-q[symspec]" +.PD 0 +.ie n .IP """\-\-graph[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-graph[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--graph[=symspec]" +.PD +The \fB\-q\fR option causes \f(CW\*(C`gprof\*(C'\fR to print the call graph analysis. +If \fIsymspec\fR is specified, print call graph only for matching symbols +and their children. +.ie n .IP """\-Q[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-Q[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-Q[symspec]" +.PD 0 +.ie n .IP """\-\-no\-graph[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-no\-graph[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--no-graph[=symspec]" +.PD +The \fB\-Q\fR option causes \f(CW\*(C`gprof\*(C'\fR to suppress printing the +call graph. +If \fIsymspec\fR is specified, \f(CW\*(C`gprof\*(C'\fR prints a call graph, +but excludes matching symbols. +.ie n .IP """\-t""" 4 +.el .IP "\f(CW\-t\fR" 4 +.IX Item "-t" +.PD 0 +.ie n .IP """\-\-table\-length=\f(CInum\f(CW""" 4 +.el .IP "\f(CW\-\-table\-length=\f(CInum\f(CW\fR" 4 +.IX Item "--table-length=num" +.PD +The \fB\-t\fR option causes the \fInum\fR most active source lines in +each source file to be listed when source annotation is enabled. The +default is 10. +.ie n .IP """\-y""" 4 +.el .IP "\f(CW\-y\fR" 4 +.IX Item "-y" +.PD 0 +.ie n .IP """\-\-separate\-files""" 4 +.el .IP "\f(CW\-\-separate\-files\fR" 4 +.IX Item "--separate-files" +.PD +This option affects annotated source output only. +Normally, \f(CW\*(C`gprof\*(C'\fR prints annotated source files +to standard-output. If this option is specified, +annotated source for a file named \fIpath/\fIfilename\fI\fR +is generated in the file \fI\fIfilename\fI\-ann\fR. If the underlying +file system would truncate \fI\fIfilename\fI\-ann\fR so that it +overwrites the original \fI\fIfilename\fI\fR, \f(CW\*(C`gprof\*(C'\fR generates +annotated source in the file \fI\fIfilename\fI.ann\fR instead (if the +original file name has an extension, that extension is \fIreplaced\fR +with \fI.ann\fR). +.ie n .IP """\-Z[\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-Z[\f(CIsymspec\f(CW]\fR" 4 +.IX Item "-Z[symspec]" +.PD 0 +.ie n .IP """\-\-no\-exec\-counts[=\f(CIsymspec\f(CW]""" 4 +.el .IP "\f(CW\-\-no\-exec\-counts[=\f(CIsymspec\f(CW]\fR" 4 +.IX Item "--no-exec-counts[=symspec]" +.PD +The \fB\-Z\fR option causes \f(CW\*(C`gprof\*(C'\fR not to +print a tally of functions and the number of times each was called. +If \fIsymspec\fR is specified, print tally, but exclude matching symbols. +.ie n .IP """\-r""" 4 +.el .IP "\f(CW\-r\fR" 4 +.IX Item "-r" +.PD 0 +.ie n .IP """\-\-function\-ordering""" 4 +.el .IP "\f(CW\-\-function\-ordering\fR" 4 +.IX Item "--function-ordering" +.PD +The \fB\-\-function\-ordering\fR option causes \f(CW\*(C`gprof\*(C'\fR to print a +suggested function ordering for the program based on profiling data. +This option suggests an ordering which may improve paging, tlb and +cache behavior for the program on systems which support arbitrary +ordering of functions in an executable. +.Sp +The exact details of how to force the linker to place functions +in a particular order is system dependent and out of the scope of this +manual. +.ie n .IP """\-R \f(CImap_file\f(CW""" 4 +.el .IP "\f(CW\-R \f(CImap_file\f(CW\fR" 4 +.IX Item "-R map_file" +.PD 0 +.ie n .IP """\-\-file\-ordering \f(CImap_file\f(CW""" 4 +.el .IP "\f(CW\-\-file\-ordering \f(CImap_file\f(CW\fR" 4 +.IX Item "--file-ordering map_file" +.PD +The \fB\-\-file\-ordering\fR option causes \f(CW\*(C`gprof\*(C'\fR to print a +suggested .o link line ordering for the program based on profiling data. +This option suggests an ordering which may improve paging, tlb and +cache behavior for the program on systems which do not support arbitrary +ordering of functions in an executable. +.Sp +Use of the \fB\-a\fR argument is highly recommended with this option. +.Sp +The \fImap_file\fR argument is a pathname to a file which provides +function name to object file mappings. The format of the file is similar to +the output of the program \f(CW\*(C`nm\*(C'\fR. +.Sp +.Vb 8 +\& c\-parse.o:00000000 T yyparse +\& c\-parse.o:00000004 C yyerrflag +\& c\-lang.o:00000000 T maybe_objc_method_name +\& c\-lang.o:00000000 T print_lang_statistics +\& c\-lang.o:00000000 T recognize_objc_keyword +\& c\-decl.o:00000000 T print_lang_identifier +\& c\-decl.o:00000000 T print_lang_type +\& ... +.Ve +.Sp +To create a \fImap_file\fR with \s-1GNU \s0\f(CW\*(C`nm\*(C'\fR, type a command like +\&\f(CW\*(C`nm \-\-extern\-only \-\-defined\-only \-v \-\-print\-file\-name program\-name\*(C'\fR. +.ie n .IP """\-T""" 4 +.el .IP "\f(CW\-T\fR" 4 +.IX Item "-T" +.PD 0 +.ie n .IP """\-\-traditional""" 4 +.el .IP "\f(CW\-\-traditional\fR" 4 +.IX Item "--traditional" +.PD +The \fB\-T\fR option causes \f(CW\*(C`gprof\*(C'\fR to print its output in +\&\*(L"traditional\*(R" \s-1BSD\s0 style. +.ie n .IP """\-w \f(CIwidth\f(CW""" 4 +.el .IP "\f(CW\-w \f(CIwidth\f(CW\fR" 4 +.IX Item "-w width" +.PD 0 +.ie n .IP """\-\-width=\f(CIwidth\f(CW""" 4 +.el .IP "\f(CW\-\-width=\f(CIwidth\f(CW\fR" 4 +.IX Item "--width=width" +.PD +Sets width of output lines to \fIwidth\fR. +Currently only used when printing the function index at the bottom +of the call graph. +.ie n .IP """\-x""" 4 +.el .IP "\f(CW\-x\fR" 4 +.IX Item "-x" +.PD 0 +.ie n .IP """\-\-all\-lines""" 4 +.el .IP "\f(CW\-\-all\-lines\fR" 4 +.IX Item "--all-lines" +.PD +This option affects annotated source output only. +By default, only the lines at the beginning of a basic-block +are annotated. If this option is specified, every line in +a basic-block is annotated by repeating the annotation for the +first line. This behavior is similar to \f(CW\*(C`tcov\*(C'\fR's \fB\-a\fR. +.ie n .IP """\-\-demangle[=\f(CIstyle\f(CW]""" 4 +.el .IP "\f(CW\-\-demangle[=\f(CIstyle\f(CW]\fR" 4 +.IX Item "--demangle[=style]" +.PD 0 +.ie n .IP """\-\-no\-demangle""" 4 +.el .IP "\f(CW\-\-no\-demangle\fR" 4 +.IX Item "--no-demangle" +.PD +These options control whether \*(C+ symbol names should be demangled when +printing output. The default is to demangle symbols. The +\&\f(CW\*(C`\-\-no\-demangle\*(C'\fR option may be used to turn off demangling. Different +compilers have different mangling styles. The optional demangling style +argument can be used to choose an appropriate demangling style for your +compiler. +.SS "Analysis Options" +.IX Subsection "Analysis Options" +.ie n .IP """\-a""" 4 +.el .IP "\f(CW\-a\fR" 4 +.IX Item "-a" +.PD 0 +.ie n .IP """\-\-no\-static""" 4 +.el .IP "\f(CW\-\-no\-static\fR" 4 +.IX Item "--no-static" +.PD +The \fB\-a\fR option causes \f(CW\*(C`gprof\*(C'\fR to suppress the printing of +statically declared (private) functions. (These are functions whose +names are not listed as global, and which are not visible outside the +file/function/block where they were defined.) Time spent in these +functions, calls to/from them, etc., will all be attributed to the +function that was loaded directly before it in the executable file. +This option affects both the flat profile and the call graph. +.ie n .IP """\-c""" 4 +.el .IP "\f(CW\-c\fR" 4 +.IX Item "-c" +.PD 0 +.ie n .IP """\-\-static\-call\-graph""" 4 +.el .IP "\f(CW\-\-static\-call\-graph\fR" 4 +.IX Item "--static-call-graph" +.PD +The \fB\-c\fR option causes the call graph of the program to be +augmented by a heuristic which examines the text space of the object +file and identifies function calls in the binary machine code. +Since normal call graph records are only generated when functions are +entered, this option identifies children that could have been called, +but never were. Calls to functions that were not compiled with +profiling enabled are also identified, but only if symbol table +entries are present for them. +Calls to dynamic library routines are typically \fInot\fR found +by this option. +Parents or children identified via this heuristic +are indicated in the call graph with call counts of \fB0\fR. +.ie n .IP """\-D""" 4 +.el .IP "\f(CW\-D\fR" 4 +.IX Item "-D" +.PD 0 +.ie n .IP """\-\-ignore\-non\-functions""" 4 +.el .IP "\f(CW\-\-ignore\-non\-functions\fR" 4 +.IX Item "--ignore-non-functions" +.PD +The \fB\-D\fR option causes \f(CW\*(C`gprof\*(C'\fR to ignore symbols which +are not known to be functions. This option will give more accurate +profile data on systems where it is supported (Solaris and \s-1HPUX\s0 for +example). +.ie n .IP """\-k \f(CIfrom\f(CW/\f(CIto\f(CW""" 4 +.el .IP "\f(CW\-k \f(CIfrom\f(CW/\f(CIto\f(CW\fR" 4 +.IX Item "-k from/to" +The \fB\-k\fR option allows you to delete from the call graph any arcs from +symbols matching symspec \fIfrom\fR to those matching symspec \fIto\fR. +.ie n .IP """\-l""" 4 +.el .IP "\f(CW\-l\fR" 4 +.IX Item "-l" +.PD 0 +.ie n .IP """\-\-line""" 4 +.el .IP "\f(CW\-\-line\fR" 4 +.IX Item "--line" +.PD +The \fB\-l\fR option enables line-by-line profiling, which causes +histogram hits to be charged to individual source code lines, +instead of functions. This feature only works with programs compiled +by older versions of the \f(CW\*(C`gcc\*(C'\fR compiler. Newer versions of +\&\f(CW\*(C`gcc\*(C'\fR are designed to work with the \f(CW\*(C`gcov\*(C'\fR tool instead. +.Sp +If the program was compiled with basic-block counting enabled, +this option will also identify how many times each line of +code was executed. +While line-by-line profiling can help isolate where in a large function +a program is spending its time, it also significantly increases +the running time of \f(CW\*(C`gprof\*(C'\fR, and magnifies statistical +inaccuracies. +.ie n .IP """\-\-inline\-file\-names""" 4 +.el .IP "\f(CW\-\-inline\-file\-names\fR" 4 +.IX Item "--inline-file-names" +This option causes \f(CW\*(C`gprof\*(C'\fR to print the source file after each +symbol in both the flat profile and the call graph. The full path to the +file is printed if used with the \fB\-L\fR option. +.ie n .IP """\-m \f(CInum\f(CW""" 4 +.el .IP "\f(CW\-m \f(CInum\f(CW\fR" 4 +.IX Item "-m num" +.PD 0 +.ie n .IP """\-\-min\-count=\f(CInum\f(CW""" 4 +.el .IP "\f(CW\-\-min\-count=\f(CInum\f(CW\fR" 4 +.IX Item "--min-count=num" +.PD +This option affects execution count output only. +Symbols that are executed less than \fInum\fR times are suppressed. +.ie n .IP """\-n\f(CIsymspec\f(CW""" 4 +.el .IP "\f(CW\-n\f(CIsymspec\f(CW\fR" 4 +.IX Item "-nsymspec" +.PD 0 +.ie n .IP """\-\-time=\f(CIsymspec\f(CW""" 4 +.el .IP "\f(CW\-\-time=\f(CIsymspec\f(CW\fR" 4 +.IX Item "--time=symspec" +.PD +The \fB\-n\fR option causes \f(CW\*(C`gprof\*(C'\fR, in its call graph analysis, +to only propagate times for symbols matching \fIsymspec\fR. +.ie n .IP """\-N\f(CIsymspec\f(CW""" 4 +.el .IP "\f(CW\-N\f(CIsymspec\f(CW\fR" 4 +.IX Item "-Nsymspec" +.PD 0 +.ie n .IP """\-\-no\-time=\f(CIsymspec\f(CW""" 4 +.el .IP "\f(CW\-\-no\-time=\f(CIsymspec\f(CW\fR" 4 +.IX Item "--no-time=symspec" +.PD +The \fB\-n\fR option causes \f(CW\*(C`gprof\*(C'\fR, in its call graph analysis, +not to propagate times for symbols matching \fIsymspec\fR. +.ie n .IP """\-S\f(CIfilename\f(CW""" 4 +.el .IP "\f(CW\-S\f(CIfilename\f(CW\fR" 4 +.IX Item "-Sfilename" +.PD 0 +.ie n .IP """\-\-external\-symbol\-table=\f(CIfilename\f(CW""" 4 +.el .IP "\f(CW\-\-external\-symbol\-table=\f(CIfilename\f(CW\fR" 4 +.IX Item "--external-symbol-table=filename" +.PD +The \fB\-S\fR option causes \f(CW\*(C`gprof\*(C'\fR to read an external symbol table +file, such as \fI/proc/kallsyms\fR, rather than read the symbol table +from the given object file (the default is \f(CW\*(C`a.out\*(C'\fR). This is useful +for profiling kernel modules. +.ie n .IP """\-z""" 4 +.el .IP "\f(CW\-z\fR" 4 +.IX Item "-z" +.PD 0 +.ie n .IP """\-\-display\-unused\-functions""" 4 +.el .IP "\f(CW\-\-display\-unused\-functions\fR" 4 +.IX Item "--display-unused-functions" +.PD +If you give the \fB\-z\fR option, \f(CW\*(C`gprof\*(C'\fR will mention all +functions in the flat profile, even those that were never called, and +that had no time spent in them. This is useful in conjunction with the +\&\fB\-c\fR option for discovering which routines were never called. +.SS "Miscellaneous Options" +.IX Subsection "Miscellaneous Options" +.ie n .IP """\-d[\f(CInum\f(CW]""" 4 +.el .IP "\f(CW\-d[\f(CInum\f(CW]\fR" 4 +.IX Item "-d[num]" +.PD 0 +.ie n .IP """\-\-debug[=\f(CInum\f(CW]""" 4 +.el .IP "\f(CW\-\-debug[=\f(CInum\f(CW]\fR" 4 +.IX Item "--debug[=num]" +.PD +The \fB\-d\fR \fInum\fR option specifies debugging options. +If \fInum\fR is not specified, enable all debugging. +.ie n .IP """\-h""" 4 +.el .IP "\f(CW\-h\fR" 4 +.IX Item "-h" +.PD 0 +.ie n .IP """\-\-help""" 4 +.el .IP "\f(CW\-\-help\fR" 4 +.IX Item "--help" +.PD +The \fB\-h\fR option prints command line usage. +.ie n .IP """\-O\f(CIname\f(CW""" 4 +.el .IP "\f(CW\-O\f(CIname\f(CW\fR" 4 +.IX Item "-Oname" +.PD 0 +.ie n .IP """\-\-file\-format=\f(CIname\f(CW""" 4 +.el .IP "\f(CW\-\-file\-format=\f(CIname\f(CW\fR" 4 +.IX Item "--file-format=name" +.PD +Selects the format of the profile data files. Recognized formats are +\&\fBauto\fR (the default), \fBbsd\fR, \fB4.4bsd\fR, \fBmagic\fR, and +\&\fBprof\fR (not yet supported). +.ie n .IP """\-s""" 4 +.el .IP "\f(CW\-s\fR" 4 +.IX Item "-s" +.PD 0 +.ie n .IP """\-\-sum""" 4 +.el .IP "\f(CW\-\-sum\fR" 4 +.IX Item "--sum" +.PD +The \fB\-s\fR option causes \f(CW\*(C`gprof\*(C'\fR to summarize the information +in the profile data files it read in, and write out a profile data +file called \fIgmon.sum\fR, which contains all the information from +the profile data files that \f(CW\*(C`gprof\*(C'\fR read in. The file \fIgmon.sum\fR +may be one of the specified input files; the effect of this is to +merge the data in the other input files into \fIgmon.sum\fR. +.Sp +Eventually you can run \f(CW\*(C`gprof\*(C'\fR again without \fB\-s\fR to analyze the +cumulative data in the file \fIgmon.sum\fR. +.ie n .IP """\-v""" 4 +.el .IP "\f(CW\-v\fR" 4 +.IX Item "-v" +.PD 0 +.ie n .IP """\-\-version""" 4 +.el .IP "\f(CW\-\-version\fR" 4 +.IX Item "--version" +.PD +The \fB\-v\fR flag causes \f(CW\*(C`gprof\*(C'\fR to print the current version +number, and then exit. +.SS "Deprecated Options" +.IX Subsection "Deprecated Options" +These options have been replaced with newer versions that use symspecs. +.ie n .IP """\-e \f(CIfunction_name\f(CW""" 4 +.el .IP "\f(CW\-e \f(CIfunction_name\f(CW\fR" 4 +.IX Item "-e function_name" +The \fB\-e\fR \fIfunction\fR option tells \f(CW\*(C`gprof\*(C'\fR to not print +information about the function \fIfunction_name\fR (and its +children...) in the call graph. The function will still be listed +as a child of any functions that call it, but its index number will be +shown as \fB[not printed]\fR. More than one \fB\-e\fR option may be +given; only one \fIfunction_name\fR may be indicated with each \fB\-e\fR +option. +.ie n .IP """\-E \f(CIfunction_name\f(CW""" 4 +.el .IP "\f(CW\-E \f(CIfunction_name\f(CW\fR" 4 +.IX Item "-E function_name" +The \f(CW\*(C`\-E \f(CIfunction\f(CW\*(C'\fR option works like the \f(CW\*(C`\-e\*(C'\fR option, but +time spent in the function (and children who were not called from +anywhere else), will not be used to compute the percentages-of-time for +the call graph. More than one \fB\-E\fR option may be given; only one +\&\fIfunction_name\fR may be indicated with each \fB\-E\fR option. +.ie n .IP """\-f \f(CIfunction_name\f(CW""" 4 +.el .IP "\f(CW\-f \f(CIfunction_name\f(CW\fR" 4 +.IX Item "-f function_name" +The \fB\-f\fR \fIfunction\fR option causes \f(CW\*(C`gprof\*(C'\fR to limit the +call graph to the function \fIfunction_name\fR and its children (and +their children...). More than one \fB\-f\fR option may be given; +only one \fIfunction_name\fR may be indicated with each \fB\-f\fR +option. +.ie n .IP """\-F \f(CIfunction_name\f(CW""" 4 +.el .IP "\f(CW\-F \f(CIfunction_name\f(CW\fR" 4 +.IX Item "-F function_name" +The \fB\-F\fR \fIfunction\fR option works like the \f(CW\*(C`\-f\*(C'\fR option, but +only time spent in the function and its children (and their +children...) will be used to determine total-time and +percentages-of-time for the call graph. More than one \fB\-F\fR option +may be given; only one \fIfunction_name\fR may be indicated with each +\&\fB\-F\fR option. The \fB\-F\fR option overrides the \fB\-E\fR option. +.SH "FILES" +.IX Header "FILES" +.ie n .IP """\f(CIa.out\f(CW""" 4 +.el .IP "\f(CW\f(CIa.out\f(CW\fR" 4 +.IX Item "a.out" +the namelist and text space. +.ie n .IP """\f(CIgmon.out\f(CW""" 4 +.el .IP "\f(CW\f(CIgmon.out\f(CW\fR" 4 +.IX Item "gmon.out" +dynamic call graph and profile. +.ie n .IP """\f(CIgmon.sum\f(CW""" 4 +.el .IP "\f(CW\f(CIgmon.sum\f(CW\fR" 4 +.IX Item "gmon.sum" +summarized dynamic call graph and profile. +.SH "BUGS" +.IX Header "BUGS" +The granularity of the sampling is shown, but remains +statistical at best. +We assume that the time for each execution of a function +can be expressed by the total time for the function divided +by the number of times the function is called. +Thus the time propagated along the call graph arcs to the function's +parents is directly proportional to the number of times that +arc is traversed. +.PP +Parents that are not themselves profiled will have the time of +their profiled children propagated to them, but they will appear +to be spontaneously invoked in the call graph listing, and will +not have their time propagated further. +Similarly, signal catchers, even though profiled, will appear +to be spontaneous (although for more obscure reasons). +Any profiled children of signal catchers should have their times +propagated properly, unless the signal catcher was invoked during +the execution of the profiling routine, in which case all is lost. +.PP +The profiled program must call \f(CW\*(C`exit\*(C'\fR(2) +or return normally for the profiling information to be saved +in the \fIgmon.out\fR file. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fImonitor\fR\|(3), \fIprofil\fR\|(2), \fIcc\fR\|(1), \fIprof\fR\|(1), and the Info entry for \fIgprof\fR. +.PP +\&\*(L"An Execution Profiler for Modular Programs\*(R", +by S. Graham, P. Kessler, M. McKusick; +Software \- Practice and Experience, +Vol. 13, pp. 671\-685, 1983. +.PP +\&\*(L"gprof: A Call Graph Execution Profiler\*(R", +by S. Graham, P. Kessler, M. McKusick; +Proceedings of the \s-1SIGPLAN \s0'82 Symposium on Compiler Construction, +\&\s-1SIGPLAN\s0 Notices, Vol. 17, No 6, pp. 120\-126, June 1982. +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 1988\-2016 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.3 +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/binutils227/block2/ld/Makefile b/gnu/usr.bin/binutils227/block2/ld/Makefile new file mode 100644 index 0000000000..33b552d1c0 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/ld/Makefile @@ -0,0 +1,92 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/ld + +PROG= ld.bfd +MFILE= ld${MANPAGEVER}.1 +MAN= ${MFILE} +SRCS+= ldgram.y \ + ldlex.l \ + lexsup.c \ + ldlang.c \ + mri.c \ + ldctor.c \ + ldmain.c \ + ldwrite.c \ + ldexp.c \ + ldemul.c \ + ldver.c \ + ldmisc.c \ + ldfile.c \ + ldcref.c \ + plugin.c \ + ldbuildid.c +LDADD= ${LDADD_BFD} ${LDADD_IBERTY} -lz + +LIBEXEC_BINUTILS= ${BINDIR}/.. +SCRIPTDIR= ${LIBEXEC_BINUTILS}/ldscripts +ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw + +.include "Makefile.x86_64" + +# We need to change CFLAGS, so that not to pick up bulibs's config.h first. +BULIBS_INC:= # empty + +CFLAGS+= -I${SRCDIR}/include -I${SRCDIR}/bfd +CFLAGS+= -I${SRCDIR}/ld -I${.OBJDIR} -I${.CURDIR} +CFLAGS+= ${_BULIBS_INC} # for bfd.h + +CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\" +CFLAGS+= -DBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\" +CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}${LIBEXEC_BINUTILS}\" +CFLAGS+= -DENABLE_PLUGINS -DHAVE_CONFIG_H +CFLAGS+= -DTARGET_SYSTEM_ROOT=\"${USRDATA_PREFIX}\" + +CFLAGS+= -DELF_LIST_OPTIONS=TRUE +CFLAGS+= -DELF_SHLIB_LIST_OPTIONS=TRUE +CFLAGS+= -DELF_PLT_UNWIND_LIST_OPTIONS=TRUE + +# XXX: Do we want -Wl,-z,relro on by default? Differs for ld.bfd and lg.gold. +CFLAGS+= -DDEFAULT_LD_Z_RELRO=0 + +# link-time optimization requires dlopen() which means ld cannot be built +# statically and also support -plugin, not even for cross-tools. +.undef NOSHARED + +ldemul.c: ldemul-list.h + +CLEANDIRS+= ldscripts tmpdir +CLEANFILES+= ldemul-list.h stringify.sed + +EMXFR= +EMLST= +.for _e in ${EMS} +EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation; +EMLST+= &ld_${_e}_emulation, +.endfor + +ldemul-list.h: + echo "${EMXFR}" > ${.TARGET} + echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET} + +stringify.sed: + ${LN} -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} + +${MFILE}: ${SRCDIR}/ld/ld.1 + cp ${.ALLSRC} ${.TARGET} + +install-ldscripts: ${LDSCRIPTS:S|^|ldscripts/|} + ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${.ALLSRC} ${DESTDIR}${SCRIPTDIR} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ld.1 +.endif + +afterinstall: install-ldscripts + +CLEANDIRS+= ldscripts tmpdir +CLEANFILES+= ${MFILE} ldemul-list.h stringify.sed + +.include diff --git a/gnu/usr.bin/binutils227/block2/ld/Makefile.x86_64 b/gnu/usr.bin/binutils227/block2/ld/Makefile.x86_64 new file mode 100644 index 0000000000..da97511d22 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/ld/Makefile.x86_64 @@ -0,0 +1,96 @@ +TARGET_TUPLE?= x86_64-just-dragonfly + +NATIVE_EMULATION= elf_x86_64 +X86_EMULATION= elf_i386 +L1OM_EMULATION= elf_l1om +K1OM_EMULATION= elf_k1om +HOST= ${TARGET_TUPLE} +FLAGS_GROUPS= emul +emul_FLAGS= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\" \ + -DTARGET=\"${TARGET_TUPLE}\" +emul_FLAGS_FILES= ldmain.c + +_x86_64_path= ${USRDATA_PREFIX}/lib:${USRDATA_PREFIX}/usr/lib +_i386_path= ${USRDATA_PREFIX}/lib/i386:${USRDATA_PREFIX}/usr/lib/i386 + +.for EMUL in ${NATIVE_EMULATION} ${X86_EMULATION} ${L1OM_EMULATION} ${K1OM_EMULATION} +EMS+= ${EMUL} +SRCS+= e${EMUL}.c +CLEANFILES+= e${EMUL}.c +. for ext in ${ELF_SCR_EXT} +LDSCRIPTS_${EMUL}+= ${EMUL}.${ext} +. endfor +LDSCRIPTS+= ${LDSCRIPTS_${EMUL}} +.endfor + +e${NATIVE_EMULATION}.c ${LDSCRIPTS_${NATIVE_EMULATION}}: \ + emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${SRCDIR}/ld/genscripts.sh \ + ${SRCDIR:Q}/ld \ + ${_x86_64_path:Q} \ + "" \ + "" \ + ${HOST} \ + ${TARGET_TUPLE:Q} \ + ${TARGET_TUPLE:Q} \ + ${NATIVE_EMULATION:Q} \ + "" \ + no \ + yes \ + ${NATIVE_EMULATION:Q} \ + ${TARGET_TUPLE:Q} + +e${X86_EMULATION}.c ${LDSCRIPTS_${X86_EMULATION}}: \ + emulparams/${X86_EMULATION}.sh emultempl/elf32.em \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${SRCDIR}/ld/genscripts.sh \ + ${SRCDIR:Q}/ld \ + ${_i386_path:Q} \ + "" \ + "" \ + ${HOST} \ + ${TARGET_TUPLE:Q} \ + ${TARGET_TUPLE:Q} \ + ${X86_EMULATION:Q} \ + "" \ + no \ + yes \ + ${X86_EMULATION:Q} \ + ${TARGET_TUPLE:Q} + +e${L1OM_EMULATION}.c ${LDSCRIPTS_${L1OM_EMULATION}}: \ + emulparams/${L1OM_EMULATION}.sh emultempl/elf32.em \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${SRCDIR}/ld/genscripts.sh \ + ${SRCDIR:Q}/ld \ + ${_x86_64_path:Q} \ + "" \ + "" \ + ${HOST} \ + ${TARGET_TUPLE:Q} \ + ${TARGET_TUPLE:Q} \ + ${L1OM_EMULATION:Q} \ + "" \ + no \ + yes \ + ${L1OM_EMULATION:Q} \ + ${TARGET_TUPLE:Q} + +e${K1OM_EMULATION}.c ${LDSCRIPTS_${K1OM_EMULATION}}: \ + emulparams/${K1OM_EMULATION}.sh emultempl/elf32.em \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${SRCDIR}/ld/genscripts.sh \ + ${SRCDIR:Q}/ld \ + ${_x86_64_path:Q} \ + "" \ + "" \ + ${HOST} \ + ${TARGET_TUPLE:Q} \ + ${TARGET_TUPLE:Q} \ + ${K1OM_EMULATION:Q} \ + "" \ + no \ + yes \ + ${K1OM_EMULATION:Q} \ + ${TARGET_TUPLE:Q} diff --git a/gnu/usr.bin/binutils227/block2/ld/config.h b/gnu/usr.bin/binutils227/block2/ld/config.h new file mode 100644 index 0000000000..8eaa181add --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/ld/config.h @@ -0,0 +1,238 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define if you want compressed debug sections by default. */ +/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +/* #define DEFAULT_LD_Z_RELRO 0 */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Additional extension a shared object might have. */ +/* #undef EXTRA_SHLIB_EXTENSION */ + +/* Define to choose default GOT handling scheme */ +#define GOT_HANDLING_DEFAULT GOT_HANDLING_TARGET_DEFAULT + +/* Define to 1 if you have the `close' function. */ +#define HAVE_CLOSE 1 + +/* Define to 1 if you have the declaration of `environ', and to 0 if you + don't. */ +#define HAVE_DECL_ENVIRON 0 + +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 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 `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ELF_HINTS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `glob' function. */ +#define HAVE_GLOB 1 + +/* Define .init_array/.fini_array sections are available and working. */ +#define HAVE_INITFINI_ARRAY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `lseek' function. */ +#define HAVE_LSEEK 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the `open' function. */ +#define HAVE_OPEN 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "ld" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ld" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ld 2.27" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "ld" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.27" + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 + +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.27" + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/gnu/usr.bin/binutils227/block2/libgold/Makefile b/gnu/usr.bin/binutils227/block2/libgold/Makefile new file mode 100644 index 0000000000..4658042eb0 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/libgold/Makefile @@ -0,0 +1,60 @@ +.include "../../Makefile.inc1" +.include "../../block3/Makefile.gld" + +LIB= gold +INTERNALLIB= true + +# copied from gold/Makefile +SRCS= archive.cc \ + attributes.cc \ + binary.cc \ + common.cc \ + compressed_output.cc \ + copy-relocs.cc \ + cref.cc \ + defstd.cc \ + descriptors.cc \ + dirsearch.cc \ + dynobj.cc \ + dwarf_reader.cc \ + ehframe.cc \ + errors.cc \ + expression.cc \ + fileread.cc \ + gc.cc \ + gdb-index.cc \ + gold.cc \ + gold-threads.cc \ + icf.cc \ + incremental.cc \ + int_encoding.cc \ + layout.cc \ + mapfile.cc \ + merge.cc \ + nacl.cc \ + object.cc \ + options.cc \ + output.cc \ + parameters.cc \ + plugin.cc \ + readsyms.cc \ + reduced_debug_output.cc \ + reloc.cc \ + resolve.cc \ + script-sections.cc \ + script.cc \ + stringpool.cc \ + symtab.cc \ + target.cc \ + target-select.cc \ + timer.cc \ + version.cc \ + workqueue.cc + +# only when ENABLE_THREADS +#SRCS+= workqueue-threads.cc + +# extra sources +SRCS+= yyscript.c mremap.c + +.include diff --git a/gnu/usr.bin/binutils227/block2/libgold/config.h b/gnu/usr.bin/binutils227/block2/libgold/config.h new file mode 100644 index 0000000000..5af9adb6a4 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/libgold/config.h @@ -0,0 +1,284 @@ +/* config.h. Generated from config.in by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ + +/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1 + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if you want to enable -z relro in ELF linker by default. */ +/* #define DEFAULT_LD_Z_RELRO 1 */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to enable linker plugins */ +#define ENABLE_PLUGINS 1 + +/* Define to do multi-threaded linking */ +/* #undef ENABLE_THREADS */ + +/* Default big endian (true or false) */ +#define GOLD_DEFAULT_BIG_ENDIAN false + +/* Default machine code */ +#define GOLD_DEFAULT_MACHINE EM_X86_64 + +/* Default OSABI code */ +#define GOLD_DEFAULT_OSABI ELFOSABI_NONE + +/* Default size (32 or 64) */ +#define GOLD_DEFAULT_SIZE 64 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the `chsize' function. */ +/* #undef HAVE_CHSIZE */ + +/* 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 `ffs', and to 0 if you don't. */ +#define HAVE_DECL_FFS 1 + +/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. + */ +#define HAVE_DECL_MEMMEM 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 `strndup', and to 0 if you + don't. */ +#define HAVE_DECL_STRNDUP 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 header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_EXT_HASH_MAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_EXT_HASH_SET 1 + +/* Define to 1 if you have the `fallocate' function. */ +/* #undef HAVE_FALLOCATE */ + +/* Define to 1 if you have the `ffsll' function. */ +#define HAVE_FFSLL 1 + +/* Define to 1 if you have the `ftruncate' function. */ +#define HAVE_FTRUNCATE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `mallinfo' function. */ +/* #undef HAVE_MALLINFO */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the mremap function with MREMAP_MAYMOVE support */ +/* #undef HAVE_MREMAP */ + +/* Define if compiler supports #pragma omp threadprivate */ +#define HAVE_OMP_SUPPORT 1 + +/* Define to 1 if you have the `posix_fallocate' function. */ +/* #undef HAVE_POSIX_FALLOCATE */ + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the `readv' function. */ +#define HAVE_READV 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define if struct stat has a field st_mtim with timespec for mtime */ +#define HAVE_STAT_ST_MTIM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to support 32-bit big-endian targets */ +/* #undef HAVE_TARGET_32_BIG */ + +/* Define to support 32-bit little-endian targets */ +#define HAVE_TARGET_32_LITTLE 1 + +/* Define to support 64-bit big-endian targets */ +/* #undef HAVE_TARGET_64_BIG */ + +/* Define to support 64-bit little-endian targets */ +#define HAVE_TARGET_64_LITTLE 1 + +/* Define if attributes work on C++ templates */ +#define HAVE_TEMPLATE_ATTRIBUTES 1 + +/* Define to 1 if you have the `times' function. */ +#define HAVE_TIMES 1 + +/* Define if std::tr1::hash is usable */ +#define HAVE_TR1_HASH_OFF_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TR1_UNORDERED_MAP 1 + +/* Define if ::std::tr1::unordered_map::rehash is usable */ +#define HAVE_TR1_UNORDERED_MAP_REHASH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TR1_UNORDERED_SET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNORDERED_MAP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNORDERED_SET */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Default library search path */ +#define LIB_PATH "/lib:/usr/lib" + +/* Whether configured as a native linker */ +#define NATIVE_LINKER 1 + +/* Name of package */ +#define PACKAGE "gold" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gold" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gold 0.1" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gold" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.1" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* System root for target files */ +/* #define TARGET_SYSTEM_ROOT "" */ + +/* Whether the system root can be relocated */ +#define TARGET_SYSTEM_ROOT_RELOCATABLE 0 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "0.1" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ diff --git a/gnu/usr.bin/binutils227/block2/libgold/yyscript.c b/gnu/usr.bin/binutils227/block2/libgold/yyscript.c new file mode 100644 index 0000000000..d8a081f0e9 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/libgold/yyscript.c @@ -0,0 +1,3872 @@ +/* A Bison parser, made by GNU Bison 2.7.12-4996. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 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, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.7.12-4996" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* Copy the first part of user declarations. */ +/* Line 371 of yacc.c */ +#line 26 "yyscript.y" + + +#include "config.h" + +#include +#include +#include +#include + +#include "script-c.h" + + +/* Line 371 of yacc.c */ +#line 81 "yyscript.c" + +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_YY_YYSCRIPT_H_INCLUDED +# define YY_YY_YYSCRIPT_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + OREQ = 258, + ANDEQ = 259, + RSHIFTEQ = 260, + LSHIFTEQ = 261, + DIVEQ = 262, + MULTEQ = 263, + MINUSEQ = 264, + PLUSEQ = 265, + OROR = 266, + ANDAND = 267, + NE = 268, + EQ = 269, + GE = 270, + LE = 271, + RSHIFT = 272, + LSHIFT = 273, + UNARY = 274, + STRING = 275, + QUOTED_STRING = 276, + INTEGER = 277, + ABSOLUTE = 278, + ADDR = 279, + ALIGN_K = 280, + ALIGNOF = 281, + ASSERT_K = 282, + AS_NEEDED = 283, + AT = 284, + BIND = 285, + BLOCK = 286, + BYTE = 287, + CONSTANT = 288, + CONSTRUCTORS = 289, + COPY = 290, + CREATE_OBJECT_SYMBOLS = 291, + DATA_SEGMENT_ALIGN = 292, + DATA_SEGMENT_END = 293, + DATA_SEGMENT_RELRO_END = 294, + DEFINED = 295, + DSECT = 296, + ENTRY = 297, + EXCLUDE_FILE = 298, + EXTERN = 299, + FILL = 300, + FLOAT = 301, + FORCE_COMMON_ALLOCATION = 302, + GLOBAL = 303, + GROUP = 304, + HLL = 305, + INCLUDE = 306, + INHIBIT_COMMON_ALLOCATION = 307, + INFO = 308, + INPUT = 309, + KEEP = 310, + LEN = 311, + LENGTH = 312, + LOADADDR = 313, + LOCAL = 314, + LONG = 315, + MAP = 316, + MAX_K = 317, + MEMORY = 318, + MIN_K = 319, + NEXT = 320, + NOCROSSREFS = 321, + NOFLOAT = 322, + NOLOAD = 323, + ONLY_IF_RO = 324, + ONLY_IF_RW = 325, + ORG = 326, + ORIGIN = 327, + OUTPUT = 328, + OUTPUT_ARCH = 329, + OUTPUT_FORMAT = 330, + OVERLAY = 331, + PHDRS = 332, + PROVIDE = 333, + PROVIDE_HIDDEN = 334, + QUAD = 335, + SEARCH_DIR = 336, + SECTIONS = 337, + SEGMENT_START = 338, + SHORT = 339, + SIZEOF = 340, + SIZEOF_HEADERS = 341, + SORT_BY_ALIGNMENT = 342, + SORT_BY_INIT_PRIORITY = 343, + SORT_BY_NAME = 344, + SPECIAL = 345, + SQUAD = 346, + STARTUP = 347, + SUBALIGN = 348, + SYSLIB = 349, + TARGET_K = 350, + TRUNCATE = 351, + VERSIONK = 352, + OPTION = 353, + PARSING_LINKER_SCRIPT = 354, + PARSING_VERSION_SCRIPT = 355, + PARSING_DEFSYM = 356, + PARSING_DYNAMIC_LIST = 357, + PARSING_SECTIONS_BLOCK = 358, + PARSING_SECTION_COMMANDS = 359, + PARSING_MEMORY_DEF = 360 + }; +#endif +/* Tokens. */ +#define OREQ 258 +#define ANDEQ 259 +#define RSHIFTEQ 260 +#define LSHIFTEQ 261 +#define DIVEQ 262 +#define MULTEQ 263 +#define MINUSEQ 264 +#define PLUSEQ 265 +#define OROR 266 +#define ANDAND 267 +#define NE 268 +#define EQ 269 +#define GE 270 +#define LE 271 +#define RSHIFT 272 +#define LSHIFT 273 +#define UNARY 274 +#define STRING 275 +#define QUOTED_STRING 276 +#define INTEGER 277 +#define ABSOLUTE 278 +#define ADDR 279 +#define ALIGN_K 280 +#define ALIGNOF 281 +#define ASSERT_K 282 +#define AS_NEEDED 283 +#define AT 284 +#define BIND 285 +#define BLOCK 286 +#define BYTE 287 +#define CONSTANT 288 +#define CONSTRUCTORS 289 +#define COPY 290 +#define CREATE_OBJECT_SYMBOLS 291 +#define DATA_SEGMENT_ALIGN 292 +#define DATA_SEGMENT_END 293 +#define DATA_SEGMENT_RELRO_END 294 +#define DEFINED 295 +#define DSECT 296 +#define ENTRY 297 +#define EXCLUDE_FILE 298 +#define EXTERN 299 +#define FILL 300 +#define FLOAT 301 +#define FORCE_COMMON_ALLOCATION 302 +#define GLOBAL 303 +#define GROUP 304 +#define HLL 305 +#define INCLUDE 306 +#define INHIBIT_COMMON_ALLOCATION 307 +#define INFO 308 +#define INPUT 309 +#define KEEP 310 +#define LEN 311 +#define LENGTH 312 +#define LOADADDR 313 +#define LOCAL 314 +#define LONG 315 +#define MAP 316 +#define MAX_K 317 +#define MEMORY 318 +#define MIN_K 319 +#define NEXT 320 +#define NOCROSSREFS 321 +#define NOFLOAT 322 +#define NOLOAD 323 +#define ONLY_IF_RO 324 +#define ONLY_IF_RW 325 +#define ORG 326 +#define ORIGIN 327 +#define OUTPUT 328 +#define OUTPUT_ARCH 329 +#define OUTPUT_FORMAT 330 +#define OVERLAY 331 +#define PHDRS 332 +#define PROVIDE 333 +#define PROVIDE_HIDDEN 334 +#define QUAD 335 +#define SEARCH_DIR 336 +#define SECTIONS 337 +#define SEGMENT_START 338 +#define SHORT 339 +#define SIZEOF 340 +#define SIZEOF_HEADERS 341 +#define SORT_BY_ALIGNMENT 342 +#define SORT_BY_INIT_PRIORITY 343 +#define SORT_BY_NAME 344 +#define SPECIAL 345 +#define SQUAD 346 +#define STARTUP 347 +#define SUBALIGN 348 +#define SYSLIB 349 +#define TARGET_K 350 +#define TRUNCATE 351 +#define VERSIONK 352 +#define OPTION 353 +#define PARSING_LINKER_SCRIPT 354 +#define PARSING_VERSION_SCRIPT 355 +#define PARSING_DEFSYM 356 +#define PARSING_DYNAMIC_LIST 357 +#define PARSING_SECTIONS_BLOCK 358 +#define PARSING_SECTION_COMMANDS 359 +#define PARSING_MEMORY_DEF 360 + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ +/* Line 387 of yacc.c */ +#line 53 "yyscript.y" + + /* A string. */ + struct Parser_string string; + /* A number. */ + uint64_t integer; + /* An expression. */ + Expression_ptr expr; + /* An output section header. */ + struct Parser_output_section_header output_section_header; + /* An output section trailer. */ + struct Parser_output_section_trailer output_section_trailer; + /* A section constraint. */ + enum Section_constraint constraint; + /* A complete input section specification. */ + struct Input_section_spec input_section_spec; + /* A list of wildcard specifications, with exclusions. */ + struct Wildcard_sections wildcard_sections; + /* A single wildcard specification. */ + struct Wildcard_section wildcard_section; + /* A list of strings. */ + String_list_ptr string_list; + /* Information for a program header. */ + struct Phdr_info phdr_info; + /* Used for version scripts and within VERSION {}. */ + struct Version_dependency_list* deplist; + struct Version_expression_list* versyms; + struct Version_tree* versnode; + enum Script_section_type section_type; + + +/* Line 387 of yacc.c */ +#line 365 "yyscript.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void* closure); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_YY_YYSCRIPT_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +/* Line 390 of yacc.c */ +#line 392 "yyscript.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) +# define __attribute__(Spec) /* empty */ +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(N) (N) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 26 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 1464 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 129 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 70 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 240 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 549 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 360 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 125, 2, 2, 2, 31, 18, 2, + 119, 120, 29, 27, 123, 28, 2, 30, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 13, 124, + 21, 3, 22, 12, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 17, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 127, 2, + 2, 126, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 121, 16, 122, 128, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 4, 5, + 6, 7, 8, 9, 10, 11, 14, 15, 19, 20, + 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 6, 9, 12, 15, 18, 21, 24, + 27, 28, 33, 35, 36, 42, 44, 49, 54, 59, + 64, 73, 78, 83, 84, 90, 95, 96, 102, 107, + 110, 117, 120, 122, 124, 129, 130, 133, 135, 138, + 142, 144, 148, 150, 153, 154, 160, 163, 164, 169, + 172, 179, 182, 183, 191, 192, 193, 201, 203, 207, + 210, 215, 220, 226, 228, 230, 232, 234, 236, 237, + 242, 243, 248, 249, 254, 255, 257, 259, 261, 267, + 270, 271, 275, 276, 280, 281, 284, 285, 286, 289, + 292, 294, 299, 306, 311, 313, 318, 321, 323, 325, + 327, 329, 331, 333, 335, 340, 342, 347, 349, 354, + 358, 360, 367, 372, 374, 379, 384, 389, 393, 395, + 397, 399, 401, 405, 406, 417, 420, 421, 425, 430, + 431, 433, 435, 437, 439, 441, 443, 446, 447, 452, + 454, 456, 457, 460, 463, 469, 475, 479, 483, 487, + 491, 495, 499, 503, 507, 511, 518, 525, 526, 529, + 533, 536, 539, 542, 545, 549, 553, 557, 561, 565, + 569, 573, 577, 581, 585, 589, 593, 597, 601, 605, + 609, 613, 617, 623, 625, 627, 634, 641, 646, 648, + 653, 658, 663, 668, 673, 678, 683, 688, 693, 700, + 705, 712, 719, 724, 731, 738, 742, 744, 746, 749, + 755, 757, 759, 762, 767, 773, 780, 782, 785, 786, + 789, 794, 799, 808, 810, 812, 816, 820, 821, 829, + 830, 840, 842, 846, 848, 850, 852, 854, 856, 857, + 859 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 130, 0, -1, 112, 131, -1, 113, 187, -1, 114, + 183, -1, 115, 184, -1, 116, 143, -1, 117, 160, + -1, 118, 170, -1, 131, 132, -1, -1, 57, 119, + 137, 120, -1, 60, -1, -1, 62, 133, 119, 140, + 120, -1, 65, -1, 67, 119, 140, 120, -1, 76, + 121, 170, 122, -1, 111, 119, 195, 120, -1, 88, + 119, 195, 120, -1, 88, 119, 195, 123, 195, 123, + 195, 120, -1, 90, 121, 175, 122, -1, 94, 119, + 195, 120, -1, -1, 95, 121, 134, 143, 122, -1, + 108, 119, 195, 120, -1, -1, 110, 121, 135, 187, + 122, -1, 55, 119, 195, 120, -1, 179, 196, -1, + 40, 119, 180, 123, 195, 120, -1, 64, 195, -1, + 136, -1, 124, -1, 87, 119, 195, 120, -1, -1, + 138, 139, -1, 195, -1, 139, 195, -1, 139, 123, + 195, -1, 141, -1, 140, 198, 141, -1, 195, -1, + 28, 33, -1, -1, 41, 142, 119, 140, 120, -1, + 143, 144, -1, -1, 55, 119, 195, 120, -1, 179, + 196, -1, 40, 119, 180, 123, 195, 120, -1, 64, + 195, -1, -1, 195, 146, 145, 121, 160, 122, 155, + -1, -1, -1, 147, 149, 151, 152, 153, 148, 154, + -1, 13, -1, 119, 120, 13, -1, 182, 13, -1, + 182, 119, 120, 13, -1, 119, 150, 120, 13, -1, + 182, 119, 150, 120, 13, -1, 81, -1, 54, -1, + 48, -1, 66, -1, 89, -1, -1, 42, 119, 182, + 120, -1, -1, 38, 119, 182, 120, -1, -1, 106, + 119, 182, 120, -1, -1, 82, -1, 83, -1, 103, + -1, 156, 157, 158, 159, 198, -1, 22, 195, -1, + -1, 42, 22, 195, -1, -1, 158, 13, 195, -1, + -1, 3, 180, -1, -1, -1, 160, 161, -1, 179, + 196, -1, 163, -1, 162, 119, 180, 120, -1, 40, + 119, 180, 123, 195, 120, -1, 58, 119, 180, 120, + -1, 47, -1, 102, 119, 47, 120, -1, 64, 195, + -1, 124, -1, 93, -1, 104, -1, 73, -1, 97, + -1, 45, -1, 164, -1, 68, 119, 164, 120, -1, + 195, -1, 165, 119, 166, 120, -1, 169, -1, 102, + 119, 169, 120, -1, 166, 198, 167, -1, 167, -1, + 166, 198, 56, 119, 168, 120, -1, 56, 119, 168, + 120, -1, 169, -1, 102, 119, 167, 120, -1, 100, + 119, 167, 120, -1, 101, 119, 169, 120, -1, 168, + 198, 169, -1, 169, -1, 195, -1, 29, -1, 12, + -1, 170, 198, 171, -1, -1, 195, 172, 13, 173, + 3, 180, 198, 174, 3, 180, -1, 64, 195, -1, + -1, 119, 195, 120, -1, 119, 125, 195, 120, -1, + -1, 85, -1, 84, -1, 126, -1, 70, -1, 69, + -1, 127, -1, 175, 176, -1, -1, 195, 177, 178, + 124, -1, 195, -1, 35, -1, -1, 195, 178, -1, + 90, 178, -1, 195, 119, 35, 120, 178, -1, 42, + 119, 180, 120, 178, -1, 195, 3, 180, -1, 195, + 11, 180, -1, 195, 10, 180, -1, 195, 9, 180, + -1, 195, 8, 180, -1, 195, 7, 180, -1, 195, + 6, 180, -1, 195, 5, 180, -1, 195, 4, 180, + -1, 91, 119, 195, 3, 180, 120, -1, 92, 119, + 195, 3, 180, 120, -1, -1, 181, 182, -1, 119, + 182, 120, -1, 28, 182, -1, 125, 182, -1, 128, + 182, -1, 27, 182, -1, 182, 29, 182, -1, 182, + 30, 182, -1, 182, 31, 182, -1, 182, 27, 182, + -1, 182, 28, 182, -1, 182, 26, 182, -1, 182, + 25, 182, -1, 182, 20, 182, -1, 182, 19, 182, + -1, 182, 24, 182, -1, 182, 23, 182, -1, 182, + 21, 182, -1, 182, 22, 182, -1, 182, 18, 182, + -1, 182, 17, 182, -1, 182, 16, 182, -1, 182, + 15, 182, -1, 182, 14, 182, -1, 182, 12, 182, + 13, 182, -1, 35, -1, 195, -1, 75, 119, 182, + 123, 182, 120, -1, 77, 119, 182, 123, 182, 120, + -1, 53, 119, 195, 120, -1, 99, -1, 39, 119, + 195, 120, -1, 98, 119, 195, 120, -1, 37, 119, + 195, 120, -1, 71, 119, 195, 120, -1, 85, 119, + 195, 120, -1, 70, 119, 195, 120, -1, 46, 119, + 195, 120, -1, 36, 119, 182, 120, -1, 38, 119, + 182, 120, -1, 38, 119, 182, 123, 182, 120, -1, + 44, 119, 182, 120, -1, 50, 119, 182, 123, 182, + 120, -1, 52, 119, 182, 123, 182, 120, -1, 51, + 119, 182, 120, -1, 96, 119, 195, 123, 182, 120, + -1, 40, 119, 182, 123, 195, 120, -1, 195, 3, + 180, -1, 185, -1, 186, -1, 185, 186, -1, 121, + 192, 124, 122, 124, -1, 188, -1, 189, -1, 188, + 189, -1, 121, 191, 122, 124, -1, 195, 121, 191, + 122, 124, -1, 195, 121, 191, 122, 190, 124, -1, + 195, -1, 190, 195, -1, -1, 192, 124, -1, 61, + 13, 192, 124, -1, 72, 13, 192, 124, -1, 61, + 13, 192, 124, 72, 13, 192, 124, -1, 33, -1, + 34, -1, 192, 124, 33, -1, 192, 124, 34, -1, + -1, 57, 195, 121, 193, 192, 197, 122, -1, -1, + 192, 124, 57, 195, 121, 194, 192, 197, 122, -1, + 57, -1, 192, 124, 57, -1, 33, -1, 34, -1, + 124, -1, 123, -1, 124, -1, -1, 123, -1, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 235, 235, 236, 237, 238, 239, 240, 241, 246, + 247, 252, 253, 256, 255, 259, 261, 262, 263, 265, + 271, 278, 279, 282, 281, 285, 288, 287, 291, 293, + 294, 296, 299, 300, 308, 316, 316, 322, 324, 326, + 332, 333, 338, 340, 343, 342, 350, 351, 356, 358, + 359, 361, 365, 364, 373, 375, 373, 392, 397, 402, + 407, 412, 417, 426, 428, 433, 438, 443, 453, 454, + 461, 462, 469, 470, 477, 478, 480, 482, 488, 497, + 499, 504, 506, 511, 514, 520, 523, 528, 530, 536, + 537, 538, 540, 542, 544, 551, 552, 555, 561, 563, + 565, 567, 569, 576, 578, 584, 591, 600, 605, 614, + 619, 624, 629, 638, 643, 662, 681, 690, 692, 699, + 701, 706, 715, 716, 721, 724, 727, 732, 735, 738, + 742, 744, 746, 750, 752, 754, 759, 760, 765, 774, + 776, 783, 784, 792, 797, 808, 817, 819, 825, 831, + 837, 843, 849, 855, 861, 867, 869, 875, 875, 885, + 887, 889, 891, 893, 895, 897, 899, 901, 903, 905, + 907, 909, 911, 913, 915, 917, 919, 921, 923, 925, + 927, 929, 931, 933, 935, 937, 939, 941, 943, 945, + 947, 949, 951, 953, 955, 957, 959, 961, 963, 965, + 967, 972, 977, 979, 987, 993, 1003, 1006, 1007, 1011, + 1017, 1021, 1022, 1026, 1030, 1035, 1042, 1046, 1054, 1055, + 1057, 1059, 1061, 1070, 1075, 1080, 1085, 1092, 1091, 1102, + 1101, 1108, 1113, 1123, 1125, 1132, 1133, 1138, 1139, 1144, + 1145 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "'='", "OREQ", "ANDEQ", "RSHIFTEQ", + "LSHIFTEQ", "DIVEQ", "MULTEQ", "MINUSEQ", "PLUSEQ", "'?'", "':'", "OROR", + "ANDAND", "'|'", "'^'", "'&'", "NE", "EQ", "'<'", "'>'", "GE", "LE", + "RSHIFT", "LSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "STRING", + "QUOTED_STRING", "INTEGER", "ABSOLUTE", "ADDR", "ALIGN_K", "ALIGNOF", + "ASSERT_K", "AS_NEEDED", "AT", "BIND", "BLOCK", "BYTE", "CONSTANT", + "CONSTRUCTORS", "COPY", "CREATE_OBJECT_SYMBOLS", "DATA_SEGMENT_ALIGN", + "DATA_SEGMENT_END", "DATA_SEGMENT_RELRO_END", "DEFINED", "DSECT", + "ENTRY", "EXCLUDE_FILE", "EXTERN", "FILL", "FLOAT", + "FORCE_COMMON_ALLOCATION", "GLOBAL", "GROUP", "HLL", "INCLUDE", + "INHIBIT_COMMON_ALLOCATION", "INFO", "INPUT", "KEEP", "LEN", "LENGTH", + "LOADADDR", "LOCAL", "LONG", "MAP", "MAX_K", "MEMORY", "MIN_K", "NEXT", + "NOCROSSREFS", "NOFLOAT", "NOLOAD", "ONLY_IF_RO", "ONLY_IF_RW", "ORG", + "ORIGIN", "OUTPUT", "OUTPUT_ARCH", "OUTPUT_FORMAT", "OVERLAY", "PHDRS", + "PROVIDE", "PROVIDE_HIDDEN", "QUAD", "SEARCH_DIR", "SECTIONS", + "SEGMENT_START", "SHORT", "SIZEOF", "SIZEOF_HEADERS", + "SORT_BY_ALIGNMENT", "SORT_BY_INIT_PRIORITY", "SORT_BY_NAME", "SPECIAL", + "SQUAD", "STARTUP", "SUBALIGN", "SYSLIB", "TARGET_K", "TRUNCATE", + "VERSIONK", "OPTION", "PARSING_LINKER_SCRIPT", "PARSING_VERSION_SCRIPT", + "PARSING_DEFSYM", "PARSING_DYNAMIC_LIST", "PARSING_SECTIONS_BLOCK", + "PARSING_SECTION_COMMANDS", "PARSING_MEMORY_DEF", "'('", "')'", "'{'", + "'}'", "','", "';'", "'!'", "'o'", "'l'", "'~'", "$accept", "top", + "linker_script", "file_cmd", "$@1", "$@2", "$@3", "ignore_cmd", + "extern_name_list", "$@4", "extern_name_list_body", "input_list", + "input_list_element", "$@5", "sections_block", "section_block_cmd", + "$@6", "section_header", "$@7", "$@8", "opt_address_and_section_type", + "section_type", "opt_at", "opt_align", "opt_subalign", "opt_constraint", + "section_trailer", "opt_memspec", "opt_at_memspec", "opt_phdr", + "opt_fill", "section_cmds", "section_cmd", "data_length", + "input_section_spec", "input_section_no_keep", "wildcard_file", + "wildcard_sections", "wildcard_section", "exclude_names", + "wildcard_name", "memory_defs", "memory_def", "memory_attr", + "memory_origin", "memory_length", "phdrs_defs", "phdr_def", "phdr_type", + "phdr_info", "assignment", "parse_exp", "$@9", "exp", "defsym_expr", + "dynamic_list_expr", "dynamic_list_nodes", "dynamic_list_node", + "version_script", "vers_nodes", "vers_node", "verdep", "vers_tag", + "vers_defns", "$@10", "$@11", "string", "end", "opt_semicolon", + "opt_comma", YY_NULL +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 61, 258, 259, 260, 261, 262, 263, + 264, 265, 63, 58, 266, 267, 124, 94, 38, 268, + 269, 60, 62, 270, 271, 272, 273, 43, 45, 42, + 47, 37, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 357, 358, 359, 360, 40, + 41, 123, 125, 44, 59, 33, 111, 108, 126 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 129, 130, 130, 130, 130, 130, 130, 130, 131, + 131, 132, 132, 133, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 134, 132, 132, 135, 132, 132, 132, + 132, 132, 132, 132, 136, 138, 137, 139, 139, 139, + 140, 140, 141, 141, 142, 141, 143, 143, 144, 144, + 144, 144, 145, 144, 147, 148, 146, 149, 149, 149, + 149, 149, 149, 150, 150, 150, 150, 150, 151, 151, + 152, 152, 153, 153, 154, 154, 154, 154, 155, 156, + 156, 157, 157, 158, 158, 159, 159, 160, 160, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 162, 162, + 162, 162, 162, 163, 163, 164, 164, 165, 165, 166, + 166, 166, 166, 167, 167, 167, 167, 168, 168, 169, + 169, 169, 170, 170, 171, 171, 171, 172, 172, 172, + 173, 173, 173, 174, 174, 174, 175, 175, 176, 177, + 177, 178, 178, 178, 178, 178, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 181, 180, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 183, 184, 185, 185, 186, + 187, 188, 188, 189, 189, 189, 190, 190, 191, 191, + 191, 191, 191, 192, 192, 192, 192, 193, 192, 194, + 192, 192, 192, 195, 195, 196, 196, 197, 197, 198, + 198 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 4, 1, 0, 5, 1, 4, 4, 4, 4, + 8, 4, 4, 0, 5, 4, 0, 5, 4, 2, + 6, 2, 1, 1, 4, 0, 2, 1, 2, 3, + 1, 3, 1, 2, 0, 5, 2, 0, 4, 2, + 6, 2, 0, 7, 0, 0, 7, 1, 3, 2, + 4, 4, 5, 1, 1, 1, 1, 1, 0, 4, + 0, 4, 0, 4, 0, 1, 1, 1, 5, 2, + 0, 3, 0, 3, 0, 2, 0, 0, 2, 2, + 1, 4, 6, 4, 1, 4, 2, 1, 1, 1, + 1, 1, 1, 1, 4, 1, 4, 1, 4, 3, + 1, 6, 4, 1, 4, 4, 4, 3, 1, 1, + 1, 1, 3, 0, 10, 2, 0, 3, 4, 0, + 1, 1, 1, 1, 1, 1, 2, 0, 4, 1, + 1, 0, 2, 2, 5, 5, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 6, 6, 0, 2, 3, + 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 5, 1, 1, 6, 6, 4, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, + 6, 6, 4, 6, 6, 3, 1, 1, 2, 5, + 1, 1, 2, 4, 5, 6, 1, 2, 0, 2, + 4, 4, 8, 1, 1, 3, 3, 0, 7, 0, + 9, 1, 3, 1, 1, 1, 1, 1, 0, 1, + 0 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 10, 0, 0, 0, 47, 87, 123, 0, 2, + 233, 234, 218, 3, 210, 211, 0, 4, 0, 0, + 5, 206, 207, 6, 7, 240, 1, 0, 0, 0, + 12, 13, 0, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 33, 9, 32, 0, + 0, 223, 224, 231, 0, 0, 0, 0, 212, 218, + 157, 0, 208, 0, 0, 0, 46, 0, 54, 121, + 120, 0, 102, 94, 0, 0, 0, 100, 98, 101, + 0, 99, 97, 88, 0, 90, 103, 0, 107, 0, + 105, 239, 126, 157, 0, 35, 0, 31, 0, 123, + 0, 0, 137, 0, 0, 0, 23, 0, 26, 0, + 236, 235, 29, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 0, 0, 0, 0, 219, 0, 205, 0, + 0, 157, 0, 51, 49, 52, 0, 157, 157, 96, + 0, 0, 157, 0, 89, 0, 122, 129, 0, 0, + 0, 0, 0, 0, 44, 240, 40, 42, 240, 0, + 0, 0, 0, 0, 0, 47, 0, 0, 0, 146, + 154, 153, 152, 151, 150, 149, 148, 147, 227, 0, + 0, 213, 225, 226, 232, 0, 0, 0, 183, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 188, 0, 0, + 0, 158, 184, 0, 0, 0, 0, 57, 0, 68, + 0, 0, 0, 0, 0, 105, 0, 0, 119, 0, + 0, 0, 0, 0, 240, 110, 113, 125, 0, 0, + 0, 28, 11, 36, 37, 240, 43, 0, 16, 0, + 17, 34, 19, 0, 21, 136, 0, 157, 157, 22, + 0, 25, 0, 18, 0, 220, 221, 0, 214, 0, + 216, 163, 160, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 161, 162, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 209, 0, 48, 87, 65, 64, 66, + 63, 67, 0, 0, 0, 70, 59, 0, 0, 93, + 0, 104, 95, 108, 91, 0, 0, 0, 0, 106, + 0, 0, 0, 0, 0, 0, 38, 14, 0, 41, + 0, 140, 141, 139, 0, 0, 24, 27, 238, 0, + 229, 215, 217, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 159, 0, 181, 180, 179, 178, 177, 172, 171, + 175, 176, 174, 173, 170, 169, 167, 168, 164, 165, + 166, 0, 0, 58, 0, 0, 0, 72, 0, 0, + 0, 240, 118, 0, 0, 0, 0, 109, 0, 127, + 131, 130, 132, 0, 30, 39, 240, 0, 0, 141, + 0, 141, 155, 156, 237, 0, 0, 0, 196, 191, + 197, 0, 189, 0, 199, 195, 0, 202, 0, 187, + 194, 192, 0, 0, 193, 0, 190, 0, 50, 80, + 61, 0, 0, 0, 55, 60, 0, 92, 112, 0, + 115, 116, 114, 0, 128, 157, 45, 0, 157, 143, + 138, 0, 142, 228, 0, 238, 0, 0, 0, 0, + 0, 0, 0, 182, 0, 53, 82, 69, 0, 0, + 74, 62, 117, 240, 240, 20, 0, 0, 222, 0, + 198, 204, 200, 201, 185, 186, 203, 79, 0, 84, + 71, 0, 75, 76, 77, 56, 111, 0, 141, 141, + 230, 0, 86, 73, 134, 133, 135, 0, 145, 144, + 81, 157, 0, 240, 157, 85, 83, 78, 124 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 8, 9, 47, 96, 165, 167, 48, 150, 151, + 243, 155, 156, 247, 23, 66, 216, 135, 136, 500, + 219, 323, 325, 407, 464, 525, 495, 496, 519, 532, + 543, 24, 83, 84, 85, 86, 87, 234, 235, 411, + 236, 25, 146, 239, 423, 537, 161, 255, 352, 430, + 67, 128, 129, 291, 17, 20, 21, 22, 13, 14, + 15, 269, 56, 57, 264, 437, 212, 112, 435, 249 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -417 +static const yytype_int16 yypact[] = +{ + 239, -417, 24, 103, -107, -417, -417, -417, 27, 589, + -417, -417, 135, -417, 24, -417, -62, -417, 88, 175, + -417, -107, -417, 179, 570, 8, -417, -26, -22, 3, + -417, -417, 103, -417, 10, -7, 45, 51, 6, 59, + 71, 95, 106, 97, 112, 121, -417, -417, -417, -105, + 314, -417, -417, 103, 82, 91, 26, 126, -417, 135, + -417, 132, -417, 150, 161, 103, -417, -105, 314, -417, + -417, 166, -417, -417, 191, 103, 192, -417, -417, -417, + 194, -417, -417, -417, 196, -417, -417, 208, -417, -105, + 37, -417, 46, -417, 103, -417, 213, -417, 146, -417, + 103, 103, -417, 103, 103, 103, -417, 103, -417, 103, + -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, + -417, -417, 124, 175, 175, 220, 189, 157, -417, 1336, + -5, -417, 103, -417, -417, -417, 332, -417, -417, -417, + 42, 219, -417, 99, -417, 103, -417, 218, 224, 228, + 229, 103, 146, 325, -417, -70, -417, -417, 29, 241, + 1, 32, 359, 360, 244, -417, 253, 24, 254, -417, + -417, -417, -417, -417, -417, -417, -417, -417, -417, 251, + 255, -417, -417, -417, 103, -24, 1336, 1336, -417, 258, + 261, 267, 270, 271, 272, 273, 275, 276, 280, 282, + 286, 287, 289, 299, 300, 301, 304, -417, 1336, 1336, + 1336, 1205, -417, 263, 303, 317, 318, -417, 1240, 382, + 1227, 315, 320, 323, 324, 326, 327, 329, -417, 330, + 334, 337, 339, 342, 75, -417, -417, -417, -10, 430, + 103, -417, -417, -17, -417, 119, -417, 344, -417, 146, + -417, -417, -417, 103, -417, -417, 296, -417, -417, -417, + 133, -417, 343, -417, 175, 187, 189, 345, -417, -8, + -417, -417, -417, 1336, 103, 1336, 103, 1336, 1336, 103, + 1336, 1336, 1336, 103, 103, 103, 1336, 1336, 103, 103, + 103, 864, -417, -417, 1336, 1336, 1336, 1336, 1336, 1336, + 1336, 1336, 1336, 1336, 1336, 1336, 1336, 1336, 1336, 1336, + 1336, 1336, 1336, -417, 103, -417, -417, -417, -417, -417, + -417, -417, 433, 348, 350, 426, -417, 137, 103, -417, + 55, -417, -417, -417, -417, 55, 160, 55, 160, -417, + 128, 103, 352, -3, 353, 103, -417, -417, 146, -417, + 347, -417, 28, -417, 354, 355, -417, -417, 358, 463, + -417, -417, -417, 884, 363, 482, 364, 717, 904, 365, + 754, 937, 774, 366, 367, 368, 794, 827, 369, 356, + 370, -417, 277, 734, 567, 842, 951, 807, 915, 915, + 385, 385, 385, 385, 405, 405, 311, 311, -417, -417, + -417, 371, 113, -417, 480, 1336, 376, 408, 502, 396, + 397, 145, -417, 398, 399, 401, 403, -417, 404, -417, + -417, -417, -417, 520, -417, -417, 153, 103, 406, 28, + 407, 44, -417, -417, 189, 410, 175, 175, -417, -417, + -417, 1336, -417, 103, -417, -417, 1336, -417, 1336, -417, + -417, -417, 1336, 1336, -417, 1336, -417, 1336, -417, 506, + -417, 971, 1336, 411, -417, -417, 521, -417, -417, 55, + -417, -417, -417, 55, -417, -417, -417, 413, -417, -417, + -417, 500, -417, -417, 412, 358, 991, 417, 1011, 1044, + 1078, 1098, 1118, 1205, 103, -417, 496, -417, 1151, 1336, + 181, -417, -417, 155, 416, -417, 422, 424, 189, 425, + -417, -417, -417, -417, -417, -417, -417, -417, 529, -417, + -417, 1185, -417, -417, -417, -417, -417, -1, 28, 28, + -417, 103, 61, -417, -417, -417, -417, 549, -417, -417, + -417, -417, 103, 416, -417, -417, -417, -417, -417 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -417, -417, -417, -417, -417, -417, -417, -417, -417, -417, + -417, -146, 307, -417, 388, -417, -417, -417, -417, -417, + -417, 230, -417, -417, -417, -417, -417, -417, -417, -417, + -417, 242, -417, -417, -417, 419, -417, -417, -253, 87, + -21, 462, -417, -417, -417, -417, -417, -417, -417, -416, + -4, -82, -417, 268, -417, -417, -417, 560, 434, -417, + 586, -417, 547, -15, -417, -417, -2, 5, 122, -23 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -120 +static const yytype_int16 yytable[] = +{ + 16, 18, 92, 88, 61, 49, 245, 50, -8, 10, + 11, 148, 16, 479, 19, 482, 10, 11, 110, 111, + 89, 68, 90, 10, 11, 10, 11, 26, 182, 183, + 97, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 214, + 248, 122, 184, 91, 69, 221, 222, 10, 11, 59, + 229, 10, 11, 133, 541, 10, 11, 69, 534, 535, + 428, 70, 134, 139, 542, 10, 11, 10, 11, 10, + 11, 420, 421, 413, 70, 415, 428, 417, 10, 11, + 147, 60, 149, 93, 144, 123, 157, 94, 159, 160, + 268, 162, 163, 164, 124, 166, 345, 168, 179, 180, + 145, 69, 538, 539, 99, 341, 361, 213, 429, 88, + 227, 252, 95, 422, 253, 69, 536, 102, 70, 98, + 215, 91, 10, 11, 429, 92, 10, 11, 225, 228, + 69, 228, 70, 237, 223, 12, 10, 11, 125, 244, + 157, 250, 91, 71, 254, 230, -119, 70, 72, 256, + 73, 10, 11, 481, 100, 16, 10, 11, 51, 52, + 101, 74, 69, 63, 153, 354, 355, 75, 103, 10, + 11, 76, 267, 270, 416, 317, 77, 154, 64, 70, + 104, 318, 53, 10, 11, 339, 54, 65, 91, 231, + 232, 233, 426, 319, 39, 40, 78, 55, 51, 52, + 79, 340, 10, 11, 105, 80, 107, 81, 320, 63, + 182, 183, 182, 183, 39, 40, 321, 106, 231, 232, + 233, 69, 53, 108, 64, 459, 342, 82, 344, 347, + 109, 346, 91, 65, 184, 178, 184, 157, 70, 358, + 126, 350, 10, 11, 353, 356, 130, 408, 68, 359, + 231, 232, 233, 522, 523, 468, 226, 362, 91, 131, + 39, 40, 364, 476, 366, 526, 91, 369, 91, 185, + 132, 373, 374, 375, 524, 137, 378, 379, 380, 294, + 457, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 227, + 138, 140, 401, 141, 412, 142, 414, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 410, 143, 228, 10, + 11, 351, 152, 228, 228, 228, 228, 238, 228, 418, + 310, 311, 312, 425, 181, 217, 157, 240, 241, 242, + 431, 1, 2, 3, 4, 5, 6, 7, 246, 186, + 187, 251, 257, 258, 259, 10, 11, 188, 189, 190, + 191, 192, 193, 261, 263, 265, 194, 273, 195, 266, + 274, 88, 196, 197, 198, 199, 275, 313, 469, 276, + 277, 278, 279, 504, 280, 281, 506, 211, 89, 282, + 90, 283, 200, 201, 220, 284, 285, 202, 286, 203, + 306, 307, 308, 309, 310, 311, 312, 204, 287, 288, + 289, 484, 485, 290, 324, 477, 314, 431, 205, 431, + 206, 207, 308, 309, 310, 311, 312, 315, 328, 316, + 329, 487, 330, 343, 331, -119, 403, 332, 502, 333, + 334, 218, 412, 335, 271, 272, 336, 209, 337, 545, + 210, 338, 548, 348, 406, 357, 360, 228, 404, 405, + 427, 228, 419, 424, 432, 433, 436, 292, 293, 455, + 469, 527, 434, 439, 442, 445, 449, 450, 451, 454, + 456, 458, 517, 460, 294, 462, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 463, 465, 466, 467, 470, 471, + 547, 472, 473, 475, 474, 478, 431, 431, 494, 540, + 499, 480, 483, 505, 501, 507, 508, 511, 518, 91, + 546, 363, 528, 365, 529, 367, 368, 530, 370, 371, + 372, 531, 544, 260, 376, 377, 349, 409, 402, 224, + 503, 158, 382, 383, 384, 385, 386, 387, 388, 389, + 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 62, 69, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 70, + 58, 262, 440, 10, 11, 441, 127, 509, 0, 0, + 71, 0, 0, 0, 0, 72, 0, 73, 0, 0, + 0, 0, 10, 11, 0, 0, 0, 0, 74, 27, + 0, 0, 0, 0, 75, 0, 0, 0, 76, 0, + 0, 0, 0, 77, 28, 0, 29, 0, 0, 30, + 0, 31, 0, 32, 33, 0, 34, 0, 0, 0, + 0, 39, 40, 78, 0, 35, 0, 79, 0, 0, + 0, 0, 80, 461, 81, 0, 36, 37, 0, 38, + 39, 40, 0, 41, 42, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 0, 43, 0, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 486, + 0, 0, 0, 46, 488, 0, 489, 0, 0, 0, + 490, 491, 0, 492, 0, 493, 0, 0, 0, 294, + 498, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 294, 521, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 294, 0, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 294, 0, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 294, + 443, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 0, 0, 294, 446, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 294, 448, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 294, 452, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 0, 0, 294, + 453, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 294, 381, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 294, 438, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 294, 444, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 294, 447, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 294, 497, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 294, 510, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 294, 512, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 294, 513, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 294, 514, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 294, 515, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 0, 516, 294, + 326, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 0, + 0, 0, 0, 0, 0, 0, 0, 186, 187, 0, + 0, 520, 0, 10, 11, 188, 189, 190, 191, 192, + 193, 0, 0, 0, 194, 0, 195, 0, 317, 0, + 196, 197, 198, 199, 318, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 533, 319, 0, 0, 0, + 200, 201, 0, 0, 0, 202, 0, 203, 0, 0, + 0, 320, 0, 0, 0, 204, 0, 0, 0, 321, + 0, 0, 0, 0, 0, 0, 205, 0, 206, 207, + 0, 0, 0, 0, 0, 0, 327, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 208, + 322, 0, 0, 186, 187, 209, 0, 0, 210, 10, + 11, 188, 189, 190, 191, 192, 193, 0, 0, 0, + 194, 0, 195, 0, 0, 0, 196, 197, 198, 199, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 200, 201, 0, 0, + 0, 202, 0, 203, 0, 0, 0, 0, 0, 0, + 0, 204, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 205, 0, 206, 207, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 208, 0, 0, 0, 0, + 0, 209, 0, 0, 210 +}; + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-417))) + +#define yytable_value_is_error(Yytable_value) \ + YYID (0) + +static const yytype_int16 yycheck[] = +{ + 2, 3, 25, 24, 19, 9, 152, 9, 0, 33, + 34, 93, 14, 429, 121, 431, 33, 34, 123, 124, + 24, 23, 24, 33, 34, 33, 34, 0, 33, 34, + 32, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 131, + 120, 53, 57, 123, 12, 137, 138, 33, 34, 121, + 142, 33, 34, 65, 3, 33, 34, 12, 69, 70, + 42, 29, 67, 75, 13, 33, 34, 33, 34, 33, + 34, 84, 85, 336, 29, 338, 42, 340, 33, 34, + 92, 3, 94, 119, 89, 13, 98, 119, 100, 101, + 124, 103, 104, 105, 13, 107, 123, 109, 123, 124, + 64, 12, 528, 529, 121, 125, 124, 122, 90, 140, + 141, 120, 119, 126, 123, 12, 127, 121, 29, 119, + 132, 123, 33, 34, 90, 158, 33, 34, 140, 141, + 12, 143, 29, 145, 102, 121, 33, 34, 122, 151, + 152, 122, 123, 40, 122, 56, 119, 29, 45, 161, + 47, 33, 34, 119, 119, 167, 33, 34, 33, 34, + 119, 58, 12, 40, 28, 257, 258, 64, 119, 33, + 34, 68, 184, 185, 56, 48, 73, 41, 55, 29, + 119, 54, 57, 33, 34, 120, 61, 64, 123, 100, + 101, 102, 348, 66, 91, 92, 93, 72, 33, 34, + 97, 234, 33, 34, 119, 102, 119, 104, 81, 40, + 33, 34, 33, 34, 91, 92, 89, 121, 100, 101, + 102, 12, 57, 121, 55, 122, 238, 124, 240, 120, + 119, 243, 123, 64, 57, 121, 57, 249, 29, 264, + 124, 253, 33, 34, 256, 122, 124, 120, 260, 72, + 100, 101, 102, 82, 83, 120, 47, 269, 123, 119, + 91, 92, 274, 120, 276, 120, 123, 279, 123, 122, + 119, 283, 284, 285, 103, 119, 288, 289, 290, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 330, + 119, 119, 314, 119, 335, 119, 337, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 328, 119, 330, 33, + 34, 35, 119, 335, 336, 337, 338, 119, 340, 341, + 29, 30, 31, 345, 124, 13, 348, 123, 120, 120, + 352, 112, 113, 114, 115, 116, 117, 118, 33, 27, + 28, 120, 3, 3, 120, 33, 34, 35, 36, 37, + 38, 39, 40, 120, 120, 124, 44, 119, 46, 124, + 119, 402, 50, 51, 52, 53, 119, 124, 411, 119, + 119, 119, 119, 475, 119, 119, 478, 129, 402, 119, + 402, 119, 70, 71, 136, 119, 119, 75, 119, 77, + 25, 26, 27, 28, 29, 30, 31, 85, 119, 119, + 119, 436, 437, 119, 42, 427, 123, 429, 96, 431, + 98, 99, 27, 28, 29, 30, 31, 120, 123, 121, + 120, 443, 119, 13, 120, 119, 13, 120, 469, 120, + 120, 119, 473, 119, 186, 187, 119, 125, 119, 541, + 128, 119, 544, 119, 38, 122, 121, 469, 120, 119, + 123, 473, 120, 120, 120, 120, 13, 209, 210, 123, + 503, 504, 124, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 494, 13, 12, 119, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 106, 13, 120, 120, 120, 120, + 543, 120, 119, 3, 120, 119, 528, 529, 22, 531, + 119, 124, 122, 120, 13, 35, 124, 120, 42, 123, + 542, 273, 120, 275, 120, 277, 278, 122, 280, 281, + 282, 22, 3, 165, 286, 287, 249, 327, 316, 140, + 473, 99, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 21, 12, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 29, + 14, 167, 120, 33, 34, 123, 59, 485, -1, -1, + 40, -1, -1, -1, -1, 45, -1, 47, -1, -1, + -1, -1, 33, 34, -1, -1, -1, -1, 58, 40, + -1, -1, -1, -1, 64, -1, -1, -1, 68, -1, + -1, -1, -1, 73, 55, -1, 57, -1, -1, 60, + -1, 62, -1, 64, 65, -1, 67, -1, -1, -1, + -1, 91, 92, 93, -1, 76, -1, 97, -1, -1, + -1, -1, 102, 405, 104, -1, 87, 88, -1, 90, + 91, 92, -1, 94, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 124, -1, -1, 108, -1, 110, + 111, -1, -1, -1, -1, -1, -1, -1, -1, 441, + -1, -1, -1, 124, 446, -1, 448, -1, -1, -1, + 452, 453, -1, 455, -1, 457, -1, -1, -1, 12, + 462, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 12, 499, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 12, -1, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 12, -1, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 12, + 123, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, -1, -1, 12, 123, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 12, 123, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 12, 123, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, -1, -1, 12, + 123, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 12, 120, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 12, 120, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 12, 120, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 12, 120, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 12, 120, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 12, 120, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 12, 120, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 12, 120, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 12, 120, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 12, 120, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, -1, 120, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, + -1, -1, -1, -1, -1, -1, -1, 27, 28, -1, + -1, 120, -1, 33, 34, 35, 36, 37, 38, 39, + 40, -1, -1, -1, 44, -1, 46, -1, 48, -1, + 50, 51, 52, 53, 54, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 120, 66, -1, -1, -1, + 70, 71, -1, -1, -1, 75, -1, 77, -1, -1, + -1, 81, -1, -1, -1, 85, -1, -1, -1, 89, + -1, -1, -1, -1, -1, -1, 96, -1, 98, 99, + -1, -1, -1, -1, -1, -1, 119, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 119, + 120, -1, -1, 27, 28, 125, -1, -1, 128, 33, + 34, 35, 36, 37, 38, 39, 40, -1, -1, -1, + 44, -1, 46, -1, -1, -1, 50, 51, 52, 53, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 70, 71, -1, -1, + -1, 75, -1, 77, -1, -1, -1, -1, -1, -1, + -1, 85, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 96, -1, 98, 99, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 119, -1, -1, -1, -1, + -1, 125, -1, -1, 128 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 112, 113, 114, 115, 116, 117, 118, 130, 131, + 33, 34, 121, 187, 188, 189, 195, 183, 195, 121, + 184, 185, 186, 143, 160, 170, 0, 40, 55, 57, + 60, 62, 64, 65, 67, 76, 87, 88, 90, 91, + 92, 94, 95, 108, 110, 111, 124, 132, 136, 179, + 195, 33, 34, 57, 61, 72, 191, 192, 189, 121, + 3, 192, 186, 40, 55, 64, 144, 179, 195, 12, + 29, 40, 45, 47, 58, 64, 68, 73, 93, 97, + 102, 104, 124, 161, 162, 163, 164, 165, 169, 179, + 195, 123, 198, 119, 119, 119, 133, 195, 119, 121, + 119, 119, 121, 119, 119, 119, 121, 119, 121, 119, + 123, 124, 196, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 195, 13, 13, 122, 124, 191, 180, 181, + 124, 119, 119, 195, 196, 146, 147, 119, 119, 195, + 119, 119, 119, 119, 196, 64, 171, 195, 180, 195, + 137, 138, 119, 28, 41, 140, 141, 195, 170, 195, + 195, 175, 195, 195, 195, 134, 195, 135, 195, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 121, 192, + 192, 124, 33, 34, 57, 122, 27, 28, 35, 36, + 37, 38, 39, 40, 44, 46, 50, 51, 52, 53, + 70, 71, 75, 77, 85, 96, 98, 99, 119, 125, + 128, 182, 195, 122, 180, 195, 145, 13, 119, 149, + 182, 180, 180, 102, 164, 195, 47, 169, 195, 180, + 56, 100, 101, 102, 166, 167, 169, 195, 119, 172, + 123, 120, 120, 139, 195, 140, 33, 142, 120, 198, + 122, 120, 120, 123, 122, 176, 195, 3, 3, 120, + 143, 120, 187, 120, 193, 124, 124, 195, 124, 190, + 195, 182, 182, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 182, 182, 182, 12, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 124, 123, 120, 121, 48, 54, 66, + 81, 89, 120, 150, 42, 151, 13, 119, 123, 120, + 119, 120, 120, 120, 120, 119, 119, 119, 119, 120, + 198, 125, 195, 13, 195, 123, 195, 120, 119, 141, + 195, 35, 177, 195, 180, 180, 122, 122, 192, 72, + 121, 124, 195, 182, 195, 182, 195, 182, 182, 195, + 182, 182, 182, 195, 195, 195, 182, 182, 195, 195, + 195, 120, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 195, 160, 13, 120, 119, 38, 152, 120, 150, + 195, 168, 169, 167, 169, 167, 56, 167, 195, 120, + 84, 85, 126, 173, 120, 195, 140, 123, 42, 90, + 178, 195, 120, 120, 124, 197, 13, 194, 120, 120, + 120, 123, 120, 123, 120, 120, 123, 120, 123, 120, + 120, 120, 123, 123, 120, 123, 120, 13, 120, 122, + 13, 182, 119, 106, 153, 13, 120, 120, 120, 198, + 120, 120, 120, 119, 120, 3, 120, 195, 119, 178, + 124, 119, 178, 122, 192, 192, 182, 195, 182, 182, + 182, 182, 182, 182, 22, 155, 156, 120, 182, 119, + 148, 13, 169, 168, 180, 120, 180, 35, 124, 197, + 120, 120, 120, 120, 120, 120, 120, 195, 42, 157, + 120, 182, 82, 83, 103, 154, 120, 198, 120, 120, + 122, 22, 158, 120, 69, 70, 127, 174, 178, 178, + 195, 3, 13, 159, 3, 180, 195, 198, 180 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (closure, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval, closure) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, closure); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* closure) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, closure) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + void* closure; +#endif +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; + YYUSE (closure); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* closure) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, closure) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + void* closure; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, closure); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void* closure) +#else +static void +yy_reduce_print (yyvsp, yyrule, closure) + YYSTYPE *yyvsp; + int yyrule; + void* closure; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , closure); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, closure); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void* closure) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, closure) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + void* closure; +#endif +{ + YYUSE (yyvaluep); + YYUSE (closure); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YYUSE (yytype); +} + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void* closure) +#else +int +yyparse (closure) + void* closure; +#endif +#endif +{ +/* The lookahead symbol. */ +int yychar; + + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 12: +/* Line 1787 of yacc.c */ +#line 254 "yyscript.y" + { script_set_common_allocation(closure, 1); } + break; + + case 13: +/* Line 1787 of yacc.c */ +#line 256 "yyscript.y" + { script_start_group(closure); } + break; + + case 14: +/* Line 1787 of yacc.c */ +#line 258 "yyscript.y" + { script_end_group(closure); } + break; + + case 15: +/* Line 1787 of yacc.c */ +#line 260 "yyscript.y" + { script_set_common_allocation(closure, 0); } + break; + + case 18: +/* Line 1787 of yacc.c */ +#line 264 "yyscript.y" + { script_parse_option(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 19: +/* Line 1787 of yacc.c */ +#line 266 "yyscript.y" + { + if (!script_check_output_format(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length, + NULL, 0, NULL, 0)) + YYABORT; + } + break; + + case 20: +/* Line 1787 of yacc.c */ +#line 272 "yyscript.y" + { + if (!script_check_output_format(closure, (yyvsp[(3) - (8)].string).value, (yyvsp[(3) - (8)].string).length, + (yyvsp[(5) - (8)].string).value, (yyvsp[(5) - (8)].string).length, + (yyvsp[(7) - (8)].string).value, (yyvsp[(7) - (8)].string).length)) + YYABORT; + } + break; + + case 22: +/* Line 1787 of yacc.c */ +#line 280 "yyscript.y" + { script_add_search_dir(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 23: +/* Line 1787 of yacc.c */ +#line 282 "yyscript.y" + { script_start_sections(closure); } + break; + + case 24: +/* Line 1787 of yacc.c */ +#line 284 "yyscript.y" + { script_finish_sections(closure); } + break; + + case 25: +/* Line 1787 of yacc.c */ +#line 286 "yyscript.y" + { script_set_target(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 26: +/* Line 1787 of yacc.c */ +#line 288 "yyscript.y" + { script_push_lex_into_version_mode(closure); } + break; + + case 27: +/* Line 1787 of yacc.c */ +#line 290 "yyscript.y" + { script_pop_lex_mode(closure); } + break; + + case 28: +/* Line 1787 of yacc.c */ +#line 292 "yyscript.y" + { script_set_entry(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 30: +/* Line 1787 of yacc.c */ +#line 295 "yyscript.y" + { script_add_assertion(closure, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].string).value, (yyvsp[(5) - (6)].string).length); } + break; + + case 31: +/* Line 1787 of yacc.c */ +#line 297 "yyscript.y" + { script_include_directive(PARSING_LINKER_SCRIPT, closure, + (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); } + break; + + case 35: +/* Line 1787 of yacc.c */ +#line 316 "yyscript.y" + { script_push_lex_into_expression_mode(closure); } + break; + + case 36: +/* Line 1787 of yacc.c */ +#line 318 "yyscript.y" + { script_pop_lex_mode(closure); } + break; + + case 37: +/* Line 1787 of yacc.c */ +#line 323 "yyscript.y" + { script_add_extern(closure, (yyvsp[(1) - (1)].string).value, (yyvsp[(1) - (1)].string).length); } + break; + + case 38: +/* Line 1787 of yacc.c */ +#line 325 "yyscript.y" + { script_add_extern(closure, (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); } + break; + + case 39: +/* Line 1787 of yacc.c */ +#line 327 "yyscript.y" + { script_add_extern(closure, (yyvsp[(3) - (3)].string).value, (yyvsp[(3) - (3)].string).length); } + break; + + case 42: +/* Line 1787 of yacc.c */ +#line 339 "yyscript.y" + { script_add_file(closure, (yyvsp[(1) - (1)].string).value, (yyvsp[(1) - (1)].string).length); } + break; + + case 43: +/* Line 1787 of yacc.c */ +#line 341 "yyscript.y" + { script_add_library(closure, (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); } + break; + + case 44: +/* Line 1787 of yacc.c */ +#line 343 "yyscript.y" + { script_start_as_needed(closure); } + break; + + case 45: +/* Line 1787 of yacc.c */ +#line 345 "yyscript.y" + { script_end_as_needed(closure); } + break; + + case 48: +/* Line 1787 of yacc.c */ +#line 357 "yyscript.y" + { script_set_entry(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 50: +/* Line 1787 of yacc.c */ +#line 360 "yyscript.y" + { script_add_assertion(closure, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].string).value, (yyvsp[(5) - (6)].string).length); } + break; + + case 51: +/* Line 1787 of yacc.c */ +#line 362 "yyscript.y" + { script_include_directive(PARSING_SECTIONS_BLOCK, closure, + (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); } + break; + + case 52: +/* Line 1787 of yacc.c */ +#line 365 "yyscript.y" + { script_start_output_section(closure, (yyvsp[(1) - (2)].string).value, (yyvsp[(1) - (2)].string).length, &(yyvsp[(2) - (2)].output_section_header)); } + break; + + case 53: +/* Line 1787 of yacc.c */ +#line 367 "yyscript.y" + { script_finish_output_section(closure, &(yyvsp[(7) - (7)].output_section_trailer)); } + break; + + case 54: +/* Line 1787 of yacc.c */ +#line 373 "yyscript.y" + { script_push_lex_into_expression_mode(closure); } + break; + + case 55: +/* Line 1787 of yacc.c */ +#line 375 "yyscript.y" + { script_pop_lex_mode(closure); } + break; + + case 56: +/* Line 1787 of yacc.c */ +#line 377 "yyscript.y" + { + (yyval.output_section_header).address = (yyvsp[(2) - (7)].output_section_header).address; + (yyval.output_section_header).section_type = (yyvsp[(2) - (7)].output_section_header).section_type; + (yyval.output_section_header).load_address = (yyvsp[(3) - (7)].expr); + (yyval.output_section_header).align = (yyvsp[(4) - (7)].expr); + (yyval.output_section_header).subalign = (yyvsp[(5) - (7)].expr); + (yyval.output_section_header).constraint = (yyvsp[(7) - (7)].constraint); + } + break; + + case 57: +/* Line 1787 of yacc.c */ +#line 393 "yyscript.y" + { + (yyval.output_section_header).address = NULL; + (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; + } + break; + + case 58: +/* Line 1787 of yacc.c */ +#line 398 "yyscript.y" + { + (yyval.output_section_header).address = NULL; + (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; + } + break; + + case 59: +/* Line 1787 of yacc.c */ +#line 403 "yyscript.y" + { + (yyval.output_section_header).address = (yyvsp[(1) - (2)].expr); + (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; + } + break; + + case 60: +/* Line 1787 of yacc.c */ +#line 408 "yyscript.y" + { + (yyval.output_section_header).address = (yyvsp[(1) - (4)].expr); + (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; + } + break; + + case 61: +/* Line 1787 of yacc.c */ +#line 413 "yyscript.y" + { + (yyval.output_section_header).address = NULL; + (yyval.output_section_header).section_type = (yyvsp[(2) - (4)].section_type); + } + break; + + case 62: +/* Line 1787 of yacc.c */ +#line 418 "yyscript.y" + { + (yyval.output_section_header).address = (yyvsp[(1) - (5)].expr); + (yyval.output_section_header).section_type = (yyvsp[(3) - (5)].section_type); + } + break; + + case 63: +/* Line 1787 of yacc.c */ +#line 427 "yyscript.y" + { (yyval.section_type) = SCRIPT_SECTION_TYPE_NOLOAD; } + break; + + case 64: +/* Line 1787 of yacc.c */ +#line 429 "yyscript.y" + { + yyerror(closure, "DSECT section type is unsupported"); + (yyval.section_type) = SCRIPT_SECTION_TYPE_DSECT; + } + break; + + case 65: +/* Line 1787 of yacc.c */ +#line 434 "yyscript.y" + { + yyerror(closure, "COPY section type is unsupported"); + (yyval.section_type) = SCRIPT_SECTION_TYPE_COPY; + } + break; + + case 66: +/* Line 1787 of yacc.c */ +#line 439 "yyscript.y" + { + yyerror(closure, "INFO section type is unsupported"); + (yyval.section_type) = SCRIPT_SECTION_TYPE_INFO; + } + break; + + case 67: +/* Line 1787 of yacc.c */ +#line 444 "yyscript.y" + { + yyerror(closure, "OVERLAY section type is unsupported"); + (yyval.section_type) = SCRIPT_SECTION_TYPE_OVERLAY; + } + break; + + case 68: +/* Line 1787 of yacc.c */ +#line 453 "yyscript.y" + { (yyval.expr) = NULL; } + break; + + case 69: +/* Line 1787 of yacc.c */ +#line 455 "yyscript.y" + { (yyval.expr) = (yyvsp[(3) - (4)].expr); } + break; + + case 70: +/* Line 1787 of yacc.c */ +#line 461 "yyscript.y" + { (yyval.expr) = NULL; } + break; + + case 71: +/* Line 1787 of yacc.c */ +#line 463 "yyscript.y" + { (yyval.expr) = (yyvsp[(3) - (4)].expr); } + break; + + case 72: +/* Line 1787 of yacc.c */ +#line 469 "yyscript.y" + { (yyval.expr) = NULL; } + break; + + case 73: +/* Line 1787 of yacc.c */ +#line 471 "yyscript.y" + { (yyval.expr) = (yyvsp[(3) - (4)].expr); } + break; + + case 74: +/* Line 1787 of yacc.c */ +#line 477 "yyscript.y" + { (yyval.constraint) = CONSTRAINT_NONE; } + break; + + case 75: +/* Line 1787 of yacc.c */ +#line 479 "yyscript.y" + { (yyval.constraint) = CONSTRAINT_ONLY_IF_RO; } + break; + + case 76: +/* Line 1787 of yacc.c */ +#line 481 "yyscript.y" + { (yyval.constraint) = CONSTRAINT_ONLY_IF_RW; } + break; + + case 77: +/* Line 1787 of yacc.c */ +#line 483 "yyscript.y" + { (yyval.constraint) = CONSTRAINT_SPECIAL; } + break; + + case 78: +/* Line 1787 of yacc.c */ +#line 489 "yyscript.y" + { + (yyval.output_section_trailer).fill = (yyvsp[(4) - (5)].expr); + (yyval.output_section_trailer).phdrs = (yyvsp[(3) - (5)].string_list); + } + break; + + case 79: +/* Line 1787 of yacc.c */ +#line 498 "yyscript.y" + { script_set_section_region(closure, (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length, 1); } + break; + + case 81: +/* Line 1787 of yacc.c */ +#line 505 "yyscript.y" + { script_set_section_region(closure, (yyvsp[(3) - (3)].string).value, (yyvsp[(3) - (3)].string).length, 0); } + break; + + case 83: +/* Line 1787 of yacc.c */ +#line 512 "yyscript.y" + { (yyval.string_list) = script_string_list_push_back((yyvsp[(1) - (3)].string_list), (yyvsp[(3) - (3)].string).value, (yyvsp[(3) - (3)].string).length); } + break; + + case 84: +/* Line 1787 of yacc.c */ +#line 514 "yyscript.y" + { (yyval.string_list) = NULL; } + break; + + case 85: +/* Line 1787 of yacc.c */ +#line 521 "yyscript.y" + { (yyval.expr) = (yyvsp[(2) - (2)].expr); } + break; + + case 86: +/* Line 1787 of yacc.c */ +#line 523 "yyscript.y" + { (yyval.expr) = NULL; } + break; + + case 91: +/* Line 1787 of yacc.c */ +#line 539 "yyscript.y" + { script_add_data(closure, (yyvsp[(1) - (4)].integer), (yyvsp[(3) - (4)].expr)); } + break; + + case 92: +/* Line 1787 of yacc.c */ +#line 541 "yyscript.y" + { script_add_assertion(closure, (yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].string).value, (yyvsp[(5) - (6)].string).length); } + break; + + case 93: +/* Line 1787 of yacc.c */ +#line 543 "yyscript.y" + { script_add_fill(closure, (yyvsp[(3) - (4)].expr)); } + break; + + case 94: +/* Line 1787 of yacc.c */ +#line 545 "yyscript.y" + { + /* The GNU linker uses CONSTRUCTORS for the a.out object + file format. It does nothing when using ELF. Since + some ELF linker scripts use it although it does + nothing, we accept it and ignore it. */ + } + break; + + case 96: +/* Line 1787 of yacc.c */ +#line 553 "yyscript.y" + { script_include_directive(PARSING_SECTION_COMMANDS, closure, + (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); } + break; + + case 98: +/* Line 1787 of yacc.c */ +#line 562 "yyscript.y" + { (yyval.integer) = QUAD; } + break; + + case 99: +/* Line 1787 of yacc.c */ +#line 564 "yyscript.y" + { (yyval.integer) = SQUAD; } + break; + + case 100: +/* Line 1787 of yacc.c */ +#line 566 "yyscript.y" + { (yyval.integer) = LONG; } + break; + + case 101: +/* Line 1787 of yacc.c */ +#line 568 "yyscript.y" + { (yyval.integer) = SHORT; } + break; + + case 102: +/* Line 1787 of yacc.c */ +#line 570 "yyscript.y" + { (yyval.integer) = BYTE; } + break; + + case 103: +/* Line 1787 of yacc.c */ +#line 577 "yyscript.y" + { script_add_input_section(closure, &(yyvsp[(1) - (1)].input_section_spec), 0); } + break; + + case 104: +/* Line 1787 of yacc.c */ +#line 579 "yyscript.y" + { script_add_input_section(closure, &(yyvsp[(3) - (4)].input_section_spec), 1); } + break; + + case 105: +/* Line 1787 of yacc.c */ +#line 585 "yyscript.y" + { + (yyval.input_section_spec).file.name = (yyvsp[(1) - (1)].string); + (yyval.input_section_spec).file.sort = SORT_WILDCARD_NONE; + (yyval.input_section_spec).input_sections.sections = NULL; + (yyval.input_section_spec).input_sections.exclude = NULL; + } + break; + + case 106: +/* Line 1787 of yacc.c */ +#line 592 "yyscript.y" + { + (yyval.input_section_spec).file = (yyvsp[(1) - (4)].wildcard_section); + (yyval.input_section_spec).input_sections = (yyvsp[(3) - (4)].wildcard_sections); + } + break; + + case 107: +/* Line 1787 of yacc.c */ +#line 601 "yyscript.y" + { + (yyval.wildcard_section).name = (yyvsp[(1) - (1)].string); + (yyval.wildcard_section).sort = SORT_WILDCARD_NONE; + } + break; + + case 108: +/* Line 1787 of yacc.c */ +#line 606 "yyscript.y" + { + (yyval.wildcard_section).name = (yyvsp[(3) - (4)].string); + (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME; + } + break; + + case 109: +/* Line 1787 of yacc.c */ +#line 615 "yyscript.y" + { + (yyval.wildcard_sections).sections = script_string_sort_list_add((yyvsp[(1) - (3)].wildcard_sections).sections, &(yyvsp[(3) - (3)].wildcard_section)); + (yyval.wildcard_sections).exclude = (yyvsp[(1) - (3)].wildcard_sections).exclude; + } + break; + + case 110: +/* Line 1787 of yacc.c */ +#line 620 "yyscript.y" + { + (yyval.wildcard_sections).sections = script_new_string_sort_list(&(yyvsp[(1) - (1)].wildcard_section)); + (yyval.wildcard_sections).exclude = NULL; + } + break; + + case 111: +/* Line 1787 of yacc.c */ +#line 625 "yyscript.y" + { + (yyval.wildcard_sections).sections = (yyvsp[(1) - (6)].wildcard_sections).sections; + (yyval.wildcard_sections).exclude = script_string_list_append((yyvsp[(1) - (6)].wildcard_sections).exclude, (yyvsp[(5) - (6)].string_list)); + } + break; + + case 112: +/* Line 1787 of yacc.c */ +#line 630 "yyscript.y" + { + (yyval.wildcard_sections).sections = NULL; + (yyval.wildcard_sections).exclude = (yyvsp[(3) - (4)].string_list); + } + break; + + case 113: +/* Line 1787 of yacc.c */ +#line 639 "yyscript.y" + { + (yyval.wildcard_section).name = (yyvsp[(1) - (1)].string); + (yyval.wildcard_section).sort = SORT_WILDCARD_NONE; + } + break; + + case 114: +/* Line 1787 of yacc.c */ +#line 644 "yyscript.y" + { + (yyval.wildcard_section).name = (yyvsp[(3) - (4)].wildcard_section).name; + switch ((yyvsp[(3) - (4)].wildcard_section).sort) + { + case SORT_WILDCARD_NONE: + (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME; + break; + case SORT_WILDCARD_BY_NAME: + case SORT_WILDCARD_BY_NAME_BY_ALIGNMENT: + break; + case SORT_WILDCARD_BY_ALIGNMENT: + case SORT_WILDCARD_BY_ALIGNMENT_BY_NAME: + (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME_BY_ALIGNMENT; + break; + default: + abort(); + } + } + break; + + case 115: +/* Line 1787 of yacc.c */ +#line 663 "yyscript.y" + { + (yyval.wildcard_section).name = (yyvsp[(3) - (4)].wildcard_section).name; + switch ((yyvsp[(3) - (4)].wildcard_section).sort) + { + case SORT_WILDCARD_NONE: + (yyval.wildcard_section).sort = SORT_WILDCARD_BY_ALIGNMENT; + break; + case SORT_WILDCARD_BY_ALIGNMENT: + case SORT_WILDCARD_BY_ALIGNMENT_BY_NAME: + break; + case SORT_WILDCARD_BY_NAME: + case SORT_WILDCARD_BY_NAME_BY_ALIGNMENT: + (yyval.wildcard_section).sort = SORT_WILDCARD_BY_ALIGNMENT_BY_NAME; + break; + default: + abort(); + } + } + break; + + case 116: +/* Line 1787 of yacc.c */ +#line 682 "yyscript.y" + { + (yyval.wildcard_section).name = (yyvsp[(3) - (4)].string); + (yyval.wildcard_section).sort = SORT_WILDCARD_BY_INIT_PRIORITY; + } + break; + + case 117: +/* Line 1787 of yacc.c */ +#line 691 "yyscript.y" + { (yyval.string_list) = script_string_list_push_back((yyvsp[(1) - (3)].string_list), (yyvsp[(3) - (3)].string).value, (yyvsp[(3) - (3)].string).length); } + break; + + case 118: +/* Line 1787 of yacc.c */ +#line 693 "yyscript.y" + { (yyval.string_list) = script_new_string_list((yyvsp[(1) - (1)].string).value, (yyvsp[(1) - (1)].string).length); } + break; + + case 119: +/* Line 1787 of yacc.c */ +#line 700 "yyscript.y" + { (yyval.string) = (yyvsp[(1) - (1)].string); } + break; + + case 120: +/* Line 1787 of yacc.c */ +#line 702 "yyscript.y" + { + (yyval.string).value = "*"; + (yyval.string).length = 1; + } + break; + + case 121: +/* Line 1787 of yacc.c */ +#line 707 "yyscript.y" + { + (yyval.string).value = "?"; + (yyval.string).length = 1; + } + break; + + case 124: +/* Line 1787 of yacc.c */ +#line 722 "yyscript.y" + { script_add_memory(closure, (yyvsp[(1) - (10)].string).value, (yyvsp[(1) - (10)].string).length, (yyvsp[(2) - (10)].integer), (yyvsp[(6) - (10)].expr), (yyvsp[(10) - (10)].expr)); } + break; + + case 125: +/* Line 1787 of yacc.c */ +#line 725 "yyscript.y" + { script_include_directive(PARSING_MEMORY_DEF, closure, + (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); } + break; + + case 127: +/* Line 1787 of yacc.c */ +#line 733 "yyscript.y" + { (yyval.integer) = script_parse_memory_attr(closure, (yyvsp[(2) - (3)].string).value, (yyvsp[(2) - (3)].string).length, 0); } + break; + + case 128: +/* Line 1787 of yacc.c */ +#line 736 "yyscript.y" + { (yyval.integer) = script_parse_memory_attr(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length, 1); } + break; + + case 129: +/* Line 1787 of yacc.c */ +#line 738 "yyscript.y" + { (yyval.integer) = 0; } + break; + + case 138: +/* Line 1787 of yacc.c */ +#line 766 "yyscript.y" + { script_add_phdr(closure, (yyvsp[(1) - (4)].string).value, (yyvsp[(1) - (4)].string).length, (yyvsp[(2) - (4)].integer), &(yyvsp[(3) - (4)].phdr_info)); } + break; + + case 139: +/* Line 1787 of yacc.c */ +#line 775 "yyscript.y" + { (yyval.integer) = script_phdr_string_to_type(closure, (yyvsp[(1) - (1)].string).value, (yyvsp[(1) - (1)].string).length); } + break; + + case 140: +/* Line 1787 of yacc.c */ +#line 777 "yyscript.y" + { (yyval.integer) = (yyvsp[(1) - (1)].integer); } + break; + + case 141: +/* Line 1787 of yacc.c */ +#line 783 "yyscript.y" + { memset(&(yyval.phdr_info), 0, sizeof(struct Phdr_info)); } + break; + + case 142: +/* Line 1787 of yacc.c */ +#line 785 "yyscript.y" + { + (yyval.phdr_info) = (yyvsp[(2) - (2)].phdr_info); + if ((yyvsp[(1) - (2)].string).length == 7 && strncmp((yyvsp[(1) - (2)].string).value, "FILEHDR", 7) == 0) + (yyval.phdr_info).includes_filehdr = 1; + else + yyerror(closure, "PHDRS syntax error"); + } + break; + + case 143: +/* Line 1787 of yacc.c */ +#line 793 "yyscript.y" + { + (yyval.phdr_info) = (yyvsp[(2) - (2)].phdr_info); + (yyval.phdr_info).includes_phdrs = 1; + } + break; + + case 144: +/* Line 1787 of yacc.c */ +#line 798 "yyscript.y" + { + (yyval.phdr_info) = (yyvsp[(5) - (5)].phdr_info); + if ((yyvsp[(1) - (5)].string).length == 5 && strncmp((yyvsp[(1) - (5)].string).value, "FLAGS", 5) == 0) + { + (yyval.phdr_info).is_flags_valid = 1; + (yyval.phdr_info).flags = (yyvsp[(3) - (5)].integer); + } + else + yyerror(closure, "PHDRS syntax error"); + } + break; + + case 145: +/* Line 1787 of yacc.c */ +#line 809 "yyscript.y" + { + (yyval.phdr_info) = (yyvsp[(5) - (5)].phdr_info); + (yyval.phdr_info).load_address = (yyvsp[(3) - (5)].expr); + } + break; + + case 146: +/* Line 1787 of yacc.c */ +#line 818 "yyscript.y" + { script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, (yyvsp[(3) - (3)].expr), 0, 0); } + break; + + case 147: +/* Line 1787 of yacc.c */ +#line 820 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_add(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 148: +/* Line 1787 of yacc.c */ +#line 826 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_sub(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 149: +/* Line 1787 of yacc.c */ +#line 832 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_mult(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 150: +/* Line 1787 of yacc.c */ +#line 838 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_div(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 151: +/* Line 1787 of yacc.c */ +#line 844 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_lshift(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 152: +/* Line 1787 of yacc.c */ +#line 850 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_rshift(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 153: +/* Line 1787 of yacc.c */ +#line 856 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_bitwise_and(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 154: +/* Line 1787 of yacc.c */ +#line 862 "yyscript.y" + { + Expression_ptr s = script_exp_string((yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length); + Expression_ptr e = script_exp_binary_bitwise_or(s, (yyvsp[(3) - (3)].expr)); + script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, e, 0, 0); + } + break; + + case 155: +/* Line 1787 of yacc.c */ +#line 868 "yyscript.y" + { script_set_symbol(closure, (yyvsp[(3) - (6)].string).value, (yyvsp[(3) - (6)].string).length, (yyvsp[(5) - (6)].expr), 1, 0); } + break; + + case 156: +/* Line 1787 of yacc.c */ +#line 870 "yyscript.y" + { script_set_symbol(closure, (yyvsp[(3) - (6)].string).value, (yyvsp[(3) - (6)].string).length, (yyvsp[(5) - (6)].expr), 1, 1); } + break; + + case 157: +/* Line 1787 of yacc.c */ +#line 875 "yyscript.y" + { script_push_lex_into_expression_mode(closure); } + break; + + case 158: +/* Line 1787 of yacc.c */ +#line 877 "yyscript.y" + { + script_pop_lex_mode(closure); + (yyval.expr) = (yyvsp[(2) - (2)].expr); + } + break; + + case 159: +/* Line 1787 of yacc.c */ +#line 886 "yyscript.y" + { (yyval.expr) = (yyvsp[(2) - (3)].expr); } + break; + + case 160: +/* Line 1787 of yacc.c */ +#line 888 "yyscript.y" + { (yyval.expr) = script_exp_unary_minus((yyvsp[(2) - (2)].expr)); } + break; + + case 161: +/* Line 1787 of yacc.c */ +#line 890 "yyscript.y" + { (yyval.expr) = script_exp_unary_logical_not((yyvsp[(2) - (2)].expr)); } + break; + + case 162: +/* Line 1787 of yacc.c */ +#line 892 "yyscript.y" + { (yyval.expr) = script_exp_unary_bitwise_not((yyvsp[(2) - (2)].expr)); } + break; + + case 163: +/* Line 1787 of yacc.c */ +#line 894 "yyscript.y" + { (yyval.expr) = (yyvsp[(2) - (2)].expr); } + break; + + case 164: +/* Line 1787 of yacc.c */ +#line 896 "yyscript.y" + { (yyval.expr) = script_exp_binary_mult((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 165: +/* Line 1787 of yacc.c */ +#line 898 "yyscript.y" + { (yyval.expr) = script_exp_binary_div((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 166: +/* Line 1787 of yacc.c */ +#line 900 "yyscript.y" + { (yyval.expr) = script_exp_binary_mod((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 167: +/* Line 1787 of yacc.c */ +#line 902 "yyscript.y" + { (yyval.expr) = script_exp_binary_add((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 168: +/* Line 1787 of yacc.c */ +#line 904 "yyscript.y" + { (yyval.expr) = script_exp_binary_sub((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 169: +/* Line 1787 of yacc.c */ +#line 906 "yyscript.y" + { (yyval.expr) = script_exp_binary_lshift((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 170: +/* Line 1787 of yacc.c */ +#line 908 "yyscript.y" + { (yyval.expr) = script_exp_binary_rshift((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 171: +/* Line 1787 of yacc.c */ +#line 910 "yyscript.y" + { (yyval.expr) = script_exp_binary_eq((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 172: +/* Line 1787 of yacc.c */ +#line 912 "yyscript.y" + { (yyval.expr) = script_exp_binary_ne((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 173: +/* Line 1787 of yacc.c */ +#line 914 "yyscript.y" + { (yyval.expr) = script_exp_binary_le((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 174: +/* Line 1787 of yacc.c */ +#line 916 "yyscript.y" + { (yyval.expr) = script_exp_binary_ge((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 175: +/* Line 1787 of yacc.c */ +#line 918 "yyscript.y" + { (yyval.expr) = script_exp_binary_lt((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 176: +/* Line 1787 of yacc.c */ +#line 920 "yyscript.y" + { (yyval.expr) = script_exp_binary_gt((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 177: +/* Line 1787 of yacc.c */ +#line 922 "yyscript.y" + { (yyval.expr) = script_exp_binary_bitwise_and((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 178: +/* Line 1787 of yacc.c */ +#line 924 "yyscript.y" + { (yyval.expr) = script_exp_binary_bitwise_xor((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 179: +/* Line 1787 of yacc.c */ +#line 926 "yyscript.y" + { (yyval.expr) = script_exp_binary_bitwise_or((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 180: +/* Line 1787 of yacc.c */ +#line 928 "yyscript.y" + { (yyval.expr) = script_exp_binary_logical_and((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 181: +/* Line 1787 of yacc.c */ +#line 930 "yyscript.y" + { (yyval.expr) = script_exp_binary_logical_or((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 182: +/* Line 1787 of yacc.c */ +#line 932 "yyscript.y" + { (yyval.expr) = script_exp_trinary_cond((yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); } + break; + + case 183: +/* Line 1787 of yacc.c */ +#line 934 "yyscript.y" + { (yyval.expr) = script_exp_integer((yyvsp[(1) - (1)].integer)); } + break; + + case 184: +/* Line 1787 of yacc.c */ +#line 936 "yyscript.y" + { (yyval.expr) = script_symbol(closure, (yyvsp[(1) - (1)].string).value, (yyvsp[(1) - (1)].string).length); } + break; + + case 185: +/* Line 1787 of yacc.c */ +#line 938 "yyscript.y" + { (yyval.expr) = script_exp_function_max((yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); } + break; + + case 186: +/* Line 1787 of yacc.c */ +#line 940 "yyscript.y" + { (yyval.expr) = script_exp_function_min((yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); } + break; + + case 187: +/* Line 1787 of yacc.c */ +#line 942 "yyscript.y" + { (yyval.expr) = script_exp_function_defined((yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 188: +/* Line 1787 of yacc.c */ +#line 944 "yyscript.y" + { (yyval.expr) = script_exp_function_sizeof_headers(); } + break; + + case 189: +/* Line 1787 of yacc.c */ +#line 946 "yyscript.y" + { (yyval.expr) = script_exp_function_alignof((yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 190: +/* Line 1787 of yacc.c */ +#line 948 "yyscript.y" + { (yyval.expr) = script_exp_function_sizeof((yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 191: +/* Line 1787 of yacc.c */ +#line 950 "yyscript.y" + { (yyval.expr) = script_exp_function_addr((yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 192: +/* Line 1787 of yacc.c */ +#line 952 "yyscript.y" + { (yyval.expr) = script_exp_function_loadaddr((yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 193: +/* Line 1787 of yacc.c */ +#line 954 "yyscript.y" + { (yyval.expr) = script_exp_function_origin(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 194: +/* Line 1787 of yacc.c */ +#line 956 "yyscript.y" + { (yyval.expr) = script_exp_function_length(closure, (yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 195: +/* Line 1787 of yacc.c */ +#line 958 "yyscript.y" + { (yyval.expr) = script_exp_function_constant((yyvsp[(3) - (4)].string).value, (yyvsp[(3) - (4)].string).length); } + break; + + case 196: +/* Line 1787 of yacc.c */ +#line 960 "yyscript.y" + { (yyval.expr) = script_exp_function_absolute((yyvsp[(3) - (4)].expr)); } + break; + + case 197: +/* Line 1787 of yacc.c */ +#line 962 "yyscript.y" + { (yyval.expr) = script_exp_function_align(script_exp_string(".", 1), (yyvsp[(3) - (4)].expr)); } + break; + + case 198: +/* Line 1787 of yacc.c */ +#line 964 "yyscript.y" + { (yyval.expr) = script_exp_function_align((yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); } + break; + + case 199: +/* Line 1787 of yacc.c */ +#line 966 "yyscript.y" + { (yyval.expr) = script_exp_function_align(script_exp_string(".", 1), (yyvsp[(3) - (4)].expr)); } + break; + + case 200: +/* Line 1787 of yacc.c */ +#line 968 "yyscript.y" + { + script_data_segment_align(closure); + (yyval.expr) = script_exp_function_data_segment_align((yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + } + break; + + case 201: +/* Line 1787 of yacc.c */ +#line 973 "yyscript.y" + { + script_data_segment_relro_end(closure); + (yyval.expr) = script_exp_function_data_segment_relro_end((yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].expr)); + } + break; + + case 202: +/* Line 1787 of yacc.c */ +#line 978 "yyscript.y" + { (yyval.expr) = script_exp_function_data_segment_end((yyvsp[(3) - (4)].expr)); } + break; + + case 203: +/* Line 1787 of yacc.c */ +#line 980 "yyscript.y" + { + (yyval.expr) = script_exp_function_segment_start((yyvsp[(3) - (6)].string).value, (yyvsp[(3) - (6)].string).length, (yyvsp[(5) - (6)].expr)); + /* We need to take note of any SEGMENT_START expressions + because they change the behaviour of -Ttext, -Tdata and + -Tbss options. */ + script_saw_segment_start_expression(closure); + } + break; + + case 204: +/* Line 1787 of yacc.c */ +#line 988 "yyscript.y" + { (yyval.expr) = script_exp_function_assert((yyvsp[(3) - (6)].expr), (yyvsp[(5) - (6)].string).value, (yyvsp[(5) - (6)].string).length); } + break; + + case 205: +/* Line 1787 of yacc.c */ +#line 994 "yyscript.y" + { script_set_symbol(closure, (yyvsp[(1) - (3)].string).value, (yyvsp[(1) - (3)].string).length, (yyvsp[(3) - (3)].expr), 0, 0); } + break; + + case 209: +/* Line 1787 of yacc.c */ +#line 1012 "yyscript.y" + { script_new_vers_node (closure, NULL, (yyvsp[(2) - (5)].versyms)); } + break; + + case 213: +/* Line 1787 of yacc.c */ +#line 1027 "yyscript.y" + { + script_register_vers_node (closure, NULL, 0, (yyvsp[(2) - (4)].versnode), NULL); + } + break; + + case 214: +/* Line 1787 of yacc.c */ +#line 1031 "yyscript.y" + { + script_register_vers_node (closure, (yyvsp[(1) - (5)].string).value, (yyvsp[(1) - (5)].string).length, (yyvsp[(3) - (5)].versnode), + NULL); + } + break; + + case 215: +/* Line 1787 of yacc.c */ +#line 1036 "yyscript.y" + { + script_register_vers_node (closure, (yyvsp[(1) - (6)].string).value, (yyvsp[(1) - (6)].string).length, (yyvsp[(3) - (6)].versnode), (yyvsp[(5) - (6)].deplist)); + } + break; + + case 216: +/* Line 1787 of yacc.c */ +#line 1043 "yyscript.y" + { + (yyval.deplist) = script_add_vers_depend (closure, NULL, (yyvsp[(1) - (1)].string).value, (yyvsp[(1) - (1)].string).length); + } + break; + + case 217: +/* Line 1787 of yacc.c */ +#line 1047 "yyscript.y" + { + (yyval.deplist) = script_add_vers_depend (closure, (yyvsp[(1) - (2)].deplist), (yyvsp[(2) - (2)].string).value, (yyvsp[(2) - (2)].string).length); + } + break; + + case 218: +/* Line 1787 of yacc.c */ +#line 1054 "yyscript.y" + { (yyval.versnode) = script_new_vers_node (closure, NULL, NULL); } + break; + + case 219: +/* Line 1787 of yacc.c */ +#line 1056 "yyscript.y" + { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[(1) - (2)].versyms), NULL); } + break; + + case 220: +/* Line 1787 of yacc.c */ +#line 1058 "yyscript.y" + { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[(3) - (4)].versyms), NULL); } + break; + + case 221: +/* Line 1787 of yacc.c */ +#line 1060 "yyscript.y" + { (yyval.versnode) = script_new_vers_node (closure, NULL, (yyvsp[(3) - (4)].versyms)); } + break; + + case 222: +/* Line 1787 of yacc.c */ +#line 1062 "yyscript.y" + { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[(3) - (8)].versyms), (yyvsp[(7) - (8)].versyms)); } + break; + + case 223: +/* Line 1787 of yacc.c */ +#line 1071 "yyscript.y" + { + (yyval.versyms) = script_new_vers_pattern (closure, NULL, (yyvsp[(1) - (1)].string).value, + (yyvsp[(1) - (1)].string).length, 0); + } + break; + + case 224: +/* Line 1787 of yacc.c */ +#line 1076 "yyscript.y" + { + (yyval.versyms) = script_new_vers_pattern (closure, NULL, (yyvsp[(1) - (1)].string).value, + (yyvsp[(1) - (1)].string).length, 1); + } + break; + + case 225: +/* Line 1787 of yacc.c */ +#line 1081 "yyscript.y" + { + (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[(1) - (3)].versyms), (yyvsp[(3) - (3)].string).value, + (yyvsp[(3) - (3)].string).length, 0); + } + break; + + case 226: +/* Line 1787 of yacc.c */ +#line 1086 "yyscript.y" + { + (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[(1) - (3)].versyms), (yyvsp[(3) - (3)].string).value, + (yyvsp[(3) - (3)].string).length, 1); + } + break; + + case 227: +/* Line 1787 of yacc.c */ +#line 1092 "yyscript.y" + { version_script_push_lang (closure, (yyvsp[(2) - (3)].string).value, (yyvsp[(2) - (3)].string).length); } + break; + + case 228: +/* Line 1787 of yacc.c */ +#line 1094 "yyscript.y" + { + (yyval.versyms) = (yyvsp[(5) - (7)].versyms); + version_script_pop_lang(closure); + } + break; + + case 229: +/* Line 1787 of yacc.c */ +#line 1102 "yyscript.y" + { version_script_push_lang (closure, (yyvsp[(4) - (5)].string).value, (yyvsp[(4) - (5)].string).length); } + break; + + case 230: +/* Line 1787 of yacc.c */ +#line 1104 "yyscript.y" + { + (yyval.versyms) = script_merge_expressions ((yyvsp[(1) - (9)].versyms), (yyvsp[(7) - (9)].versyms)); + version_script_pop_lang(closure); + } + break; + + case 231: +/* Line 1787 of yacc.c */ +#line 1109 "yyscript.y" + { + (yyval.versyms) = script_new_vers_pattern (closure, NULL, "extern", + sizeof("extern") - 1, 1); + } + break; + + case 232: +/* Line 1787 of yacc.c */ +#line 1114 "yyscript.y" + { + (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[(1) - (3)].versyms), "extern", + sizeof("extern") - 1, 1); + } + break; + + case 233: +/* Line 1787 of yacc.c */ +#line 1124 "yyscript.y" + { (yyval.string) = (yyvsp[(1) - (1)].string); } + break; + + case 234: +/* Line 1787 of yacc.c */ +#line 1126 "yyscript.y" + { (yyval.string) = (yyvsp[(1) - (1)].string); } + break; + + +/* Line 1787 of yacc.c */ +#line 3641 "yyscript.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (closure, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (closure, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, closure); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, closure); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (closure, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, closure); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, closure); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +/* Line 2050 of yacc.c */ +#line 1148 "yyscript.y" diff --git a/gnu/usr.bin/binutils227/block2/libgold/yyscript.h b/gnu/usr.bin/binutils227/block2/libgold/yyscript.h new file mode 100644 index 0000000000..b5eafa7443 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/libgold/yyscript.h @@ -0,0 +1,319 @@ +/* A Bison parser, made by GNU Bison 2.7.12-4996. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 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, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_YY_YYSCRIPT_H_INCLUDED +# define YY_YY_YYSCRIPT_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + OREQ = 258, + ANDEQ = 259, + RSHIFTEQ = 260, + LSHIFTEQ = 261, + DIVEQ = 262, + MULTEQ = 263, + MINUSEQ = 264, + PLUSEQ = 265, + OROR = 266, + ANDAND = 267, + NE = 268, + EQ = 269, + GE = 270, + LE = 271, + RSHIFT = 272, + LSHIFT = 273, + UNARY = 274, + STRING = 275, + QUOTED_STRING = 276, + INTEGER = 277, + ABSOLUTE = 278, + ADDR = 279, + ALIGN_K = 280, + ALIGNOF = 281, + ASSERT_K = 282, + AS_NEEDED = 283, + AT = 284, + BIND = 285, + BLOCK = 286, + BYTE = 287, + CONSTANT = 288, + CONSTRUCTORS = 289, + COPY = 290, + CREATE_OBJECT_SYMBOLS = 291, + DATA_SEGMENT_ALIGN = 292, + DATA_SEGMENT_END = 293, + DATA_SEGMENT_RELRO_END = 294, + DEFINED = 295, + DSECT = 296, + ENTRY = 297, + EXCLUDE_FILE = 298, + EXTERN = 299, + FILL = 300, + FLOAT = 301, + FORCE_COMMON_ALLOCATION = 302, + GLOBAL = 303, + GROUP = 304, + HLL = 305, + INCLUDE = 306, + INHIBIT_COMMON_ALLOCATION = 307, + INFO = 308, + INPUT = 309, + KEEP = 310, + LEN = 311, + LENGTH = 312, + LOADADDR = 313, + LOCAL = 314, + LONG = 315, + MAP = 316, + MAX_K = 317, + MEMORY = 318, + MIN_K = 319, + NEXT = 320, + NOCROSSREFS = 321, + NOFLOAT = 322, + NOLOAD = 323, + ONLY_IF_RO = 324, + ONLY_IF_RW = 325, + ORG = 326, + ORIGIN = 327, + OUTPUT = 328, + OUTPUT_ARCH = 329, + OUTPUT_FORMAT = 330, + OVERLAY = 331, + PHDRS = 332, + PROVIDE = 333, + PROVIDE_HIDDEN = 334, + QUAD = 335, + SEARCH_DIR = 336, + SECTIONS = 337, + SEGMENT_START = 338, + SHORT = 339, + SIZEOF = 340, + SIZEOF_HEADERS = 341, + SORT_BY_ALIGNMENT = 342, + SORT_BY_INIT_PRIORITY = 343, + SORT_BY_NAME = 344, + SPECIAL = 345, + SQUAD = 346, + STARTUP = 347, + SUBALIGN = 348, + SYSLIB = 349, + TARGET_K = 350, + TRUNCATE = 351, + VERSIONK = 352, + OPTION = 353, + PARSING_LINKER_SCRIPT = 354, + PARSING_VERSION_SCRIPT = 355, + PARSING_DEFSYM = 356, + PARSING_DYNAMIC_LIST = 357, + PARSING_SECTIONS_BLOCK = 358, + PARSING_SECTION_COMMANDS = 359, + PARSING_MEMORY_DEF = 360 + }; +#endif +/* Tokens. */ +#define OREQ 258 +#define ANDEQ 259 +#define RSHIFTEQ 260 +#define LSHIFTEQ 261 +#define DIVEQ 262 +#define MULTEQ 263 +#define MINUSEQ 264 +#define PLUSEQ 265 +#define OROR 266 +#define ANDAND 267 +#define NE 268 +#define EQ 269 +#define GE 270 +#define LE 271 +#define RSHIFT 272 +#define LSHIFT 273 +#define UNARY 274 +#define STRING 275 +#define QUOTED_STRING 276 +#define INTEGER 277 +#define ABSOLUTE 278 +#define ADDR 279 +#define ALIGN_K 280 +#define ALIGNOF 281 +#define ASSERT_K 282 +#define AS_NEEDED 283 +#define AT 284 +#define BIND 285 +#define BLOCK 286 +#define BYTE 287 +#define CONSTANT 288 +#define CONSTRUCTORS 289 +#define COPY 290 +#define CREATE_OBJECT_SYMBOLS 291 +#define DATA_SEGMENT_ALIGN 292 +#define DATA_SEGMENT_END 293 +#define DATA_SEGMENT_RELRO_END 294 +#define DEFINED 295 +#define DSECT 296 +#define ENTRY 297 +#define EXCLUDE_FILE 298 +#define EXTERN 299 +#define FILL 300 +#define FLOAT 301 +#define FORCE_COMMON_ALLOCATION 302 +#define GLOBAL 303 +#define GROUP 304 +#define HLL 305 +#define INCLUDE 306 +#define INHIBIT_COMMON_ALLOCATION 307 +#define INFO 308 +#define INPUT 309 +#define KEEP 310 +#define LEN 311 +#define LENGTH 312 +#define LOADADDR 313 +#define LOCAL 314 +#define LONG 315 +#define MAP 316 +#define MAX_K 317 +#define MEMORY 318 +#define MIN_K 319 +#define NEXT 320 +#define NOCROSSREFS 321 +#define NOFLOAT 322 +#define NOLOAD 323 +#define ONLY_IF_RO 324 +#define ONLY_IF_RW 325 +#define ORG 326 +#define ORIGIN 327 +#define OUTPUT 328 +#define OUTPUT_ARCH 329 +#define OUTPUT_FORMAT 330 +#define OVERLAY 331 +#define PHDRS 332 +#define PROVIDE 333 +#define PROVIDE_HIDDEN 334 +#define QUAD 335 +#define SEARCH_DIR 336 +#define SECTIONS 337 +#define SEGMENT_START 338 +#define SHORT 339 +#define SIZEOF 340 +#define SIZEOF_HEADERS 341 +#define SORT_BY_ALIGNMENT 342 +#define SORT_BY_INIT_PRIORITY 343 +#define SORT_BY_NAME 344 +#define SPECIAL 345 +#define SQUAD 346 +#define STARTUP 347 +#define SUBALIGN 348 +#define SYSLIB 349 +#define TARGET_K 350 +#define TRUNCATE 351 +#define VERSIONK 352 +#define OPTION 353 +#define PARSING_LINKER_SCRIPT 354 +#define PARSING_VERSION_SCRIPT 355 +#define PARSING_DEFSYM 356 +#define PARSING_DYNAMIC_LIST 357 +#define PARSING_SECTIONS_BLOCK 358 +#define PARSING_SECTION_COMMANDS 359 +#define PARSING_MEMORY_DEF 360 + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ +/* Line 2053 of yacc.c */ +#line 53 "yyscript.y" + + /* A string. */ + struct Parser_string string; + /* A number. */ + uint64_t integer; + /* An expression. */ + Expression_ptr expr; + /* An output section header. */ + struct Parser_output_section_header output_section_header; + /* An output section trailer. */ + struct Parser_output_section_trailer output_section_trailer; + /* A section constraint. */ + enum Section_constraint constraint; + /* A complete input section specification. */ + struct Input_section_spec input_section_spec; + /* A list of wildcard specifications, with exclusions. */ + struct Wildcard_sections wildcard_sections; + /* A single wildcard specification. */ + struct Wildcard_section wildcard_section; + /* A list of strings. */ + String_list_ptr string_list; + /* Information for a program header. */ + struct Phdr_info phdr_info; + /* Used for version scripts and within VERSION {}. */ + struct Version_dependency_list* deplist; + struct Version_expression_list* versyms; + struct Version_tree* versnode; + enum Script_section_type section_type; + + +/* Line 2053 of yacc.c */ +#line 298 "yyscript.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void* closure); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_YY_YYSCRIPT_H_INCLUDED */ diff --git a/gnu/usr.bin/binutils227/block2/nm/Makefile b/gnu/usr.bin/binutils227/block2/nm/Makefile new file mode 100644 index 0000000000..d4cdd83ff9 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/nm/Makefile @@ -0,0 +1,25 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= nm +SRCS= nm.c +MFILE= nm${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +# link-time optimization requires dlopen() which means nm cannot be built +# statically and also support -plugin, not even for cross-tools. +.undef NOSHARED + +${MFILE}: ${SRCDIR}/binutils/doc/nm.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} nm.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/objcopy/Makefile b/gnu/usr.bin/binutils227/block2/objcopy/Makefile new file mode 100644 index 0000000000..f115486a9b --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/objcopy/Makefile @@ -0,0 +1,24 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= objcopy +SRCS= objcopy.c not-strip.c rename.c ${WRITE_DEBUG_SRCS} +MFILE= objcopy${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +DEBUG_SRCS= rddbg.c debug.c stabs.c ieee.c rdcoff.c +WRITE_DEBUG_SRCS= ${DEBUG_SRCS} wrstabs.c + +${MFILE}: ${SRCDIR}/binutils/doc/objcopy.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} objcopy.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/objdump/Makefile b/gnu/usr.bin/binutils227/block2/objdump/Makefile new file mode 100644 index 0000000000..a68e61aec0 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/objdump/Makefile @@ -0,0 +1,29 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= objdump +SRCS= objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) elfcomm.c +MFILE= objdump${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} ${LDADD_OPCODE} -lz + +DEBUG_SRCS= rddbg.c debug.c stabs.c ieee.c rdcoff.c +CFLAGS+= -I${.OBJDIR} +FLAGS_GROUPS= objdump +objdump_FLAGS= -DOBJDUMP_PRIVATE_VECTORS="" +objdump_FLAGS_FILES= objdump.c + +dwarf.c: bfd_stdint.h + +${MFILE}: ${SRCDIR}/binutils/doc/objdump.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} bfd_stdint.h + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} objdump.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/ranlib/Makefile b/gnu/usr.bin/binutils227/block2/ranlib/Makefile new file mode 100644 index 0000000000..c529f31df4 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/ranlib/Makefile @@ -0,0 +1,30 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= ranlib +SRCS= ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c binemul.c \ + emul_vanilla.c +MFILE= ranlib${MANPAGEVER}.1 +MAN= ${MFILE} +DPADD= ${LIBL} ${LIBZ} +LDADD= ${STD_LDADD} -ll -lz + +CFLAGS+= -I${SRCDIR}/binutils \ + -Dbin_dummy_emulation=bin_vanilla_emulation + +# link-time optimization requires dlopen() which means ranlib cannot be built +# statically and also support -plugin, not even for cross-tools. +.undef NOSHARED + +${MFILE}: ${SRCDIR}/binutils/doc/ranlib.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} ranlib.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/readelf/Makefile b/gnu/usr.bin/binutils227/block2/readelf/Makefile new file mode 100644 index 0000000000..8f7a88ceff --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/readelf/Makefile @@ -0,0 +1,25 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= readelf +SRCS= readelf.c version.c unwind-ia64.c dwarf.c elfcomm.c +MFILE= readelf${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${LDADD_IBERTY} -lz + +CFLAGS+= -I${.OBJDIR} + +${MFILE}: ${SRCDIR}/binutils/doc/readelf.1 + cp ${.ALLSRC} ${.TARGET} + +dwarf.c: bfd_stdint.h + +CLEANFILES+= ${MFILE} bfd_stdint.h + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} readelf.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/size/Makefile b/gnu/usr.bin/binutils227/block2/size/Makefile new file mode 100644 index 0000000000..90030b5a8c --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/size/Makefile @@ -0,0 +1,21 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= size +SRCS= size.c +MFILE= size${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +${MFILE}: ${SRCDIR}/binutils/doc/size.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} size.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/strings/Makefile b/gnu/usr.bin/binutils227/block2/strings/Makefile new file mode 100644 index 0000000000..cbe71a6ea0 --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/strings/Makefile @@ -0,0 +1,20 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= strings +MFILE= strings${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +${MFILE}: ${SRCDIR}/binutils/doc/strings.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} strings.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block2/strip/Makefile b/gnu/usr.bin/binutils227/block2/strip/Makefile new file mode 100644 index 0000000000..3f7bf963cc --- /dev/null +++ b/gnu/usr.bin/binutils227/block2/strip/Makefile @@ -0,0 +1,24 @@ +.include "../../Makefile.inc1" +.include "../Makefile.block2" + +.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc + +PROG= strip +SRCS= objcopy.c is-strip.c rename.c ${WRITE_DEBUG_SRCS} +MFILE= strip${MANPAGEVER}.1 +MAN= ${MFILE} +LDADD= ${STD_LDADD} -lz + +DEBUG_SRCS= rddbg.c debug.c stabs.c ieee.c rdcoff.c +WRITE_DEBUG_SRCS= ${DEBUG_SRCS} wrstabs.c + +${MFILE}: ${SRCDIR}/binutils/doc/strip.1 + cp ${.ALLSRC} ${.TARGET} + +CLEANFILES+= ${MFILE} + +.if defined(IS_PRIMARY) +MLINKS+= ${MFILE} strip.1 +.endif + +.include diff --git a/gnu/usr.bin/binutils227/block3/Makefile b/gnu/usr.bin/binutils227/block3/Makefile new file mode 100644 index 0000000000..9b93b10ef0 --- /dev/null +++ b/gnu/usr.bin/binutils227/block3/Makefile @@ -0,0 +1,8 @@ +# Build in serial +# incremental dump uses all the same object files as the gold linker +# except for one, so we reuse them instead of building them twice +SUBDIR= gold-linker incremental-dump + +SUBDIR_ORDERED= ${SUBDIR} + +.include diff --git a/gnu/usr.bin/binutils227/block3/Makefile.gld b/gnu/usr.bin/binutils227/block3/Makefile.gld new file mode 100644 index 0000000000..00be51a2d5 --- /dev/null +++ b/gnu/usr.bin/binutils227/block3/Makefile.gld @@ -0,0 +1,47 @@ +# This is included explicitly at the top of each sub-Makefile. We can't +# use the normal "Makefile.inc" mechanism, because we need some of these +# definitions before the sub-Makefile is processed. + +RELTOP:= ../.. + +# RELTOP is the relative path to this point in the source or object +# tree, from any subdirectory of same. It gets extra "../" prefixes +# added to it as we descend into subdirectories. + +RELSRC= ${RELTOP}/../../../contrib/binutils-2.27 +SRCDIR= ${.CURDIR}/${RELSRC} +OBJTOP= ${.OBJDIR}/${RELTOP} +TSR= /${USRDATA_PREFIX} + +.PATH: ${SRCDIR}/gold + +CFLAGS+= -DHAVE_CONFIG_H +CFLAGS+= -D_LARGEFILE_SOURCE +CFLAGS+= -D_FILE_OFFSET_BITS=64 +CFLAGS+= -DBINDIR="\"${TOOLS_PREFIX}${BINDIR}\"" +CFLAGS+= -DTOOLBINDIR="\"${TOOLS_PREFIX}${BINDIR}\"" +CFLAGS+= -DTOOLLIBDIR="\"${TOOLS_PREFIX}${LIBDIR}\"" +CFLAGS+= -DTARGET_SYSTEM_ROOT="\"${TSR:S|//|/|}\"" +CFLAGS+= -I. -I${.CURDIR} -I${SRCDIR}/gold +CFLAGS+= -I${SRCDIR}/include -I${SRCDIR}/elfcpp + +# XXX: Do we want -Wl,-z,relro on by default? Differs for ld.bfd and lg.gold. +CFLAGS+= -DDEFAULT_LD_Z_RELRO=0 + +LDADD_IBERTY= ${OBJTOP}/block1/libiberty/libiberty.a +LDADD_GOLD= ${OBJTOP}/block2/libgold/libgold.a +STD_LDADD= ${LDADD_GOLD} ${LDADD_IBERTY} -lz + +# source files common to both ld.gold and incremental-dump + +GOLD_COMMON= i386.cc \ + x86_64.cc + +# hmmm sparc.cc \ + powerpc.cc \ + arm.cc \ + arm-reloc-property.cc \ + tilegx.cc \ + mips.cc \ + aarch64.cc \ + aarch64-reloc-property.cc diff --git a/gnu/usr.bin/binutils227/block3/gold-linker/Makefile b/gnu/usr.bin/binutils227/block3/gold-linker/Makefile new file mode 100644 index 0000000000..8fe540ba5f --- /dev/null +++ b/gnu/usr.bin/binutils227/block3/gold-linker/Makefile @@ -0,0 +1,14 @@ +.include "../../Makefile.inc1" +.include "../Makefile.gld" + +PROG_CXX= ld.gold +SRCS= main.cc ${GOLD_COMMON} +CFLAGS+= -I${.CURDIR}/../../block2/libgold +LDADD= ${STD_LDADD} +NOMAN= + +# link-time optimization requires dlopen() which means ld cannot be built +# statically and also support -plugin, not even for cross-tools. +.undef NOSHARED + +.include diff --git a/gnu/usr.bin/binutils227/block3/incremental-dump/Makefile b/gnu/usr.bin/binutils227/block3/incremental-dump/Makefile new file mode 100644 index 0000000000..7eaa3f7c9c --- /dev/null +++ b/gnu/usr.bin/binutils227/block3/incremental-dump/Makefile @@ -0,0 +1,20 @@ +.include "../../Makefile.inc1" +.include "../Makefile.gld" + +PROG_CXX= incremental-dump +OBJS= incremental-dump.o +COMMOBJS= ${GOLD_COMMON:S|^|${.OBJDIR:H}/gold-linker/|:.cc=.o} +CFLAGS+= -I${.CURDIR}/../../block2/libgold +LDADD= ${STD_LDADD} +NOMAN= + +# The prevents searching for object files in other +# directory's work area. In order to avoid building the COMMONOBJS +# twice, a custom target has to be applied, and the sources have to +# defined as OBJS, not SRCS for this to work. + +incremental-dump: ${OBJS} ${COMMOBJS} + ${CXX_LINK} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} \ + ${OBJS} ${COMMOBJS} ${LDADD} + +.include -- 2.11.4.GIT