diff options
author | kib <kib@FreeBSD.org> | 2009-04-10 09:52:42 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-04-10 09:52:42 +0000 |
commit | 4ea821c2235c44e6912826449ef0dee77f2f387d (patch) | |
tree | 135e347fe74b75d47229555e3b7fff39d8ecaac8 /libexec/rtld-elf/map_object.c | |
parent | e13cab7798a19e15641e32a844874e969c83c7eb (diff) | |
download | FreeBSD-src-4ea821c2235c44e6912826449ef0dee77f2f387d.zip FreeBSD-src-4ea821c2235c44e6912826449ef0dee77f2f387d.tar.gz |
Update comment to the reality, rtld supports any number of loadable segments.
Fix spacing.
Reviewed by: kan
Diffstat (limited to 'libexec/rtld-elf/map_object.c')
-rw-r--r-- | libexec/rtld-elf/map_object.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 2d06074..211c01c 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -91,8 +91,7 @@ map_object(int fd, const char *path, const struct stat *sb) /* * 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, const struct stat *sb) 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); |