about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 1d10541f52..e1909ca6bf 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -916,29 +916,27 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 	      goto call_lose;
 	    }
 
-	  {
-	    struct loadcmd *c = &loadcmds[nloadcmds++];
-	    c->mapstart = ph->p_vaddr & ~(ph->p_align - 1);
-	    c->mapend = ((ph->p_vaddr + ph->p_filesz + GL(dl_pagesize) - 1)
-			 & ~(GL(dl_pagesize) - 1));
-	    c->dataend = ph->p_vaddr + ph->p_filesz;
-	    c->allocend = ph->p_vaddr + ph->p_memsz;
-	    c->mapoff = ph->p_offset & ~(ph->p_align - 1);
-
-	    /* Optimize a common case.  */
+	  c = &loadcmds[nloadcmds++];
+	  c->mapstart = ph->p_vaddr & ~(ph->p_align - 1);
+	  c->mapend = ((ph->p_vaddr + ph->p_filesz + GL(dl_pagesize) - 1)
+		       & ~(GL(dl_pagesize) - 1));
+	  c->dataend = ph->p_vaddr + ph->p_filesz;
+	  c->allocend = ph->p_vaddr + ph->p_memsz;
+	  c->mapoff = ph->p_offset & ~(ph->p_align - 1);
+
+	  /* Optimize a common case.  */
 #if (PF_R | PF_W | PF_X) == 7 && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7
-	    c->prot = (PF_TO_PROT
-		       >> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf;
+	  c->prot = (PF_TO_PROT
+		     >> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf;
 #else
-	    c->prot = 0;
-	    if (ph->p_flags & PF_R)
-	      c->prot |= PROT_READ;
-	    if (ph->p_flags & PF_W)
-	      c->prot |= PROT_WRITE;
-	    if (ph->p_flags & PF_X)
-	      c->prot |= PROT_EXEC;
+	  c->prot = 0;
+	  if (ph->p_flags & PF_R)
+	    c->prot |= PROT_READ;
+	  if (ph->p_flags & PF_W)
+	    c->prot |= PROT_WRITE;
+	  if (ph->p_flags & PF_X)
+	    c->prot |= PROT_EXEC;
 #endif
-	  }
 	  break;
 
 	case PT_TLS: