From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37679 invoked by alias); 27 Feb 2020 07:07:10 -0000 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 Received: (qmail 37670 invoked by uid 89); 27 Feb 2020 07:07:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-pl1-f171.google.com Received: from mail-pl1-f171.google.com (HELO mail-pl1-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Feb 2020 07:07:08 +0000 Received: by mail-pl1-f171.google.com with SMTP id b22so742219pls.12 for ; Wed, 26 Feb 2020 23:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3xnnUJ8KCM/YsX9LJLUWp56OiYtTYP1JGS2uVaeT3tU=; b=L5PIH/XXDz047XpS/vwAjcgPDNBlw4X6Gx/J076EJVF4/qZBfZUw1HOrYz81X4proJ s8l0QvA+b6xx3Mgn5WHUIlkSkdXRxl/ROmiWHVYg+9cQ+7lt2TBOnxglN06nyoMrUey7 F7HDe7NY1ZCvKoSuc2lsHqBbHX1FtBWbJO7wX+nZKmmbxThgMpXinx5eeo84NtOv0SMr 04Kbyem9Frve8Hey8Xe6ZcP36iHCN3+wEILh1weQLOB2uF4+83x9Aem954xKkoXTEg8M 6KhmTvtS6egzZ7IPcVlqplISMj/jMidrFwrpIUs8DBqUuafZ2HYng38hk9EqNkuwJn9y K5gg== Return-Path: Received: from bubble.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id o14sm5167855pgm.67.2020.02.26.23.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 23:07:05 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A0E6B806B5; Thu, 27 Feb 2020 17:37:01 +1030 (ACDT) Date: Thu, 27 Feb 2020 07:07:00 -0000 From: Alan Modra To: Hans-Peter Nilsson Cc: binutils@sourceware.org, KONRAD Frederic Subject: Re: PR24511, nm should not mark symbols in .init_array as "t" Message-ID: <20200227070701.GH32593@bubble.grove.modra.org> References: <20190504075723.GJ3195@bubble.grove.modra.org> <1b774bd1-68a9-bcf7-795b-e3c545c4faa6@adacore.com> <20200227065610.GG32593@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200227065610.GG32593@bubble.grove.modra.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00557.txt.bz2 On Thu, Feb 27, 2020 at 05:26:10PM +1030, Alan Modra wrote: > * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries. > (coff_section_type): Adjust comment. > (decode_section_type): Likewise. Call coff_section_type before > decode_section_type. > (bfd_decode_symclass): Use 'c' for common sections other than > the standard one. With the bfd_decode_symclass change, ld SIZEOF test fails due to data_end being reported as type '?'. Does this look a reasonable solution, Hans-Peter? bfd/ * mmo.c (mmo_scan): Set SEC_DATA for .data. ld/ * testsuite/ld-mmix/b-fixo2.d: Adjust for .data change. * testsuite/ld-mmix/sec-2.d: Likewise. * testsuite/ld-mmix/sec-3.d: Likewise. * testsuite/ld-mmix/sec-4.d: Likewise. * testsuite/ld-mmix/spec802.d: Likewise. * testsuite/ld-mmix/spec803.d: Likewise. * testsuite/ld-mmix/spec804.d: Likewise. * testsuite/ld-mmix/spec805.d: Likewise. * testsuite/ld-mmix/spec806.d: Likewise. * testsuite/ld-mmix/spec807.d: Likewise. * testsuite/ld-mmix/spec808.d: Likewise. diff --git a/bfd/mmo.c b/bfd/mmo.c index 9ac689d042..073c37c0ac 100644 --- a/bfd/mmo.c +++ b/bfd/mmo.c @@ -2074,7 +2074,7 @@ mmo_scan (bfd *abfd) if (sec != NULL && (bfd_section_flags (sec) & SEC_HAS_CONTENTS) && !bfd_set_section_flags (sec, (bfd_section_flags (sec) - | SEC_ALLOC | SEC_LOAD))) + | SEC_ALLOC | SEC_LOAD | SEC_DATA))) error = TRUE; /* Free whatever resources we took. */ diff --git a/ld/testsuite/ld-mmix/b-fixo2.d b/ld/testsuite/ld-mmix/b-fixo2.d index e8e2ff845f..3db01eb32d 100644 --- a/ld/testsuite/ld-mmix/b-fixo2.d +++ b/ld/testsuite/ld-mmix/b-fixo2.d @@ -16,7 +16,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+8 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2068098510aa5564 2068098510aa5564 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA SYMBOL TABLE: 0+4 g \.text Main 0+4 g \.text a diff --git a/ld/testsuite/ld-mmix/sec-2.d b/ld/testsuite/ld-mmix/sec-2.d index 10623f354c..10a9a521ac 100644 --- a/ld/testsuite/ld-mmix/sec-2.d +++ b/ld/testsuite/ld-mmix/sec-2.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 1 \.other 0+50 1000000000000000 1000000000000000 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE, DATA 2 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA Contents of section \.text: 0100 e3fd0001 .* Contents of section \.other: diff --git a/ld/testsuite/ld-mmix/sec-3.d b/ld/testsuite/ld-mmix/sec-3.d index 290052b99e..8074e834e1 100644 --- a/ld/testsuite/ld-mmix/sec-3.d +++ b/ld/testsuite/ld-mmix/sec-3.d @@ -15,7 +15,7 @@ Idx Name Size VMA LMA File off Algn 2 \.a\.fourth\.section 0+10 0+20 0+20 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 4 anothersec 0+13 2000000000000008 2000000000000008 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, DATA 5 thirdsec 0+a 0+ 0+ 0+ 2\*\*2 diff --git a/ld/testsuite/ld-mmix/sec-4.d b/ld/testsuite/ld-mmix/sec-4.d index 251f6a28d0..16b65896a7 100644 --- a/ld/testsuite/ld-mmix/sec-4.d +++ b/ld/testsuite/ld-mmix/sec-4.d @@ -11,7 +11,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+100 0+100 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.other 0+c 1000000000000000 1000000000000000 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, READONLY, CODE Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec802.d b/ld/testsuite/ld-mmix/spec802.d index ea0ebc3d65..cea7de2ee5 100644 --- a/ld/testsuite/ld-mmix/spec802.d +++ b/ld/testsuite/ld-mmix/spec802.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec803.d b/ld/testsuite/ld-mmix/spec803.d index b933d6ca7d..cc63844425 100644 --- a/ld/testsuite/ld-mmix/spec803.d +++ b/ld/testsuite/ld-mmix/spec803.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+c 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec804.d b/ld/testsuite/ld-mmix/spec804.d index 170bc5e0bd..fd8f0bf376 100644 --- a/ld/testsuite/ld-mmix/spec804.d +++ b/ld/testsuite/ld-mmix/spec804.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+10 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec805.d b/ld/testsuite/ld-mmix/spec805.d index c4cdd02f23..d0562eb138 100644 --- a/ld/testsuite/ld-mmix/spec805.d +++ b/ld/testsuite/ld-mmix/spec805.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+14 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec806.d b/ld/testsuite/ld-mmix/spec806.d index 7f64948971..64d8bf9cf6 100644 --- a/ld/testsuite/ld-mmix/spec806.d +++ b/ld/testsuite/ld-mmix/spec806.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+18 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec807.d b/ld/testsuite/ld-mmix/spec807.d index f37e57a4d5..ef2edb93d3 100644 --- a/ld/testsuite/ld-mmix/spec807.d +++ b/ld/testsuite/ld-mmix/spec807.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+1c 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: diff --git a/ld/testsuite/ld-mmix/spec808.d b/ld/testsuite/ld-mmix/spec808.d index e1d678485e..00a5347f99 100644 --- a/ld/testsuite/ld-mmix/spec808.d +++ b/ld/testsuite/ld-mmix/spec808.d @@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 CONTENTS, ALLOC, LOAD, CODE 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 - CONTENTS, ALLOC, LOAD + CONTENTS, ALLOC, LOAD, DATA 2 \.MMIX\.spec_data\.80 0+20 0+ 0+ 0+ 2\*\*2 CONTENTS Contents of section \.text: -- Alan Modra Australia Development Lab, IBM