From owner-cvs-all@FreeBSD.ORG Fri Oct 17 08:43:13 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 E68CF16A4B3; Fri, 17 Oct 2003 08:43:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 770D643FB1; Fri, 17 Oct 2003 08:43:13 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9HFhDXJ008795; Fri, 17 Oct 2003 08:43:13 -0700 (PDT) (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9HFhD4q008794; Fri, 17 Oct 2003 08:43:13 -0700 (PDT) (envelope-from peter) Message-Id: <200310171543.h9HFhD4q008794@repoman.freebsd.org> From: Peter Wemm Date: Fri, 17 Oct 2003 08:43:13 -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/common crtbrand.c 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: Fri, 17 Oct 2003 15:43:14 -0000 peter 2003/10/17 08:43:13 PDT FreeBSD src repository Modified files: lib/csu/common crtbrand.c Log: Explicitly specify an alignment for abitag. Without it, gcc specifies a section alignnment of 16 bytes for amd64 and this breaks file(1). Before: ./cp: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), for \ FreeBSD 127.7.9, statically linked, stripped after: ^^^^^^^ ./ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), for \ FreeBSD 5.0.1, dynamically linked (uses shared libs), stripped The reason for this is that the NOTE sections are not contiguous internally. If the note section has an alignment of 16, then anything that looks for the data is supposed to round up the payload start to the next multiple of the alignment. But FreeBSD/amd64 broke because the structure is declared as a single structure, not a (header,payload) group, where the payload had an explicit alignment roundup. The alternative is to change things like file(1) to ignore the ELF payload alignment rules for the PT_NOTE section only for FreeBSD. Revision Changes Path 1.4 +1 -1 src/lib/csu/common/crtbrand.c