summaryrefslogtreecommitdiff
path: root/usr/src/head/link.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/head/link.h')
-rw-r--r--usr/src/head/link.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/head/link.h b/usr/src/head/link.h
index e92bb9e459..b47273d265 100644
--- a/usr/src/head/link.h
+++ b/usr/src/head/link.h
@@ -28,7 +28,7 @@
#include <sys/link.h>
#ifndef _ASM
-#include <libelf.h>
+#include <elf.h>
#include <sys/types.h>
#include <dlfcn.h>
#endif
@@ -39,9 +39,15 @@ extern "C" {
#ifndef _ASM
/*
- * ld support library calls
+ * ld support library calls.
+ *
+ * These cannot be used in a 32bit large file capable environment because
+ * libelf is not large-file safe. Only define these interfaces if we are not
+ * 32bit, or not in the large file environment.
*/
+#if !defined(_ILP32) || _FILE_OFFSET_BITS != 64
#ifdef __STDC__
+#include <libelf.h>
extern uint_t ld_version(uint_t);
extern void ld_input_done(uint_t *);
@@ -88,6 +94,7 @@ extern void ld_section64();
#endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */
#endif /* __STDC__ */
+#endif /* !defined(_ILP32) || _FILE_OFFSET_BITS != 64 */
/*
* ld_version() version values.