From patchwork Wed Jan 29 11:27:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 23828 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 53E9C20300 for ; Wed, 29 Jan 2014 11:27:40 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id p5sf3595036vbn.10 for ; Wed, 29 Jan 2014 03:27:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=X2I0FG7xrTUwUFdXu4Ki/h53UU+1s5uv7JXobNDOfeA=; b=YRxR3wCP+fJnpCV7GS05ndfTnkGKULMmKpEFZTtgIHhChOQb/VD10BlBdw0L1Lh9gG qUv0FDkfBXNNp8inYD+rWsdt43S6bcu7DEjKiaLiVhhEwQuilAHM/HHI0MbH+CepoOLf NHC8kkYCf3bC2dfT/dU50mksKg0tDzd0YaMIbyQ/OmNsE6fQDPbEbvUoEQ+9/nY48sNC 1yVoMMg/swWBz0KOXzbZ1n1jrSTwbvUqvsWGYfxVSwOKywX/VNoZfk19z6nTQReYJ9ZN chQqYhvHC3OVXTPcG2JaT9mzfULux/oCJNTzhVl8LQYC7E2ROnKabb29AmG8K0/bPB0w KhEA== X-Gm-Message-State: ALoCoQk+GS7/IcLGmGmYmtYeWIBq+k9vlIJyOHf5g43TbWCZf0F78gQSV9gsRGo77J3cM7Qf/8Vb X-Received: by 10.236.139.116 with SMTP id b80mr2200318yhj.30.1390994858881; Wed, 29 Jan 2014 03:27:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.165 with SMTP id l34ls75464qgd.5.gmail; Wed, 29 Jan 2014 03:27:38 -0800 (PST) X-Received: by 10.52.108.232 with SMTP id hn8mr695999vdb.29.1390994858808; Wed, 29 Jan 2014 03:27:38 -0800 (PST) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id eo4si684656vdb.121.2014.01.29.03.27.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 03:27:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.45; Received: by mail-vb0-f45.google.com with SMTP id m10so1033804vbh.18 for ; Wed, 29 Jan 2014 03:27:38 -0800 (PST) X-Received: by 10.52.229.72 with SMTP id so8mr5269582vdc.10.1390994858729; Wed, 29 Jan 2014 03:27:38 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp105170vcz; Wed, 29 Jan 2014 03:27:37 -0800 (PST) X-Received: by 10.67.11.12 with SMTP id ee12mr7323794pad.132.1390994856812; Wed, 29 Jan 2014 03:27:36 -0800 (PST) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id a6si2290006pao.41.2014.01.29.03.27.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 03:27:36 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of kugan.vivekanandarajah@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id y10so1597584pdj.4 for ; Wed, 29 Jan 2014 03:27:36 -0800 (PST) X-Received: by 10.66.149.7 with SMTP id tw7mr7429877pab.72.1390994856216; Wed, 29 Jan 2014 03:27:36 -0800 (PST) Received: from [192.168.0.100] ([1.130.32.84]) by mx.google.com with ESMTPSA id gw11sm6194446pbd.17.2014.01.29.03.27.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 03:27:35 -0800 (PST) Message-ID: <52E8E59A.4040005@linaro.org> Date: Wed, 29 Jan 2014 22:27:22 +1100 From: Kugan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: binutils@sourceware.org CC: "patches@linaro.org" Subject: [Bug15639][ARM] gold and -flto always fails with an internal error on arm-linux-gnueabi* X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kugan.vivekanandarajah@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi, In Sized_relobj_file::do_layout_deferred_sections(Layout* layout), while reading .eh_frame, Arm_relobj::do_read_symbols(Read_symbols_data* sd) is called second time around and this triggering the assert. This patch removes the assert and skips reading if this section is already read. Is this OK? Thanks, Kugan gold/ +2014-01-29 Kugan Vivekanandarajah + + * arm.cc (Arm_relobj::do_read_symbols): Skip reading + .ARM.attributes section if already read. + diff --git a/gold/arm.cc b/gold/arm.cc index 560f380..4588b94 100644 --- a/gold/arm.cc +++ b/gold/arm.cc @@ -6729,9 +6729,9 @@ Arm_relobj::do_read_symbols(Read_symbols_data* sd) // be conservative. must_merge_flags_and_attributes = true; - if (shdr.get_sh_type() == elfcpp::SHT_ARM_ATTRIBUTES) + if ((shdr.get_sh_type() == elfcpp::SHT_ARM_ATTRIBUTES) + && (this->attributes_section_data_ == NULL)) { - gold_assert(this->attributes_section_data_ == NULL); section_offset_type section_offset = shdr.get_sh_offset(); section_size_type section_size = convert_to_section_size_type(shdr.get_sh_size());