From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15856 invoked by alias); 13 Dec 2010 19:41:27 -0000 Received: (qmail 15834 invoked by uid 22791); 13 Dec 2010 19:41:25 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Dec 2010 19:41:08 +0000 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id oBDJf54w017652 for ; Mon, 13 Dec 2010 11:41:05 -0800 Received: from gxk20 (gxk20.prod.google.com [10.202.11.20]) by kpbe14.cbf.corp.google.com with ESMTP id oBDJesKg011078 for ; Mon, 13 Dec 2010 11:41:04 -0800 Received: by gxk20 with SMTP id 20so4053616gxk.20 for ; Mon, 13 Dec 2010 11:41:03 -0800 (PST) Received: by 10.42.178.70 with SMTP id bl6mr3286703icb.28.1292269263679; Mon, 13 Dec 2010 11:41:03 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id i2sm176681icv.15.2010.12.13.11.41.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 13 Dec 2010 11:41:02 -0800 (PST) From: Ian Lance Taylor To: Dave Korn Cc: "H.J. Lu" , "gcc\@gcc.gnu.org" Subject: Re: Is init_priority file scope or global scope? References: <4D0461A6.6070405@gmail.com> <4D047CAF.5040208@gmail.com> Date: Mon, 13 Dec 2010 19:41:00 -0000 In-Reply-To: <4D047CAF.5040208@gmail.com> (Dave Korn's message of "Sun, 12 Dec 2010 07:41:35 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg00345.txt.bz2 Dave Korn writes: > Well, at least on PE-COFF, the numeric string is (65536-priority). It is > zero padded to five digits, so that the linker's alphabetical sort effectively > becomes a numeric sort, and the reason for the inverting the numeric order of > priorities is because .ctors gets read backwards at startup. Same on ELF (except that on ARM EABI it uses .init_array and does not subtract from 65535; see arm_elf_asm_cdtor). Ian