aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2016-02-12 18:18:49 +0000
committerEd Maste <emaste@FreeBSD.org>2016-02-12 18:18:49 +0000
commit7c9f2b63d3a1c147cf1bd709b562d6273908d5b6 (patch)
tree4faefe7161f44f1e96042cb888296d788a036e3d
parent888a18208d70e0395f1ba2a425a272996246174e (diff)
downloadsrc-7c9f2b63d3a1c147cf1bd709b562d6273908d5b6.tar.gz
src-7c9f2b63d3a1c147cf1bd709b562d6273908d5b6.zip
Import ELF Tool Chain snapshot revision 3399vendor/elftoolchain/elftoolchain-r3399
Notes
Notes: svn path=/vendor/elftoolchain/dist/; revision=295569 svn path=/vendor/elftoolchain/elftoolchain-r3399/; revision=295570; tag=vendor/elftoolchain/elftoolchain-r3399
-rw-r--r--elfcopy/main.c4
-rw-r--r--elfcopy/segments.c4
-rw-r--r--libelf/_libelf_config.h8
3 files changed, 12 insertions, 4 deletions
diff --git a/elfcopy/main.c b/elfcopy/main.c
index 205466976a26..b51ba4e3ac38 100644
--- a/elfcopy/main.c
+++ b/elfcopy/main.c
@@ -39,7 +39,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: main.c 3381 2016-01-30 19:39:47Z jkoshy $");
+ELFTC_VCSID("$Id: main.c 3399 2016-02-12 18:07:56Z emaste $");
enum options
{
@@ -316,6 +316,7 @@ create_elf(struct elfcopy *ecp)
oeh.e_entry = ieh.e_entry;
oeh.e_version = ieh.e_version;
+ ecp->flags &= ~(EXECUTABLE | DYNAMIC | RELOCATABLE);
if (ieh.e_type == ET_EXEC)
ecp->flags |= EXECUTABLE;
else if (ieh.e_type == ET_DYN)
@@ -1485,6 +1486,7 @@ Usage: %s [options] file...\n\
Options:\n\
-d | -g | -S | --strip-debug Remove debugging symbols.\n\
-h | --help Print a help message.\n\
+ -o FILE | --output-file FILE Write output to FILE.\n\
--only-keep-debug Keep debugging information only.\n\
-p | --preserve-dates Preserve access and modification times.\n\
-s | --strip-all Remove all symbols.\n\
diff --git a/elfcopy/segments.c b/elfcopy/segments.c
index c003c1343e3c..8ce0b83abe80 100644
--- a/elfcopy/segments.c
+++ b/elfcopy/segments.c
@@ -34,7 +34,7 @@
#include "elfcopy.h"
-ELFTC_VCSID("$Id: segments.c 3340 2016-01-17 15:00:56Z kaiwang27 $");
+ELFTC_VCSID("$Id: segments.c 3397 2016-02-12 14:35:19Z emaste $");
static void insert_to_inseg_list(struct segment *seg, struct section *sec);
@@ -489,7 +489,7 @@ copy_phdr(struct elfcopy *ecp)
ophdr.p_filesz = seg->fsz;
ophdr.p_memsz = seg->msz;
if (!gelf_update_phdr(ecp->eout, i, &ophdr))
- err(EXIT_FAILURE, "gelf_update_phdr failed :%s",
+ errx(EXIT_FAILURE, "gelf_update_phdr failed: %s",
elf_errmsg(-1));
i++;
diff --git a/libelf/_libelf_config.h b/libelf/_libelf_config.h
index 1b8f35b2242d..92e0b0ae781d 100644
--- a/libelf/_libelf_config.h
+++ b/libelf/_libelf_config.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: _libelf_config.h 3168 2015-02-24 19:17:47Z emaste $
+ * $Id: _libelf_config.h 3396 2016-02-10 21:50:05Z emaste $
*/
#if defined(__APPLE__) || defined(__DragonFly__)
@@ -97,6 +97,12 @@
#define LIBELF_BYTEORDER ELFDATA2MSB
#define LIBELF_CLASS ELFCLASS32
+#elif defined(__riscv64)
+
+#define LIBELF_ARCH EM_RISCV
+#define LIBELF_BYTEORDER ELFDATA2LSB
+#define LIBELF_CLASS ELFCLASS64
+
#elif defined(__sparc__)
#define LIBELF_ARCH EM_SPARCV9