* unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
that where the value of an _OBJC_* symbol points to is in the .bss
section (Bug#10240).
+2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
+ that where the value of an _OBJC_* symbol points to is in the .bss
+ section (Bug#10240).
+
2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
* coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
nn = symp->st_shndx;
if (nn > old_bss_index)
nn--;
- old = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr)
- + OLD_SECTION_H (nn).sh_offset + old_base);
- memcpy (new, old, symp->st_size);
+ if (nn == old_bss_index)
+ memset (new, 0, symp->st_size);
+ else
+ {
+ old = ((symp->st_value
+ - NEW_SECTION_H (symp->st_shndx).sh_addr)
+ + OLD_SECTION_H (nn).sh_offset + old_base);
+ memcpy (new, old, symp->st_size);
+ }
}
#endif
}