Author: emaste
Date: Fri May 20 17:24:34 2016
New Revision: 300311
URL: https://svnweb.freebsd.org/changeset/base/300311

Log:
  Update to ELF Tool Chain r3475
  
  Improvements include:
  
   * Add support for reporting and handling a number of new constants in
     various tools, including:
      * CloudABI OSABI
      * DT_TLSDESC_*
      * i386, MIPS, SPARC and amd64 relocations
  
   * C++ demangler bug fixes
  
   * Man page updates
  
   * Improved input validation in several tools
  
  This update also reduces diffs against upstream as a number of fixes
  included in upstream were previously cherry-picked into FreeBSD.
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.3
     - copied unchanged from r300228, 
vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.3
  head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
     - copied unchanged from r300228, 
vendor/elftoolchain/dist/libelftc/elftc_reloc_type_str.c
Modified:
  head/contrib/elftoolchain/addr2line/addr2line.c
  head/contrib/elftoolchain/brandelf/brandelf.c
  head/contrib/elftoolchain/common/_elftc.h
  head/contrib/elftoolchain/common/elfdefinitions.h
  head/contrib/elftoolchain/cxxfilt/cxxfilt.c
  head/contrib/elftoolchain/elfcopy/ascii.c
  head/contrib/elftoolchain/elfcopy/binary.c
  head/contrib/elftoolchain/elfcopy/elfcopy.1
  head/contrib/elftoolchain/elfcopy/elfcopy.h
  head/contrib/elftoolchain/elfcopy/main.c
  head/contrib/elftoolchain/elfcopy/sections.c
  head/contrib/elftoolchain/elfcopy/segments.c
  head/contrib/elftoolchain/elfcopy/symbols.c
  head/contrib/elftoolchain/elfdump/elfdump.c
  head/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c
  head/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c
  head/contrib/elftoolchain/libelf/_libelf_config.h
  head/contrib/elftoolchain/libelf/elf_data.c
  head/contrib/elftoolchain/libelf/libelf_ar.c
  head/contrib/elftoolchain/libelf/libelf_convert.m4
  head/contrib/elftoolchain/libelftc/Makefile
  head/contrib/elftoolchain/libelftc/libelftc.h
  head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c
  head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c
  head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
  head/contrib/elftoolchain/libelftc/make-toolchain-version
  head/contrib/elftoolchain/libpe/libpe_section.c
  head/contrib/elftoolchain/libpe/pe.h
  head/contrib/elftoolchain/nm/nm.c
  head/contrib/elftoolchain/readelf/readelf.c
  head/contrib/elftoolchain/size/size.c
  head/contrib/elftoolchain/strings/strings.c
  head/lib/libelftc/Makefile
  head/lib/libelftc/elftc_version.c
Directory Properties:
  head/contrib/elftoolchain/   (props changed)
  head/contrib/elftoolchain/brandelf/   (props changed)
  head/contrib/elftoolchain/elfdump/   (props changed)

Modified: head/contrib/elftoolchain/addr2line/addr2line.c
==============================================================================
--- head/contrib/elftoolchain/addr2line/addr2line.c     Fri May 20 16:20:08 
2016        (r300310)
+++ head/contrib/elftoolchain/addr2line/addr2line.c     Fri May 20 17:24:34 
2016        (r300311)
@@ -40,7 +40,7 @@
 #include "uthash.h"
 #include "_elftc.h"
 
-ELFTC_VCSID("$Id: addr2line.c 3273 2015-12-11 21:38:57Z kaiwang27 $");
+ELFTC_VCSID("$Id: addr2line.c 3446 2016-05-03 01:31:17Z emaste $");
 
 struct Func {
        char *name;
@@ -284,7 +284,7 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die 
                    &de) == DW_DLV_OK)
                        goto add_func;
 
-               /* Skip if no name assoicated with this DIE. */
+               /* Skip if no name associated with this DIE. */
                goto cont_search;
 
        add_func:

Modified: head/contrib/elftoolchain/brandelf/brandelf.c
==============================================================================
--- head/contrib/elftoolchain/brandelf/brandelf.c       Fri May 20 16:20:08 
2016        (r300310)
+++ head/contrib/elftoolchain/brandelf/brandelf.c       Fri May 20 17:24:34 
2016        (r300311)
@@ -44,7 +44,7 @@
 
 #include "_elftc.h"
 
-ELFTC_VCSID("$Id: brandelf.c 3354 2016-01-18 21:50:15Z jkoshy $");
+ELFTC_VCSID("$Id: brandelf.c 3440 2016-04-07 14:51:47Z emaste $");
 
 static int elftype(const char *);
 static const char *iselftype(int);
