svn commit: r292178 - in user/ngie/more-tests2: . contrib/elftoolchain/addr2line contrib/elftoolchain/common contrib/elftoolchain/elfcopy contrib/elftoolchain/libelf contrib/elftoolchain/readelf co...

Garrett Cooper ngie at FreeBSD.org
Mon Dec 14 00:12:57 UTC 2015


Author: ngie
Date: Mon Dec 14 00:12:53 2015
New Revision: 292178
URL: https://svnweb.freebsd.org/changeset/base/292178

Log:
  MFhead @ r292177

Added:
  user/ngie/more-tests2/etc/etc.riscv/
     - copied from r292177, head/etc/etc.riscv/
  user/ngie/more-tests2/lib/csu/riscv/
     - copied from r292177, head/lib/csu/riscv/
  user/ngie/more-tests2/lib/libc/riscv/
     - copied from r292177, head/lib/libc/riscv/
  user/ngie/more-tests2/lib/libthr/arch/riscv/
     - copied from r292177, head/lib/libthr/arch/riscv/
  user/ngie/more-tests2/lib/msun/riscv/
     - copied from r292177, head/lib/msun/riscv/
Modified:
  user/ngie/more-tests2/MAINTAINERS   (contents, props changed)
  user/ngie/more-tests2/Makefile
  user/ngie/more-tests2/Makefile.inc1
  user/ngie/more-tests2/UPDATING
  user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.1
  user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.c
  user/ngie/more-tests2/contrib/elftoolchain/common/elfdefinitions.h
  user/ngie/more-tests2/contrib/elftoolchain/elfcopy/binary.c
  user/ngie/more-tests2/contrib/elftoolchain/elfcopy/elfcopy.1
  user/ngie/more-tests2/contrib/elftoolchain/elfcopy/main.c
  user/ngie/more-tests2/contrib/elftoolchain/elfcopy/sections.c
  user/ngie/more-tests2/contrib/elftoolchain/elfcopy/segments.c
  user/ngie/more-tests2/contrib/elftoolchain/libelf/elf_data.c
  user/ngie/more-tests2/contrib/elftoolchain/readelf/readelf.c
  user/ngie/more-tests2/contrib/top/loadavg.h
  user/ngie/more-tests2/contrib/unbound/freebsd-configure.sh
  user/ngie/more-tests2/lib/libc/gen/exec.3
  user/ngie/more-tests2/lib/libc/net/getaddrinfo.c
  user/ngie/more-tests2/lib/libc/regex/grot/Makefile
  user/ngie/more-tests2/sbin/geom/class/part/gpart.8
  user/ngie/more-tests2/share/man/man4/mps.4
  user/ngie/more-tests2/share/mk/bsd.cpu.mk
  user/ngie/more-tests2/share/mk/bsd.endian.mk
  user/ngie/more-tests2/share/mk/bsd.opts.mk
  user/ngie/more-tests2/share/mk/bsd.sys.mk
  user/ngie/more-tests2/share/mk/local.dirdeps.mk
  user/ngie/more-tests2/share/mk/local.meta.sys.mk
  user/ngie/more-tests2/share/mk/src.opts.mk
  user/ngie/more-tests2/share/mk/sys.mk
  user/ngie/more-tests2/sys/arm64/arm64/gic.c
  user/ngie/more-tests2/sys/arm64/arm64/gic.h
  user/ngie/more-tests2/sys/arm64/arm64/gic_fdt.c
  user/ngie/more-tests2/sys/arm64/arm64/gic_v3_its.c
  user/ngie/more-tests2/sys/arm64/arm64/gic_v3_var.h
  user/ngie/more-tests2/sys/arm64/arm64/intr_machdep.c
  user/ngie/more-tests2/sys/arm64/arm64/pic_if.m
  user/ngie/more-tests2/sys/arm64/cavium/thunder_pcie.c
  user/ngie/more-tests2/sys/arm64/cavium/thunder_pcie_common.c
  user/ngie/more-tests2/sys/arm64/cavium/thunder_pcie_pem.c
  user/ngie/more-tests2/sys/arm64/conf/GENERIC
  user/ngie/more-tests2/sys/arm64/include/intr.h
  user/ngie/more-tests2/sys/boot/common/part.c
  user/ngie/more-tests2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  user/ngie/more-tests2/sys/dev/aic/aic_pccard.c
  user/ngie/more-tests2/sys/dev/an/if_an_pccard.c
  user/ngie/more-tests2/sys/dev/ata/ata-card.c
  user/ngie/more-tests2/sys/dev/bwn/if_bwn.c
  user/ngie/more-tests2/sys/dev/cmx/cmx_pccard.c
  user/ngie/more-tests2/sys/dev/cs/if_cs_pccard.c
  user/ngie/more-tests2/sys/dev/ed/if_ed_isa.c
  user/ngie/more-tests2/sys/dev/ed/if_ed_pccard.c
  user/ngie/more-tests2/sys/dev/ed/if_ed_pci.c
  user/ngie/more-tests2/sys/dev/ep/if_ep_pccard.c
  user/ngie/more-tests2/sys/dev/ex/if_ex_pccard.c
  user/ngie/more-tests2/sys/dev/fdc/fdc_pccard.c
  user/ngie/more-tests2/sys/dev/fdt/simplebus.c
  user/ngie/more-tests2/sys/dev/fe/if_fe_pccard.c
  user/ngie/more-tests2/sys/dev/hwpmc/hwpmc_core.c
  user/ngie/more-tests2/sys/dev/md/md.c
  user/ngie/more-tests2/sys/dev/ncv/ncr53c500_pccard.c
  user/ngie/more-tests2/sys/dev/nsp/nsp_pccard.c
  user/ngie/more-tests2/sys/dev/nvd/nvd.c
  user/ngie/more-tests2/sys/dev/nvme/nvme.h
  user/ngie/more-tests2/sys/dev/nvme/nvme_ns.c
  user/ngie/more-tests2/sys/dev/nvme/nvme_sysctl.c
  user/ngie/more-tests2/sys/dev/ofw/ofw_bus_subr.c
  user/ngie/more-tests2/sys/dev/ofw/ofw_bus_subr.h
  user/ngie/more-tests2/sys/dev/ofw/ofw_iicbus.c
  user/ngie/more-tests2/sys/dev/otus/if_otus.c
  user/ngie/more-tests2/sys/dev/pccard/pccardvar.h
  user/ngie/more-tests2/sys/dev/ral/rt2560.c
  user/ngie/more-tests2/sys/dev/ral/rt2661.c
  user/ngie/more-tests2/sys/dev/ral/rt2860.c
  user/ngie/more-tests2/sys/dev/sfxge/common/efx_impl.h
  user/ngie/more-tests2/sys/dev/sfxge/common/efx_mcdi.c
  user/ngie/more-tests2/sys/dev/sfxge/common/efx_mcdi.h
  user/ngie/more-tests2/sys/dev/sfxge/common/hunt_impl.h
  user/ngie/more-tests2/sys/dev/sfxge/common/hunt_mcdi.c
  user/ngie/more-tests2/sys/dev/sfxge/common/siena_impl.h
  user/ngie/more-tests2/sys/dev/sfxge/common/siena_mcdi.c
  user/ngie/more-tests2/sys/dev/sfxge/sfxge.c
  user/ngie/more-tests2/sys/dev/sn/if_sn_pccard.c
  user/ngie/more-tests2/sys/dev/snc/if_snc_pccard.c
  user/ngie/more-tests2/sys/dev/sound/usb/uaudio.c
  user/ngie/more-tests2/sys/dev/stg/tmc18c30_pccard.c
  user/ngie/more-tests2/sys/dev/uart/uart_bus_pccard.c
  user/ngie/more-tests2/sys/dev/usb/input/atp.c
  user/ngie/more-tests2/sys/dev/usb/input/uep.c
  user/ngie/more-tests2/sys/dev/usb/input/uhid.c
  user/ngie/more-tests2/sys/dev/usb/input/ukbd.c
  user/ngie/more-tests2/sys/dev/usb/input/ums.c
  user/ngie/more-tests2/sys/dev/usb/input/wsp.c
  user/ngie/more-tests2/sys/dev/usb/misc/udbp.c
  user/ngie/more-tests2/sys/dev/usb/misc/ufm.c
  user/ngie/more-tests2/sys/dev/usb/misc/ugold.c
  user/ngie/more-tests2/sys/dev/usb/misc/uled.c
  user/ngie/more-tests2/sys/dev/usb/net/if_aue.c
  user/ngie/more-tests2/sys/dev/usb/net/if_axe.c
  user/ngie/more-tests2/sys/dev/usb/net/if_axge.c
  user/ngie/more-tests2/sys/dev/usb/net/if_cdce.c
  user/ngie/more-tests2/sys/dev/usb/net/if_cue.c
  user/ngie/more-tests2/sys/dev/usb/net/if_ipheth.c
  user/ngie/more-tests2/sys/dev/usb/net/if_kue.c
  user/ngie/more-tests2/sys/dev/usb/net/if_mos.c
  user/ngie/more-tests2/sys/dev/usb/net/if_rue.c
  user/ngie/more-tests2/sys/dev/usb/net/if_smsc.c
  user/ngie/more-tests2/sys/dev/usb/net/if_udav.c
  user/ngie/more-tests2/sys/dev/usb/net/if_urndis.c
  user/ngie/more-tests2/sys/dev/usb/net/if_usie.c
  user/ngie/more-tests2/sys/dev/usb/net/uhso.c
  user/ngie/more-tests2/sys/dev/usb/serial/u3g.c
  user/ngie/more-tests2/sys/dev/usb/serial/uark.c
  user/ngie/more-tests2/sys/dev/usb/serial/ubsa.c
  user/ngie/more-tests2/sys/dev/usb/serial/uchcom.c
  user/ngie/more-tests2/sys/dev/usb/serial/ucycom.c
  user/ngie/more-tests2/sys/dev/usb/serial/ufoma.c
  user/ngie/more-tests2/sys/dev/usb/serial/uftdi.c
  user/ngie/more-tests2/sys/dev/usb/serial/ugensa.c
  user/ngie/more-tests2/sys/dev/usb/serial/uipaq.c
  user/ngie/more-tests2/sys/dev/usb/serial/ulpt.c
  user/ngie/more-tests2/sys/dev/usb/serial/umcs.c
  user/ngie/more-tests2/sys/dev/usb/serial/umct.c
  user/ngie/more-tests2/sys/dev/usb/serial/umodem.c
  user/ngie/more-tests2/sys/dev/usb/serial/umoscom.c
  user/ngie/more-tests2/sys/dev/usb/serial/uplcom.c
  user/ngie/more-tests2/sys/dev/usb/serial/uslcom.c
  user/ngie/more-tests2/sys/dev/usb/serial/uvisor.c
  user/ngie/more-tests2/sys/dev/usb/serial/uvscom.c
  user/ngie/more-tests2/sys/dev/usb/storage/umass.c
  user/ngie/more-tests2/sys/dev/usb/storage/urio.c
  user/ngie/more-tests2/sys/dev/usb/usb_hub.c
  user/ngie/more-tests2/sys/dev/usb/usbdi.h
  user/ngie/more-tests2/sys/dev/usb/wlan/if_rsu.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_rum.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_run.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_uath.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_upgt.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_ural.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_urtw.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_urtwn.c
  user/ngie/more-tests2/sys/dev/usb/wlan/if_urtwnreg.h
  user/ngie/more-tests2/sys/dev/usb/wlan/if_urtwnvar.h
  user/ngie/more-tests2/sys/dev/usb/wlan/if_zyd.c
  user/ngie/more-tests2/sys/dev/wi/if_wi_pccard.c
  user/ngie/more-tests2/sys/dev/wpi/if_wpi.c
  user/ngie/more-tests2/sys/dev/wpi/if_wpi_debug.h
  user/ngie/more-tests2/sys/dev/wtap/if_wtap_module.c
  user/ngie/more-tests2/sys/dev/wtap/if_wtapvar.h
  user/ngie/more-tests2/sys/dev/wtap/plugins/visibility.c
  user/ngie/more-tests2/sys/dev/xe/if_xe_pccard.c
  user/ngie/more-tests2/sys/geom/part/g_part_gpt.c
  user/ngie/more-tests2/sys/kern/kern_linker.c
  user/ngie/more-tests2/sys/kern/kern_malloc.c
  user/ngie/more-tests2/sys/kern/kern_racct.c
  user/ngie/more-tests2/sys/kern/kern_rctl.c
  user/ngie/more-tests2/sys/mips/include/cpuregs.h
  user/ngie/more-tests2/sys/net/if_llatbl.c
  user/ngie/more-tests2/sys/net/if_llatbl.h
  user/ngie/more-tests2/sys/net/route.c
  user/ngie/more-tests2/sys/net80211/ieee80211_phy.h
  user/ngie/more-tests2/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
  user/ngie/more-tests2/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
  user/ngie/more-tests2/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
  user/ngie/more-tests2/sys/netinet/sctp_input.c
  user/ngie/more-tests2/sys/netinet/sctp_output.c
  user/ngie/more-tests2/sys/netinet/sctp_pcb.h
  user/ngie/more-tests2/sys/netinet/tcp_hostcache.c
  user/ngie/more-tests2/sys/netinet/tcp_hostcache.h
  user/ngie/more-tests2/sys/netinet/tcp_var.h
  user/ngie/more-tests2/sys/netinet6/in6.c
  user/ngie/more-tests2/sys/netinet6/nd6.c
  user/ngie/more-tests2/sys/netinet6/nd6_nbr.c
  user/ngie/more-tests2/sys/powerpc/booke/booke_machdep.c
  user/ngie/more-tests2/sys/powerpc/booke/trap_subr.S
  user/ngie/more-tests2/sys/powerpc/include/trap.h
  user/ngie/more-tests2/sys/powerpc/powerpc/trap.c
  user/ngie/more-tests2/sys/sys/module.h
  user/ngie/more-tests2/sys/vm/uma_core.c
  user/ngie/more-tests2/sys/vm/vm_page.c
  user/ngie/more-tests2/tools/bsdbox/Makefile.base
  user/ngie/more-tests2/tools/tools/nanobsd/defaults.sh
  user/ngie/more-tests2/tools/tools/nanobsd/embedded/common
  user/ngie/more-tests2/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg
  user/ngie/more-tests2/usr.bin/mkimg/mbr.c
  user/ngie/more-tests2/usr.bin/mkimg/scheme.c
  user/ngie/more-tests2/usr.bin/mkimg/scheme.h
  user/ngie/more-tests2/usr.bin/unzip/unzip.1
  user/ngie/more-tests2/usr.bin/unzip/unzip.c
  user/ngie/more-tests2/usr.sbin/crunch/crunchide/exec_elf32.c
  user/ngie/more-tests2/usr.sbin/kldxref/kldxref.c
  user/ngie/more-tests2/usr.sbin/sesutil/Makefile
  user/ngie/more-tests2/usr.sbin/sesutil/eltsub.c
  user/ngie/more-tests2/usr.sbin/sesutil/eltsub.h
  user/ngie/more-tests2/usr.sbin/sesutil/sesutil.c
