aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/eshlibld.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-cris/eshlibld.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-cris/eshlibld.h')
-rw-r--r--include/asm-cris/eshlibld.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/include/asm-cris/eshlibld.h b/include/asm-cris/eshlibld.h
new file mode 100644
index 000000000000..2b577cde17eb
--- /dev/null
+++ b/include/asm-cris/eshlibld.h
@@ -0,0 +1,114 @@
1/*!**************************************************************************
2*!
3*! FILE NAME : eshlibld.h
4*!
5*! DESCRIPTION: Prototypes for exported shared library functions
6*!
7*! FUNCTIONS : perform_cris_aout_relocations, shlibmod_fork, shlibmod_exit
8*! (EXPORTED)
9*!
10*!---------------------------------------------------------------------------
11*!
12*! (C) Copyright 1998, 1999 Axis Communications AB, LUND, SWEDEN
13*!
14*!**************************************************************************/
15/* $Id: eshlibld.h,v 1.2 2001/02/23 13:47:33 bjornw Exp $ */
16
17#ifndef _cris_relocate_h
18#define _cris_relocate_h
19
20/* Please note that this file is also compiled into the xsim simulator.
21 Try to avoid breaking its double use (only works on a little-endian
22 32-bit machine such as the i386 anyway).
23
24 Use __KERNEL__ when you're about to use kernel functions,
25 (which you should not do here anyway, since this file is
26 used by glibc).
27 Use defined(__KERNEL__) || defined(__elinux__) when doing
28 things that only makes sense on an elinux system.
29 Use __CRIS__ when you're about to do (really) CRIS-specific code.
30*/
31
32/* We have dependencies all over the place for the host system
33 for xsim being a linux system, so let's not pretend anything
34 else with #ifdef:s here until fixed. */
35#include <linux/config.h>
36#include <linux/limits.h>
37
38/* Maybe do sanity checking if file input. */
39#undef SANITYCHECK_RELOC
40
41/* Maybe output debug messages. */
42#undef RELOC_DEBUG
43
44/* Maybe we want to share core as well as disk space.
45 Mainly depends on the config macro CONFIG_SHARE_SHLIB_CORE, but it is
46 assumed that we want to share code when debugging (exposes more
47 trouble). */
48#ifndef SHARE_LIB_CORE
49# if (defined(__KERNEL__) || !defined(RELOC_DEBUG)) \
50 && !defined(CONFIG_SHARE_SHLIB_CORE)
51# define SHARE_LIB_CORE 0
52# else
53# define SHARE_LIB_CORE 1
54# endif /* __KERNEL__ etc */
55#endif /* SHARE_LIB_CORE */
56
57
58/* Main exported function; supposed to be called when the program a.out
59 has been read in. */
60extern int
61perform_cris_aout_relocations(unsigned long text, unsigned long tlength,
62 unsigned long data, unsigned long dlength,
63 unsigned long baddr, unsigned long blength,
64
65 /* These may be zero when there's "perfect"
66 position-independent code. */
67 unsigned char *trel, unsigned long tsrel,
68 unsigned long dsrel,
69
70 /* These will be zero at a first try, to see
71 if code is statically linked. Else a
72 second try, with the symbol table and
73 string table nonzero should be done. */
74 unsigned char *symbols, unsigned long symlength,
75 unsigned char *strings, unsigned long stringlength,
76
77 /* These will only be used when symbol table
78 information is present. */
79 char **env, int envc,
80 int euid, int is_suid);
81
82
83#ifdef RELOC_DEBUG
84/* Task-specific debug stuff. */
85struct task_reloc_debug {
86 struct memdebug *alloclast;
87 unsigned long alloc_total;
88 unsigned long export_total;
89};
90#endif /* RELOC_DEBUG */
91
92#if SHARE_LIB_CORE
93
94/* When code (and some very specific data) is shared and not just
95 dynamically linked, we need to export hooks for exec beginning and
96 end. */
97
98struct shlibdep;
99
100extern void
101shlibmod_exit(struct shlibdep **deps);
102
103/* Returns 0 if failure, nonzero for ok. */
104extern int
105shlibmod_fork(struct shlibdep **deps);
106
107#else /* ! SHARE_LIB_CORE */
108# define shlibmod_exit(x)
109# define shlibmod_fork(x) 1
110#endif /* ! SHARE_LIB_CORE */
111
112#endif _cris_relocate_h
113/********************** END OF FILE eshlibld.h *****************************/
114