blob: d27a48916d0310927242441e4ea3d91556475ce1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001The libc6-dev in Ubuntu 9.04 is so old that the elf.h doesn't
2define STT_GNU_IFUNC, so we have to define it ourselves.
3
4Upstream-Status: Inappropriate [other] - old release specific, maybe removable
5
6-- Dexuan Cui (dexuan.cui@intel.com) Feb 16, 2011.
7
8diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp
9index 2444c39..56d93f8 100644
10--- a/src/mklibs-readelf/main.cpp
11+++ b/src/mklibs-readelf/main.cpp
12@@ -6,6 +6,14 @@
13 #include <vector>
14
15 #include <elf.h>
16+/*
17+ * The /usr/include/elf.h in some distributions(like Ubuntu 9.04) doesn't
18+ * define the macro. We need to define it here.
19+ */
20+#ifndef STT_GNU_IFUNC
21+#define STT_GNU_IFUNC 10 /* Symbol is indirect code object */
22+#endif
23+
24 #include <getopt.h>
25
26 #include "elf.hpp"