Directory Properties:
  user/ngie/more-tests2/   (props changed)
  user/ngie/more-tests2/contrib/elftoolchain/   (props changed)
  user/ngie/more-tests2/contrib/top/   (props changed)
  user/ngie/more-tests2/contrib/unbound/   (props changed)
  user/ngie/more-tests2/lib/libc/   (props changed)
  user/ngie/more-tests2/sbin/   (props changed)
  user/ngie/more-tests2/share/   (props changed)
  user/ngie/more-tests2/share/man/man4/   (props changed)
  user/ngie/more-tests2/sys/   (props changed)
  user/ngie/more-tests2/sys/boot/   (props changed)
  user/ngie/more-tests2/sys/cddl/contrib/opensolaris/   (props changed)
  user/ngie/more-tests2/usr.bin/mkimg/   (props changed)

Modified: user/ngie/more-tests2/MAINTAINERS
==============================================================================
--- user/ngie/more-tests2/MAINTAINERS	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/MAINTAINERS	Mon Dec 14 00:12:53 2015	(r292178)
@@ -26,57 +26,62 @@ sub-system.
 
 subsystem	login	notes
 -----------------------------
-opencrypto	jmg	Pre-commit review requested.  Documentation Required.
-kqueue		jmg	Pre-commit review requested.  Documentation Required.
-share/mk	imp, bapt, bdrewery, emaste, sjg	Make is hard.
+atf			freebsd-testing,jmmv,ngie	Pre-commit review requested.
 ath(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
-net80211	adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
-iwn(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
-iwm(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
-otus(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
-dev/usb/wlan	adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
-openssl		benl,jkim	Pre-commit review requested.
-release/release.sh	gjb,re	Pre-commit review and regression tests
-				requested.
-sh(1)		jilles		Pre-commit review requested. This also applies
-				to kill(1), printf(1) and test(1) which are
-				compiled in as builtins.
-isci(4)		jimharris	Pre-commit review requested.
-nvme(4)		jimharris	Pre-commit review requested.
-nvd(4)		jimharris	Pre-commit review requested.
-nvmecontrol(8)	jimharris	Pre-commit review requested.
-libfetch	des	Pre-commit review requested.
-fetch		des	Pre-commit review requested.
-libpam		des	Pre-commit review requested.
-openssh		des	Pre-commit review requested.
-pseudofs	des	Pre-commit review requested.
-procfs		des	Pre-commit review requested.
-linprocfs	des	Pre-commit review requested.
+callout_*(9)	rrs		Pre-commit review requested -- becareful its tricksy code :o.
 contrib/compiler-rt	dim	Pre-commit review preferred.
 contrib/libc++		dim	Pre-commit review preferred.
 contrib/libcxxrt	dim	Pre-commit review preferred.
 contrib/llvm		dim	Pre-commit review preferred.
 contrib/llvm/tools/lldb	emaste	Pre-commit review preferred.
-atf			freebsd-testing,jmmv,ngie	Pre-commit review requested.
 contrib/netbsd-tests	freebsd-testing,ngie	Pre-commit review requested.
 contrib/pjdfstest	freebsd-testing,ngie,pjd	Pre-commit review requested.
+dev/usb/wlan	adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
+etc/mail	gshapiro	Pre-commit review requested.  Keep in sync with -STABLE.
+etc/sendmail	gshapiro	Pre-commit review requested.  Keep in sync with -STABLE.
+fetch		des	Pre-commit review requested.
+isci(4)		jimharris	Pre-commit review requested.
+iwm(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
+iwn(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
+kqueue		jmg	Pre-commit review requested.  Documentation Required.
+libfetch	des	Pre-commit review requested.
+libpam		des	Pre-commit review requested.
+linprocfs	des	Pre-commit review requested.
+lpr		gad	Pre-commit review requested, particularly for
+			lpd/recvjob.c and lpd/printjob.c.
+nanobsd		imp	Pre-commit phabricator review requested.
+net80211	adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
+nis(8), yp(8)	araujo	Pre-commit review requested.
+nvd(4)		jimharris	Pre-commit review requested.
+nvme(4)		jimharris	Pre-commit review requested.
+nvmecontrol(8)	jimharris	Pre-commit review requested.
+opencrypto	jmg	Pre-commit review requested.  Documentation Required.
+openssh		des	Pre-commit review requested.
+openssl		benl,jkim	Pre-commit review requested.
+otus(4)		adrian	Pre-commit review requested, send to freebsd-wireless at freebsd.org
+pmcstudy(8)	rrs		Pre-commit review requested.
+procfs		des	Pre-commit review requested.
+pseudofs	des	Pre-commit review requested.
+release/release.sh	gjb,re	Pre-commit review and regression tests
+				requested.
+sctp		rrs,tuexen	Pre-commit review requested (changes need to be backported to github).
+sendmail	gshapiro	Pre-commit review requested.
+sh(1)		jilles		Pre-commit review requested. This also applies
+				to kill(1), printf(1) and test(1) which are
+				compiled in as builtins.
+share/mk	imp, bapt, bdrewery, emaste, sjg	Make is hard.
 share/mk/*.test.mk	freebsd-testing,ngie (same list as share/mk too)	Pre-commit review requested.
-tests			freebsd-testing,ngie	Pre-commit review requested.
-sys/dev/usb	hselasky	If in doubt, ask.
-sys/dev/sound/usb	hselasky	If in doubt, ask.
 sys/compat/linuxkpi	hselasky	If in doubt, ask.
 sys/dev/e1000	erj	Pre-commit phabricator review requested.
 sys/dev/ixgbe	erj	Pre-commit phabricator review requested.
 sys/dev/ixl	erj	Pre-commit phabricator review requested.
+sys/dev/sound/usb	hselasky	If in doubt, ask.
+sys/dev/usb	hselasky	If in doubt, ask.
 sys/netinet/ip_carp.c	glebius	Pre-commit review recommended.
 sys/netpfil/pf	kp,glebius	Pre-commit review recommended.
-sctp		rrs,tuexen	Pre-commit review requested (changes need to be backported to github).
-pmcstudy(8)	rrs		Pre-commit review requested.
-callout_*(9)	rrs		Pre-commit review requested -- becareful its tricksy code :o.
+tests			freebsd-testing,ngie	Pre-commit review requested.
 usr.sbin/pkg	pkg@	Please coordinate behavior or flag changes with pkg team.
-lpr		gad	Pre-commit review requested, particularly for
-			lpd/recvjob.c and lpd/printjob.c.
-nis(8), yp(8)	araujo	Pre-commit review requested.
+vmm(4)		neel,grehan	Pre-commit review requested.
 ---- OLD ----
 libc/posix1e	rwatson	Pre-commit review requested.
 POSIX.1e ACLs	rwatson	Pre-commit review requested.
@@ -102,11 +107,6 @@ cd(4)		ken	Pre-commit review requested.
 pass(4)		ken	Pre-commit review requested.
 ch(4)		ken	Pre-commit review requested.
 em(4)		jfv	Pre-commit review requested.
-sendmail	gshapiro	Pre-commit review requested.
-etc/mail	gshapiro	Pre-commit review requested.
-				Keep in sync with -STABLE.
-etc/sendmail	gshapiro	Pre-commit review requested.
-				Keep in sync with -STABLE.
 nvi		peter	Try not to break it.
 libz		peter	Try not to break it.
 groff		ru	Recommends pre-commit review.
@@ -155,5 +155,4 @@ sbin/routed	bms	Pre-commit review; notif
 cmx		daniel at roe.ch	Pre-commit review preferred.
 filemon		obrien		Pre-commit review preferred.
 sysdoc		trhodes		Pre-commit review preferred.
-nanobsd		imp	Pre-commit review requested for coordination.
-vmm(4)		neel,grehan	Pre-commit review requested.
+

Modified: user/ngie/more-tests2/Makefile
==============================================================================
--- user/ngie/more-tests2/Makefile	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/Makefile	Mon Dec 14 00:12:53 2015	(r292178)
@@ -180,7 +180,7 @@ _MAKE=	PATH=${PATH} ${SUB_MAKE} -f Makef
 _TARGET_ARCH=	${TARGET:S/pc98/i386/:S/arm64/aarch64/}
 .elif !defined(TARGET) && defined(TARGET_ARCH) && \
     ${TARGET_ARCH} != ${MACHINE_ARCH}
-_TARGET=		${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/}
+_TARGET=		${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/}
 .endif
 .if defined(TARGET) && !defined(_TARGET)
 _TARGET=${TARGET}

Modified: user/ngie/more-tests2/Makefile.inc1
==============================================================================
--- user/ngie/more-tests2/Makefile.inc1	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/Makefile.inc1	Mon Dec 14 00:12:53 2015	(r292178)
@@ -172,7 +172,11 @@ VERSION=	FreeBSD ${REVISION}-${BRANCH:C/
 .export VERSION
 .endif
 
-KNOWN_ARCHES?=	aarch64/arm64 amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64
+KNOWN_ARCHES?=	aarch64/arm64 amd64 arm armeb/arm armv6/arm armv6hf/arm   \
+		i386 i386/pc98 mips mipsel/mips mips64el/mips mips64/mips \
+		mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc     \
+		riscv64/riscv sparc64
+
 .if ${TARGET} == ${TARGET_ARCH}
 _t=		${TARGET}
 .else

Modified: user/ngie/more-tests2/UPDATING
==============================================================================
--- user/ngie/more-tests2/UPDATING	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/UPDATING	Mon Dec 14 00:12:53 2015	(r292178)
@@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20151211:
+	The code to start recording plug and play data into the modules has
+	been committed. While the old tools will properly build a new kernel,
+	a number of warnings about "unknown metadata record 4" will be produced
+	for an older kldxref. To avoid such warnings, make sure to rebuild
+	the kernel toolchain (or world). Make sure that you have r292078 or
+	later when trying to build 292077 or later before rebuilding.
+
 20151207:
 	Debug data files are now built by default with 'make buildworld' and
 	installed with 'make installworld'. This facilitates debugging but

Modified: user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.1
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.1	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.1	Mon Dec 14 00:12:53 2015	(r292178)
@@ -22,9 +22,9 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $Id: addr2line.1 3195 2015-05-12 17:22:19Z emaste $
+.\" $Id: addr2line.1 3263 2015-11-30 04:25:54Z kaiwang27 $
 .\"
-.Dd July 25, 2010
+.Dd November 30, 2015
 .Os
 .Dt ADDR2LINE 1
 .Sh NAME
@@ -32,10 +32,13 @@
 .Nd translate program addresses to source file names and line numbers
 .Sh SYNOPSIS
 .Nm
+.Op Fl a | Fl -addresses
 .Op Fl b Ar target | Fl -target Ns = Ns Ar target
 .Op Fl e Ar pathname | Fl -exe Ns = Ns Ar pathname
 .Op Fl f | Fl -functions
+.Op Fl i | Fl -inlines
 .Op Fl j Ar sectionname | Fl -section Ns = Ns Ar sectionname
+.Op Fl p | Fl -pretty-print
 .Op Fl s | Fl -basename
 .Op Fl C | Fl -demangle
 .Op Fl H | Fl -help
@@ -69,6 +72,8 @@ The
 .Nm
 utility recognizes the following options:
 .Bl -tag -width indent
+.It Fl a | Fl -addresses
+Display the address prior to the line number information.
 .It Fl b Ar target | Fl -target Ns = Ns Ar target
 This option is recognized by
 .Nm
@@ -84,11 +89,17 @@ will use the file
 .Dq Pa a.out .
 .It Fl f | Fl -functions
 Display function names in addition to file and line number information.
+.It Fl i | Fl -inlines
+If the address specified belongs to an inlined function, also display the line
+number information for its caller, recursively until the first non-inlined
+caller.
 .It Fl j Ar sectionname | Fl -section Ns = Ns Ar sectionname
 The values specified by arguments
 .Ar hexaddress
 are to be treated as offsets into the section named
 .Ar sectionname .
+.It Fl p | -pretty-print
+Display the line number information on one line, in human readable manner.
 .It Fl s | -basename
 Display only the base name for each file name.
 .It Fl C | Fl -demangle
@@ -115,6 +126,18 @@ to program address
 .Ar hexaddress ,
 followed by a line with the file name and line number.
 .Pp
+If the
+.Fl p
+option was specified,
+.Nm
+will print line number information and function name on one line in
+human readable manner. If the
+.Fl i
+option was also specified,
+.Nm
+will print the caller function information prefixed with
+.Dq (inlined by) .
+.Pp
 The
 .Nm
 utility prints the file name and line number using the format

Modified: user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.c
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.c	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/addr2line/addr2line.c	Mon Dec 14 00:12:53 2015	(r292178)
@@ -37,33 +37,64 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "uthash.h"
 #include "_elftc.h"
 
-ELFTC_VCSID("$Id: addr2line.c 3249 2015-10-04 08:11:30Z kaiwang27 $");
+ELFTC_VCSID("$Id: addr2line.c 3264 2015-11-30 05:38:14Z kaiwang27 $");
+
+struct Func {
+	char *name;
+	Dwarf_Unsigned lopc;
+	Dwarf_Unsigned hipc;
+	Dwarf_Unsigned call_file;
+	Dwarf_Unsigned call_line;
+	Dwarf_Ranges *ranges;
+	Dwarf_Signed ranges_cnt;
+	struct Func *inlined_caller;
+	STAILQ_ENTRY(Func) next;
+};
+
+struct CU {
+	Dwarf_Off off;
+	Dwarf_Unsigned lopc;
+	Dwarf_Unsigned hipc;
+	char **srcfiles;
+	Dwarf_Signed nsrcfiles;
+	STAILQ_HEAD(, Func) funclist;
+	UT_hash_handle hh;
+};
 
 static struct option longopts[] = {
+	{"addresses", no_argument, NULL, 'a'},
 	{"target" , required_argument, NULL, 'b'},
 	{"demangle", no_argument, NULL, 'C'},
 	{"exe", required_argument, NULL, 'e'},
 	{"functions", no_argument, NULL, 'f'},
+	{"inlines", no_argument, NULL, 'i'},
 	{"section", required_argument, NULL, 'j'},
+	{"pretty-print", no_argument, NULL, 'p'},
 	{"basename", no_argument, NULL, 's'},
 	{"help", no_argument, NULL, 'H'},
 	{"version", no_argument, NULL, 'V'},
 	{NULL, 0, NULL, 0}
 };
-static int demangle, func, base;
+static int demangle, func, base, inlines, print_addr, pretty_print;
 static char unknown[] = { '?', '?', '\0' };
 static Dwarf_Addr section_base;
+static struct CU *culist;
 
 #define	USAGE_MESSAGE	"\
 Usage: %s [options] hexaddress...\n\
   Map program addresses to source file names and line numbers.\n\n\
   Options:\n\
+  -a      | --addresses       Display address prior to line number info.\n\
   -b TGT  | --target=TGT      (Accepted but ignored).\n\
   -e EXE  | --exe=EXE         Use program \"EXE\" to translate addresses.\n\
   -f      | --functions       Display function names.\n\
+  -i      | --inlines         Display caller info for inlined functions.\n\
   -j NAME | --section=NAME    Values are offsets into section \"NAME\".\n\
+  -p      | --pretty-print    Display line number info and function name\n\
+                              in human readable manner.\n\
   -s      | --basename        Only show the base name for each file name.\n\
   -C      | --demangle        Demangle C++ names.\n\
   -H      | --help            Print a help message.\n\
@@ -122,71 +153,160 @@ handle_high_pc(Dwarf_Die die, Dwarf_Unsi
 	return (DW_DLV_OK);
 }
 
+static struct Func *
+search_func(struct CU *cu, Dwarf_Unsigned addr)
+{
+	struct Func *f, *f0;
+	Dwarf_Unsigned lopc, hipc, addr_base;
+	int i;
+
+	f0 = NULL;
+
+	STAILQ_FOREACH(f, &cu->funclist, next) {
+		if (f->ranges != NULL) {
+			addr_base = 0;
+			for (i = 0; i < f->ranges_cnt; i++) {
+				if (f->ranges[i].dwr_type == DW_RANGES_END)
+					break;
+				if (f->ranges[i].dwr_type ==
+				    DW_RANGES_ADDRESS_SELECTION) {
+					addr_base = f->ranges[i].dwr_addr2;
+					continue;
+				}
+
+				/* DW_RANGES_ENTRY */
+				lopc = f->ranges[i].dwr_addr1 + addr_base;
+				hipc = f->ranges[i].dwr_addr2 + addr_base;
+				if (addr >= lopc && addr < hipc) {
+					if (f0 == NULL ||
+					    (lopc >= f0->lopc &&
+					    hipc <= f0->hipc)) {
+						f0 = f;
+						f0->lopc = lopc;
+						f0->hipc = hipc;
+						break;
+					}
+				}
+			}
+		} else if (addr >= f->lopc && addr < f->hipc) {
+			if (f0 == NULL ||
+			    (f->lopc >= f0->lopc && f->hipc <= f0->hipc))
+				f0 = f;
+		}
+	}
+
+	return (f0);
+}
+
 static void
-search_func(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Addr addr, char **rlt_func)
+collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu)
 {
-	Dwarf_Die ret_die, spec_die;
+	Dwarf_Die ret_die, abst_die, spec_die;
 	Dwarf_Error de;
 	Dwarf_Half tag;
-	Dwarf_Unsigned lopc, hipc;
+	Dwarf_Unsigned lopc, hipc, ranges_off;
+	Dwarf_Signed ranges_cnt;
 	Dwarf_Off ref;
-	Dwarf_Attribute sub_at, spec_at;
-	char *func0;
-	const char *func1;
-	int ret;
+	Dwarf_Attribute abst_at, spec_at;
+	Dwarf_Ranges *ranges;
+	const char *funcname;
+	struct Func *f;
+	int found_ranges, ret;
 
-	if (*rlt_func != NULL)
-		goto done;
+	f = NULL;
+	abst_die = spec_die = NULL;
 
 	if (dwarf_tag(die, &tag, &de)) {
 		warnx("dwarf_tag: %s", dwarf_errmsg(de));
 		goto cont_search;
 	}
-	if (tag == DW_TAG_subprogram) {
+	if (tag == DW_TAG_subprogram || tag == DW_TAG_entry_point ||
+	    tag == DW_TAG_inlined_subroutine) {
+		/*
+		 * Function address range can be specified by either
+		 * a DW_AT_ranges attribute which points to a range list or
+		 * by a pair of DW_AT_low_pc and DW_AT_high_pc attributes.
+		 */
+		ranges = NULL;
+		ranges_cnt = 0;
+		found_ranges = 0;
+		if (dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off,
+		    &de) == DW_DLV_OK &&
+		    dwarf_get_ranges(dbg, (Dwarf_Off) ranges_off, &ranges,
+		    &ranges_cnt, NULL, &de) == DW_DLV_OK) {
+			if (ranges != NULL && ranges_cnt > 0) {
+				found_ranges = 1;
+				goto get_func_name;
+			}
+		}
+
+		/*
+		 * Search for DW_AT_low_pc/DW_AT_high_pc if ranges pointer
+		 * not found.
+		 */
 		if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) ||
 		    dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de))
 			goto cont_search;
 		if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK)
 			goto cont_search;
