(_dl_function_address): Prototype.

(DL_FUNCTION_ADDRESS): Define.
(DL_DT_INIT_ADDRESS): Define.
(DL_DT_FINI_ADDRESS): Define.
This commit is contained in:
Ulrich Drepper 2001-04-22 03:21:34 +00:00
parent efaa6dd8a2
commit 85ff0834bb
1 changed files with 13 additions and 0 deletions

View File

@ -34,3 +34,16 @@ Elf32_Addr _dl_lookup_address (const void *address);
void _dl_unmap (struct link_map *map);
#define DL_UNMAP(map) _dl_unmap (map)
extern Elf32_Addr _dl_function_address (const struct link_map *map,
Elf32_Addr start);
#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
/* The test for "addr & 2" below is to accomodate old binaries which
violated the ELF ABI by pointing DT_INIT and DT_FINI at a function
pointer. */
#define DL_DT_INIT_ADDRESS(map, addr) \
((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
#define DL_DT_FINI_ADDRESS(map, addr) \
((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))