aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2008-11-13 10:57:00 +0000
committerHans-Peter Nilsson <hp@axis.com>2008-11-13 10:57:00 +0000
commitede76260a7201121e1dbed3a14e280bd3aa8c459 (patch)
tree97900b924c7bea761141dd01840cc94a51aaf12d /binutils
parentc31ad2a1f76386595425b589e2639efe25fda21d (diff)
downloadgdb-ede76260a7201121e1dbed3a14e280bd3aa8c459.zip
gdb-ede76260a7201121e1dbed3a14e280bd3aa8c459.tar.gz
gdb-ede76260a7201121e1dbed3a14e280bd3aa8c459.tar.bz2
* nm.c (filter_symbols): Only call memcpy when from != to.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/nm.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 587a60d..414fa46 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-13 Hans-Peter Nilsson <hp@axis.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * nm.c (filter_symbols): Only call memcpy when from != to.
+
2008-11-10 Tristan Gingold <gingold@adacore.com>
Alan Modra <amodra@bigpond.net.au>
diff --git a/binutils/nm.c b/binutils/nm.c
index 1dbf47e..e11568a 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -449,7 +449,8 @@ filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
if (keep)
{
- memcpy (to, from, size);
+ if (to != from)
+ memcpy (to, from, size);
to += size;
}
}