svn commit: r239019 - head/libexec/rtld-elf
Alexander Kabaev
kan at FreeBSD.org
Fri Aug 3 17:04:42 UTC 2012
Author: kan
Date: Fri Aug 3 17:04:41 2012
New Revision: 239019
URL: http://svn.freebsd.org/changeset/base/239019
Log:
Parse notes only after object structure had been allocated.
Reported by: kargl
Reviewed by: kib (sans whitespace)
Modified:
head/libexec/rtld-elf/map_object.c
Modified: head/libexec/rtld-elf/map_object.c
==============================================================================
--- head/libexec/rtld-elf/map_object.c Fri Aug 3 16:18:20 2012 (r239018)
+++ head/libexec/rtld-elf/map_object.c Fri Aug 3 17:04:41 2012 (r239019)
@@ -153,7 +153,6 @@ map_object(int fd, const char *path, con
break;
note_start = (Elf_Addr)(char *)hdr + phdr->p_offset;
note_end = note_start + phdr->p_filesz;
- digest_notes(obj, note_start, note_end);
break;
}
@@ -291,7 +290,8 @@ map_object(int fd, const char *path, con
obj->stack_flags = stack_flags;
obj->relro_page = obj->relocbase + trunc_page(relro_page);
obj->relro_size = round_page(relro_size);
-
+ if (note_start < note_end)
+ digest_notes(obj, note_start, note_end);
munmap(hdr, PAGE_SIZE);
return (obj);
More information about the svn-src-head
mailing list