98 |
static long cookie; |
static long cookie; |
99 |
|
|
100 |
|
|
101 |
unexec (new_name, a_name, bndry, bss_start, entry) |
unexec (new_name, a_name, bndry, bss_start, entry) |
102 |
char *new_name, *a_name; |
char *new_name, *a_name; |
103 |
unsigned bndry, bss_start, entry; |
unsigned bndry, bss_start, entry; |
104 |
{ |
{ |
163 |
/* Have to do this some time before dumping the data */ |
/* Have to do this some time before dumping the data */ |
164 |
initialized = 1; |
initialized = 1; |
165 |
#endif |
#endif |
166 |
|
|
167 |
/* Handle new data and bss sizes and optional new entry point. |
/* Handle new data and bss sizes and optional new entry point. |
168 |
No one actually uses bss_start and entry, but tradition compels |
No one actually uses bss_start and entry, but tradition compels |
169 |
one to support them. |
one to support them. |
171 |
but the caller is *supposed* to know what she is doing. */ |
but the caller is *supposed* to know what she is doing. */ |
172 |
nhdr.a_data = (bss_start ? bss_start : brk_value) - N_DATADDR (nhdr); |
nhdr.a_data = (bss_start ? bss_start : brk_value) - N_DATADDR (nhdr); |
173 |
nhdr.a_bss = bss_start ? brk_value - bss_start : 0; |
nhdr.a_bss = bss_start ? brk_value - bss_start : 0; |
174 |
if (entry) |
if (entry) |
175 |
nhdr.a_entry = entry; |
nhdr.a_entry = entry; |
176 |
|
|
177 |
/* |
/* |
296 |
* First try argv[0], will almost always succeed as shells tend to give |
* First try argv[0], will almost always succeed as shells tend to give |
297 |
* the full path from the hash list rather than using execvp () |
* the full path from the hash list rather than using execvp () |
298 |
*/ |
*/ |
299 |
if (is_it (progname)) |
if (is_it (progname)) |
300 |
return; |
return; |
301 |
|
|
302 |
/* |
/* |
303 |
* If argv[0] is a full path and does not exist, not much sense in |
* If argv[0] is a full path and does not exist, not much sense in |
304 |
* searching further |
* searching further |
305 |
*/ |
*/ |
306 |
if (strchr (progname, '/')) |
if (strchr (progname, '/')) |
307 |
return; |
return; |
308 |
|
|
309 |
/* |
/* |