* [PATCH] nm: Handle/Skip /SYM64/ index entries.
@ 2014-12-26 15:22 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-12-26 15:22 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]
Add a testcase to show eu-nm now handles archives with 64-bit symbol table.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
src/ChangeLog | 4 ++++
src/nm.c | 3 ++-
tests/ChangeLog | 4 ++++
tests/run-test-archive64.sh | 14 +++++++++++++-
4 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 18a038d..9da2853 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2014-12-26 Mark Wielaard <mjw@redhat.com>
+ * nm.c (handle_ar): Skip over /SYM64/ entries.
+
+2014-12-26 Mark Wielaard <mjw@redhat.com>
+
* nm.c (handle_ar): Break on arsym with invalid offset.
2014-12-20 Mark Wielaard <mjw@redhat.com>
diff --git a/src/nm.c b/src/nm.c
index 6a9f8e1..be91459 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -493,7 +493,8 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
/* Skip over the index entries. */
if (strcmp (arhdr->ar_name, "/") != 0
- && strcmp (arhdr->ar_name, "//") != 0)
+ && strcmp (arhdr->ar_name, "//") != 0
+ && strcmp (arhdr->ar_name, "/SYM64/") != 0)
{
if (elf_kind (subelf) == ELF_K_ELF)
result |= handle_elf (subelf, new_prefix, arhdr->ar_name,
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 59048f6..6dd553b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-26 Mark Wielaard <mjw@redhat.com>
+
+ * run-test-archive64.sh: Add nm test.
+
2014-12-19 Mark Wielaard <mjw@redhat.com>
* run-deleted.sh: Don't check libfunc on ppc64.
diff --git a/tests/run-test-archive64.sh b/tests/run-test-archive64.sh
index 43df16e..2d8c21d 100755
--- a/tests/run-test-archive64.sh
+++ b/tests/run-test-archive64.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2012 Red Hat, Inc.
+# Copyright (C) 2012, 2014 Red Hat, Inc.
# This file is part of elfutils.
#
# This file is free software; you can redistribute it and/or modify
@@ -40,4 +40,16 @@ Archive member 'ccc.o' contains:
ccc3
EOF
+testrun_compare ${abs_top_builddir}/src/nm -P -g testarchive64.a <<\EOF
+testarchive64.a[aaa.o]:
+aaa T 0000000000000000 0000000000000016
+testarchive64.a[bbb.o]:
+bbb T 0000000000000000 0000000000000016
+bbb2 T 0000000000000018 0000000000000016
+testarchive64.a[ccc.o]:
+ccc T 0000000000000000 0000000000000016
+ccc2 T 0000000000000018 0000000000000016
+ccc3 T 0000000000000030 0000000000000016
+EOF
+
exit 0
--
2.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nm: Handle/Skip /SYM64/ index entries.
@ 2015-01-12 21:07 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2015-01-12 21:07 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
On Fri, 2014-12-26 at 16:22 +0100, Mark Wielaard wrote:
> Add a testcase to show eu-nm now handles archives with 64-bit symbol table.
I pushed this to master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-12 21:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-26 15:22 [PATCH] nm: Handle/Skip /SYM64/ index entries Mark Wielaard
2015-01-12 21:07 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).