bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20614: Segmentation fault when building on Power8 Little Endian


From: YAMAMOTO Mitsuharu
Subject: bug#20614: Segmentation fault when building on Power8 Little Endian
Date: Wed, 07 Oct 2015 19:56:00 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

What happens if you apply the following patch?

                                     YAMAMOTO Mitsuharu
                                mituharu@math.s.chiba-u.ac.jp

diff --git a/src/unexelf.c b/src/unexelf.c
index 59e2725..0d67b99 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -730,7 +730,14 @@ unexec (const char *new_name, const char *old_name)
   old_plt_index = find_section (".plt", old_section_names,
                                old_name, old_file_h, old_section_h, 1);
   if (old_plt_index != -1)
-    if (OLD_SECTION_H (old_plt_index).sh_type != SHT_NOBITS)
+    if (OLD_SECTION_H (old_plt_index).sh_type != SHT_NOBITS
+       || ((OLD_SECTION_H (old_plt_index).sh_addr
+            + OLD_SECTION_H (old_plt_index).sh_size
+            != OLD_SECTION_H (old_bss_index).sh_addr)
+           && (old_sbss_index == -1
+               || (OLD_SECTION_H (old_plt_index).sh_addr
+                   + OLD_SECTION_H (old_plt_index).sh_size
+                   != OLD_SECTION_H (old_sbss_index).sh_addr))))
       old_plt_index = -1;
 
   if (old_sbss_index == -1 && old_plt_index == -1)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]