@@ -62,6 +62,7 @@ static struct ELFtypes elftypes[] = {
        { "AIX",        ELFOSABI_AIX },
        { "ARM",        ELFOSABI_ARM },
        { "AROS",       ELFOSABI_AROS },
+       { "CloudABI",   ELFOSABI_CLOUDABI },
        { "FreeBSD",    ELFOSABI_FREEBSD },
        { "GNU",        ELFOSABI_GNU },
        { "HP/UX",      ELFOSABI_HPUX},

Modified: head/contrib/elftoolchain/common/_elftc.h
==============================================================================
--- head/contrib/elftoolchain/common/_elftc.h   Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/common/_elftc.h   Fri May 20 17:24:34 2016        
(r300311)
@@ -23,11 +23,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _elftc.h 3244 2015-08-31 19:53:08Z emaste $
+ * $Id: _elftc.h 3446 2016-05-03 01:31:17Z emaste $
  */
 
 /**
- ** Miscellanous definitions needed by multiple components.
+ ** Miscellaneous definitions needed by multiple components.
  **/
 
 #ifndef        _ELFTC_H

Modified: head/contrib/elftoolchain/common/elfdefinitions.h
==============================================================================
--- head/contrib/elftoolchain/common/elfdefinitions.h   Fri May 20 16:20:08 
2016        (r300310)
+++ head/contrib/elftoolchain/common/elfdefinitions.h   Fri May 20 17:24:34 
2016        (r300311)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: elfdefinitions.h 3392 2016-02-05 19:51:22Z emaste $
+ * $Id: elfdefinitions.h 3455 2016-05-09 13:47:29Z emaste $
  */
 
 /*
@@ -184,6 +184,10 @@ _ELF_DEFINE_DT(DT_ADDRRNGLO,        0x6F
        "start of range using the d_ptr field")                         \
 _ELF_DEFINE_DT(DT_GNU_HASH,        0x6FFFFEF5UL,                       \
        "GNU style hash tables")                                        \
+_ELF_DEFINE_DT(DT_TLSDESC_PLT,     0x6FFFFEF6UL,                       \
+       "location of PLT entry for TLS descriptor resolver calls")      \
+_ELF_DEFINE_DT(DT_TLSDESC_GOT,     0x6FFFFEF7UL,                       \
+       "location of GOT entry used by TLS descriptor resolver PLT entry") \
 _ELF_DEFINE_DT(DT_GNU_CONFLICT,     0x6FFFFEF8UL,                      \
        "address of conflict section")                                  \
 _ELF_DEFINE_DT(DT_GNU_LIBLIST,      0x6FFFFEF9UL,                      \
@@ -269,7 +273,7 @@ _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC, 0x70
 _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC_NO, 0x7000001CUL,                   \
        "number of entries in DT_MIPS_DELTA_RELOC")                     \
 _ELF_DEFINE_DT(DT_MIPS_DELTA_SYM,   0x7000001DUL,                      \
-       "Delta symbols refered by Delta relocations")                   \
+       "Delta symbols referred by Delta relocations")                  \
 _ELF_DEFINE_DT(DT_MIPS_DELTA_SYM_NO, 0x7000001EUL,                     \
        "number of entries in DT_MIPS_DELTA_SYM")                       \
 _ELF_DEFINE_DT(DT_MIPS_DELTA_CLASSSYM, 0x70000020UL,                   \
@@ -540,6 +544,7 @@ _ELF_DEFINE_EABI(ELFOSABI_NSK,        14
 _ELF_DEFINE_EABI(ELFOSABI_AROS,       15, "Amiga Research OS")         \
 _ELF_DEFINE_EABI(ELFOSABI_FENIXOS,    16,                              \
        "The FenixOS highly scalable multi-core OS")                    \
+_ELF_DEFINE_EABI(ELFOSABI_CLOUDABI,   17, "Nuxi CloudABI")             \
 _ELF_DEFINE_EABI(ELFOSABI_ARM_AEABI,  64,                              \
        "ARM specific symbol versioning extensions")                    \
 _ELF_DEFINE_EABI(ELFOSABI_ARM,        97, "ARM ABI")                   \
@@ -1193,7 +1198,7 @@ _ELF_DEFINE_SHT(SHT_MIPS_ABIFLAGS,   0x7
        "ABI flags")                                                    \
 _ELF_DEFINE_SHT(SHT_SPARC_GOTDATA,   0x70000000UL,                     \
        "SPARC-specific data")                                          \
-_ELF_DEFINE_SHT(SHT_AMD64_UNWIND,    0x70000001UL,                     \
+_ELF_DEFINE_SHT(SHT_X86_64_UNWIND,   0x70000001UL,                     \
        "unwind tables for the AMD64")                                  \
 _ELF_DEFINE_SHT(SHT_ORDERED,         0x7FFFFFFFUL,                     \
        "sort entries in the section")                                  \
@@ -1212,6 +1217,7 @@ enum {
 };
 
 /* Aliases for section types. */
+#define        SHT_AMD64_UNWIND        SHT_X86_64_UNWIND
 #define        SHT_GNU_verdef          SHT_SUNW_verdef
 #define        SHT_GNU_verneed         SHT_SUNW_verneed
 #define        SHT_GNU_versym          SHT_SUNW_versym
@@ -1255,6 +1261,7 @@ _ELF_DEFINE_STT(STT_FILE,            4, 
 _ELF_DEFINE_STT(STT_COMMON,          5, "uninitialized common block")  \
 _ELF_DEFINE_STT(STT_TLS,             6, "thread local storage")                
\
 _ELF_DEFINE_STT(STT_LOOS,            10, "start of OS-specific types") \
+_ELF_DEFINE_STT(STT_GNU_IFUNC,       10, "indirect function")  \
 _ELF_DEFINE_STT(STT_HIOS,            12, "end of OS-specific types")   \
 _ELF_DEFINE_STT(STT_LOPROC,          13,                               \
        "start of processor-specific types")                            \
@@ -1402,10 +1409,37 @@ _ELF_DEFINE_RELOC(R_386_RELATIVE,       8)      \
 _ELF_DEFINE_RELOC(R_386_GOTOFF,                9)      \
 _ELF_DEFINE_RELOC(R_386_GOTPC,         10)     \
 _ELF_DEFINE_RELOC(R_386_32PLT,         11)     \
+_ELF_DEFINE_RELOC(R_386_TLS_TPOFF,     14)     \
+_ELF_DEFINE_RELOC(R_386_TLS_IE,                15)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GOTIE,     16)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LE,                17)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GD,                18)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LDM,       19)     \
 _ELF_DEFINE_RELOC(R_386_16,            20)     \
 _ELF_DEFINE_RELOC(R_386_PC16,          21)     \
 _ELF_DEFINE_RELOC(R_386_8,             22)     \
-_ELF_DEFINE_RELOC(R_386_PC8,           23)
+_ELF_DEFINE_RELOC(R_386_PC8,           23)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GD_32,     24)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GD_PUSH,   25)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GD_CALL,   26)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GD_POP,    27)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LDM_32,    28)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LDM_PUSH,  29)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LDM_CALL,  30)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LDM_POP,   31)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LDO_32,    32)     \
+_ELF_DEFINE_RELOC(R_386_TLS_IE_32,     33)     \
+_ELF_DEFINE_RELOC(R_386_TLS_LE_32,     34)     \
+_ELF_DEFINE_RELOC(R_386_TLS_DTPMOD32,  35)     \
+_ELF_DEFINE_RELOC(R_386_TLS_DTPOFF32,  36)     \
+_ELF_DEFINE_RELOC(R_386_TLS_TPOFF32,   37)     \
+_ELF_DEFINE_RELOC(R_386_SIZE32,                38)     \
+_ELF_DEFINE_RELOC(R_386_TLS_GOTDESC,   39)     \
+_ELF_DEFINE_RELOC(R_386_TLS_DESC_CALL, 40)     \
+_ELF_DEFINE_RELOC(R_386_TLS_DESC,      41)     \
+_ELF_DEFINE_RELOC(R_386_IRELATIVE,     42)     \
+_ELF_DEFINE_RELOC(R_386_GOT32X,                43)
+
 
 /*
  */
@@ -1795,11 +1829,18 @@ _ELF_DEFINE_RELOC(R_MIPS_GOT16,                 9)      
\
 _ELF_DEFINE_RELOC(R_MIPS_PC16,                 10)     \
 _ELF_DEFINE_RELOC(R_MIPS_CALL16,               11)     \
 _ELF_DEFINE_RELOC(R_MIPS_GPREL32,              12)     \
+_ELF_DEFINE_RELOC(R_MIPS_SHIFT5,               16)     \
+_ELF_DEFINE_RELOC(R_MIPS_SHIFT6,               17)     \
 _ELF_DEFINE_RELOC(R_MIPS_64,                   18)     \
