Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | The libc6-dev in Ubuntu 9.04 is so old that the elf.h doesn't |
| 2 | define STT_GNU_IFUNC, so we have to define it ourselves. |
| 3 | |
| 4 | Upstream-Status: Inappropriate [other] - old release specific, maybe removable |
| 5 | |
| 6 | -- Dexuan Cui (dexuan.cui@intel.com) Feb 16, 2011. |
| 7 | |
| 8 | diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp |
| 9 | index 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" |