-		if (addr < lopc || addr >= hipc)
-			goto cont_search;
 
-		/* Found it! */
+	get_func_name:
+		/*
+		 * Most common case the function name is stored in DW_AT_name
+		 * attribute.
+		 */
+		if (dwarf_attrval_string(die, DW_AT_name, &funcname, &de) ==
+		    DW_DLV_OK)
+			goto add_func;
 
-		if ((*rlt_func = strdup(unknown)) == NULL)
-			err(EXIT_FAILURE, "strdup");
-		ret = dwarf_attr(die, DW_AT_name, &sub_at, &de);
-		if (ret == DW_DLV_ERROR)
-			goto done;
-		if (ret == DW_DLV_OK) {
-			if (dwarf_formstring(sub_at, &func0, &de) ==
-			    DW_DLV_OK) {
-				free(*rlt_func);
-				if ((*rlt_func = strdup(func0)) == NULL)
-					err(EXIT_FAILURE, "strdup");
-			}
-			goto done;
-		}
+		/*
+		 * For inlined function, the actual name is probably in the DIE
+		 * referenced by DW_AT_abstract_origin. (if present)
+		 */
+		if (dwarf_attr(die, DW_AT_abstract_origin, &abst_at, &de) ==
+		    DW_DLV_OK &&
+		    dwarf_global_formref(abst_at, &ref, &de) == DW_DLV_OK &&
+		    dwarf_offdie(dbg, ref, &abst_die, &de) == DW_DLV_OK &&
+		    dwarf_attrval_string(abst_die, DW_AT_name, &funcname,
+		    &de) == DW_DLV_OK)
+			goto add_func;
 
 		/*
 		 * If DW_AT_name is not present, but DW_AT_specification is
 		 * present, then probably the actual name is in the DIE
 		 * referenced by DW_AT_specification.
 		 */
