From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8334 invoked by alias); 23 Feb 2004 20:14:51 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 8322 invoked from network); 23 Feb 2004 20:14:50 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 23 Feb 2004 20:14:50 -0000 Received: from redhat.com (topaz.toronto.redhat.com [172.16.14.227]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 63C9980001E for ; Mon, 23 Feb 2004 15:14:50 -0500 (EST) Message-ID: <403A5F3A.2060703@redhat.com> Date: Mon, 23 Feb 2004 20:14:00 -0000 From: Dave Brolley Organization: Red Hat Canada, Ltd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch] elf loader detection of code sections Content-Type: multipart/mixed; boundary="------------000207090201050904030503" X-SW-Source: 2004-q1/txt/msg00031.txt.bz2 This is a multi-part message in MIME format. --------------000207090201050904030503 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 160 The attached patch makes a correction in the way code sections are detected by the elf loader. It now uses the VMA address of the section as intended. Dave --------------000207090201050904030503 Content-Type: text/plain; name="elfload-1.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="elfload-1.ChangeLog" Content-length: 142 2004-02-23 Dave Brolley * elfload.c (readElfFile): Get address from offset 16 for 64 bit and offset 12 for 16 bit. --------------000207090201050904030503 Content-Type: text/plain; name="elfload-1.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="elfload-1.patch.txt" Content-length: 1711 Index: sid/component/loader/elfload.c =================================================================== RCS file: /cvs/src/src/sid/component/loader/elfload.c,v retrieving revision 1.6 diff -c -p -r1.6 elfload.c *** sid/component/loader/elfload.c 12 Feb 2004 20:30:08 -0000 1.6 --- sid/component/loader/elfload.c 23 Feb 2004 20:07:02 -0000 *************** readElfFile (PFLOAD func, unsigned* entr *** 229,235 **** if (fetchQuad(secHdr+8, littleEndian) & SHF_EXECINSTR) { textSections[textSectionCount].lbound = ! fetchQuad(secHdr+24, littleEndian); textSections[textSectionCount].hbound = textSections[textSectionCount].lbound + fetchQuad(secHdr+32, littleEndian) - 1; --- 229,235 ---- if (fetchQuad(secHdr+8, littleEndian) & SHF_EXECINSTR) { textSections[textSectionCount].lbound = ! fetchQuad(secHdr+16, littleEndian); textSections[textSectionCount].hbound = textSections[textSectionCount].lbound + fetchQuad(secHdr+32, littleEndian) - 1; *************** readElfFile (PFLOAD func, unsigned* entr *** 242,248 **** if (fetchWord(secHdr+8, littleEndian) & SHF_EXECINSTR) { textSections[textSectionCount].lbound = ! fetchWord(secHdr+16, littleEndian); textSections[textSectionCount].hbound = textSections[textSectionCount].lbound + fetchWord(secHdr+20, littleEndian) - 1; --- 242,248 ---- if (fetchWord(secHdr+8, littleEndian) & SHF_EXECINSTR) { textSections[textSectionCount].lbound = ! fetchWord(secHdr+12, littleEndian); textSections[textSectionCount].hbound = textSections[textSectionCount].lbound + fetchWord(secHdr+20, littleEndian) - 1; --------------000207090201050904030503--