summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <[email protected]>2015-05-04 02:25:40 +0300
committerMark Wielaard <[email protected]>2015-05-04 16:05:04 +0200
commitb88bece422ec249215f3ab5e848c4991bef68c40 (patch)
treee9484c1a78ab74227f37f682c6035f2bc39f94dd
parent1ab3c2befeedf5bd891cfbe17cfef79c06e5079a (diff)
Drop mtrace calls.
mtrace is a GNU extension not supported by uClibc and it's believed to not be really used. Drop mtrace() calls and #include <mcheck.h>. Signed-off-by: Max Filippov <[email protected]>
-rw-r--r--src/ChangeLog12
-rw-r--r--src/addr2line.c4
-rw-r--r--src/ar.c4
-rw-r--r--src/ld.c6
-rw-r--r--src/nm.c4
-rw-r--r--src/objdump.c4
-rw-r--r--src/ranlib.c4
-rw-r--r--src/size.c4
-rw-r--r--src/strip.c4
-rw-r--r--src/unstrip.c4
10 files changed, 12 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0aa85eee..957eeb36 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
+2015-05-04 Max Filippov <[email protected]>
+
+ * addr2line.c (main): Drop mtrace() call and #include <mcheck.h>.
+ * ar.c: Likewise.
+ * ld.c: Likewise.
+ * nm.c: Likewise.
+ * objdump.c: Likewise.
+ * ranlib.c: Likewise.
+ * size.c: Likewise.
+ * strip.c: Likewise.
+ * unstrip.c: Likewise.
+
2015-05-04 Anthony G. Basile <[email protected]>
* Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
diff --git a/src/addr2line.c b/src/addr2line.c
index de802941..281a91e1 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -30,7 +30,6 @@
#include <dwarf.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdio_ext.h>
@@ -131,9 +130,6 @@ main (int argc, char *argv[])
int remaining;
int result = 0;
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
(void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/ar.c b/src/ar.c
index f51f0efd..caed7f3f 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -28,7 +28,6 @@
#include <libintl.h>
#include <limits.h>
#include <locale.h>
-#include <mcheck.h>
#include <search.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -141,9 +140,6 @@ static enum { ipos_none, ipos_before, ipos_after } ipos;
int
main (int argc, char *argv[])
{
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
(void) __fsetlocking (stdin, FSETLOCKING_BYCALLER);
(void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/ld.c b/src/ld.c
index 73e4f04f..6e96ae26 100644
--- a/src/ld.c
+++ b/src/ld.c
@@ -26,7 +26,6 @@
#include <libelf.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <stdio.h>
#include <stdio_ext.h>
#include <stdlib.h>
@@ -277,11 +276,6 @@ main (int argc, char *argv[])
int remaining;
int err;
-#ifndef NDEBUG
- /* Enable memory debugging. */
- mtrace ();
-#endif
-
/* Sanity check. We always want to use the LFS functionality. */
if (sizeof (off_t) != sizeof (off64_t))
abort ();
diff --git a/src/nm.c b/src/nm.c
index 67fb4c29..b6a1e6eb 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -33,7 +33,6 @@
#include <libdw.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <obstack.h>
#include <search.h>
#include <stdbool.h>
@@ -217,9 +216,6 @@ main (int argc, char *argv[])
int remaining;
int result = 0;
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
(void) __fsetlocking (stdin, FSETLOCKING_BYCALLER);
(void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/objdump.c b/src/objdump.c
index b689024b..0aa41e89 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -26,7 +26,6 @@
#include <inttypes.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdio_ext.h>
@@ -131,9 +130,6 @@ static bool print_disasm;
int
main (int argc, char *argv[])
{
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
(void) __fsetlocking (stdin, FSETLOCKING_BYCALLER);
(void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/ranlib.c b/src/ranlib.c
index 8435fc1b..c93c5ac8 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -29,7 +29,6 @@
#include <gelf.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <obstack.h>
#include <stdlib.h>
#include <stdio.h>
@@ -78,9 +77,6 @@ static const struct argp argp =
int
main (int argc, char *argv[])
{
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
(void) __fsetlocking (stdin, FSETLOCKING_BYCALLER);
(void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/size.c b/src/size.c
index 0ec1139b..7c03ccef 100644
--- a/src/size.c
+++ b/src/size.c
@@ -28,7 +28,6 @@
#include <libelf.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdio_ext.h>
@@ -160,9 +159,6 @@ main (int argc, char *argv[])
int remaining;
int result = 0;
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
__fsetlocking (stdin, FSETLOCKING_BYCALLER);
__fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/strip.c b/src/strip.c
index c003647a..e81001eb 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -30,7 +30,6 @@
#include <libelf.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdio_ext.h>
@@ -155,9 +154,6 @@ main (int argc, char *argv[])
int remaining;
int result = 0;
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
__fsetlocking (stdin, FSETLOCKING_BYCALLER);
__fsetlocking (stdout, FSETLOCKING_BYCALLER);
diff --git a/src/unstrip.c b/src/unstrip.c
index 989ac5ff..4a8e5fa9 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -36,7 +36,6 @@
#include <fnmatch.h>
#include <libintl.h>
#include <locale.h>
-#include <mcheck.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdio_ext.h>
@@ -2252,9 +2251,6 @@ handle_implicit_modules (const struct arg_info *info)
int
main (int argc, char **argv)
{
- /* Make memory leak detection possible. */
- mtrace ();
-
/* We use no threads here which can interfere with handling a stream. */
__fsetlocking (stdin, FSETLOCKING_BYCALLER);
__fsetlocking (stdout, FSETLOCKING_BYCALLER);