svn commit: r247846 - stable/9/libexec/rtld-elf

Tijl Coosemans tijl at FreeBSD.org
Tue Mar 5 16:04:07 UTC 2013


Author: tijl
Date: Tue Mar  5 16:04:07 2013
New Revision: 247846
URL: http://svnweb.freebsd.org/changeset/base/247846

Log:
  MFC r247396:
  
  Map libraries linked with -Ttext-segment=base_addr at base_addr.
  Normal libraries have base address 0 and are unaffected by this change.
  
  PR:		176216
  Submitted by:	Damjan Jovanovic <damjan.jov at gmail.com>
  Reviewed by:	kib

Modified:
  stable/9/libexec/rtld-elf/map_object.c
Directory Properties:
  stable/9/libexec/rtld-elf/   (props changed)

Modified: stable/9/libexec/rtld-elf/map_object.c
==============================================================================
--- stable/9/libexec/rtld-elf/map_object.c	Tue Mar  5 15:35:57 2013	(r247845)
+++ stable/9/libexec/rtld-elf/map_object.c	Tue Mar  5 16:04:07 2013	(r247846)
@@ -175,7 +175,7 @@ map_object(int fd, const char *path, con
     base_vaddr = trunc_page(segs[0]->p_vaddr);
     base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz);
     mapsize = base_vlimit - base_vaddr;
-    base_addr = hdr->e_type == ET_EXEC ? (caddr_t) base_vaddr : NULL;
+    base_addr = (caddr_t) base_vaddr;
 
     mapbase = mmap(base_addr, mapsize, PROT_NONE, MAP_ANON | MAP_PRIVATE |
       MAP_NOCORE, -1, 0);


More information about the svn-src-stable-9 mailing list