-_ELF_DEFINE_RELOC(R_MIPS_GOTHI16,              21)     \
-_ELF_DEFINE_RELOC(R_MIPS_GOTLO16,              22)     \
+_ELF_DEFINE_RELOC(R_MIPS_GOT_DISP,             19)     \
+_ELF_DEFINE_RELOC(R_MIPS_GOT_PAGE,             20)     \
+_ELF_DEFINE_RELOC(R_MIPS_GOT_OFST,             21)     \
+_ELF_DEFINE_RELOC(R_MIPS_GOT_HI16,             22)     \
+_ELF_DEFINE_RELOC(R_MIPS_GOT_LO16,             23)     \
+_ELF_DEFINE_RELOC(R_MIPS_SUB,                  24)     \
 _ELF_DEFINE_RELOC(R_MIPS_CALLHI16,             30)     \
 _ELF_DEFINE_RELOC(R_MIPS_CALLLO16,             31)     \
+_ELF_DEFINE_RELOC(R_MIPS_JALR,                 37)     \
 _ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32,         38)     \
 _ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32,         39)     \
 _ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64,         40)     \
@@ -2095,6 +2136,7 @@ _ELF_DEFINE_RELOC(R_SPARC_PC_HM10,        38)     \
 _ELF_DEFINE_RELOC(R_SPARC_PC_LM22,     39)     \
 _ELF_DEFINE_RELOC(R_SPARC_WDISP16,     40)     \
 _ELF_DEFINE_RELOC(R_SPARC_WDISP19,     41)     \
+_ELF_DEFINE_RELOC(R_SPARC_GLOB_JMP,    42)     \
 _ELF_DEFINE_RELOC(R_SPARC_7,           43)     \
 _ELF_DEFINE_RELOC(R_SPARC_5,           44)     \
 _ELF_DEFINE_RELOC(R_SPARC_6,           45)     \
@@ -2108,6 +2150,30 @@ _ELF_DEFINE_RELOC(R_SPARC_L44,           52)     \
 _ELF_DEFINE_RELOC(R_SPARC_REGISTER,    53)     \
 _ELF_DEFINE_RELOC(R_SPARC_UA64,                54)     \
 _ELF_DEFINE_RELOC(R_SPARC_UA16,                55)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_GD_HI22, 56)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_GD_LO10, 57)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_GD_ADD,  58)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_GD_CALL, 59)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDM_HI22,        60)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDM_LO10,        61)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDM_ADD, 62)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDM_CALL,        63)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDO_HIX22, 64)   \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDO_LOX10, 65)   \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LDO_ADD, 66)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_IE_HI22, 67)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_IE_LO10, 68)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_IE_LD,   69)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_IE_LDX,  70)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_IE_ADD,  71)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LE_HIX22,        72)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_LE_LOX10,        73)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_DTPMOD32,        74)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_DTPMOD64,        75)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_DTPOFF32,        76)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_DTPOFF64,        77)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_TPOFF32, 78)     \
+_ELF_DEFINE_RELOC(R_SPARC_TLS_TPOFF64, 79)     \
 _ELF_DEFINE_RELOC(R_SPARC_GOTDATA_HIX22, 80)   \
 _ELF_DEFINE_RELOC(R_SPARC_GOTDATA_LOX10, 81)   \
 _ELF_DEFINE_RELOC(R_SPARC_GOTDATA_OP_HIX22, 82)        \
@@ -2153,7 +2219,10 @@ _ELF_DEFINE_RELOC(R_X86_64_SIZE64,       33)     \
 _ELF_DEFINE_RELOC(R_X86_64_GOTPC32_TLSDESC, 34)        \
 _ELF_DEFINE_RELOC(R_X86_64_TLSDESC_CALL, 35)   \
 _ELF_DEFINE_RELOC(R_X86_64_TLSDESC,    36)     \
-_ELF_DEFINE_RELOC(R_X86_64_IRELATIVE,  37)
+_ELF_DEFINE_RELOC(R_X86_64_IRELATIVE,  37)     \
+_ELF_DEFINE_RELOC(R_X86_64_RELATIVE64, 38)     \
+_ELF_DEFINE_RELOC(R_X86_64_GOTPCRELX,  41)     \
+_ELF_DEFINE_RELOC(R_X86_64_REX_GOTPCRELX, 42)
 
 #define        _ELF_DEFINE_RELOCATIONS()               \
 _ELF_DEFINE_386_RELOCATIONS()                  \
@@ -2424,7 +2493,7 @@ _ELF_DEFINE_ODK(ODK_HWOR,       8,      
 _ELF_DEFINE_ODK(ODK_GP_GROUP,   9,                                     \
        "GP group to use for text/data sections")                       \
 _ELF_DEFINE_ODK(ODK_IDENT,      10,     "ID information")              \
-_ELF_DEFINE_ODK(ODK_PAGESIZE,   11,     "page size infomation")
+_ELF_DEFINE_ODK(ODK_PAGESIZE,   11,     "page size information")
 
 #undef _ELF_DEFINE_ODK
 #define        _ELF_DEFINE_ODK(N, V, DESCR)    N = V ,

Modified: head/contrib/elftoolchain/cxxfilt/cxxfilt.c
==============================================================================
--- head/contrib/elftoolchain/cxxfilt/cxxfilt.c Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/cxxfilt/cxxfilt.c Fri May 20 17:24:34 2016        
(r300311)
@@ -35,7 +35,7 @@
 
 #include "_elftc.h"
 
-ELFTC_VCSID("$Id: cxxfilt.c 3356 2016-01-22 22:31:38Z jkoshy $");
+ELFTC_VCSID("$Id: cxxfilt.c 3454 2016-05-07 17:11:05Z kaiwang27 $");
 
 #define        STRBUFSZ        8192
 
@@ -112,35 +112,18 @@ find_format(const char *fstr)
 }
 
 static char *
-demangle(char *name, int strict, size_t *pos)
+demangle(char *name)
 {
        static char dem[STRBUFSZ];
-       char nb[STRBUFSZ];
-       size_t p, t;
 
-       if (stripus && *name == '_') {
-               strncpy(nb, name + 1, sizeof(nb) - 1);
-               t = 1;
-       } else {
-               strncpy(nb, name, sizeof(nb) - 1);
-               t = 0;
-       }
-       nb[sizeof(nb) - 1] = '\0';
+       if (stripus && *name == '_')
+               name++;
 
-       p = strlen(nb);
-       if (p == 0)
-               return NULL;
-
-       while (elftc_demangle(nb, dem, sizeof(dem), (unsigned) format) < 0) {
-               if (!strict && p > 1) {
-                       nb[--p] = '\0';
-                       continue;
-               } else
-                       return (NULL);
-       }
+       if (strlen(name) == 0)
+               return (NULL);
 
-       if (pos != NULL)
-               *pos = t ? p + 1 : p;
+       if (elftc_demangle(name, dem, sizeof(dem), (unsigned) format) < 0)
+               return (NULL);
 
        return (dem);
 }
