[haiku-bugs] Re: [Haiku] #6271: support for images with a single rwx PT_LOAD program header

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Tue, 06 Jul 2010 21:47:46 -0000

#6271: support for images with a single rwx PT_LOAD program header
----------------------------+-----------------------------------------------
  Reporter:  lucian         |         Owner:  axeld         
      Type:  bug            |        Status:  closed        
  Priority:  normal         |     Milestone:  R1            
 Component:  System/Kernel  |       Version:  R1/Development
Resolution:  fixed          |      Keywords:                
Blocked By:                 |   Has a Patch:  1             
  Platform:  All            |      Blocking:                
----------------------------+-----------------------------------------------
Changes (by bonefish):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Thanks, that looks more correct indeed. Applied in r37415 with small
 coding style corrections:
 {{{
 +               if (programHeaders[i].IsExecutable())
 +                       executableHeaderCount ++;
 }}}
 No space for unary operators (only for binary/trinary ones).

 {{{
 +               if (programHeaders[i].IsReadWrite() &&
 +                       (!programHeaders[i].IsExecutable() ||
 executableHeaderCount > 1)) {
 [...]
         set_area_protection(image->text_region.id,
 -               B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA);
 +               B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA |
 +               (textSectionWritable ? B_KERNEL_WRITE_AREA : 0));
 }}}
 Operators at the beginning of the next line instead at the end of the
 previous one.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6271#comment:11>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: