Commit b34d7317 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu
Browse files

Fix for GNUstep build failure during dumping.

* 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).
parent 2fac8180
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)
......
......@@ -1219,9 +1219,15 @@ unexec (const char *new_name, const char *old_name)
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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment