From owner-cvs-all@FreeBSD.ORG Sun Jul 13 16:11:38 2003 Return-Path: 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 136B737B401; Sun, 13 Jul 2003 16:11:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B67F543FB1; Sun, 13 Jul 2003 16:11:37 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6DNBb0U094027; Sun, 13 Jul 2003 16:11:37 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6DNBboX094026; Sun, 13 Jul 2003 16:11:37 -0700 (PDT) Message-Id: <200307132311.h6DNBboX094026@repoman.freebsd.org> From: Marcel Moolenaar Date: Sun, 13 Jul 2003 16:11:37 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/csu/ia64 Makefile crt1.S X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 23:11:38 -0000 marcel 2003/07/13 16:11:37 PDT FreeBSD src repository Modified files: lib/csu/ia64 Makefile Added files: lib/csu/ia64 crt1.S Log: Rewite _start(). We cannot use a C function due to the fact that we don't call it according to the runtime specification and especially WRT to gp this can cause trouble. The gcc 3.3.1 import broke the ia64 runtime because the compiler saved gp prior to us being able to set it properly. Restoring gp after the calls would then invalidate gp and cause segmentation faults later on. By rewriting _start() as an assembly function, we also avoided even more gcc dependences, by trying to use gcc specific features to work around the problem. This version of _start() does not reference _DYNAMIC. We register the cleanup function when it's a non-NULL pointer. The kernel will always pass a NULL pointer and dynamic linkers may pass a non-NULL pointer. The machine independent code to set __progname now unfortunately is written in assembly. So be it. Revision Changes Path 1.12 +2 -2 src/lib/csu/ia64/Makefile 1.1 +191 -0 src/lib/csu/ia64/crt1.S (new)