From owner-cvs-src@FreeBSD.ORG Fri Jul 23 00:46:06 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C9BC16A4CE; Fri, 23 Jul 2004 00:46:06 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 152BA43D3F; Fri, 23 Jul 2004 00:46:06 +0000 (GMT) (envelope-from grehan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6N0k50n021248; Fri, 23 Jul 2004 00:46:05 GMT (envelope-from grehan@repoman.freebsd.org) Received: (from grehan@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6N0k5ob021247; Fri, 23 Jul 2004 00:46:05 GMT (envelope-from grehan) Message-Id: <200407230046.i6N0k5ob021247@repoman.freebsd.org> From: Peter Grehan Date: Fri, 23 Jul 2004 00:46:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/powerpc/powerpc elf_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2004 00:46:06 -0000 grehan 2004-07-23 00:46:05 UTC FreeBSD src repository Modified files: sys/powerpc/powerpc elf_machdep.c Log: The ADDR16 relocations were assuming that non-local symbols had an addend of 0. This isn't correct, and was quite easy to break by referring to the address of an element within a structure. However, fixing this exposed the fact that symbol lookups for local variables were returning the base of the section they were contained in. This case is detected by comparing the return value from elf_lookup() to the relocbase+addend value: if it is lesser, but greater than relocbase, then relocbase+addend is taken to be the authoritative value. bug reported by: gallatin Revision Changes Path 1.21 +24 -14 src/sys/powerpc/powerpc/elf_machdep.c