diff options
Diffstat (limited to 'toolchain/sstrip/sstrip.c')
-rw-r--r-- | toolchain/sstrip/sstrip.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/toolchain/sstrip/sstrip.c b/toolchain/sstrip/sstrip.c index 1842f053c..03adc0eac 100644 --- a/toolchain/sstrip/sstrip.c +++ b/toolchain/sstrip/sstrip.c @@ -253,8 +253,7 @@ static int modifyheaders ## CLASS (Elf ## CLASS ## _Ehdr *ehdr, \ ESET(phdr->p_offset,newsize); \ ESET(phdr->p_filesz,0); \ } else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \ - newsize -= EGET(phdr->p_offset); \ - ESET(phdr->p_filesz, newsize); \ + ESET(phdr->p_filesz, newsize - EGET(phdr->p_offset)); \ } \ } \ \ |