Author: kib
Date: Fri Apr 10 09:52:42 2009
New Revision: 190883
URL: http://svn.freebsd.org/changeset/base/190883

Log:
  Update comment to the reality, rtld supports any number of loadable segments.
  Fix spacing.
  
  Reviewed by:  kan

Modified:
  head/libexec/rtld-elf/map_object.c

Modified: head/libexec/rtld-elf/map_object.c
==============================================================================
--- head/libexec/rtld-elf/map_object.c  Fri Apr 10 09:13:58 2009        
(r190882)
+++ head/libexec/rtld-elf/map_object.c  Fri Apr 10 09:52:42 2009        
(r190883)
@@ -91,8 +91,7 @@ map_object(int fd, const char *path, con
     /*
      * Scan the program header entries, and save key information.
      *
-     * We rely on there being exactly two load segments, text and data,
-     * in that order.
+     * We expect that the loadable segments are ordered by load address.
      */
     phdr = (Elf_Phdr *) ((char *)hdr + hdr->e_phoff);
     phsize  = hdr->e_phnum * sizeof (phdr[0]);
@@ -167,7 +166,7 @@ map_object(int fd, const char *path, con
        return NULL;
     }
 
-    for (i = 0; i <=  nsegs; i++) {
+    for (i = 0; i <= nsegs; i++) {
        /* Overlay the segment onto the proper region. */
        data_offset = trunc_page(segs[i]->p_offset);
        data_vaddr = trunc_page(segs[i]->p_vaddr);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to