From owner-cvs-all Fri Aug 23 22: 1:38 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 618E837B400; Fri, 23 Aug 2002 22:01:34 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 272E543E42; Fri, 23 Aug 2002 22:01:34 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (marcel@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7O51XJU027155; Fri, 23 Aug 2002 22:01:33 -0700 (PDT) (envelope-from marcel@freefall.freebsd.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7O51X64027154; Fri, 23 Aug 2002 22:01:33 -0700 (PDT) Message-Id: <200208240501.g7O51X64027154@freefall.freebsd.org> From: Marcel Moolenaar Date: Fri, 23 Aug 2002 22:01:33 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern link_elf.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG marcel 2002/08/23 22:01:33 PDT Modified files: sys/kern link_elf.c Log: Work around a GCC optimization bug on ia64: In link_elf_symbol_values(), a pointer to a symbol is given and we have to find the containing symbol table. We do this by bounds checking. For some strange reason (ie I haven't found the root cause) the first test succeeded for said symbol, implying that the symbol came from the .dynsym table. In reality however the symbol actually resided in the .symtab table. Needless to say that all that was returned was junk. The upper bounds check was: (symptr - baseptr) < symtab_size This has been rewritten to: symptr < (baseptr + symtab_size) As a side-effect, slightly more optimal (and still correct :-) code can be generated on ia64. Revision Changes Path 1.58 +2 -2 src/sys/kern/link_elf.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message