From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BkToOD9mAmG1OgAAWB0awg (envelope-from ) for ; Thu, 29 Jul 2021 04:26:39 -0400 Received: by simark.ca (Postfix, from userid 112) id DAB671EDFB; Thu, 29 Jul 2021 04:26:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E4A211E4A3 for ; Thu, 29 Jul 2021 04:26:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22CA039AE845 for ; Thu, 29 Jul 2021 08:26:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22CA039AE845 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627547198; bh=+Y8mEzzXd/sx3lPJHAOjg8l+87aaVvCG2rC1/ODRU5Y=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cyfFdcUvozQdZ0nsuDml0i4Wu3MjJnn7OUw8jUsvlZbVBlmP6YQsmzS4wvMoaNoYn tbkBMfu4+pzF9bBkOLRi/lCF2pcLOOjRtE6245RtsfIWzCy7KDP9aK0lonFAPKTfOO /wYXuUICqbNru6kNur7KoCZXjNTnySRoV+rRhFw4= Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 3991E3858023 for ; Thu, 29 Jul 2021 08:26:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3991E3858023 Received: by mail-pl1-x629.google.com with SMTP id n10so6103600plf.4 for ; Thu, 29 Jul 2021 01:26:16 -0700 (PDT) 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+Y8mEzzXd/sx3lPJHAOjg8l+87aaVvCG2rC1/ODRU5Y=; b=gogMjFmm3wAatcCC2ZULKHVnCnepOBA4wNtkAxNd3TCQ0wMrw3gwvusqYzhurtsFUe SqfvtNyd2IC/uYun92013YFPmPoc6UC/+8JnC/C4IEQyzxlHspXKQYApQS7liJhgRIhy xNo0ETAkqHd8XF702cPqumaXqiLD9wKeXr6rI7Sw0Fb0dltOrDDdqmUHbD+MgjB0jTXz QB4ycjbhQUmbVbGxhJZd3rWajQErfkvhEXLashYRwQETvwxnuTs+Ypu8Ee3uFrkqVGSR JTZ6zyYcwomxlDBWv8oBgFFLhPsTCAk0hCOosC6Wyc/eSpgs1BoE5wsduILglWK5I+gl MvTQ== X-Gm-Message-State: AOAM533xCLOBb7OWrDHEi5sUInxQXC7O6mu0OlI7Bwv7b25+GeQHPV5W /ZUqMaa7PelCwNXCsYh55JE= X-Google-Smtp-Source: ABdhPJzH6Q5qejLrhrEjJK6QmA3tGBpuxKFKoTDqu9HuuXZQOkMhdS1GiLl7MYWWC5a4kQnjDywM6g== X-Received: by 2002:a63:54d:: with SMTP id 74mr2825300pgf.265.1627547175356; Thu, 29 Jul 2021 01:26:15 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:a85d:ac35:db0:9e93]) by smtp.gmail.com with ESMTPSA id x9sm2736334pfd.100.2021.07.29.01.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 01:26:14 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id BEA721140050; Thu, 29 Jul 2021 17:56:11 +0930 (ACST) Date: Thu, 29 Jul 2021 17:56:11 +0930 To: Ulrich Weigand Subject: Re: [Patch v2] Handle .TOC. sections during gdb-compile for rs6000 target. Message-ID: References: <21185e6d3118c97c9dde66df366bb9ff3b31dede.camel@vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Alan Modra via Gdb-patches Reply-To: Alan Modra Cc: rogerio , "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, Jul 29, 2021 at 09:18:18AM +0200, Ulrich Weigand wrote: > > > "will schmidt" wrote on 28.07.2021 21:08:21: > > > + sym->section = toc_fallback; > > + sym->value = 0x8000; > > + bfd_set_gp_value(abfd.get(), toc_fallback->vma); > > For compatibility with BFD, shouldn't this be rather: > > bfd_set_gp_value(abfd.get(), toc_fallback->vma + sym->value); > > Alan, can you confirm? No, see bfd/elf64-ppc.c:ppc64_elf_sec_toc. A long time ago I chose the value of elf_gp used in elf64-ppc.c to be the start of the toc section rather than the value of ".TOC.". The value is somewhat arbitrary. Yes, I could change it to be the value of .TOC., but for now the value above is correct. -- Alan Modra Australia Development Lab, IBM