-		if (dwarf_attr(die, DW_AT_specification, &spec_at, &de))
-			goto done;
-		if (dwarf_global_formref(spec_at, &ref, &de))
-			goto done;
-		if (dwarf_offdie(dbg, ref, &spec_die, &de))
-			goto done;
-		if (dwarf_attrval_string(spec_die, DW_AT_name, &func1, &de) ==
-		    DW_DLV_OK) {
-			free(*rlt_func);
-			if ((*rlt_func = strdup(func1)) == NULL)
-			    err(EXIT_FAILURE, "strdup");
-		}
+		if (dwarf_attr(die, DW_AT_specification, &spec_at, &de) ==
+		    DW_DLV_OK &&
+		    dwarf_global_formref(spec_at, &ref, &de) == DW_DLV_OK &&
+		    dwarf_offdie(dbg, ref, &spec_die, &de) == DW_DLV_OK &&
+		    dwarf_attrval_string(spec_die, DW_AT_name, &funcname,
+		    &de) == DW_DLV_OK)
+			goto add_func;
 
-		goto done;
+		/* Skip if no name assoicated with this DIE. */
+		goto cont_search;
+
+	add_func:
+		if ((f = calloc(1, sizeof(*f))) == NULL)
+			err(EXIT_FAILURE, "calloc");
+		if ((f->name = strdup(funcname)) == NULL)
+			err(EXIT_FAILURE, "strdup");
+		if (found_ranges) {
+			f->ranges = ranges;
+			f->ranges_cnt = ranges_cnt;
+		} else {
+			f->lopc = lopc;
+			f->hipc = hipc;
+		}
+		if (tag == DW_TAG_inlined_subroutine) {
+			f->inlined_caller = parent;
+			dwarf_attrval_unsigned(die, DW_AT_call_file,
+			    &f->call_file, &de);
+			dwarf_attrval_unsigned(die, DW_AT_call_line,
+			    &f->call_line, &de);
+		}
+		STAILQ_INSERT_TAIL(&cu->funclist, f, next);
 	}
 
 cont_search:
