* Re: [PATCH 2/6] Drop mtrace calls.
@ 2015-05-04 14:06 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2015-05-04 14:06 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
On Mon, May 04, 2015 at 02:25:40AM +0300, Max Filippov wrote:
> 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>.
Applied and pushed.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/6] Drop mtrace calls.
@ 2015-05-03 23:25 Max Filippov
0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2015-05-03 23:25 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 6742 bytes --]
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 <jcmvbkbc@gmail.com>
---
src/ChangeLog | 12 ++++++++++++
src/addr2line.c | 4 ----
src/ar.c | 4 ----
src/ld.c | 6 ------
src/nm.c | 4 ----
src/objdump.c | 4 ----
src/ranlib.c | 4 ----
src/size.c | 4 ----
src/strip.c | 4 ----
src/unstrip.c | 4 ----
10 files changed, 12 insertions(+), 38 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 0aa85ee..957eeb3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
+2015-05-04 Max Filippov <jcmvbkbc@gmail.com>
+
+ * 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 <blueness@gentoo.org>
* Makefile.am (readelf_LDADD, nm_LDADD, size_LDADD, strip_LDADD)
diff --git a/src/addr2line.c b/src/addr2line.c
index de80294..281a91e 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 f51f0ef..caed7f3 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 73e4f04..6e96ae2 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 67fb4c2..b6a1e6e 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 b689024..0aa41e8 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 8435fc1..c93c5ac 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 0ec1139..7c03cce 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 c003647..e81001e 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 989ac5f..4a8e5fa 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);
--
1.8.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-04 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 14:06 [PATCH 2/6] Drop mtrace calls Mark Wielaard
-- strict thread matches above, loose matches on Subject: below --
2015-05-03 23:25 Max Filippov
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).