Path: blob/master/arch/cris/include/asm/eshlibld.h
15126 views
/*!**************************************************************************1*!2*! FILE NAME : eshlibld.h3*!4*! DESCRIPTION: Prototypes for exported shared library functions5*!6*! FUNCTIONS : perform_cris_aout_relocations, shlibmod_fork, shlibmod_exit7*! (EXPORTED)8*!9*!---------------------------------------------------------------------------10*!11*! (C) Copyright 1998, 1999 Axis Communications AB, LUND, SWEDEN12*!13*!**************************************************************************/14/* $Id: eshlibld.h,v 1.2 2001/02/23 13:47:33 bjornw Exp $ */1516#ifndef _cris_relocate_h17#define _cris_relocate_h1819/* Please note that this file is also compiled into the xsim simulator.20Try to avoid breaking its double use (only works on a little-endian2132-bit machine such as the i386 anyway).2223Use __KERNEL__ when you're about to use kernel functions,24(which you should not do here anyway, since this file is25used by glibc).26Use defined(__KERNEL__) || defined(__elinux__) when doing27things that only makes sense on an elinux system.28Use __CRIS__ when you're about to do (really) CRIS-specific code.29*/3031/* We have dependencies all over the place for the host system32for xsim being a linux system, so let's not pretend anything33else with #ifdef:s here until fixed. */34#include <linux/limits.h>3536/* Maybe do sanity checking if file input. */37#undef SANITYCHECK_RELOC3839/* Maybe output debug messages. */40#undef RELOC_DEBUG4142/* Maybe we want to share core as well as disk space.43Mainly depends on the config macro CONFIG_SHARE_SHLIB_CORE, but it is44assumed that we want to share code when debugging (exposes more45trouble). */46#ifndef SHARE_LIB_CORE47# if (defined(__KERNEL__) || !defined(RELOC_DEBUG)) \48&& !defined(CONFIG_SHARE_SHLIB_CORE)49# define SHARE_LIB_CORE 050# else51# define SHARE_LIB_CORE 152# endif /* __KERNEL__ etc */53#endif /* SHARE_LIB_CORE */545556/* Main exported function; supposed to be called when the program a.out57has been read in. */58extern int59perform_cris_aout_relocations(unsigned long text, unsigned long tlength,60unsigned long data, unsigned long dlength,61unsigned long baddr, unsigned long blength,6263/* These may be zero when there's "perfect"64position-independent code. */65unsigned char *trel, unsigned long tsrel,66unsigned long dsrel,6768/* These will be zero at a first try, to see69if code is statically linked. Else a70second try, with the symbol table and71string table nonzero should be done. */72unsigned char *symbols, unsigned long symlength,73unsigned char *strings, unsigned long stringlength,7475/* These will only be used when symbol table76information is present. */77char **env, int envc,78int euid, int is_suid);798081#ifdef RELOC_DEBUG82/* Task-specific debug stuff. */83struct task_reloc_debug {84struct memdebug *alloclast;85unsigned long alloc_total;86unsigned long export_total;87};88#endif /* RELOC_DEBUG */8990#if SHARE_LIB_CORE9192/* When code (and some very specific data) is shared and not just93dynamically linked, we need to export hooks for exec beginning and94end. */9596struct shlibdep;9798extern void99shlibmod_exit(struct shlibdep **deps);100101/* Returns 0 if failure, nonzero for ok. */102extern int103shlibmod_fork(struct shlibdep **deps);104105#else /* ! SHARE_LIB_CORE */106# define shlibmod_exit(x)107# define shlibmod_fork(x) 1108#endif /* ! SHARE_LIB_CORE */109110#endif _cris_relocate_h111/********************** END OF FILE eshlibld.h *****************************/112113114115