Source-Changes-D archive

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

Re: CVS commit: src/sys/kern



hi joerg,

this change breaks some executables on some platforms (eg. tcsh on sparc64).
here's what "objdump -p" shows for this file:

    LOAD off    0x0000000000000000 vaddr 0x0000000000100000 paddr 
0x0000000000100000 align 2**20
         filesz 0x000000000004d533 memsz 0x000000000004d533 flags r-x
    LOAD off    0x000000000004e000 vaddr 0x000000000024e000 paddr 
0x000000000024e000 align 2**20
         filesz 0x0000000000004e78 memsz 0x0000000000031dd0 flags rwx

since the data PT_LOAD section is marked executable for some reason,
and it's smaller than the text section, your new code thinks that
there is no data section and sets both epp_t* and epp_d* to refer to
the text section.  this causes sbrk() to fail and it goes downhill
from there.

(yes, we also need to fix it so that the data section isn't executable,
but that's a separate problem.)

-Chuck


On Fri, Aug 20, 2010 at 02:59:53PM +0000, Joerg Sonnenberger wrote:
> Module Name:  src
> Committed By: joerg
> Date:         Fri Aug 20 14:59:53 UTC 2010
> 
> Modified Files:
>       src/sys/kern: exec_elf.c
> 
> Log Message:
> Allow ELF objects with more than two PT_LOAD sections. Go creates such
> binaries by default with separate sections for executable, writeable
> data and constants. Use the same heuristic as FreeBSD to match up the
> text and data segment assumptions.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.23 -r1.24 src/sys/kern/exec_elf.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.


Home | Main Index | Thread Index | Old Index