fix_STT_GNU_IFUNC.patch 764 B

1234567891011121314151617181920212223242526
  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. Upstream-Status: Inappropriate [other] - old release specific, maybe removable
  4. -- Dexuan Cui (dexuan.cui@intel.com) Feb 16, 2011.
  5. diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp
  6. index 2444c39..56d93f8 100644
  7. --- a/src/mklibs-readelf/main.cpp
  8. +++ b/src/mklibs-readelf/main.cpp
  9. @@ -6,6 +6,14 @@
  10. #include <vector>
  11. #include <elf.h>
  12. +/*
  13. + * The /usr/include/elf.h in some distributions(like Ubuntu 9.04) doesn't
  14. + * define the macro. We need to define it here.
  15. + */
  16. +#ifndef STT_GNU_IFUNC
  17. +#define STT_GNU_IFUNC 10 /* Symbol is indirect code object */
  18. +#endif
  19. +
  20. #include <getopt.h>
  21. #include "elf.hpp"