Hi ALL,

Could you help me how to give the execute permissions to data segment which 
have already read write permission.
Actually I want to change the permission of data segment in shared 
object(ld.so.1 as well as some shared objects) using gcc linker script.
If you have another idea except linker script,please share.

following are my output of elfdump.

Program Header[0]:
    p_vaddr:      0           p_flags:    [ PF_X PF_R ]
    p_paddr:      0           p_type:     [ PT_LOAD ]
    p_filesz:     0x2af6c     p_memsz:    0x2af6c
    p_offset:     0           p_align:    0x8000

Program Header[1]:
    p_vaddr:      0x33010     p_flags:    [ PF_W PF_R ]
    p_paddr:      0x33010     p_type:     [ PT_LOAD ]
    p_filesz:     0xa2b       p_memsz:    0x24d4
    p_offset:     0x2b010     p_align:    0x8000

above Program Header[1]: is for code segment so I want change  
p_flags:    [ PF_W PF_R ]   to  p_flags:    [ PF_X PF_W PF_R ]


Thanks & Regards
verma
 
 
This message posted from opensolaris.org

Reply via email to