From owner-svn-src-head@FreeBSD.ORG Mon Oct 20 18:39:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E97E983F; Mon, 20 Oct 2014 18:39:20 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5D64802; Mon, 20 Oct 2014 18:39:20 +0000 (UTC) Received: from djonathan-sslvpn-nc.jnpr.net ([66.129.239.11]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id s9KIdD4L010262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Oct 2014 11:39:13 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r273334 - in head/sys: boot/common kern sys From: Marcel Moolenaar In-Reply-To: <20141020180002.GA85946@vlakno.cz> Date: Mon, 20 Oct 2014 11:39:07 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201410201704.s9KH44wX079917@svn.freebsd.org> <20141020180002.GA85946@vlakno.cz> To: Roman Divacky X-Mailer: Apple Mail (2.1990.1) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 18:39:21 -0000 > On Oct 20, 2014, at 11:00 AM, Roman Divacky = wrote: >=20 >> Note that LLVM appends the priority of the constructors to the name = of >> the .ctors section. Not so when compiling with GCC. The code = currently >> works for GCC and not for LLVM. >=20 > Uhm? LLVM here creates ".ctors" section, nothing is appended. Can you = be more > specific on what you're seing? Go to a module build directory (I picked uart) and build on amd64: % make DEBUG_FLAGS=3D"-ftest-coverage -fprofile-arcs" Check with objdump: % objdump -x /usr/obj/usr/src/sys/modules/uart/uart.ko | grep ctors 16 .ctors.65535 00000080 0000000000000000 0000000000000000 00020320 = 2**3 0000000000000000 l d .ctors.65535 0000000000000000 .ctors.65535 RELOCATION RECORDS FOR [.ctors.65535]: As you can see, the section is not called .ctors, but it's called .ctors.$((65536-priority)). The priority suffix is removed as part of linking, but on amd64, kernel modules are relocatables... FYI, --=20 Marcel Moolenaar marcel@xcllnt.net