diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/unexelf.c | 14 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6bb4021b876..dc3074697e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-03-17 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-17 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * unexelf.c (unexec): Name an expression, | ||
| 4 | to avoid gcc -Wbad-function-cast warning. | ||
| 5 | |||
| 3 | * deps.mk (unexalpha.o): Remove; unused. | 6 | * deps.mk (unexalpha.o): Remove; unused. |
| 4 | 7 | ||
| 5 | 2011-03-16 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2011-03-16 Paul Eggert <eggert@cs.ucla.edu> |
diff --git a/src/unexelf.c b/src/unexelf.c index 182b9f8a16b..01d41a15d50 100644 --- a/src/unexelf.c +++ b/src/unexelf.c | |||
| @@ -625,6 +625,10 @@ unexec (const char *new_name, const char *old_name) | |||
| 625 | { | 625 | { |
| 626 | int new_file, old_file, new_file_size; | 626 | int new_file, old_file, new_file_size; |
| 627 | 627 | ||
| 628 | #if defined (emacs) || !defined (DEBUG) | ||
| 629 | void *new_break; | ||
| 630 | #endif | ||
| 631 | |||
| 628 | /* Pointers to the base of the image of the two files. */ | 632 | /* Pointers to the base of the image of the two files. */ |
| 629 | caddr_t old_base, new_base; | 633 | caddr_t old_base, new_base; |
| 630 | 634 | ||
| @@ -755,7 +759,8 @@ unexec (const char *new_name, const char *old_name) | |||
| 755 | old_name, old_file_h, old_section_h, 0); | 759 | old_name, old_file_h, old_section_h, 0); |
| 756 | 760 | ||
| 757 | #if defined (emacs) || !defined (DEBUG) | 761 | #if defined (emacs) || !defined (DEBUG) |
| 758 | new_bss_addr = (ElfW(Addr)) sbrk (0); | 762 | new_break = sbrk (0); |
| 763 | new_bss_addr = (ElfW(Addr)) new_break; | ||
| 759 | #else | 764 | #else |
| 760 | new_bss_addr = old_bss_addr + old_bss_size + 0x1234; | 765 | new_bss_addr = old_bss_addr + old_bss_size + 0x1234; |
| 761 | #endif | 766 | #endif |
| @@ -956,13 +961,13 @@ temacs: | |||
| 956 | Link Info Adralgn Entsize | 961 | Link Info Adralgn Entsize |
| 957 | 962 | ||
| 958 | [22] 1 3 0x335150 0x315150 0x4 .data.rel.local | 963 | [22] 1 3 0x335150 0x315150 0x4 .data.rel.local |
| 959 | 0 0 0x4 0 | 964 | 0 0 0x4 0 |
| 960 | 965 | ||
| 961 | [23] 8 3 0x335158 0x315158 0x42720 .bss | 966 | [23] 8 3 0x335158 0x315158 0x42720 .bss |
| 962 | 0 0 0x8 0 | 967 | 0 0 0x8 0 |
| 963 | 968 | ||
| 964 | [24] 2 0 0 0x315154 0x1c9d0 .symtab | 969 | [24] 2 0 0 0x315154 0x1c9d0 .symtab |
| 965 | 25 1709 0x4 0x10 | 970 | 25 1709 0x4 0x10 |
| 966 | */ | 971 | */ |
| 967 | 972 | ||
| 968 | if (NEW_SECTION_H (nn).sh_offset >= old_bss_offset | 973 | if (NEW_SECTION_H (nn).sh_offset >= old_bss_offset |
| @@ -1309,4 +1314,3 @@ temacs: | |||
| 1309 | if (chmod (new_name, stat_buf.st_mode) == -1) | 1314 | if (chmod (new_name, stat_buf.st_mode) == -1) |
| 1310 | fatal ("Can't chmod (%s): errno %d\n", new_name, errno); | 1315 | fatal ("Can't chmod (%s): errno %d\n", new_name, errno); |
| 1311 | } | 1316 | } |
| 1312 | |||