mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
144d2ef959
Submitted by: TAOKA Satoshi <taoka@infonets.hiroshima-u.ac.jp>
23 lines
1003 B
Plaintext
23 lines
1003 B
Plaintext
--- src/unexelf.c.orig Fri Oct 2 12:55:43 1998
|
|
+++ src/unexelf.c Fri Oct 2 13:02:05 1998
|
|
@@ -678,7 +678,8 @@
|
|
if (n < 0)
|
|
fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0);
|
|
|
|
- NEW_PROGRAM_H (n).p_filesz += new_data2_size;
|
|
+/* NEW_PROGRAM_H (n).p_filesz += new_data2_size; */
|
|
+ NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr; /* From emacs 20.3 */
|
|
NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz;
|
|
|
|
#if 0 /* Maybe allow section after data2 - does this ever happen? */
|
|
@@ -845,7 +846,9 @@
|
|
|
|
for (; symp < symendp; symp ++)
|
|
if (strcmp ((char *) (symnames + symp->st_name), "_end") == 0
|
|
- || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0)
|
|
+ || strcmp ((char *) (symnames + symp->st_name), "end") == 0
|
|
+ || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0
|
|
+ || strcmp ((char *) (symnames + symp->st_name), "edata") == 0)
|
|
memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr));
|
|
}
|