* [committed] Fix build on debian 7
@ 2019-01-01 0:00 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz, jakub
Hi,
On debian 7, we run into:
...
dwz.c: In function âread_dwarfâ:
dwz.c:10211:34: error: âSHF_COMPRESSEDâ undeclared
...
Glibc defines SHF_COMPRESSED starting v2.22, and libelf has a fallback
definition starting v0.166, which are both not present here.
Fix this by adding a fallback definition in dwz.c.
Committed to trunk.
Thanks,
- Tom
Fix build on debian 7
2019-07-09 Tom de Vries <tdevries@suse.de>
* dwz.c (SHF_COMPRESSED): Define if not defined.
---
dwz.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dwz.c b/dwz.c
index 98f6f53..13f67f2 100644
--- a/dwz.c
+++ b/dwz.c
@@ -40,6 +40,13 @@
#include "hashtab.h"
#include "sha1.h"
+#ifndef SHF_COMPRESSED
+ /* Glibc elf.h contains SHF_COMPRESSED starting v2.22. Libelf libelf.h has
+ a fallback definition starting v0.166. Define a fallback definition here
+ for the case of both pre-v2.22 glibc and pre-v0.166 libelf. */
+# define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */
+#endif
+
/* Theory of operation:
The DWZ tool can either optimize debug sections of a single
executable or shared library at a time, or, when -m option
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-09 9:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [committed] Fix build on debian 7 Tom de Vries
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).