aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-07-12 21:53:28 +0000
committerRichard M. Stallman2003-07-12 21:53:28 +0000
commitad5378567ab7901a3f2d6cc115b90f851cde8052 (patch)
treeed1731820c3181d866000caebc5e1ba91cdd4b2a /src
parent69e38995354befdc5e97820660875ac2a32896b9 (diff)
downloademacs-ad5378567ab7901a3f2d6cc115b90f851cde8052.tar.gz
emacs-ad5378567ab7901a3f2d6cc115b90f851cde8052.zip
(unexec): Consider a section to precede the .bss
section if its addresses overlap that of .bss.
Diffstat (limited to 'src')
-rw-r--r--src/unexelf.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index b3075f08b2f..d88b8ec37c0 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -950,8 +950,13 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
950 } 950 }
951 else 951 else
952 { 952 {
953 /* Any section that was original placed AFTER the bss 953 /* Any section that was originally placed after the .bss
954 section should now be off by NEW_DATA2_SIZE. */ 954 section should now be off by NEW_DATA2_SIZE. If a
955 section overlaps the .bss section, consider it to be
956 placed after the .bss section. Overlap can occur if the
957 section just before .bss has less-strict alignment; this
958 was observed between .symtab and .bss on Solaris 2.5.1
959 (sparc) with GCC snapshot 960602. */
955#ifdef SOLARIS_POWERPC 960#ifdef SOLARIS_POWERPC
956 /* On PPC Reference Platform running Solaris 2.5.1 961 /* On PPC Reference Platform running Solaris 2.5.1
957 the plt section is also of type NOBI like the bss section. 962 the plt section is also of type NOBI like the bss section.
@@ -965,9 +970,8 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
965 >= OLD_SECTION_H (old_bss_index-1).sh_offset) 970 >= OLD_SECTION_H (old_bss_index-1).sh_offset)
966 NEW_SECTION_H (nn).sh_offset += new_data2_size; 971 NEW_SECTION_H (nn).sh_offset += new_data2_size;
967#else 972#else
968 if (round_up (NEW_SECTION_H (nn).sh_offset, 973 if (NEW_SECTION_H (nn).sh_offset + NEW_SECTION_H (nn).sh_size
969 OLD_SECTION_H (old_bss_index).sh_addralign) 974 > new_data2_offset)
970 >= new_data2_offset)
971 NEW_SECTION_H (nn).sh_offset += new_data2_size; 975 NEW_SECTION_H (nn).sh_offset += new_data2_size;
972#endif 976#endif
973 /* Any section that was originally placed after the section 977 /* Any section that was originally placed after the section