123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- /*++
- Copyright (c) 2016 Minoca Corp. All Rights Reserved
- Module Name:
- elfcomm.h
- Abstract:
- This header contains definitions for ELF functions that are agnostic to
- address size (32 vs 64 bit), but would otherwise be private to the ELF
- library.
- Author:
- Evan Green 8-Apr-2016
- --*/
- //
- // ------------------------------------------------------------------- Includes
- //
- //
- // ---------------------------------------------------------------- Definitions
- //
- //
- // ------------------------------------------------------ Data Type Definitions
- //
- //
- // -------------------------------------------------------------------- Globals
- //
- //
- // -------------------------------------------------------- Function Prototypes
- //
- KSTATUS
- ImpElfOpenWithPathList (
- PLOADED_IMAGE Parent,
- PSTR LibraryName,
- PSTR PathList,
- PIMAGE_FILE_INFORMATION File,
- PSTR *Path
- );
- /*++
- Routine Description:
- This routine attempts to load a needed library for an ELF image.
- Arguments:
- Parent - Supplies a pointer to the image that needs the library.
- LibraryName - Supplies the name of the library to load.
- PathList - Supplies a colon-separated list of paths to try.
- File - Supplies a pointer where the information for the file including its
- open handle will be returned.
- Path - Supplies a pointer where the real path to the opened file will be
- returned. The caller is responsible for freeing this memory.
- Return Value:
- Status code.
- --*/
- ULONG
- ImpElfOriginalHash (
- PSTR SymbolName
- );
- /*++
- Routine Description:
- This routine hashes a symbol name to get the index into the ELF hash table.
- Arguments:
- SymbolName - Supplies a pointer to the name to hash.
- Return Value:
- Returns the hash of the name.
- --*/
- ULONG
- ImpElfGnuHash (
- PSTR SymbolName
- );
- /*++
- Routine Description:
- This routine hashes a symbol name to get the index into the ELF hash table
- using the GNU style hash function.
- Arguments:
- SymbolName - Supplies a pointer to the name to hash.
- Return Value:
- Returns the hash of the name.
- --*/
- PSTR
- ImpElfGetEnvironmentVariable (
- PSTR Variable
- );
- /*++
- Routine Description:
- This routine gets an environment variable value for the image library.
- Arguments:
- Variable - Supplies a pointer to a null terminated string containing the
- name of the variable to get.
- Return Value:
- Returns a pointer to the value of the environment variable. The image
- library will not free or modify this value.
- NULL if the given environment variable is not set.
- --*/
|