From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 503B4389F4EE for ; Tue, 10 Mar 2020 11:49:54 +0000 (GMT) Received: by mail-pg1-x532.google.com with SMTP id 7so6206525pgr.2 for ; Tue, 10 Mar 2020 04:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=evkplDup47g185YaROupn70FJLelVna5FjpPzV5W1vY=; b=PpOJhmIAlwgKB9+8+AyJbVpUy5mRNeLbxozmHjrQl1pbs58LpywYYPnuMHV/LF4G3f o4324MoopZHjUZvDrPcZ3XDB2mHaWezW4gt05mbxVK5BEXo83UyAJKwHyS2xVbkQDCpj PEbbsHYyH29RooSgwmw9x39EGTXa/GQ8zPX70YDlCtTlOM773W2v2N8MuDQ4RuTczzRt pVJkLelHCjcCQ0u/rQSe8nXqQF9rzOMetiqSQ3TKUU9w7aGudGKhJNJexHtmeNn7gKbi KOz6VRUjr6cYD6KTALxFW+G6ss8PjzqhGI4Ci3wbBM0s1d/uWUxhLUfEvpt97eIQJaaP jpyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=evkplDup47g185YaROupn70FJLelVna5FjpPzV5W1vY=; b=EIl/Mcl/EhHgWWhSNeLOLjhP48lMB2J7tY80rKlnsxyY0tfwJhUm389zz9r4zRYiqJ +HocyutDfdtSujwmkFKZ3IvDAYYqf1rx17CcQE0T+euCX17EUOgqqcflYEbD+cpYESID PX3GWakJsjo+sOW9aaBS5rxKA+3SVm6BRQuWRfI/3Hf7iWP2IdOP8iMitqKJb+eDuoDZ LQpCe6az13iSXnYJAG8ik/6vKm1OdnVlGUgAb4jtb/kiLlL+GcGU7gmo/fethJo1/Nxf F+7IbixMJEsomZsBD74zJFHv6+1dVyoS/2Nld31KdBPxaOBw9tqAod6OhN7k+JTwY22/ pVeg== X-Gm-Message-State: ANhLgQ3e71cd0xo3qePJhsf8SjcD0FTfsPIBeiqXJGCq3huZXnwGj2rr 0GRiNOWeWeIXmW85IG21XtcAefVThNs= X-Google-Smtp-Source: ADFU+vv9C9W3ihqACeChWO6vlqqegaQFSMwjgaWMKznTPxhoQ5PM3/K2Gwfla1FhNAxJw/1NPaj0eg== X-Received: by 2002:a62:ce48:: with SMTP id y69mr9291964pfg.178.1583840993090; Tue, 10 Mar 2020 04:49:53 -0700 (PDT) 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 n30sm1750155pfq.16.2020.03.10.04.49.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 04:49:52 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A143189F47; Tue, 10 Mar 2020 22:19:48 +1030 (ACDT) Date: Tue, 10 Mar 2020 22:19:48 +1030 From: Alan Modra To: binutils@sourceware.org Subject: ELF section flag SHF_EXCLUDE Message-ID: <20200310114948.GW5384@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2020 11:49:55 -0000 commit 18ae9cc1db made SHF_EXCLUDE generic. Prior to that the flag was only defined for sparc, ppc, or32, and i370. The problem is that the flag was left in the very limited SHF_MASKPROC processor specific range rather than being put in the generic range, and it clashes with other processor specific section flags. aarch64, arm, hppa, mcore, microblaze, mips, mmix, nfp, score and v850 all define flags with the same value. This means SHF_EXCLUDE as is really shouldn't be used on any of those machines. aarch64.h:#define SHF_COMDEF 0x80000000 arm.h:#define SHF_COMDEF 0x80000000 hppa.h:#define SHF_PARISC_SBP 0x80000000 mcore.h:#define SHF_MCORE_NOREAD 0x80000000 microblaze.h:#define SHF_MICROBLAZE_NOREAD 0x80000000 mips.h:#define SHF_MIPS_STRING 0x80000000 mmix.h:#define SHF_MMIX_CANRELAX 0x80000000 nfp.h:#define SHF_NFP_INIT 0x80000000 score.h:#define SHF_SCORE_STRING 0x80000000 v850.h:#define SHF_RENESAS_ABS 0x80000000 SHF_PARISC_SBP, SHF_MCORE_NOREAD, SHF_MICROBLAZE_NOREAD, SHF_MIPS_STRING, SHF_MMIX_CANRELAX, SHF_SCORE_STRING, and SHF_RENESAS_ABS only appear in include/elf/*.h above. I haven't searched any of the relevant ABI docs, if such exist. SHF_COMDEF is decoded by readelf (once you disable SHF_EXCLUDE for arm and aarch64), but is described in arm docs by: "the legacy SHF_COMDEF ELF section flag is deprecated". SHF_NFP_INIT is used in opcodes/nfp-dis.c but not set by bfd/elf64-nfp.c. So what to do? Disabling the flag and assembler support for 'e' in flags is one possibility, but not a good idea for a 10 year old feature. -- Alan Modra Australia Development Lab, IBM