From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14515 invoked by alias); 19 Oct 2010 16:54:12 -0000 Received: (qmail 14502 invoked by uid 22791); 19 Oct 2010 16:54:11 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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; Tue, 19 Oct 2010 16:54:04 +0000 Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id o9JGrekF029025 for ; Tue, 19 Oct 2010 09:53:40 -0700 Received: from iwn42 (iwn42.prod.google.com [10.241.68.106]) by kpbe18.cbf.corp.google.com with ESMTP id o9JGr9uf029760 for ; Tue, 19 Oct 2010 09:53:39 -0700 Received: by iwn42 with SMTP id 42so1224010iwn.23 for ; Tue, 19 Oct 2010 09:53:39 -0700 (PDT) Received: by 10.231.168.21 with SMTP id s21mr5087009iby.123.1287507218853; Tue, 19 Oct 2010 09:53:38 -0700 (PDT) Received: from coign.google.com (dhcp-172-22-123-203.mtv.corp.google.com [172.22.123.203]) by mx.google.com with ESMTPS id 34sm16825991ibi.20.2010.10.19.09.53.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 19 Oct 2010 09:53:37 -0700 (PDT) From: Ian Lance Taylor To: =?utf-8?B?RG91ZyBLd2FuICjpl5zmjK/lvrcp?= Cc: binutils Subject: Re: [GOLD][PATCH] Set SHF_LINK_ORDER flags of ARM EXIDX sections. References: Date: Tue, 19 Oct 2010 16:54:00 -0000 In-Reply-To: ("Doug Kwan =?utf-8?B?KOmXnOaMr+W+tykiJ3M=?= message of "Wed, 20 Oct 2010 00:12:21 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00310.txt.bz2 "Doug Kwan (=E9=97=9C=E6=8C=AF=E5=BE=B7)" writes: > Gold does not handle SHF_LINK_ORDER flag in general, we drop the flag > when searching for an output section. > > Output_section* > Layout::choose_output_section(const Relobj* relobj, const char* name, > elfcpp::Elf_Word type, elfcpp::Elf_Xword fl= ags, > bool is_input_section, Output_section_order= order, > bool is_relro) > ... > > // Some flags in the input section should not be automatically > // copied to the output section. > flags &=3D ~ (elfcpp::SHF_INFO_LINK > | elfcpp::SHF_LINK_ORDER > | elfcpp::SHF_GROUP > | elfcpp::SHF_MERGE Oh yeah, sorry about that. That is incorrect when generating relocatable output. Rather than testing for SHT_ARM_EXIDX in the target-independent code, suppose we add another bit flag to Output_section. Then we can set it if SHF_LINK_ORDER is set in the input section, which will be correct once we finally support SHF_LINK_ORDER. And the ARM backend can set it at will. Ian > =E5=9C=A8 2010=E5=B9=B410=E6=9C=8819=E6=97=A5=E4=B8=8B=E5=8D=8810:07=EF= =BC=8CIan Lance Taylor =E5=AF=AB=E9=81=93=EF=BC=9A >> "Doug Kwan (=E9=97=9C=E6=8C=AF=E5=BE=B7)" writes: >> >>> This patch changes code writing output section headers so that the >>> SHF_LINK_ORDER flag of a section of type SHT_ARM_EXIDX is always set. >>> The flag is required to be set for such a section by the ARM EHABI. >>> The existing code drops the SHF_LINK_ORDER flag and that confuses >>> other tools. Gold does not handle SHF_LINK_ORDER in general but the >>> ARM back-end can handle the EXIDX sections. >>> >>> -Doug >>> >>> >>> 2010-10-19 Doug Kwan >>> >>> * output.cc(Output_section::write_header): Set SHF_LINK_ORDER f= lags of >>> ARM EXIDX sections. >> >> I don't see the ARM backend actually creating any SHT_ARM_EXIDX >> sections. So it seems to me that they are input sections. If the ABI >> requires the input sections to have the SHF_LINK_ORDER flag set, then >> that setting should carry through to the output section. Does that not >> happen? >> >> Ian >>