@@ -194,23 +314,69 @@ cont_search:
 	/* Search children. */
 	ret = dwarf_child(die, &ret_die, &de);
 	if (ret == DW_DLV_ERROR)
-		errx(EXIT_FAILURE, "dwarf_child: %s", dwarf_errmsg(de));
-	else if (ret == DW_DLV_OK)
-		search_func(dbg, ret_die, addr, rlt_func);
+		warnx("dwarf_child: %s", dwarf_errmsg(de));
+	else if (ret == DW_DLV_OK) {
+		if (f != NULL)
+			collect_func(dbg, ret_die, f, cu);
+		else
+			collect_func(dbg, ret_die, parent, cu);
+	}
 
 	/* Search sibling. */
 	ret = dwarf_siblingof(dbg, die, &ret_die, &de);
 	if (ret == DW_DLV_ERROR)
-		errx(EXIT_FAILURE, "dwarf_siblingof: %s", dwarf_errmsg(de));
+		warnx("dwarf_siblingof: %s", dwarf_errmsg(de));
 	else if (ret == DW_DLV_OK)
-		search_func(dbg, ret_die, addr, rlt_func);
+		collect_func(dbg, ret_die, parent, cu);
 
-done:
+	/* Cleanup */
 	dwarf_dealloc(dbg, die, DW_DLA_DIE);
