1 |
/* Function to wire down text and data (including from shared libraries) |
/* Function to wire down text and data (including from shared libraries) |
2 |
Copyright (C) 1996,99,2000,01 Free Software Foundation, Inc. |
Copyright (C) 1996,99,2000,01,02 Free Software Foundation, Inc. |
3 |
Written by Michael I. Bushnell, p/BSG. |
Written by Michael I. Bushnell, p/BSG. |
4 |
|
|
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
38 |
static struct link_map * |
static struct link_map * |
39 |
loaded (void) |
loaded (void) |
40 |
{ |
{ |
41 |
Elf32_Dyn *d; |
ElfW(Dyn) *d; |
42 |
|
|
43 |
if (&_DYNAMIC == 0) /* statically linked */ |
if (&_DYNAMIC == 0) /* statically linked */ |
44 |
return 0; |
return 0; |
54 |
} |
} |
55 |
|
|
56 |
/* Compute the extent of a particular shared object. */ |
/* Compute the extent of a particular shared object. */ |
57 |
static Elf32_Addr |
static ElfW(Addr) |
58 |
map_extent (struct link_map *map) |
map_extent (struct link_map *map) |
59 |
{ |
{ |
60 |
/* In fact, LIB == MAP, but doing it this way makes it entirely kosher. */ |
/* In fact, LIB == MAP, but doing it this way makes it entirely kosher. */ |
73 |
error (2, 0, "cannot wire library %s with no _end symbol: %s", |
error (2, 0, "cannot wire library %s with no _end symbol: %s", |
74 |
map->l_name, dlerror ()); |
map->l_name, dlerror ()); |
75 |
dlclose (lib); |
dlclose (lib); |
76 |
return (Elf32_Addr) end - map->l_addr; |
return (ElfW(Addr)) end - map->l_addr; |
77 |
} |
} |
78 |
} |
} |
79 |
|
|