diff options
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2011-12-09 21:33:20 +0900 |
---|---|---|
committer | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2011-12-09 21:33:20 +0900 |
commit | b34d73171792a089e2fc3728990deae186578c83 (patch) | |
tree | 1f37c3be48b92291fa69f5275aa7dd3109c6c9f7 /src/unexelf.c | |
parent | 2fac8180337f8e8ca153be4ae3946e30bf2a571c (diff) |
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).
Diffstat (limited to 'src/unexelf.c')
-rw-r--r-- | src/unexelf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/unexelf.c b/src/unexelf.c index 04c029f7e8..1715c3670c 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1219,9 +1219,15 @@ temacs: 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 } |