Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2012 15:08:22 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r239435 - stable/9/libexec/rtld-elf
Message-ID:  <201208201508.q7KF8Mw1051343@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Mon Aug 20 15:08:22 2012
New Revision: 239435
URL: http://svn.freebsd.org/changeset/base/239435

Log:
  MFC r239019: Parse notes only after object structure had been allocated.

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	Mon Aug 20 15:05:29 2012	(r239434)
+++ stable/9/libexec/rtld-elf/map_object.c	Mon Aug 20 15:08:22 2012	(r239435)
@@ -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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208201508.q7KF8Mw1051343>