+
+	if (abst_die != NULL)
+		dwarf_dealloc(dbg, abst_die, DW_DLA_DIE);
+
+	if (spec_die != NULL)
+		dwarf_dealloc(dbg, spec_die, DW_DLA_DIE);
+}
+
+static void
+print_inlines(struct CU *cu, struct Func *f, Dwarf_Unsigned call_file,
+    Dwarf_Unsigned call_line)
+{
+	char demangled[1024];
+	char *file;
+
+	if (call_file > 0 && (Dwarf_Signed) call_file <= cu->nsrcfiles)
+		file = cu->srcfiles[call_file - 1];
+	else
+		file = unknown;
+
+	if (pretty_print)
+		printf(" (inlined by) ");
+
+	if (func) {
+		if (demangle && !elftc_demangle(f->name, demangled,
+		    sizeof(demangled), 0)) {
+			if (pretty_print)
+				printf("%s at ", demangled);
+			else
+				printf("%s\n", demangled);
+		} else {
+			if (pretty_print)
+				printf("%s at ", f->name);
+			else
+				printf("%s\n", f->name);
+		}
+	}
+	(void) printf("%s:%ju\n", base ? basename(file) : file, call_line);
+
+	if (f->inlined_caller != NULL)
+		print_inlines(cu, f->inlined_caller, f->call_file,
+		    f->call_line);
 }
 
 static void
-translate(Dwarf_Debug dbg, const char* addrstr)
+translate(Dwarf_Debug dbg, Elf *e, const char* addrstr)
 {
 	Dwarf_Die die, ret_die;
 	Dwarf_Line *lbuf;
@@ -219,18 +385,20 @@ translate(Dwarf_Debug dbg, const char* a
 	Dwarf_Unsigned lopc, hipc, addr, lineno, plineno;
 	Dwarf_Signed lcount;
 	Dwarf_Addr lineaddr, plineaddr;
-	char *funcname;
+	Dwarf_Off off;
+	struct CU *cu;
+	struct Func *f;
+	const char *funcname;
 	char *file, *file0, *pfile;
 	char demangled[1024];
-	int i, ret;
+	int ec, i, ret;
 
 	addr = strtoull(addrstr, NULL, 16);
 	addr += section_base;
 	lineno = 0;
 	file = unknown;
+	cu = NULL;
 	die = NULL;
-	lbuf = NULL;
-	lcount = 0;
 
 	while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL,
 	    &de)) ==  DW_DLV_OK) {
@@ -253,59 +421,46 @@ translate(Dwarf_Debug dbg, const char* a
 			warnx("could not find DW_TAG_compile_unit die");
 			goto next_cu;
 		}
-		if (!dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) &&
-		    !dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de)) {
+		if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) ==
+		    DW_DLV_OK) {
+			if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc,
+			   &de) == DW_DLV_OK) {
+				/*
+				 * Check if the address falls into the PC
+				 * range of this CU.
+				 */
+				if (handle_high_pc(die, lopc, &hipc) !=
+				    DW_DLV_OK)
+					goto out;
+			} else {
+				/* Assume ~0ULL if DW_AT_high_pc not present */
+				hipc = ~0ULL;
+			}
+
 			/*
-			 * Check if the address falls into the PC range of
-			 * this CU.
+			 * Record the CU in the hash table for faster lookup
+			 * later.
 			 */