@@ -149,7 +132,7 @@ int
 main(int argc, char **argv)
 {
        char *dem, buf[STRBUFSZ];
-       size_t i, p, s;
+       size_t p;
        int c, n, opt;
 
        while ((opt = getopt_long(argc, argv, "_nps:V", longopts, NULL)) !=
@@ -184,8 +167,8 @@ main(int argc, char **argv)
 
        if (*argv != NULL) {
                for (n = 0; n < argc; n++) {
-                       if ((dem = demangle(argv[n], 1, NULL)) == NULL)
-                               fprintf(stderr, "Failed: %s\n", argv[n]);
+                       if ((dem = demangle(argv[n])) == NULL)
+                               printf("%s\n", argv[n]);
                        else
                                printf("%s\n", dem);
                }
@@ -193,23 +176,18 @@ main(int argc, char **argv)
                p = 0;
                for (;;) {
                        c = fgetc(stdin);
-                       if (c == EOF || !isprint(c) || strchr(" \t\n", c)) {
+                       if (c == EOF || !(isalnum(c) || strchr(".$_", c))) {
                                if (p > 0) {
                                        buf[p] = '\0';
-                                       if ((dem = demangle(buf, 0, &s)) ==
-                                           NULL)
+                                       if ((dem = demangle(buf)) == NULL)
                                                printf("%s", buf);
-                                       else {
+                                       else
                                                printf("%s", dem);
-                                               for (i = s; i < p; i++)
-                                                       putchar(buf[i]);
-                                       }
                                        p = 0;
                                }
                                if (c == EOF)
                                        break;
-                               if (isprint(c) || strchr(" \t\n", c))
-                                       putchar(c);
+                               putchar(c);
                        } else {
                                if ((size_t) p >= sizeof(buf) - 1)
                                        warnx("buffer overflowed");

Modified: head/contrib/elftoolchain/elfcopy/ascii.c
==============================================================================
--- head/contrib/elftoolchain/elfcopy/ascii.c   Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfcopy/ascii.c   Fri May 20 17:24:34 2016        
(r300311)
@@ -36,7 +36,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: ascii.c 3177 2015-03-30 18:19:41Z emaste $");
+ELFTC_VCSID("$Id: ascii.c 3446 2016-05-03 01:31:17Z emaste $");
 
 static void append_data(struct section *s, const void *buf, size_t sz);
 static char hex_digit(uint8_t n);
@@ -187,7 +187,7 @@ create_srec(struct elfcopy *ecp, int ifd
        if (elferr != 0)
                warnx("elf_nextscn failed: %s", elf_errmsg(elferr));
 
-       /* Generate S{7,8,9} end of block recrod. */
+       /* Generate S{7,8,9} end of block record. */
        if (gelf_getehdr(e, &eh) == NULL)
                errx(EXIT_FAILURE, "gelf_getehdr() failed: %s",
                    elf_errmsg(-1));

Modified: head/contrib/elftoolchain/elfcopy/binary.c
==============================================================================
--- head/contrib/elftoolchain/elfcopy/binary.c  Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfcopy/binary.c  Fri May 20 17:24:34 2016        
(r300311)
@@ -36,7 +36,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: binary.c 3270 2015-12-11 18:48:56Z emaste $");
+ELFTC_VCSID("$Id: binary.c 3445 2016-04-20 19:08:30Z emaste $");
 
 /*
  * Convert ELF object to `binary'. Sections with SHF_ALLOC flag set

Modified: head/contrib/elftoolchain/elfcopy/elfcopy.1
==============================================================================
--- head/contrib/elftoolchain/elfcopy/elfcopy.1 Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfcopy/elfcopy.1 Fri May 20 17:24:34 2016        
(r300311)
@@ -21,9 +21,9 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elfcopy.1 3381 2016-01-30 19:39:47Z jkoshy $
+.\" $Id: elfcopy.1 3426 2016-03-05 13:32:28Z emaste $
 .\"
-.Dd January 29, 2016
+.Dd March 5, 2016
 .Os
 .Dt ELFCOPY 1
 .Sh NAME
@@ -67,7 +67,10 @@
 .Op Fl -change-section-vma Ar section Ns {+|-|=} Ns Ar val
 .Op Fl -extract-dwo
 .Op Fl -gap-fill Ns = Ns Ar val
+.Op Fl -globalize-symbol Ns = Ns ar symbolname
+.Op Fl -globalize-symbols Ns = Ns Ar filename
 .Op Fl -localize-hidden
+.Op Fl -localize-symbols Ns = Ns Ar filename
 .Op Fl -no-adjust-warnings | Fl -no-change-warnings
 .Op Fl -only-keep-debug
 .Op Fl -pad-to Ns = Ns Ar address
@@ -239,9 +242,21 @@ Copy only .dwo debug sections to the out
 Fill the gaps between sections with the byte value specified by
 the argument
 .Ar val .
+.It Fl -globalize-symbol Ns = Ns Ar symbolname
+Make the symbol named by argument
+.Ar symbolname
+global, so that it is visible outside of the file in which it is defined.
+.It Fl -globalize-symbols Ns = Ns Ar filename
+Make each symbol listed in the file specified by
+.Ar filename
+global.
 .It Fl -localize-hidden
 Make all hidden symbols local to the output file.
 This includes symbols with internal visiblity.
+.It Fl -localize-symbols Ns = Ns Ar filename
+Make each symbol listed in the file specified by
+.Ar filename
+local to the output file.
 .It Fl -no-adjust-warnings | Fl -no-change-warnings
 Do not issue a warning if the section specified by the options
 .Fl -change-section-address ,

Modified: head/contrib/elftoolchain/elfcopy/elfcopy.h
==============================================================================
--- head/contrib/elftoolchain/elfcopy/elfcopy.h Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfcopy/elfcopy.h Fri May 20 17:24:34 2016        
(r300311)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: elfcopy.h 3310 2016-01-10 09:10:54Z kaiwang27 $
+ * $Id: elfcopy.h 3446 2016-05-03 01:31:17Z emaste $
  */
 
 #include <sys/queue.h>
@@ -178,7 +178,7 @@ struct elfcopy {
        Elftc_Bfd_Target_Flavor otf; /* flavour of output object */
        const char      *otgt;  /* output target name */
        int              oec;   /* elfclass of output object */
-       unsigned char    oed;   /* endianess of output object */
+       unsigned char    oed;   /* endianness of output object */
        int              oem;   /* EM_XXX of output object */
        int              abi;   /* OSABI of output object */
        Elf             *ein;   /* ELF descriptor of input object */
@@ -238,7 +238,7 @@ struct elfcopy {
        uint64_t        *secndx;        /* section index map. */
        uint64_t        *symndx;        /* symbol index map. */
        unsigned char   *v_rel;         /* symbols needed by relocation. */
-       unsigned char   *v_grp;         /* symbols refered by section group. */
+       unsigned char   *v_grp;         /* symbols referred by section group. */
        unsigned char   *v_secsym;      /* sections with section symbol. */
        STAILQ_HEAD(, segment) v_seg;   /* list of segments. */
        STAILQ_HEAD(, sec_action) v_sac;/* list of section operations. */

Modified: head/contrib/elftoolchain/elfcopy/main.c
==============================================================================
--- head/contrib/elftoolchain/elfcopy/main.c    Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfcopy/main.c    Fri May 20 17:24:34 2016        
(r300311)
@@ -39,7 +39,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: main.c 3399 2016-02-12 18:07:56Z emaste $");
+ELFTC_VCSID("$Id: main.c 3446 2016-05-03 01:31:17Z emaste $");
 
 enum options
 {
@@ -209,6 +209,7 @@ static struct {
        {"openbsd", ELFOSABI_OPENBSD},
        {"openvms", ELFOSABI_OPENVMS},
        {"nsk", ELFOSABI_NSK},
+       {"cloudabi", ELFOSABI_CLOUDABI},
        {"arm", ELFOSABI_ARM},
        {"standalone", ELFOSABI_STANDALONE},
        {NULL, 0}
@@ -235,7 +236,7 @@ static void strip_main(struct elfcopy *e
 static void    strip_usage(void);
 
 /*
- * An ELF object usually has a sturcture described by the
+ * An ELF object usually has a structure described by the
  * diagram below.
  *  _____________
  * |             |
@@ -1446,7 +1447,7 @@ Usage: %s [options] infile [outfile]\n\
                                sections.\n\
   --only-keep-debug            Copy only debugging information.\n\
   --output-target=FORMAT       Use the specified format for the output.\n\
-  --pad-to=ADDRESS             Pad the output object upto the given address.\n\
+  --pad-to=ADDRESS             Pad the output object up to the given 
address.\n\
   --prefix-alloc-sections=STRING\n\
                                Prefix the section names of all the allocated\n\
                                sections with STRING.\n\

Modified: head/contrib/elftoolchain/elfcopy/sections.c
==============================================================================
--- head/contrib/elftoolchain/elfcopy/sections.c        Fri May 20 16:20:08 
2016        (r300310)
+++ head/contrib/elftoolchain/elfcopy/sections.c        Fri May 20 17:24:34 
2016        (r300311)
@@ -34,7 +34,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: sections.c 3346 2016-01-17 20:09:15Z kaiwang27 $");
+ELFTC_VCSID("$Id: sections.c 3443 2016-04-15 18:57:54Z kaiwang27 $");
 
 static void    add_gnu_debuglink(struct elfcopy *ecp);
 static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc);

Modified: head/contrib/elftoolchain/elfcopy/segments.c
==============================================================================
--- head/contrib/elftoolchain/elfcopy/segments.c        Fri May 20 16:20:08 
2016        (r300310)
+++ head/contrib/elftoolchain/elfcopy/segments.c        Fri May 20 17:24:34 
2016        (r300311)
@@ -34,7 +34,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: segments.c 3397 2016-02-12 14:35:19Z emaste $");
+ELFTC_VCSID("$Id: segments.c 3449 2016-05-03 13:59:29Z emaste $");
 
 static void    insert_to_inseg_list(struct segment *seg, struct section *sec);
 
@@ -468,8 +468,7 @@ setup_phdr(struct elfcopy *ecp)
 {
        struct segment  *seg;
        GElf_Phdr        iphdr;
-       size_t           iphnum;
-       int              i;
+       size_t           iphnum, i;
 
        if (elf_getphnum(ecp->ein, &iphnum) == 0)
                errx(EXIT_FAILURE, "elf_getphnum failed: %s",
@@ -485,7 +484,7 @@ setup_phdr(struct elfcopy *ecp)
                return;
        }
 
-       for (i = 0; (size_t)i < iphnum; i++) {
+       for (i = 0; i < iphnum; i++) {
                if (gelf_getphdr(ecp->ein, i, &iphdr) != &iphdr)
                        errx(EXIT_FAILURE, "gelf_getphdr failed: %s",
                            elf_errmsg(-1));

Modified: head/contrib/elftoolchain/elfcopy/symbols.c
==============================================================================
--- head/contrib/elftoolchain/elfcopy/symbols.c Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfcopy/symbols.c Fri May 20 17:24:34 2016        
(r300311)
@@ -34,7 +34,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: symbols.c 3376 2016-01-26 18:41:39Z emaste $");
+ELFTC_VCSID("$Id: symbols.c 3446 2016-05-03 01:31:17Z emaste $");
 
 /* Backwards compatibility for systems with older ELF definitions. */
 #ifndef STB_GNU_UNIQUE
@@ -168,7 +168,7 @@ is_needed_symbol(struct elfcopy *ecp, in
        if (BIT_ISSET(ecp->v_rel, i))
                return (1);
 
-       /* Symbols refered by COMDAT sections are needed. */
+       /* Symbols referred by COMDAT sections are needed. */
        if (BIT_ISSET(ecp->v_grp, i))
                return (1);
 
@@ -258,7 +258,7 @@ is_remove_symbol(struct elfcopy *ecp, si
 }
 
 /*
- * Mark symbols refered by relocation entries.
+ * Mark symbols referred by relocation entries.
  */
 static void
 mark_reloc_symbols(struct elfcopy *ecp, size_t sc)
@@ -1165,7 +1165,7 @@ lookup_symop_list(struct elfcopy *ecp, c
                if ((s->op & op) == 0)
                        continue;
                if (name == NULL || !strcmp(name, s->name))
-                               return (s);
+                       return (s);
                if ((ecp->flags & WILDCARD) == 0)
                        continue;
 

Modified: head/contrib/elftoolchain/elfdump/elfdump.c
==============================================================================
--- head/contrib/elftoolchain/elfdump/elfdump.c Fri May 20 16:20:08 2016        
(r300310)
+++ head/contrib/elftoolchain/elfdump/elfdump.c Fri May 20 17:24:34 2016        
(r300311)
@@ -50,7 +50,7 @@
 
 #include "_elftc.h"
 
-ELFTC_VCSID("$Id: elfdump.c 3391 2016-02-05 19:43:01Z emaste $");
+ELFTC_VCSID("$Id: elfdump.c 3474 2016-05-17 20:44:53Z emaste $");
 
 #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
 #include "native-elf-format.h"
@@ -263,34 +263,99 @@ e_machines(unsigned int mach)
        return (machdesc);
 }
 
-static const char *e_types[] = {
-       "ET_NONE", "ET_REL", "ET_EXEC", "ET_DYN", "ET_CORE"
-};
+static const char *
+elf_type_str(unsigned int type)
+{
+       static char s_type[32];
 
-static const char *ei_versions[] = {
-       "EV_NONE", "EV_CURRENT"
-};
+       switch (type)
+       {
+       case ET_NONE:   return "ET_NONE";
+       case ET_REL:    return "ET_REL";
+       case ET_EXEC:   return "ET_EXEC";
+       case ET_DYN:    return "ET_DYN";
+       case ET_CORE:   return "ET_CORE";
+       }
+       if (type >= ET_LOPROC)
+               snprintf(s_type, sizeof(s_type), "<proc: %#x>", type);
+       else if (type >= ET_LOOS && type <= ET_HIOS)
+               snprintf(s_type, sizeof(s_type), "<os: %#x>", type);
+       else
+               snprintf(s_type, sizeof(s_type), "<unknown: %#x", type);
+       return (s_type);
+}
 
-static const char *ei_classes[] = {
-       "ELFCLASSNONE", "ELFCLASS32", "ELFCLASS64"
-};
+static const char *
+elf_version_str(unsigned int ver)
+{
+       static char s_ver[32];
 
-static const char *ei_data[] = {
-       "ELFDATANONE", "ELFDATA2LSB", "ELFDATA2MSB"
-};
+       switch (ver) {
+       case EV_NONE:           return "EV_NONE";
+       case EV_CURRENT:        return "EV_CURRENT";
+       }
+       snprintf(s_ver, sizeof(s_ver), "<unknown: %#x>", ver);
+       return (s_ver);
+}
+
+static const char *
+elf_class_str(unsigned int class)
+{
+       static char s_class[32];
+
+       switch (class) {
+       case ELFCLASSNONE:      return "ELFCLASSNONE";
+       case ELFCLASS32:        return "ELFCLASS32";
+       case ELFCLASS64:        return "ELFCLASS64";
+       }
+       snprintf(s_class, sizeof(s_class), "<unknown: %#x>", class);
+       return (s_class);
+}
+
+static const char *
+elf_data_str(unsigned int data)
+{
+       static char s_data[32];
+
+       switch (data) {
+       case ELFDATANONE:       return "ELFDATANONE";
+       case ELFDATA2LSB:       return "ELFDATA2LSB";
+       case ELFDATA2MSB:       return "ELFDATA2MSB";
+       }
+       snprintf(s_data, sizeof(s_data), "<unknown: %#x>", data);
+       return (s_data);
+}
 
 static const char *ei_abis[256] = {
        "ELFOSABI_NONE", "ELFOSABI_HPUX", "ELFOSABI_NETBSD", "ELFOSABI_LINUX",
        "ELFOSABI_HURD", "ELFOSABI_86OPEN", "ELFOSABI_SOLARIS", "ELFOSABI_AIX",
        "ELFOSABI_IRIX", "ELFOSABI_FREEBSD", "ELFOSABI_TRU64",
        "ELFOSABI_MODESTO", "ELFOSABI_OPENBSD",
+       [17] = "ELFOSABI_CLOUDABI",
        [255] = "ELFOSABI_STANDALONE"
 };
 
-static const char *p_types[] = {
-       "PT_NULL", "PT_LOAD", "PT_DYNAMIC", "PT_INTERP", "PT_NOTE",
-       "PT_SHLIB", "PT_PHDR", "PT_TLS"
-};
+static const char *
+elf_phdr_type_str(unsigned int type)
+{
+       static char s_type[32];
+
+       switch (type) {
+       case PT_NULL:           return "PT_NULL";
+       case PT_LOAD:           return "PT_LOAD";
+       case PT_DYNAMIC:        return "PT_DYNAMIC";
+       case PT_INTERP:         return "PT_INTERP";
+       case PT_NOTE:           return "PT_NOTE";
+       case PT_SHLIB:          return "PT_SHLIB";
+       case PT_PHDR:           return "PT_PHDR";
+       case PT_TLS:            return "PT_TLS";
+       case PT_GNU_EH_FRAME:   return "PT_GNU_EH_FRAME";
+       case PT_GNU_STACK:      return "PT_GNU_STACK";
+       case PT_GNU_RELRO:      return "PT_GNU_RELRO";
+       }
+       snprintf(s_type, sizeof(s_type), "<unknown: %#x>", type);
+       return (s_type);
+}
 
 static const char *p_flags[] = {
        "", "PF_X", "PF_W", "PF_X|PF_W", "PF_R", "PF_X|PF_R", "PF_W|PF_R",
@@ -407,7 +472,8 @@ sh_types(uint64_t mach, uint64_t sht) {
        DEFINE_SHF(LINK_ORDER)                  \
        DEFINE_SHF(OS_NONCONFORMING)            \
        DEFINE_SHF(GROUP)                       \
-       DEFINE_SHF(TLS)
+       DEFINE_SHF(TLS)                         \
+       DEFINE_SHF(COMPRESSED)
 
 #undef DEFINE_SHF
 #define        DEFINE_SHF(F) "SHF_" #F "|"
@@ -518,387 +584,6 @@ static unsigned char st_others[] = {
        'D', 'I', 'H', 'P'
 };
 
-static const char *
-r_type(unsigned int mach, unsigned int type)
-{
-       switch(mach) {
-       case EM_NONE: return "";
-       case EM_386:
-       case EM_IAMCU:
-               switch(type) {
-               case 0: return "R_386_NONE";
-               case 1: return "R_386_32";
-               case 2: return "R_386_PC32";
-               case 3: return "R_386_GOT32";
-               case 4: return "R_386_PLT32";
-               case 5: return "R_386_COPY";
-               case 6: return "R_386_GLOB_DAT";
-               case 7: return "R_386_JUMP_SLOT";
-               case 8: return "R_386_RELATIVE";
-               case 9: return "R_386_GOTOFF";
-               case 10: return "R_386_GOTPC";
-               case 14: return "R_386_TLS_TPOFF";
-               case 15: return "R_386_TLS_IE";
-               case 16: return "R_386_TLS_GOTIE";
-               case 17: return "R_386_TLS_LE";
-               case 18: return "R_386_TLS_GD";
-               case 19: return "R_386_TLS_LDM";
-               case 24: return "R_386_TLS_GD_32";
-               case 25: return "R_386_TLS_GD_PUSH";
-               case 26: return "R_386_TLS_GD_CALL";
-               case 27: return "R_386_TLS_GD_POP";
-               case 28: return "R_386_TLS_LDM_32";
-               case 29: return "R_386_TLS_LDM_PUSH";
-               case 30: return "R_386_TLS_LDM_CALL";
-               case 31: return "R_386_TLS_LDM_POP";
-               case 32: return "R_386_TLS_LDO_32";
-               case 33: return "R_386_TLS_IE_32";
-               case 34: return "R_386_TLS_LE_32";
-               case 35: return "R_386_TLS_DTPMOD32";
-               case 36: return "R_386_TLS_DTPOFF32";
-               case 37: return "R_386_TLS_TPOFF32";
-               default: return "";
-               }
-       case EM_ARM:
-               switch(type) {
-               case 0: return "R_ARM_NONE";
-               case 1: return "R_ARM_PC24";
-               case 2: return "R_ARM_ABS32";
-               case 3: return "R_ARM_REL32";
-               case 4: return "R_ARM_PC13";
-               case 5: return "R_ARM_ABS16";
-               case 6: return "R_ARM_ABS12";
-               case 7: return "R_ARM_THM_ABS5";
-               case 8: return "R_ARM_ABS8";
-               case 9: return "R_ARM_SBREL32";
-               case 10: return "R_ARM_THM_PC22";
-               case 11: return "R_ARM_THM_PC8";
-               case 12: return "R_ARM_AMP_VCALL9";
-               case 13: return "R_ARM_SWI24";
-               case 14: return "R_ARM_THM_SWI8";
-               case 15: return "R_ARM_XPC25";
-               case 16: return "R_ARM_THM_XPC22";
-               case 20: return "R_ARM_COPY";
-               case 21: return "R_ARM_GLOB_DAT";
-               case 22: return "R_ARM_JUMP_SLOT";
-               case 23: return "R_ARM_RELATIVE";
-               case 24: return "R_ARM_GOTOFF";
-               case 25: return "R_ARM_GOTPC";
-               case 26: return "R_ARM_GOT32";
-               case 27: return "R_ARM_PLT32";
-               case 100: return "R_ARM_GNU_VTENTRY";
-               case 101: return "R_ARM_GNU_VTINHERIT";
-               case 250: return "R_ARM_RSBREL32";
-               case 251: return "R_ARM_THM_RPC22";
-               case 252: return "R_ARM_RREL32";
-               case 253: return "R_ARM_RABS32";
-               case 254: return "R_ARM_RPC24";
-               case 255: return "R_ARM_RBASE";
-               default: return "";
-               }
-       case EM_IA_64:
-               switch(type) {
-               case 0: return "R_IA_64_NONE";
-               case 33: return "R_IA_64_IMM14";
-               case 34: return "R_IA_64_IMM22";
-               case 35: return "R_IA_64_IMM64";
-               case 36: return "R_IA_64_DIR32MSB";
-               case 37: return "R_IA_64_DIR32LSB";
-               case 38: return "R_IA_64_DIR64MSB";
-               case 39: return "R_IA_64_DIR64LSB";
-               case 42: return "R_IA_64_GPREL22";
-               case 43: return "R_IA_64_GPREL64I";
-               case 44: return "R_IA_64_GPREL32MSB";
-               case 45: return "R_IA_64_GPREL32LSB";
-               case 46: return "R_IA_64_GPREL64MSB";
-               case 47: return "R_IA_64_GPREL64LSB";
-               case 50: return "R_IA_64_LTOFF22";
-               case 51: return "R_IA_64_LTOFF64I";
-               case 58: return "R_IA_64_PLTOFF22";
-               case 59: return "R_IA_64_PLTOFF64I";
-               case 62: return "R_IA_64_PLTOFF64MSB";
-               case 63: return "R_IA_64_PLTOFF64LSB";
-               case 67: return "R_IA_64_FPTR64I";
-               case 68: return "R_IA_64_FPTR32MSB";
-               case 69: return "R_IA_64_FPTR32LSB";
-               case 70: return "R_IA_64_FPTR64MSB";
-               case 71: return "R_IA_64_FPTR64LSB";
-               case 72: return "R_IA_64_PCREL60B";
-               case 73: return "R_IA_64_PCREL21B";
-               case 74: return "R_IA_64_PCREL21M";
-               case 75: return "R_IA_64_PCREL21F";
-               case 76: return "R_IA_64_PCREL32MSB";
-               case 77: return "R_IA_64_PCREL32LSB";
-               case 78: return "R_IA_64_PCREL64MSB";
-               case 79: return "R_IA_64_PCREL64LSB";
-               case 82: return "R_IA_64_LTOFF_FPTR22";
-               case 83: return "R_IA_64_LTOFF_FPTR64I";
-               case 84: return "R_IA_64_LTOFF_FPTR32MSB";
-               case 85: return "R_IA_64_LTOFF_FPTR32LSB";
-               case 86: return "R_IA_64_LTOFF_FPTR64MSB";
-               case 87: return "R_IA_64_LTOFF_FPTR64LSB";
-               case 92: return "R_IA_64_SEGREL32MSB";
-               case 93: return "R_IA_64_SEGREL32LSB";
-               case 94: return "R_IA_64_SEGREL64MSB";
-               case 95: return "R_IA_64_SEGREL64LSB";
-               case 100: return "R_IA_64_SECREL32MSB";
-               case 101: return "R_IA_64_SECREL32LSB";
-               case 102: return "R_IA_64_SECREL64MSB";
-               case 103: return "R_IA_64_SECREL64LSB";
-               case 108: return "R_IA_64_REL32MSB";
-               case 109: return "R_IA_64_REL32LSB";
-               case 110: return "R_IA_64_REL64MSB";
-               case 111: return "R_IA_64_REL64LSB";
-               case 116: return "R_IA_64_LTV32MSB";
-               case 117: return "R_IA_64_LTV32LSB";
-               case 118: return "R_IA_64_LTV64MSB";
-               case 119: return "R_IA_64_LTV64LSB";
-               case 121: return "R_IA_64_PCREL21BI";
-               case 122: return "R_IA_64_PCREL22";
-               case 123: return "R_IA_64_PCREL64I";
-               case 128: return "R_IA_64_IPLTMSB";
-               case 129: return "R_IA_64_IPLTLSB";
-               case 133: return "R_IA_64_SUB";
-               case 134: return "R_IA_64_LTOFF22X";
-               case 135: return "R_IA_64_LDXMOV";
-               case 145: return "R_IA_64_TPREL14";
-               case 146: return "R_IA_64_TPREL22";
-               case 147: return "R_IA_64_TPREL64I";
-               case 150: return "R_IA_64_TPREL64MSB";
-               case 151: return "R_IA_64_TPREL64LSB";
-               case 154: return "R_IA_64_LTOFF_TPREL22";
-               case 166: return "R_IA_64_DTPMOD64MSB";
-               case 167: return "R_IA_64_DTPMOD64LSB";
-               case 170: return "R_IA_64_LTOFF_DTPMOD22";
-               case 177: return "R_IA_64_DTPREL14";
-               case 178: return "R_IA_64_DTPREL22";
-               case 179: return "R_IA_64_DTPREL64I";
-               case 180: return "R_IA_64_DTPREL32MSB";
-               case 181: return "R_IA_64_DTPREL32LSB";
-               case 182: return "R_IA_64_DTPREL64MSB";
-               case 183: return "R_IA_64_DTPREL64LSB";
-               case 186: return "R_IA_64_LTOFF_DTPREL22";
-               default: return "";
-               }
-       case EM_MIPS:
-               switch(type) {
-               case 0: return "R_MIPS_NONE";
-               case 1: return "R_MIPS_16";
-               case 2: return "R_MIPS_32";
-               case 3: return "R_MIPS_REL32";
-               case 4: return "R_MIPS_26";
-               case 5: return "R_MIPS_HI16";
-               case 6: return "R_MIPS_LO16";
-               case 7: return "R_MIPS_GPREL16";
-               case 8: return "R_MIPS_LITERAL";
-               case 9: return "R_MIPS_GOT16";
-               case 10: return "R_MIPS_PC16";
-               case 11: return "R_MIPS_CALL16";
-               case 12: return "R_MIPS_GPREL32";
-               case 21: return "R_MIPS_GOTHI16";
-               case 22: return "R_MIPS_GOTLO16";
-               case 30: return "R_MIPS_CALLHI16";
-               case 31: return "R_MIPS_CALLLO16";
-               default: return "";
-               }
-       case EM_PPC:
-               switch(type) {
-               case 0: return "R_PPC_NONE";
-               case 1: return "R_PPC_ADDR32";
-               case 2: return "R_PPC_ADDR24";
-               case 3: return "R_PPC_ADDR16";
-               case 4: return "R_PPC_ADDR16_LO";
-               case 5: return "R_PPC_ADDR16_HI";
-               case 6: return "R_PPC_ADDR16_HA";
-               case 7: return "R_PPC_ADDR14";
-               case 8: return "R_PPC_ADDR14_BRTAKEN";
-               case 9: return "R_PPC_ADDR14_BRNTAKEN";
-               case 10: return "R_PPC_REL24";
-               case 11: return "R_PPC_REL14";
-               case 12: return "R_PPC_REL14_BRTAKEN";
-               case 13: return "R_PPC_REL14_BRNTAKEN";
-               case 14: return "R_PPC_GOT16";
-               case 15: return "R_PPC_GOT16_LO";
-               case 16: return "R_PPC_GOT16_HI";
-               case 17: return "R_PPC_GOT16_HA";
-               case 18: return "R_PPC_PLTREL24";
-               case 19: return "R_PPC_COPY";
-               case 20: return "R_PPC_GLOB_DAT";
-               case 21: return "R_PPC_JMP_SLOT";
-               case 22: return "R_PPC_RELATIVE";
-               case 23: return "R_PPC_LOCAL24PC";
-               case 24: return "R_PPC_UADDR32";
-               case 25: return "R_PPC_UADDR16";
-               case 26: return "R_PPC_REL32";
-               case 27: return "R_PPC_PLT32";
-               case 28: return "R_PPC_PLTREL32";
-               case 29: return "R_PPC_PLT16_LO";
-               case 30: return "R_PPC_PLT16_HI";
-               case 31: return "R_PPC_PLT16_HA";
-               case 32: return "R_PPC_SDAREL16";
-               case 33: return "R_PPC_SECTOFF";
-               case 34: return "R_PPC_SECTOFF_LO";
-               case 35: return "R_PPC_SECTOFF_HI";
-               case 36: return "R_PPC_SECTOFF_HA";
-               case 67: return "R_PPC_TLS";
-               case 68: return "R_PPC_DTPMOD32";
-               case 69: return "R_PPC_TPREL16";
-               case 70: return "R_PPC_TPREL16_LO";
-               case 71: return "R_PPC_TPREL16_HI";
-               case 72: return "R_PPC_TPREL16_HA";
-               case 73: return "R_PPC_TPREL32";
-               case 74: return "R_PPC_DTPREL16";
-               case 75: return "R_PPC_DTPREL16_LO";
-               case 76: return "R_PPC_DTPREL16_HI";
-               case 77: return "R_PPC_DTPREL16_HA";
-               case 78: return "R_PPC_DTPREL32";
-               case 79: return "R_PPC_GOT_TLSGD16";
-               case 80: return "R_PPC_GOT_TLSGD16_LO";
-               case 81: return "R_PPC_GOT_TLSGD16_HI";
-               case 82: return "R_PPC_GOT_TLSGD16_HA";
-               case 83: return "R_PPC_GOT_TLSLD16";
-               case 84: return "R_PPC_GOT_TLSLD16_LO";
-               case 85: return "R_PPC_GOT_TLSLD16_HI";
-               case 86: return "R_PPC_GOT_TLSLD16_HA";
-               case 87: return "R_PPC_GOT_TPREL16";
-               case 88: return "R_PPC_GOT_TPREL16_LO";
-               case 89: return "R_PPC_GOT_TPREL16_HI";
-               case 90: return "R_PPC_GOT_TPREL16_HA";
-               case 101: return "R_PPC_EMB_NADDR32";
-               case 102: return "R_PPC_EMB_NADDR16";
-               case 103: return "R_PPC_EMB_NADDR16_LO";
-               case 104: return "R_PPC_EMB_NADDR16_HI";
-               case 105: return "R_PPC_EMB_NADDR16_HA";
-               case 106: return "R_PPC_EMB_SDAI16";
-               case 107: return "R_PPC_EMB_SDA2I16";
-               case 108: return "R_PPC_EMB_SDA2REL";
-               case 109: return "R_PPC_EMB_SDA21";
-               case 110: return "R_PPC_EMB_MRKREF";
-               case 111: return "R_PPC_EMB_RELSEC16";
-               case 112: return "R_PPC_EMB_RELST_LO";
-               case 113: return "R_PPC_EMB_RELST_HI";
-               case 114: return "R_PPC_EMB_RELST_HA";
-               case 115: return "R_PPC_EMB_BIT_FLD";
-               case 116: return "R_PPC_EMB_RELSDA";
-               default: return "";
-               }
-       case EM_SPARC:
-       case EM_SPARCV9:
-               switch(type) {
-               case 0: return "R_SPARC_NONE";
-               case 1: return "R_SPARC_8";
-               case 2: return "R_SPARC_16";
-               case 3: return "R_SPARC_32";
-               case 4: return "R_SPARC_DISP8";
-               case 5: return "R_SPARC_DISP16";
-               case 6: return "R_SPARC_DISP32";
-               case 7: return "R_SPARC_WDISP30";
-               case 8: return "R_SPARC_WDISP22";
-               case 9: return "R_SPARC_HI22";
-               case 10: return "R_SPARC_22";
-               case 11: return "R_SPARC_13";
-               case 12: return "R_SPARC_LO10";
-               case 13: return "R_SPARC_GOT10";
-               case 14: return "R_SPARC_GOT13";
-               case 15: return "R_SPARC_GOT22";
-               case 16: return "R_SPARC_PC10";
-               case 17: return "R_SPARC_PC22";
-               case 18: return "R_SPARC_WPLT30";
-               case 19: return "R_SPARC_COPY";
-               case 20: return "R_SPARC_GLOB_DAT";
-               case 21: return "R_SPARC_JMP_SLOT";
-               case 22: return "R_SPARC_RELATIVE";
-               case 23: return "R_SPARC_UA32";
-               case 24: return "R_SPARC_PLT32";
-               case 25: return "R_SPARC_HIPLT22";
-               case 26: return "R_SPARC_LOPLT10";
-               case 27: return "R_SPARC_PCPLT32";

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to