svn commit: r276421 - in projects/clang350-import: . bin/ln cddl/contrib/opensolaris/cmd/zpool contrib/elftoolchain/common contrib/elftoolchain/elfcopy contrib/elftoolchain/libdwarf contrib/elftool...
Dimitry Andric
dim at FreeBSD.org
Tue Dec 30 20:23:08 UTC 2014
Author: dim
Date: Tue Dec 30 20:23:03 2014
New Revision: 276421
URL: https://svnweb.freebsd.org/changeset/base/276421
Log:
Merge ^/head r274961 through r276418.
Added:
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_attroffset.3
- copied unchanged from r276418, head/contrib/elftoolchain/libdwarf/dwarf_attroffset.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_get_die_infotypes_flag.3
- copied unchanged from r276418, head/contrib/elftoolchain/libdwarf/dwarf_get_die_infotypes_flag.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_get_section_max_offsets.3
- copied unchanged from r276418, head/contrib/elftoolchain/libdwarf/dwarf_get_section_max_offsets.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_next_types_section.3
- copied unchanged from r276418, head/contrib/elftoolchain/libdwarf/dwarf_next_types_section.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_sections.c
- copied unchanged from r276418, head/contrib/elftoolchain/libdwarf/dwarf_sections.c
projects/clang350-import/sys/arm/arm/locore-v4.S
- copied unchanged from r276418, head/sys/arm/arm/locore-v4.S
projects/clang350-import/sys/arm/arm/locore-v6.S
- copied unchanged from r276418, head/sys/arm/arm/locore-v6.S
Replaced:
projects/clang350-import/sys/arm/arm/locore.S
- copied unchanged from r276418, head/sys/arm/arm/locore.S
Modified:
projects/clang350-import/Makefile.inc1
projects/clang350-import/bin/ln/symlink.7
projects/clang350-import/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
projects/clang350-import/contrib/elftoolchain/common/Makefile
projects/clang350-import/contrib/elftoolchain/common/elfdefinitions.h
projects/clang350-import/contrib/elftoolchain/elfcopy/archive.c
projects/clang350-import/contrib/elftoolchain/elfcopy/elfcopy.h
projects/clang350-import/contrib/elftoolchain/elfcopy/main.c
projects/clang350-import/contrib/elftoolchain/elfcopy/sections.c
projects/clang350-import/contrib/elftoolchain/elfcopy/segments.c
projects/clang350-import/contrib/elftoolchain/elfcopy/symbols.c
projects/clang350-import/contrib/elftoolchain/libdwarf/Makefile
projects/clang350-import/contrib/elftoolchain/libdwarf/Version.map
projects/clang350-import/contrib/elftoolchain/libdwarf/_libdwarf.h
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf.h
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_attr.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_attr.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_attrval.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_child.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_cu.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_die.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_dieoffset.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_dump.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_errmsg.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_frame.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_highpc.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_lineno.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_loclist.c
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_loclist_from_expr.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3
projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf_ranges.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf.h
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_arange.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_attr.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_die.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_frame.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_info.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_init.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_lineno.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_loc.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_loclist.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_nametbl.c
projects/clang350-import/contrib/elftoolchain/libdwarf/libdwarf_sections.c
projects/clang350-import/contrib/elftoolchain/libelf/_libelf.h
projects/clang350-import/contrib/elftoolchain/libelf/_libelf_ar.h
projects/clang350-import/contrib/elftoolchain/libelf/elf.3
projects/clang350-import/contrib/elftoolchain/libelf/elf_data.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_errmsg.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_flag.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_memory.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_next.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_open.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_rand.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_rawfile.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_scn.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_strptr.c
projects/clang350-import/contrib/elftoolchain/libelf/elf_update.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_cap.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_dyn.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_ehdr.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_move.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_phdr.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_rel.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_rela.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_shdr.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_sym.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_syminfo.c
projects/clang350-import/contrib/elftoolchain/libelf/gelf_symshndx.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf.h
projects/clang350-import/contrib/elftoolchain/libelf/libelf_align.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_ar.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_ar_util.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_checksum.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_convert.m4
projects/clang350-import/contrib/elftoolchain/libelf/libelf_data.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_ehdr.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_extended.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_memory.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_open.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_phdr.c
projects/clang350-import/contrib/elftoolchain/libelf/libelf_xlate.c
projects/clang350-import/contrib/elftoolchain/libelftc/elftc_copyfile.c
projects/clang350-import/contrib/elftoolchain/libelftc/elftc_demangle.c
projects/clang350-import/contrib/elftoolchain/libelftc/libelftc.h
projects/clang350-import/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
projects/clang350-import/contrib/elftoolchain/nm/nm.c
projects/clang350-import/contrib/elftoolchain/readelf/readelf.1
projects/clang350-import/contrib/elftoolchain/readelf/readelf.c
projects/clang350-import/contrib/elftoolchain/strings/strings.c
projects/clang350-import/contrib/libcxxrt/atomic.h
projects/clang350-import/contrib/libcxxrt/cxxabi.h
projects/clang350-import/contrib/libcxxrt/dwarf_eh.h
projects/clang350-import/contrib/libcxxrt/dynamic_cast.cc
projects/clang350-import/contrib/libcxxrt/exception.cc
projects/clang350-import/contrib/libcxxrt/guard.cc
projects/clang350-import/contrib/libcxxrt/stdexcept.cc
projects/clang350-import/contrib/libcxxrt/stdexcept.h
projects/clang350-import/contrib/libcxxrt/typeinfo.cc
projects/clang350-import/contrib/libcxxrt/unwind-arm.h
projects/clang350-import/contrib/libcxxrt/unwind.h
projects/clang350-import/lib/libc/regex/re_format.7
projects/clang350-import/lib/libdwarf/Makefile
projects/clang350-import/lib/libelftc/elftc_version.c
projects/clang350-import/lib/libgssapi/gss_acquire_cred.3
projects/clang350-import/lib/libgssapi/gss_add_cred.3
projects/clang350-import/lib/libgssapi/gss_add_oid_set_member.3
projects/clang350-import/lib/libgssapi/gss_create_empty_oid_set.3
projects/clang350-import/lib/libgssapi/gss_delete_sec_context.3
projects/clang350-import/lib/libgssapi/gss_get_mic.3
projects/clang350-import/lib/libgssapi/gss_import_sec_context.3
projects/clang350-import/lib/libgssapi/gss_inquire_context.3
projects/clang350-import/lib/libgssapi/gss_process_context_token.3
projects/clang350-import/lib/libgssapi/gss_test_oid_set_member.3
projects/clang350-import/lib/libgssapi/gss_unwrap.3
projects/clang350-import/lib/libgssapi/gss_wrap.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_get_error.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_get_mech_info.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_get_mechanisms.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_get_principal_name.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_get_versions.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_getcred.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_is_installed.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_max_data_length.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_mech_to_oid.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_oid_to_mech.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_qop_to_num.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_seccreate.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_set_callback.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_set_defaults.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_set_svc_name.3
projects/clang350-import/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3
projects/clang350-import/lib/librpcsec_gss/rpcsec_gss.3
projects/clang350-import/lib/libstand/cd9660.c
projects/clang350-import/lib/msun/man/lgamma.3
projects/clang350-import/release/Makefile
projects/clang350-import/sbin/bsdlabel/bsdlabel.8
projects/clang350-import/sbin/camcontrol/camcontrol.8
projects/clang350-import/sbin/geom/class/label/glabel.8
projects/clang350-import/sbin/ipfw/ipfw.8
projects/clang350-import/sbin/iscontrol/iscontrol.8
projects/clang350-import/sbin/mount_nfs/mount_nfs.8
projects/clang350-import/sbin/routed/routed.8
projects/clang350-import/share/man/man4/ada.4
projects/clang350-import/share/man/man7/crypto.7
projects/clang350-import/share/man/man7/hier.7
projects/clang350-import/sys/amd64/vmm/amd/svm.c (contents, props changed)
projects/clang350-import/sys/amd64/vmm/amd/vmcb.h (contents, props changed)
projects/clang350-import/sys/arm/arm/cpu_asm-v6.S
projects/clang350-import/sys/arm/arm/genassym.c
projects/clang350-import/sys/arm/arm/mp_machdep.c
projects/clang350-import/sys/boot/common/loader.8
projects/clang350-import/sys/conf/WITHOUT_SOURCELESS_UCODE
projects/clang350-import/sys/conf/options.arm
projects/clang350-import/sys/dev/usb/controller/xhci.c
projects/clang350-import/sys/dev/usb/controller/xhci.h
projects/clang350-import/sys/dev/virtio/mmio/virtio_mmio.c
projects/clang350-import/sys/dev/virtio/network/if_vtnet.c
projects/clang350-import/sys/dev/vt/hw/efifb/efifb.c
projects/clang350-import/sys/dev/vt/hw/vga/vt_vga.c
projects/clang350-import/sys/i386/conf/PAE
projects/clang350-import/sys/i386/conf/XEN
projects/clang350-import/sys/kern/subr_module.c
projects/clang350-import/usr.bin/soeliminate/soeliminate.1
projects/clang350-import/usr.sbin/bsdinstall/bsdinstall.8
projects/clang350-import/usr.sbin/kbdcontrol/kbdcontrol.1
Directory Properties:
projects/clang350-import/ (props changed)
projects/clang350-import/cddl/ (props changed)
projects/clang350-import/cddl/contrib/opensolaris/ (props changed)
projects/clang350-import/contrib/elftoolchain/ (props changed)
projects/clang350-import/contrib/libcxxrt/ (props changed)
projects/clang350-import/lib/libc/ (props changed)
projects/clang350-import/sbin/ (props changed)
projects/clang350-import/sbin/ipfw/ (props changed)
projects/clang350-import/share/ (props changed)
projects/clang350-import/share/man/man4/ (props changed)
projects/clang350-import/sys/ (props changed)
projects/clang350-import/sys/amd64/vmm/ (props changed)
projects/clang350-import/sys/amd64/vmm/amd/npt.c (props changed)
projects/clang350-import/sys/amd64/vmm/amd/npt.h (props changed)
projects/clang350-import/sys/amd64/vmm/amd/svm.h (props changed)
projects/clang350-import/sys/amd64/vmm/amd/svm_genassym.c (props changed)
projects/clang350-import/sys/amd64/vmm/amd/svm_msr.c (props changed)
projects/clang350-import/sys/amd64/vmm/amd/svm_msr.h (props changed)
projects/clang350-import/sys/amd64/vmm/amd/svm_softc.h (props changed)
projects/clang350-import/sys/amd64/vmm/amd/svm_support.S (props changed)
projects/clang350-import/sys/amd64/vmm/amd/vmcb.c (props changed)
projects/clang350-import/sys/boot/ (props changed)
projects/clang350-import/sys/conf/ (props changed)
Modified: projects/clang350-import/Makefile.inc1
==============================================================================
--- projects/clang350-import/Makefile.inc1 Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/Makefile.inc1 Tue Dec 30 20:23:03 2014 (r276421)
@@ -1440,8 +1440,10 @@ _kgzip= usr.sbin/kgzip
.endif
# If we're given an XAS, don't build binutils.
-.if ${XAS:M/*} == "" && ${MK_BINUTILS_BOOTSTRAP} != "no"
+.if ${XAS:M/*} == ""
+.if ${MK_BINUTILS_BOOTSTRAP} != "no"
_binutils= gnu/usr.bin/binutils
+.endif
.if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
_elftctools= lib/libelftc \
usr.bin/addr2line \
Modified: projects/clang350-import/bin/ln/symlink.7
==============================================================================
--- projects/clang350-import/bin/ln/symlink.7 Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/bin/ln/symlink.7 Tue Dec 30 20:23:03 2014 (r276421)
@@ -29,7 +29,7 @@
.\" @(#)symlink.7 8.3 (Berkeley) 3/31/94
.\" $FreeBSD$
.\"
-.Dd April 25, 2010
+.Dd December 29, 2014
.Dt SYMLINK 7
.Os
.Sh NAME
@@ -219,7 +219,7 @@ would change the ownership of
.Dq Li slink
itself.
.Pp
-There are four exceptions to this rule.
+There are five exceptions to this rule.
The
.Xr mv 1
and
@@ -262,13 +262,12 @@ a file tree.)
.Pp
The
.Xr file 1
-command is also an exception to this rule.
-The
-.Xr file 1
-command does not follow symbolic links named as argument by default.
-The
-.Xr file 1
-command does follow symbolic links named as argument if
+and
+.Xr stat 1
+commands are also exceptions to this rule.
+These
+commands do not follow symbolic links named as argument by default,
+but do follow symbolic links named as argument if the
.Fl L
option is specified.
.Pp
Modified: projects/clang350-import/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
==============================================================================
--- projects/clang350-import/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Dec 30 20:23:03 2014 (r276421)
@@ -443,7 +443,7 @@ This feature becomes
.Sy active
once a
.Sy recordsize
-property has been set larger than 128KB, and will return to being
+property has been set larger than 128KB, and will return to being
.Sy enabled
once all filesystems that have ever had their recordsize larger than 128KB
are destroyed.
Modified: projects/clang350-import/contrib/elftoolchain/common/Makefile
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/common/Makefile Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/common/Makefile Tue Dec 30 20:23:03 2014 (r276421)
@@ -1,4 +1,4 @@
-# $Id: Makefile 2606 2012-10-02 17:52:57Z jkoshy $
+# $Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy $
TOP= ..
@@ -12,4 +12,7 @@ all depend obj:
clean clobber:
rm -f ${CLEANFILES}
+cleandepend:
+ rm -f .depend
+
.include "${TOP}/mk/elftoolchain.inc.mk"
Modified: projects/clang350-import/contrib/elftoolchain/common/elfdefinitions.h
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/common/elfdefinitions.h Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/common/elfdefinitions.h Tue Dec 30 20:23:03 2014 (r276421)
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: elfdefinitions.h 2950 2013-06-15 13:36:02Z jkoshy $
+ * $Id: elfdefinitions.h 3110 2014-12-20 08:32:46Z kaiwang27 $
*/
/*
@@ -821,7 +821,8 @@ enum {
EM__LAST__
};
-/* Older synonyms. */
+/* Other synonyms. */
+#define EM_AMD64 EM_X86_64
#define EM_ARC_A5 EM_ARC_COMPACT
/*
@@ -2114,11 +2115,11 @@ typedef struct {
/* 64-bit entry. */
typedef struct {
- Elf64_Word l_name;
- Elf64_Word l_time_stamp;
- Elf64_Word l_checksum;
- Elf64_Word l_version;
- Elf64_Word l_flags;
+ Elf64_Word l_name; /* The name of a shared object. */
+ Elf64_Word l_time_stamp; /* 32-bit timestamp. */
+ Elf64_Word l_checksum; /* Checksum of visible symbols, sizes. */
+ Elf64_Word l_version; /* Interface version string index. */
+ Elf64_Word l_flags; /* Flags (LL_*). */
} Elf64_Lib;
#define _ELF_DEFINE_LL_FLAGS() \
@@ -2366,12 +2367,12 @@ typedef struct {
/* 64 bit PHDR entry. */
typedef struct {
Elf64_Word p_type; /* Type of segment. */
- Elf64_Word p_flags; /* File offset to segment. */
- Elf64_Off p_offset; /* Virtual address in memory. */
- Elf64_Addr p_vaddr; /* Physical address (if relevant). */
- Elf64_Addr p_paddr; /* Size of segment in file. */
- Elf64_Xword p_filesz; /* Size of segment in memory. */
- Elf64_Xword p_memsz; /* Segment flags. */
+ Elf64_Word p_flags; /* Segment flags. */
+ Elf64_Off p_offset; /* File offset to segment. */
+ Elf64_Addr p_vaddr; /* Virtual address in memory. */
+ Elf64_Addr p_paddr; /* Physical address (if relevant). */
+ Elf64_Xword p_filesz; /* Size of segment in file. */
+ Elf64_Xword p_memsz; /* Size of segment in memory. */
Elf64_Xword p_align; /* Alignment constraints. */
} Elf64_Phdr;
@@ -2455,11 +2456,11 @@ typedef struct {
typedef struct {
Elf64_Word st_name; /* index of symbol's name */
- unsigned char st_info; /* value for the symbol */
- unsigned char st_other; /* size of associated data */
- Elf64_Half st_shndx; /* type and binding attributes */
- Elf64_Addr st_value; /* visibility */
- Elf64_Xword st_size; /* index of related section */
+ unsigned char st_info; /* type and binding attributes */
+ unsigned char st_other; /* visibility */
+ Elf64_Half st_shndx; /* index of related section */
+ Elf64_Addr st_value; /* value for the symbol */
+ Elf64_Xword st_size; /* size of associated data */
} Elf64_Sym;
#define ELF32_ST_BIND(I) ((I) >> 4)
Modified: projects/clang350-import/contrib/elftoolchain/elfcopy/archive.c
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/elfcopy/archive.c Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/elfcopy/archive.c Tue Dec 30 20:23:03 2014 (r276421)
@@ -40,7 +40,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: archive.c 2370 2011-12-29 12:48:12Z jkoshy $");
+ELFTC_VCSID("$Id: archive.c 3102 2014-10-29 21:09:01Z jkoshy $");
#define _ARMAG_LEN 8 /* length of ar magic string */
#define _ARHDR_LEN 60 /* length of ar header */
@@ -350,7 +350,6 @@ ac_detect_ar(int ifd)
r = -1;
if ((a = archive_read_new()) == NULL)
return (0);
- archive_read_support_filter_none(a);
archive_read_support_format_ar(a);
if (archive_read_open_fd(a, ifd, 10240) == ARCHIVE_OK)
r = archive_read_next_header(a, &entry);
@@ -386,7 +385,6 @@ ac_read_objs(struct elfcopy *ecp, int if
err(EXIT_FAILURE, "lseek failed");
if ((a = archive_read_new()) == NULL)
errx(EXIT_FAILURE, "%s", archive_error_string(a));
- archive_read_support_filter_none(a);
archive_read_support_format_ar(a);
AC(archive_read_open_fd(a, ifd, 10240));
for(;;) {
@@ -449,7 +447,6 @@ ac_write_objs(struct elfcopy *ecp, int o
if ((a = archive_write_new()) == NULL)
errx(EXIT_FAILURE, "%s", archive_error_string(a));
archive_write_set_format_ar_svr4(a);
- archive_write_add_filter_none(a);
AC(archive_write_open_fd(a, ofd));
/* Write the archive symbol table, even if it's empty. */
Modified: projects/clang350-import/contrib/elftoolchain/elfcopy/elfcopy.h
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/elfcopy/elfcopy.h Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/elfcopy/elfcopy.h Tue Dec 30 20:23:03 2014 (r276421)
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: elfcopy.h 2970 2013-12-01 15:22:12Z kaiwang27 $
+ * $Id: elfcopy.h 3134 2014-12-23 10:43:59Z kaiwang27 $
*/
#include <sys/queue.h>
@@ -115,6 +115,7 @@ struct segment;
/* Internal data structure for sections. */
struct section {
struct segment *seg; /* containing segment */
+ struct segment *seg_tls; /* tls segment */
const char *name; /* section name */
char *newname; /* new section name */
Elf_Scn *is; /* input scn */
Modified: projects/clang350-import/contrib/elftoolchain/elfcopy/main.c
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/elfcopy/main.c Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/elfcopy/main.c Tue Dec 30 20:23:03 2014 (r276421)
@@ -40,7 +40,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: main.c 2970 2013-12-01 15:22:12Z kaiwang27 $");
+ELFTC_VCSID("$Id: main.c 3111 2014-12-20 08:33:01Z kaiwang27 $");
enum options
{
Modified: projects/clang350-import/contrib/elftoolchain/elfcopy/sections.c
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/elfcopy/sections.c Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/elfcopy/sections.c Tue Dec 30 20:23:03 2014 (r276421)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2007-2011 Kai Wang
+ * Copyright (c) 2007-2011,2014 Kai Wang
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: sections.c 2358 2011-12-19 18:22:32Z kaiwang27 $");
+ELFTC_VCSID("$Id: sections.c 3134 2014-12-23 10:43:59Z kaiwang27 $");
static void add_gnu_debuglink(struct elfcopy *ecp);
static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc);
@@ -372,6 +372,14 @@ create_scn(struct elfcopy *ecp)
is_remove_reloc_sec(ecp, ish.sh_info))
continue;
+ /*
+ * Section groups should be removed if symbol table will
+ * be removed. (section group's signature stored in symbol
+ * table)
+ */
+ if (ish.sh_type == SHT_GROUP && ecp->strip == STRIP_ALL)
+ continue;
+
/* Get section flags set by user. */
sec_flags = get_section_flags(ecp, name);
@@ -477,7 +485,10 @@ insert_shtab(struct elfcopy *ecp, int ta
if ((shtab = calloc(1, sizeof(*shtab))) == NULL)
errx(EXIT_FAILURE, "calloc failed");
if (!tail) {
- /* shoff of input object is used as a hint. */
+ /*
+ * "shoff" of input object is used as a hint for section
+ * resync later.
+ */
if (gelf_getehdr(ecp->ein, &ieh) == NULL)
errx(EXIT_FAILURE, "gelf_getehdr() failed: %s",
elf_errmsg(-1));
@@ -756,6 +767,15 @@ resync_sections(struct elfcopy *ecp)
first = 0;
}
+ /*
+ * Ignore TLS sections with load address 0 and without
+ * content. We don't need to adjust their file offset or
+ * VMA, only the size matters.
+ */
+ if (s->seg_tls != NULL && s->type == SHT_NOBITS &&
+ s->off == 0)
+ continue;
+
/* Align section offset. */
if (off <= s->off) {
if (!s->loadable)
@@ -1042,6 +1062,17 @@ copy_data(struct section *s)
od->d_size = id->d_size;
od->d_version = id->d_version;
}
+
+ /*
+ * Alignment Fixup. libelf does not allow the alignment for
+ * Elf_Data descriptor to be set to 0. In this case we workaround
+ * it by setting the alignment to 1.
+ *
+ * According to the ELF ABI, alignment 0 and 1 has the same
+ * meaning: the section has no alignment constraints.
+ */
+ if (od->d_align == 0)
+ od->d_align = 1;
}
struct section *
Modified: projects/clang350-import/contrib/elftoolchain/elfcopy/segments.c
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/elfcopy/segments.c Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/elfcopy/segments.c Tue Dec 30 20:23:03 2014 (r276421)
@@ -35,7 +35,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: segments.c 2542 2012-08-12 16:14:15Z kaiwang27 $");
+ELFTC_VCSID("$Id: segments.c 3134 2014-12-23 10:43:59Z kaiwang27 $");
static void insert_to_inseg_list(struct segment *seg, struct section *sec);
@@ -73,17 +73,21 @@ add_to_inseg_list(struct elfcopy *ecp, s
*/
loadable = 0;
STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) {
- if (s->off < seg->off)
+ if (s->off < seg->off || (s->vma < seg->addr && !s->pseudo))
continue;
if (s->off + s->sz > seg->off + seg->fsz &&
s->type != SHT_NOBITS)
continue;
if (s->off + s->sz > seg->off + seg->msz)
continue;
+ if (s->vma + s->sz > seg->addr + seg->msz)
+ continue;
insert_to_inseg_list(seg, s);
if (seg->type == PT_LOAD)
s->seg = seg;
+ else if (seg->type == PT_TLS)
+ s->seg_tls = seg;
s->lma = seg->addr + (s->off - seg->off);
loadable = 1;
}
@@ -97,7 +101,7 @@ adjust_addr(struct elfcopy *ecp)
struct section *s, *s0;
struct segment *seg;
struct sec_action *sac;
- uint64_t dl, lma, old_vma, start, end;
+ uint64_t dl, lma, start, end;
int found, i;
/*
@@ -114,8 +118,6 @@ adjust_addr(struct elfcopy *ecp)
s->lma += ecp->change_addr;
if (!s->pseudo) {
- old_vma = s->vma;
-
/* Apply global VMA adjustment. */
if (ecp->change_addr != 0)
s->vma += ecp->change_addr;
Modified: projects/clang350-import/contrib/elftoolchain/elfcopy/symbols.c
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/elfcopy/symbols.c Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/elfcopy/symbols.c Tue Dec 30 20:23:03 2014 (r276421)
@@ -34,7 +34,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: symbols.c 2971 2013-12-01 15:22:21Z kaiwang27 $");
+ELFTC_VCSID("$Id: symbols.c 3135 2014-12-24 08:22:43Z kaiwang27 $");
/* Symbol table buffer structure. */
struct symbuf {
@@ -46,12 +46,25 @@ struct symbuf {
size_t gcap, lcap; /* buffer capacities. */
};
+struct sthash {
+ LIST_ENTRY(sthash) sh_next;
+ size_t sh_off;
+};
+typedef LIST_HEAD(,sthash) hash_head;
+#define STHASHSIZE 65536
+
+struct strimpl {
+ char *buf; /* string table */
+ size_t sz; /* entries */
+ size_t cap; /* buffer capacity */
+ hash_head hash[STHASHSIZE];
+};
+
+
/* String table buffer structure. */
struct strbuf {
- char *l; /* local symbol string table */
- char *g; /* global symbol string table */
- size_t lsz, gsz; /* size of each kind */
- size_t gcap, lcap; /* buffer capacities. */
+ struct strimpl l; /* local symbols */
+ struct strimpl g; /* global symbols */
};
static int is_debug_symbol(unsigned char st_info);
@@ -62,10 +75,12 @@ static int is_needed_symbol(struct elfco
static int is_remove_symbol(struct elfcopy *ecp, size_t sc, int i,
GElf_Sym *s, const char *name);
static int is_weak_symbol(unsigned char st_info);
-static int lookup_exact_string(const char *buf, size_t sz, const char *s);
+static int lookup_exact_string(hash_head *hash, const char *buf,
+ const char *s);
static int generate_symbols(struct elfcopy *ecp);
static void mark_symbols(struct elfcopy *ecp, size_t sc);
static int match_wildcard(const char *name, const char *pattern);
+uint32_t str_hash(const char *s);
/* Convenient bit vector operation macros. */
#define BIT_SET(v, n) (v[(n)>>3] |= 1U << ((n) & 7))
@@ -300,7 +315,7 @@ generate_symbols(struct elfcopy *ecp)
GElf_Sym sym;
Elf_Data* id;
Elf_Scn *is;
- size_t ishstrndx, namelen, ndx, nsyms, sc, symndx;
+ size_t ishstrndx, namelen, ndx, sc, symndx;
int ec, elferr, i;
if (elf_getshstrndx(ecp->ein, &ishstrndx) == 0)
@@ -316,11 +331,10 @@ generate_symbols(struct elfcopy *ecp)
if ((st_buf = calloc(1, sizeof(*st_buf))) == NULL)
err(EXIT_FAILURE, "calloc failed");
sy_buf->gcap = sy_buf->lcap = 64;
- st_buf->gcap = 256;
- st_buf->lcap = 64;
- st_buf->lsz = 1; /* '\0' at start. */
- st_buf->gsz = 0;
- nsyms = 0;
+ st_buf->g.cap = 256;
+ st_buf->l.cap = 64;
+ st_buf->l.sz = 1; /* '\0' at start. */
+ st_buf->g.sz = 0;
ecp->symtab->sz = 0;
ecp->strtab->sz = 0;
@@ -542,10 +556,10 @@ generate_symbols(struct elfcopy *ecp)
/* Update st_name. */
if (ec == ELFCLASS32)
sy_buf->g32[ecp->symndx[i]].st_name +=
- st_buf->lsz;
+ st_buf->l.sz;
else
sy_buf->g64[ecp->symndx[i]].st_name +=
- st_buf->lsz;
+ st_buf->l.sz;
/* Update index map. */
ecp->symndx[i] += sy_buf->nls;
@@ -634,6 +648,8 @@ free_symtab(struct elfcopy *ecp)
{
struct symbuf *sy_buf;
struct strbuf *st_buf;
+ struct sthash *sh, *shtmp;
+ int i;
if (ecp->symtab != NULL && ecp->symtab->buf != NULL) {
sy_buf = ecp->symtab->buf;
@@ -649,10 +665,22 @@ free_symtab(struct elfcopy *ecp)
if (ecp->strtab != NULL && ecp->strtab->buf != NULL) {
st_buf = ecp->strtab->buf;
- if (st_buf->l != NULL)
- free(st_buf->l);
- if (st_buf->g != NULL)
- free(st_buf->g);
+ if (st_buf->l.buf != NULL)
+ free(st_buf->l.buf);
+ if (st_buf->g.buf != NULL)
+ free(st_buf->g.buf);
+ for (i = 0; i < STHASHSIZE; i++) {
+ LIST_FOREACH_SAFE(sh, &st_buf->l.hash[i], sh_next,
+ shtmp) {
+ LIST_REMOVE(sh, sh_next);
+ free(sh);
+ }
+ LIST_FOREACH_SAFE(sh, &st_buf->g.hash[i], sh_next,
+ shtmp) {
+ LIST_REMOVE(sh, sh_next);
+ free(sh);
+ }
+ }
}
}
@@ -690,10 +718,10 @@ create_external_symtab(struct elfcopy *e
if ((st_buf = calloc(1, sizeof(*st_buf))) == NULL)
err(EXIT_FAILURE, "calloc failed");
sy_buf->gcap = sy_buf->lcap = 64;
- st_buf->gcap = 256;
- st_buf->lcap = 64;
- st_buf->lsz = 1; /* '\0' at start. */
- st_buf->gsz = 0;
+ st_buf->g.cap = 256;
+ st_buf->l.cap = 64;
+ st_buf->l.sz = 1; /* '\0' at start. */
+ st_buf->g.sz = 0;
ecp->symtab->sz = 0;
ecp->strtab->sz = 0;
@@ -730,6 +758,8 @@ add_to_symtab(struct elfcopy *ecp, const
{
struct symbuf *sy_buf;
struct strbuf *st_buf;
+ struct sthash *sh;
+ uint32_t hash;
int pos;
/*
@@ -762,32 +792,39 @@ add_to_symtab(struct elfcopy *ecp, const
else \
sy_buf->B##SZ[sy_buf->n##B##s].st_shndx = \
ecp->secndx[st_shndx]; \
- if (st_buf->B == NULL) { \
- st_buf->B = calloc(st_buf->B##cap, sizeof(*st_buf->B)); \
- if (st_buf->B == NULL) \
+ if (st_buf->B.buf == NULL) { \
+ st_buf->B.buf = calloc(st_buf->B.cap, \
+ sizeof(*st_buf->B.buf)); \
+ if (st_buf->B.buf == NULL) \
err(EXIT_FAILURE, "malloc failed"); \
} \
if (name != NULL && *name != '\0') { \
- pos = lookup_exact_string(st_buf->B, \
- st_buf->B##sz, name); \
+ pos = lookup_exact_string(st_buf->B.hash, st_buf->B.buf,\
+ name); \
if (pos != -1) \
sy_buf->B##SZ[sy_buf->n##B##s].st_name = pos; \
else { \
sy_buf->B##SZ[sy_buf->n##B##s].st_name = \
- st_buf->B##sz; \
- while (st_buf->B##sz + strlen(name) >= \
- st_buf->B##cap - 1) { \
- st_buf->B##cap *= 2; \
- st_buf->B = realloc(st_buf->B, \
- st_buf->B##cap); \
- if (st_buf->B == NULL) \
+ st_buf->B.sz; \
+ while (st_buf->B.sz + strlen(name) >= \
+ st_buf->B.cap - 1) { \
+ st_buf->B.cap *= 2; \
+ st_buf->B.buf = realloc(st_buf->B.buf, \
+ st_buf->B.cap); \
+ if (st_buf->B.buf == NULL) \
err(EXIT_FAILURE, \
"realloc failed"); \
} \
- strncpy(&st_buf->B[st_buf->B##sz], name, \
+ if ((sh = malloc(sizeof(*sh))) == NULL) \
+ err(EXIT_FAILURE, "malloc failed"); \
+ sh->sh_off = st_buf->B.sz; \
+ hash = str_hash(name); \
+ LIST_INSERT_HEAD(&st_buf->B.hash[hash], sh, \
+ sh_next); \
+ strncpy(&st_buf->B.buf[st_buf->B.sz], name, \
strlen(name)); \
- st_buf->B[st_buf->B##sz + strlen(name)] = '\0'; \
- st_buf->B##sz += strlen(name) + 1; \
+ st_buf->B.buf[st_buf->B.sz + strlen(name)] = '\0'; \
+ st_buf->B.sz += strlen(name) + 1; \
} \
} else \
sy_buf->B##SZ[sy_buf->n##B##s].st_name = 0; \
@@ -812,7 +849,7 @@ add_to_symtab(struct elfcopy *ecp, const
/* Update section size. */
ecp->symtab->sz = (sy_buf->nls + sy_buf->ngs) *
(ecp->oec == ELFCLASS32 ? sizeof(Elf32_Sym) : sizeof(Elf64_Sym));
- ecp->strtab->sz = st_buf->lsz + st_buf->gsz;
+ ecp->strtab->sz = st_buf->l.sz + st_buf->g.sz;
#undef _ADDSYM
}
@@ -832,9 +869,9 @@ finalize_external_symtab(struct elfcopy
st_buf = ecp->strtab->buf;
for (i = 0; (size_t) i < sy_buf->ngs; i++) {
if (ecp->oec == ELFCLASS32)
- sy_buf->g32[i].st_name += st_buf->lsz;
+ sy_buf->g32[i].st_name += st_buf->l.sz;
else
- sy_buf->g64[i].st_name += st_buf->lsz;
+ sy_buf->g64[i].st_name += st_buf->l.sz;
}
}
@@ -921,19 +958,19 @@ create_symtab_data(struct elfcopy *ecp)
elf_errmsg(-1));
lstdata->d_align = 1;
lstdata->d_off = 0;
- lstdata->d_buf = st_buf->l;
- lstdata->d_size = st_buf->lsz;
+ lstdata->d_buf = st_buf->l.buf;
+ lstdata->d_size = st_buf->l.sz;
lstdata->d_type = ELF_T_BYTE;
lstdata->d_version = EV_CURRENT;
- if (st_buf->gsz > 0) {
+ if (st_buf->g.sz > 0) {
if ((gstdata = elf_newdata(st->os)) == NULL)
errx(EXIT_FAILURE, "elf_newdata() failed: %s.",
elf_errmsg(-1));
gstdata->d_align = 1;
gstdata->d_off = lstdata->d_size;
- gstdata->d_buf = st_buf->g;
- gstdata->d_size = st_buf->gsz;
+ gstdata->d_buf = st_buf->g.buf;
+ gstdata->d_size = st_buf->g.sz;
gstdata->d_type = ELF_T_BYTE;
gstdata->d_version = EV_CURRENT;
}
@@ -1023,18 +1060,25 @@ lookup_symop_list(struct elfcopy *ecp, c
}
static int
-lookup_exact_string(const char *buf, size_t sz, const char *s)
+lookup_exact_string(hash_head *buckets, const char *buf, const char *s)
{
- const char *b;
- size_t slen;
-
- slen = strlen(s);
- for (b = buf; b < buf + sz; b += strlen(b) + 1) {
- if (strlen(b) != slen)
- continue;
- if (!strcmp(b, s))
- return (b - buf);
- }
+ struct sthash *sh;
+ uint32_t hash;
+ hash = str_hash(s);
+ LIST_FOREACH(sh, &buckets[hash], sh_next)
+ if (strcmp(buf + sh->sh_off, s) == 0)
+ return sh->sh_off;
return (-1);
}
+
+uint32_t
+str_hash(const char *s)
+{
+ uint32_t hash;
+
+ for (hash = 2166136261; *s; s++)
+ hash = (hash ^ *s) * 16777619;
+
+ return (hash & (STHASHSIZE - 1));
+}
Modified: projects/clang350-import/contrib/elftoolchain/libdwarf/Makefile
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/libdwarf/Makefile Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/libdwarf/Makefile Tue Dec 30 20:23:03 2014 (r276421)
@@ -1,4 +1,4 @@
-# $Id: Makefile 2937 2013-04-27 04:48:23Z jkoshy $
+# $Id: Makefile 3097 2014-09-02 22:10:18Z kaiwang27 $
TOP= ${.CURDIR}/..
@@ -42,6 +42,7 @@ SRCS= \
dwarf_pubtypes.c \
dwarf_ranges.c \
dwarf_reloc.c \
+ dwarf_sections.c \
dwarf_seterror.c \
dwarf_str.c \
dwarf_types.c \
@@ -115,6 +116,7 @@ MAN= dwarf.3
dwarf_add_weakname.3 \
dwarf_attr.3 \
dwarf_attrlist.3 \
+ dwarf_attroffset.3 \
dwarf_attrval_signed.3 \
dwarf_child.3 \
dwarf_dealloc.3 \
@@ -154,6 +156,7 @@ MAN= dwarf.3
dwarf_get_cie_info.3 \
dwarf_get_cie_of_fde.3 \
dwarf_get_cu_die_offset.3 \
+ dwarf_get_die_infotypes_flag.3 \
dwarf_get_elf.3 \
dwarf_get_fde_at_pc.3 \
dwarf_get_fde_info_for_all_regs.3 \
@@ -175,6 +178,7 @@ MAN= dwarf.3
dwarf_get_relocation_info.3 \
dwarf_get_relocation_info_count.3 \
dwarf_get_section_bytes.3 \
+ dwarf_get_section_max_offsets.3 \
dwarf_get_str.3 \
dwarf_get_types.3 \
dwarf_get_vars.3 \
@@ -192,6 +196,7 @@ MAN= dwarf.3
dwarf_new_expr.3 \
dwarf_new_fde.3 \
dwarf_next_cu_header.3 \
+ dwarf_next_types_section.3 \
dwarf_object_init.3 \
dwarf_producer_init.3 \
dwarf_producer_set_isa.3 \
@@ -220,7 +225,9 @@ MLINKS+= \
dwarf_attrval_signed.3 dwarf_attrval_string.3 \
dwarf_attrval_signed.3 dwarf_attrval_unsigned.3 \
dwarf_child.3 dwarf_offdie.3 \
+ dwarf_child.3 dwarf_offdie_b.3 \
dwarf_child.3 dwarf_siblingof.3 \
+ dwarf_child.3 dwarf_siblingof_b.3 \
dwarf_dealloc.3 dwarf_fde_cie_list_dealloc.3 \
dwarf_dealloc.3 dwarf_funcs_dealloc.3 \
dwarf_dealloc.3 dwarf_globals_dealloc.3 \
@@ -234,6 +241,7 @@ MLINKS+= \
dwarf_dieoffset.3 dwarf_die_CU_offset.3 \
dwarf_dieoffset.3 dwarf_die_CU_offset_range.3 \
dwarf_dieoffset.3 dwarf_get_cu_die_offset_given_cu_header_offset.3 \
+ dwarf_dieoffset.3 dwarf_get_cu_die_offset_given_cu_header_offset_b.3 \
dwarf_finish.3 dwarf_object_finish.3 \
dwarf_formref.3 dwarf_global_formref.3 \
dwarf_formudata.3 dwarf_formsdata.3 \
@@ -273,6 +281,7 @@ MLINKS+= \
dwarf_get_pubtypes.3 dwarf_pubtype_name_offsets.3 \
dwarf_get_pubtypes.3 dwarf_pubtypename.3 \
dwarf_get_ranges.3 dwarf_get_ranges_a.3 \
+ dwarf_get_section_max_offsets.3 dwarf_get_section_max_offsets_b.3 \
dwarf_get_types.3 dwarf_type_die_offset.3 \
dwarf_get_types.3 dwarf_type_cu_offset.3 \
dwarf_get_types.3 dwarf_type_name_offsets.3 \
@@ -291,6 +300,7 @@ MLINKS+= \
dwarf_highpc.3 dwarf_bitoffset.3 \
dwarf_highpc.3 dwarf_bitsize.3 \
dwarf_highpc.3 dwarf_bytesize.3 \
+ dwarf_highpc.3 dwarf_highpc_b.3 \
dwarf_highpc.3 dwarf_lowpc.3 \
dwarf_highpc.3 dwarf_srclang.3 \
dwarf_lineno.3 dwarf_lineaddr.3 \
@@ -302,6 +312,9 @@ MLINKS+= \
dwarf_lineno.3 dwarf_line_srcfileno.3 \
dwarf_loclist.3 dwarf_loclist_n.3 \
dwarf_loclist_from_expr.3 dwarf_loclist_from_expr_a.3 \
+ dwarf_loclist_from_expr.3 dwarf_loclist_from_expr_b.3 \
+ dwarf_next_cu_header.3 dwarf_next_cu_header_b.3 \
+ dwarf_next_cu_header.3 dwarf_next_cu_header_c.3 \
dwarf_producer_init.3 dwarf_producer_init_b.3 \
dwarf_seterrarg.3 dwarf_seterrhand.3 \
dwarf_set_frame_cfa_value.3 dwarf_set_frame_rule_initial_value.3 \
Modified: projects/clang350-import/contrib/elftoolchain/libdwarf/Version.map
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/libdwarf/Version.map Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/libdwarf/Version.map Tue Dec 30 20:23:03 2014 (r276421)
@@ -1,4 +1,4 @@
-/* $Id: Version.map 2576 2012-09-13 09:16:11Z jkoshy $ */
+/* $Id: Version.map 3085 2014-09-02 22:08:23Z kaiwang27 $ */
R1.0 {
global:
@@ -39,6 +39,7 @@ global:
dwarf_arrayorder;
dwarf_attr;
dwarf_attrlist;
+ dwarf_attroffset;
dwarf_attrval_flag;
dwarf_attrval_signed;
dwarf_attrval_string;
@@ -116,6 +117,8 @@ global:
dwarf_get_cie_of_fde;
dwarf_get_cu_die_offset;
dwarf_get_cu_die_offset_given_cu_header_offset;
+ dwarf_get_cu_die_offset_given_cu_header_offset_b;
+ dwarf_get_die_infotypes_flag;
dwarf_get_elf;
dwarf_get_fde_at_pc;
dwarf_get_fde_info_for_all_regs3;
@@ -139,6 +142,8 @@ global:
dwarf_get_relocation_info;
dwarf_get_relocation_info_count;
dwarf_get_section_bytes;
+ dwarf_get_section_max_offsets;
+ dwarf_get_section_max_offsets_b;
dwarf_get_str;
dwarf_get_types;
dwarf_get_vars;
@@ -152,6 +157,7 @@ global:
dwarf_hasattr;
dwarf_hasform;
dwarf_highpc;
+ dwarf_highpc_b;
dwarf_init;
dwarf_line_srcfileno;
dwarf_lineaddr;
@@ -166,6 +172,7 @@ global:
dwarf_loclist;
dwarf_loclist_from_expr;
dwarf_loclist_from_expr_a;
+ dwarf_loclist_from_expr_b;
dwarf_loclist_n;
dwarf_lowpc;
dwarf_new_die;
@@ -173,9 +180,12 @@ global:
dwarf_new_fde;
dwarf_next_cu_header;
dwarf_next_cu_header_b;
+ dwarf_next_cu_header_c;
+ dwarf_next_types_section;
dwarf_object_finish;
dwarf_object_init;
dwarf_offdie;
+ dwarf_offdie_b;
dwarf_producer_finish;
dwarf_producer_init;
dwarf_producer_init_b;
@@ -196,6 +206,7 @@ global:
dwarf_seterrarg;
dwarf_seterrhand;
dwarf_siblingof;
+ dwarf_siblingof_b;
dwarf_srcfiles;
dwarf_srclang;
dwarf_srclines;
Modified: projects/clang350-import/contrib/elftoolchain/libdwarf/_libdwarf.h
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/libdwarf/_libdwarf.h Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/libdwarf/_libdwarf.h Tue Dec 30 20:23:03 2014 (r276421)
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2007 John Birrell (jb at freebsd.org)
- * Copyright (c) 2009-2011 Kai Wang
+ * Copyright (c) 2009-2014 Kai Wang
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: _libdwarf.h 2075 2011-10-27 03:47:28Z jkoshy $
+ * $Id: _libdwarf.h 3106 2014-12-19 16:00:58Z kaiwang27 $
*/
#ifndef __LIBDWARF_H_
@@ -89,6 +89,7 @@ extern struct _libdwarf_globals _libdwar
goto gen_fail; \
} while(0)
+typedef struct _Dwarf_CU *Dwarf_CU;
struct _Dwarf_AttrDef {
uint64_t ad_attrib; /* DW_AT_XXX */
@@ -147,14 +148,6 @@ struct _Dwarf_Die {
STAILQ_ENTRY(_Dwarf_Die) die_pro_next; /* Next die in pro-die list. */
};
-struct _Dwarf_Loclist {
- Dwarf_Locdesc **ll_ldlist; /* Array of Locdesc pointer. */
- int ll_ldlen; /* Number of Locdesc. */
- Dwarf_Unsigned ll_offset; /* Offset in .debug_loc section. */
- Dwarf_Unsigned ll_length; /* Length (in bytes) of the loclist. */
- TAILQ_ENTRY(_Dwarf_Loclist) ll_next; /* Next loclist in list. */
-};
-
struct _Dwarf_P_Expr_Entry {
Dwarf_Loc ee_loc; /* Location expression. */
Dwarf_Unsigned ee_sym; /* Optional related reloc sym index. */
@@ -265,6 +258,8 @@ struct _Dwarf_Cie {
Dwarf_Half cie_version; /* CIE version. */
uint8_t *cie_augment; /* CIE augmentation (UTF-8). */
Dwarf_Unsigned cie_ehdata; /* Optional EH Data. */
+ uint8_t cie_addrsize; /* Address size. (DWARF4) */
+ uint8_t cie_segmentsize; /* Segment size. (DWARF4) */
Dwarf_Unsigned cie_caf; /* Code alignment factor. */
Dwarf_Signed cie_daf; /* Data alignment factor. */
Dwarf_Unsigned cie_ra; /* Return address register. */
@@ -333,11 +328,14 @@ struct _Dwarf_CU {
uint64_t cu_lineno_offset; /* Offset into .debug_lineno. */
uint8_t cu_pointer_size;/* Number of bytes in pointer. */
uint8_t cu_dwarf_size; /* CU section dwarf size. */
+ Dwarf_Sig8 cu_type_sig; /* Type unit's signature. */
+ uint64_t cu_type_offset; /* Type unit's type offset. */
Dwarf_Off cu_next_offset; /* Offset to the next CU. */
uint64_t cu_1st_offset; /* First DIE offset. */
int cu_pass2; /* Two pass DIE traverse. */
Dwarf_LineInfo cu_lineinfo; /* Ptr to Dwarf_LineInfo. */
Dwarf_Abbrev cu_abbrev_hash; /* Abbrev hash table. */
+ Dwarf_Bool cu_is_info; /* Compilation/type unit flag. */
STAILQ_ENTRY(_Dwarf_CU) cu_next; /* Next compilation unit. */
};
@@ -399,17 +397,21 @@ struct _Dwarf_Debug {
Dwarf_Section *dbg_section; /* Dwarf section list. */
Dwarf_Section *dbg_info_sec; /* Pointer to info section. */
Dwarf_Off dbg_info_off; /* Current info section offset. */
+ Dwarf_Section *dbg_types_sec; /* Pointer to type section. */
+ Dwarf_Off dbg_types_off; /* Current types section offset. */
Dwarf_Unsigned dbg_seccnt; /* Total number of dwarf sections. */
int dbg_mode; /* Access mode. */
int dbg_pointer_size; /* Object address size. */
int dbg_offset_size; /* DWARF offset size. */
int dbg_info_loaded; /* Flag indicating all CU loaded. */
+ int dbg_types_loaded; /* Flag indicating all TU loaded. */
Dwarf_Half dbg_machine; /* ELF machine architecture. */
Dwarf_Handler dbg_errhand; /* Error handler. */
Dwarf_Ptr dbg_errarg; /* Argument to the error handler. */
STAILQ_HEAD(, _Dwarf_CU) dbg_cu;/* List of compilation units. */
+ STAILQ_HEAD(, _Dwarf_CU) dbg_tu;/* List of type units. */
Dwarf_CU dbg_cu_current; /* Ptr to the current CU. */
- TAILQ_HEAD(, _Dwarf_Loclist) dbg_loclist; /* List of location list. */
+ Dwarf_CU dbg_tu_current; /* Ptr to the current TU. */
Dwarf_NameSec dbg_globals; /* Ptr to pubnames lookup section. */
Dwarf_NameSec dbg_pubtypes; /* Ptr to pubtypes lookup section. */
Dwarf_NameSec dbg_weaks; /* Ptr to weaknames lookup section. */
@@ -532,13 +534,15 @@ int _dwarf_elf_get_section_info(void *,
Dwarf_Obj_Access_Section *, int *);
void _dwarf_expr_cleanup(Dwarf_P_Debug);
int _dwarf_expr_into_block(Dwarf_P_Expr, Dwarf_Error *);
+Dwarf_Section *_dwarf_find_next_types_section(Dwarf_Debug, Dwarf_Section *);
Dwarf_Section *_dwarf_find_section(Dwarf_Debug, const char *);
void _dwarf_frame_cleanup(Dwarf_Debug);
int _dwarf_frame_fde_add_inst(Dwarf_P_Fde, Dwarf_Small,
Dwarf_Unsigned, Dwarf_Unsigned, Dwarf_Error *);
int _dwarf_frame_gen(Dwarf_P_Debug, Dwarf_Error *);
-int _dwarf_frame_get_fop(Dwarf_Debug, uint8_t *, Dwarf_Unsigned,
- Dwarf_Frame_Op **, Dwarf_Signed *, Dwarf_Error *);
+int _dwarf_frame_get_fop(Dwarf_Debug, uint8_t, uint8_t *,
+ Dwarf_Unsigned, Dwarf_Frame_Op **, Dwarf_Signed *,
+ Dwarf_Error *);
int _dwarf_frame_get_internal_table(Dwarf_Fde, Dwarf_Addr,
Dwarf_Regtable3 **, Dwarf_Addr *, Dwarf_Error *);
int _dwarf_frame_interal_table_init(Dwarf_Debug, Dwarf_Error *);
@@ -553,9 +557,12 @@ Dwarf_Unsigned _dwarf_get_reloc_type(Dwa
int _dwarf_get_reloc_size(Dwarf_Debug, Dwarf_Unsigned);
void _dwarf_info_cleanup(Dwarf_Debug);
int _dwarf_info_first_cu(Dwarf_Debug, Dwarf_Error *);
+int _dwarf_info_first_tu(Dwarf_Debug, Dwarf_Error *);
int _dwarf_info_gen(Dwarf_P_Debug, Dwarf_Error *);
-int _dwarf_info_load(Dwarf_Debug, int, Dwarf_Error *);
+int _dwarf_info_load(Dwarf_Debug, Dwarf_Bool, Dwarf_Bool,
+ Dwarf_Error *);
int _dwarf_info_next_cu(Dwarf_Debug, Dwarf_Error *);
+int _dwarf_info_next_tu(Dwarf_Debug, Dwarf_Error *);
void _dwarf_info_pro_cleanup(Dwarf_P_Debug);
int _dwarf_init(Dwarf_Debug, Dwarf_Unsigned, Dwarf_Handler,
Dwarf_Ptr, Dwarf_Error *);
@@ -563,20 +570,19 @@ int _dwarf_lineno_gen(Dwarf_P_Debug, Dw
int _dwarf_lineno_init(Dwarf_Die, uint64_t, Dwarf_Error *);
void _dwarf_lineno_cleanup(Dwarf_LineInfo);
void _dwarf_lineno_pro_cleanup(Dwarf_P_Debug);
-int _dwarf_loc_fill_locdesc(Dwarf_Debug, Dwarf_Locdesc *, uint8_t *,
- uint64_t, uint8_t, Dwarf_Error *);
+int _dwarf_loc_fill_locdesc(Dwarf_Debug, Dwarf_Locdesc *,
+ uint8_t *, uint64_t, uint8_t, uint8_t, uint8_t,
+ Dwarf_Error *);
int _dwarf_loc_fill_locexpr(Dwarf_Debug, Dwarf_Locdesc **,
- uint8_t *, uint64_t, uint8_t, Dwarf_Error *);
+ uint8_t *, uint64_t, uint8_t, uint8_t, uint8_t,
+ Dwarf_Error *);
int _dwarf_loc_add(Dwarf_Die, Dwarf_Attribute, Dwarf_Error *);
int _dwarf_loc_expr_add_atom(Dwarf_Debug, uint8_t *, uint8_t *,
Dwarf_Small, Dwarf_Unsigned, Dwarf_Unsigned, int *,
Dwarf_Error *);
int _dwarf_loclist_find(Dwarf_Debug, Dwarf_CU, uint64_t,
- Dwarf_Loclist *, Dwarf_Error *);
-void _dwarf_loclist_cleanup(Dwarf_Debug);
-void _dwarf_loclist_free(Dwarf_Loclist);
-int _dwarf_loclist_add(Dwarf_Debug, Dwarf_CU, uint64_t,
- Dwarf_Loclist *, Dwarf_Error *);
+ Dwarf_Locdesc ***, Dwarf_Signed *, Dwarf_Unsigned *,
+ Dwarf_Error *);
void _dwarf_macinfo_cleanup(Dwarf_Debug);
int _dwarf_macinfo_gen(Dwarf_P_Debug, Dwarf_Error *);
int _dwarf_macinfo_init(Dwarf_Debug, Dwarf_Error *);
@@ -633,6 +639,7 @@ void _dwarf_strtab_cleanup(Dwarf_Debug)
int _dwarf_strtab_gen(Dwarf_P_Debug, Dwarf_Error *);
char *_dwarf_strtab_get_table(Dwarf_Debug);
int _dwarf_strtab_init(Dwarf_Debug, Dwarf_Error *);
+void _dwarf_type_unit_cleanup(Dwarf_Debug);
void _dwarf_write_block(void *, uint64_t *, uint8_t *, uint64_t);
int _dwarf_write_block_alloc(uint8_t **, uint64_t *, uint64_t *,
uint8_t *, uint64_t, Dwarf_Error *);
Modified: projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf.3
==============================================================================
--- projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf.3 Tue Dec 30 20:22:43 2014 (r276420)
+++ projects/clang350-import/contrib/elftoolchain/libdwarf/dwarf.3 Tue Dec 30 20:23:03 2014 (r276421)
@@ -21,9 +21,9 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" $Id: dwarf.3 2075 2011-10-27 03:47:28Z jkoshy $
+.\" $Id: dwarf.3 3130 2014-12-21 20:06:29Z jkoshy $
.\"
-.Dd September 17, 2011
+.Dd December 21, 2014
.Os
.Dt DWARF 3
.Sh NAME
@@ -217,6 +217,8 @@ attribute.
Retrieve an attribute descriptor.
.It Fn dwarf_attrlist
Retrieve attribute descriptors for a debugging information entry.
+.It Fn dwarf_attroffset
+Retrieve the section-relative offset of an attribute descriptor.
.It Fn dwarf_attrval_flag
Retrieve a
.Dv DW_AT_FORM_flag
@@ -309,10 +311,17 @@ Retrieve range information from an FDE d
.El
.It Compilation Units
.Bl -tag -compact
-.It Fn dwarf_get_cu_die_offset_given_cu_header_offset
+.It Xo
+.Fn dwarf_get_cu_die_offset_given_cu_header_offset ,
+.Fn dwarf_get_cu_die_offset_given_cu_header_offset_b
+.Xc
Retrieve the offset of the debugging information entry for a
-compilation unit.
-.It Fn dwarf_next_cu_header , Fn dwarf_next_cu_header_b
+compilation or type unit.
+.It Xo
+.Fn dwarf_next_cu_header ,
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list