diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/unexec.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/unexec.c b/src/unexec.c index c1dc6e33016..bd6985a349b 100644 --- a/src/unexec.c +++ b/src/unexec.c | |||
| @@ -479,7 +479,7 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) | |||
| 479 | * space. | 479 | * space. |
| 480 | */ | 480 | */ |
| 481 | 481 | ||
| 482 | bias = bss_end - (f_ohdr.data_start + f_dhdr.s_size); | 482 | bias = bss_start - (f_ohdr.data_start + f_dhdr.s_size); |
| 483 | 483 | ||
| 484 | #endif | 484 | #endif |
| 485 | 485 | ||
| @@ -1024,11 +1024,12 @@ adjust_lnnoptrs (writedesc, readdesc, new_name) | |||
| 1024 | { | 1024 | { |
| 1025 | read (new, &auxentry, AUXESZ); | 1025 | read (new, &auxentry, AUXESZ); |
| 1026 | nsyms++; | 1026 | nsyms++; |
| 1027 | if (ISFCN (symentry.n_type)) { | 1027 | if (ISFCN (symentry.n_type) || symentry.n_type == 0x2400) |
| 1028 | auxentry.x_sym.x_fcnary.x_fcn.x_lnnoptr += bias; | 1028 | { |
| 1029 | lseek (new, -AUXESZ, 1); | 1029 | auxentry.x_sym.x_fcnary.x_fcn.x_lnnoptr += bias; |
| 1030 | write (new, &auxentry, AUXESZ); | 1030 | lseek (new, -AUXESZ, 1); |
| 1031 | } | 1031 | write (new, &auxentry, AUXESZ); |
| 1032 | } | ||
| 1032 | } | 1033 | } |
| 1033 | } | 1034 | } |
| 1034 | close (new); | 1035 | close (new); |