-			if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK)
-				goto next_cu;
-			if (addr < lopc || addr >= hipc)
-				goto next_cu;
-		}
-
-		switch (dwarf_srclines(die, &lbuf, &lcount, &de)) {
-		case DW_DLV_OK:
-			break;
-		case DW_DLV_NO_ENTRY:
-			/* If a CU lacks debug info, just skip it. */
-			goto next_cu;
-		default:
-			warnx("dwarf_srclines: %s", dwarf_errmsg(de));
-			goto out;
-		}
-
-		plineaddr = ~0ULL;
-		plineno = 0;
-		pfile = unknown;
-		for (i = 0; i < lcount; i++) {
-			if (dwarf_lineaddr(lbuf[i], &lineaddr, &de)) {
-				warnx("dwarf_lineaddr: %s",
-				    dwarf_errmsg(de));
-				goto out;
-			}
-			if (dwarf_lineno(lbuf[i], &lineno, &de)) {
-				warnx("dwarf_lineno: %s",
+			if (dwarf_dieoffset(die, &off, &de) != DW_DLV_OK) {
+				warnx("dwarf_dieoffset failed: %s",
 				    dwarf_errmsg(de));
 				goto out;
 			}
-			if (dwarf_linesrc(lbuf[i], &file0, &de)) {
-				warnx("dwarf_linesrc: %s",
-				    dwarf_errmsg(de));
-			} else
-				file = file0;
-			if (addr == lineaddr)
-				goto out;
-			else if (addr < lineaddr && addr > plineaddr) {
-				lineno = plineno;
-				file = pfile;
-				goto out;
+			HASH_FIND(hh, culist, &off, sizeof(off), cu);
+			if (cu == NULL) {
+				if ((cu = calloc(1, sizeof(*cu))) == NULL)
+					err(EXIT_FAILURE, "calloc");
+				cu->off = off;
+				cu->lopc = lopc;
+				cu->hipc = hipc;
+				STAILQ_INIT(&cu->funclist);
+				HASH_ADD(hh, culist, off, sizeof(off), cu);
 			}
-			plineaddr = lineaddr;
-			plineno = lineno;
-			pfile = file;
+
+			if (addr >= lopc && addr < hipc)
+				break;
 		}
+
 	next_cu:
 		if (die != NULL) {
 			dwarf_dealloc(dbg, die, DW_DLA_DIE);
@@ -313,27 +468,107 @@ translate(Dwarf_Debug dbg, const char* a
 		}
 	}
 
+	if (ret != DW_DLV_OK || die == NULL)
+		goto out;
+
+	switch (dwarf_srclines(die, &lbuf, &lcount, &de)) {
+	case DW_DLV_OK:
+		break;
+	case DW_DLV_NO_ENTRY:
+		/* If a CU lacks debug info, just skip it. */
+		goto out;
+	default:
+		warnx("dwarf_srclines: %s", dwarf_errmsg(de));
+		goto out;
+	}
+
+	plineaddr = ~0ULL;
+	plineno = 0;
+	pfile = unknown;
+	for (i = 0; i < lcount; i++) {
+		if (dwarf_lineaddr(lbuf[i], &lineaddr, &de)) {
+			warnx("dwarf_lineaddr: %s", dwarf_errmsg(de));
+			goto out;
+		}
+		if (dwarf_lineno(lbuf[i], &lineno, &de)) {
+			warnx("dwarf_lineno: %s", dwarf_errmsg(de));
+			goto out;
+		}
+		if (dwarf_linesrc(lbuf[i], &file0, &de)) {
+			warnx("dwarf_linesrc: %s", dwarf_errmsg(de));
+		} else
+			file = file0;
+		if (addr == lineaddr)
+			goto out;
+		else if (addr < lineaddr && addr > plineaddr) {
+			lineno = plineno;
+			file = pfile;
+			goto out;
+		}
+		plineaddr = lineaddr;
+		plineno = lineno;
+		pfile = file;
+	}
+
 out:
+	f = NULL;
 	funcname = NULL;
-	if (ret == DW_DLV_OK && func) {
-		search_func(dbg, die, addr, &funcname);
-		die = NULL;
+	if (ret == DW_DLV_OK && (func || inlines) && cu != NULL) {
+		if (cu->srcfiles == NULL)
+			if (dwarf_srcfiles(die, &cu->srcfiles, &cu->nsrcfiles,
+			    &de))
+				warnx("dwarf_srcfiles: %s", dwarf_errmsg(de));
+		if (STAILQ_EMPTY(&cu->funclist)) {
+			collect_func(dbg, die, NULL, cu);
+			die = NULL;
+		}
+		f = search_func(cu, addr);
+		if (f != NULL)
+			funcname = f->name;
+	}
+
+	if (print_addr) {
+		if ((ec = gelf_getclass(e)) == ELFCLASSNONE) {
+			warnx("gelf_getclass failed: %s", elf_errmsg(-1));
+			ec = ELFCLASS64;
+		}
+		if (ec == ELFCLASS32) {
+			if (pretty_print)
+				printf("0x%08jx: ", (uintmax_t) addr);
+			else
+				printf("0x%08jx\n", (uintmax_t) addr);
+		} else {
+			if (pretty_print)
+				printf("0x%016jx: ", (uintmax_t) addr);
+			else
+				printf("0x%016jx\n", (uintmax_t) addr);
+		}
 	}
 
 	if (func) {
 		if (funcname == NULL)
-			if ((funcname = strdup(unknown)) == NULL)
-				err(EXIT_FAILURE, "strdup");
-		if (demangle &&
-		    !elftc_demangle(funcname, demangled, sizeof(demangled), 0))
-			printf("%s\n", demangled);
-		else
-			printf("%s\n", funcname);
-		free(funcname);
+			funcname = unknown;
+		if (demangle && !elftc_demangle(funcname, demangled,
+		    sizeof(demangled), 0)) {
+			if (pretty_print)
+				printf("%s at ", demangled);
+			else
+				printf("%s\n", demangled);
+		} else {
+			if (pretty_print)
+				printf("%s at ", funcname);
+			else
+				printf("%s\n", funcname);
+		}
 	}
 
 	(void) printf("%s:%ju\n", base ? basename(file) : file, lineno);
 
+	if (ret == DW_DLV_OK && inlines && cu != NULL &&
+	    cu->srcfiles != NULL && f != NULL && f->inlined_caller != NULL)
+		print_inlines(cu, f->inlined_caller, f->call_file,
+		    f->call_line);
+
 	if (die != NULL)
 		dwarf_dealloc(dbg, die, DW_DLA_DIE);
 
@@ -421,9 +656,12 @@ main(int argc, char **argv)
 
 	exe = NULL;
 	section = NULL;
-	while ((opt = getopt_long(argc, argv, "b:Ce:fj:sHV", longopts, NULL)) !=
-	    -1) {
+	while ((opt = getopt_long(argc, argv, "ab:Ce:fij:psHV", longopts,
+	    NULL)) != -1) {
 		switch (opt) {
+		case 'a':
+			print_addr = 1;
+			break;
 		case 'b':
 			/* ignored */
 			break;
@@ -436,9 +674,15 @@ main(int argc, char **argv)
 		case 'f':
 			func = 1;
 			break;
+		case 'i':
+			inlines = 1;
+			break;
 		case 'j':
 			section = optarg;
 			break;
+		case 'p':
+			pretty_print = 1;
+			break;
 		case 's':
 			base = 1;
 			break;
@@ -473,10 +717,10 @@ main(int argc, char **argv)
 
 	if (argc > 0)
 		for (i = 0; i < argc; i++)
-			translate(dbg, argv[i]);
+			translate(dbg, e, argv[i]);
 	else
 		while (fgets(line, sizeof(line), stdin) != NULL) {
-			translate(dbg, line);
+			translate(dbg, e, line);
 			fflush(stdout);
 		}
 

Modified: user/ngie/more-tests2/contrib/elftoolchain/common/elfdefinitions.h
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/common/elfdefinitions.h	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/common/elfdefinitions.h	Mon Dec 14 00:12:53 2015	(r292178)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: elfdefinitions.h 3247 2015-09-22 16:57:51Z emaste $
+ * $Id: elfdefinitions.h 3253 2015-10-10 18:31:33Z kaiwang27 $
  */
 
 /*

Modified: user/ngie/more-tests2/contrib/elftoolchain/elfcopy/binary.c
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/elfcopy/binary.c	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/elfcopy/binary.c	Mon Dec 14 00:12:53 2015	(r292178)
@@ -35,17 +35,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: binary.c 3174 2015-03-27 17:13:41Z emaste $");
-
-static int
-basename_length(const char *filename)
-{
-	char *p;
-
-	if ((p = strchr(filename, '.')) != NULL)
-		return (p - filename);
-	return (strlen(filename));
-}
+ELFTC_VCSID("$Id: binary.c 3270 2015-12-11 18:48:56Z emaste $");
 
 /*
  * Convert ELF object to `binary'. Sections with SHF_ALLOC flag set
@@ -150,6 +140,7 @@ create_elf_from_binary(struct elfcopy *e
 	GElf_Shdr sh;
 	void *content;
 	uint64_t off, data_start, data_end, data_size;
+	char *sym_basename, *p;
 
 	/* Reset internal section list. */
 	if (!TAILQ_EMPTY(&ecp->v_sec))
@@ -220,9 +211,13 @@ create_elf_from_binary(struct elfcopy *e
 	/* Count in .symtab and .strtab section headers.  */
 	shtab->sz += gelf_fsize(ecp->eout, ELF_T_SHDR, 2, EV_CURRENT);
 
+	if ((sym_basename = strdup(ifn)) == NULL)
+		err(1, "strdup");
+	p = sym_basename;
+	while ((p = strchr(p, '.')) != NULL)
+		*p++ = '_';
 #define	_GEN_SYMNAME(S) do {						\
-	snprintf(name, sizeof(name), "%s%.*s%s", "_binary_",		\
-	    basename_length(ifn), ifn, S);				\
+	snprintf(name, sizeof(name), "%s%s%s", "_binary_", sym_basename, S); \
 } while (0)
 
 	/*
@@ -244,6 +239,7 @@ create_elf_from_binary(struct elfcopy *e
 	finalize_external_symtab(ecp);
 	create_symtab_data(ecp);
 #undef	_GEN_SYMNAME
+	free(sym_basename);
 
 	/*
 	 * Write the underlying ehdr. Note that it should be called

Modified: user/ngie/more-tests2/contrib/elftoolchain/elfcopy/elfcopy.1
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/elfcopy/elfcopy.1	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/elfcopy/elfcopy.1	Mon Dec 14 00:12:53 2015	(r292178)
@@ -21,9 +21,9 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elfcopy.1 3195 2015-05-12 17:22:19Z emaste $
+.\" $Id: elfcopy.1 3266 2015-12-07 15:38:26Z emaste $
 .\"
-.Dd March 27, 2015
+.Dd December 7, 2015
 .Os
 .Dt ELFCOPY 1
 .Sh NAME
@@ -47,6 +47,7 @@
 .Op Fl p | Fl -preserve-dates
 .Op Fl w | Fl -wildcard
 .Op Fl x | Fl -discard-all
+.Op Fl -add-gnu-debuglink Ns = Ns Ar filename
 .Op Fl -add-section Ar sectionname Ns = Ns Ar filename
 .Oo
 .Fl -adjust-section-vma Ar section Ns {+|-|=} Ns Ar val |
@@ -165,6 +166,10 @@ Mark the end of a character class.
 .El
 .It Fl x | Fl -discard-all
 Do not copy non-global symbols to the output.
+.It Fl -add-gnu-debuglink Ns = Ns Ar filename
+Create a .gnu_debuglink section in the output file that references the
+debug data in
+.Ar filename .
 .It Fl -add-section Ar sectionname Ns = Ns Ar filename
 Add a new section to the output file with name
 .Ar sectionname .

Modified: user/ngie/more-tests2/contrib/elftoolchain/elfcopy/main.c
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/elfcopy/main.c	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/elfcopy/main.c	Mon Dec 14 00:12:53 2015	(r292178)
@@ -39,7 +39,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: main.c 3216 2015-05-23 21:16:36Z kaiwang27 $");
+ELFTC_VCSID("$Id: main.c 3268 2015-12-07 20:30:55Z emaste $");
 
 enum options
 {
@@ -1375,11 +1375,13 @@ Usage: %s [options] infile [outfile]\n\
   -w | --wildcard              Use shell-style patterns to name symbols.\n\
   -x | --discard-all           Do not copy non-globals to the output.\n\
   -I FORMAT | --input-target=FORMAT\n\
-                               (Accepted but ignored).\n\
+                               Specify object format for the input file.\n\
   -K SYM | --keep-symbol=SYM   Copy symbol SYM to the output.\n\
   -L SYM | --localize-symbol=SYM\n\
                                Make symbol SYM local to the output file.\n\
   -N SYM | --strip-symbol=SYM  Do not copy symbol SYM to the output.\n\
+  -O FORMAT | --output-target=FORMAT\n\
+                               Specify object format for the output file.\n\
   -R NAME | --remove-section=NAME\n\
                                Remove the named section.\n\
   -S | --strip-all             Remove all symbol and relocation information\n\

Modified: user/ngie/more-tests2/contrib/elftoolchain/elfcopy/sections.c
==============================================================================
--- user/ngie/more-tests2/contrib/elftoolchain/elfcopy/sections.c	Sun Dec 13 22:11:37 2015	(r292177)
+++ user/ngie/more-tests2/contrib/elftoolchain/elfcopy/sections.c	Mon Dec 14 00:12:53 2015	(r292178)
@@ -34,7 +34,7 @@
 
 #include "elfcopy.h"
 
-ELFTC_VCSID("$Id: sections.c 3225 2015-06-06 02:35:23Z kaiwang27 $");
+ELFTC_VCSID("$Id: sections.c 3272 2015-12-11 20:00:54Z kaiwang27 $");
 
 static void	add_gnu_debuglink(struct elfcopy *ecp);
 static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc);
@@ -457,11 +457,17 @@ create_scn(struct elfcopy *ecp)
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list