This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/4] default_debugscn_p: Add support for compressed debug section.


Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
---
 libebl/ChangeLog        |    4 ++++
 libebl/eblopenbackend.c |    8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 941ed6f..49c8540 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-12  Kurt Roeckx  <kurt@roeckx.be>
+
+	* eblopenbackend.c (default_debugscn_p): Support compressed section
+
 2011-06-26  Mark Wielaard  <mjw@redhat.com>
 
 	* eblopenbackend.c (default_debugscn_p): Add .debug_macro.
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index b39ab2e..251d7cc 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -657,7 +657,13 @@ default_debugscn_p (const char *name)
   const size_t ndwarf_scn_names = (sizeof (dwarf_scn_names)
 				   / sizeof (dwarf_scn_names[0]));
   for (size_t cnt = 0; cnt < ndwarf_scn_names; ++cnt)
-    if (strcmp (name, dwarf_scn_names[cnt]) == 0)
+    if (strcmp (name, dwarf_scn_names[cnt]) == 0
+#if USE_ZLIB
+	|| (name[0] == '.' && name[1] == 'z'
+	    && dwarf_scn_names[cnt][1] == 'd'
+	    && strcmp (&name[2], &dwarf_scn_names[cnt][1]) == 0)
+#endif
+	)
       return true;
 
   return false;
-- 
1.7.10.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]