[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220525165111.GP25951@gate.crashing.org>
Date: Wed, 25 May 2022 11:51:11 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Sathvika Vasireddy <sv@...ux.vnet.ibm.com>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>,
"aik@...abs.ru" <aik@...abs.ru>, jpoimboe@...hat.com,
linux-kernel@...r.kernel.org,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"peterz@...radead.org" <peterz@...radead.org>,
Paul Mackerras <paulus@...ba.org>,
Sathvika Vasireddy <sv@...ux.ibm.com>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>, mbenes@...e.cz,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc
On Wed, May 25, 2022 at 03:44:04PM +0530, Sathvika Vasireddy wrote:
> On 24/05/22 18:47, Christophe Leroy wrote:
> >This draft series adds PPC32 support to Sathvika's series.
> >Verified on pmac32 on QEMU.
> >
> >It should in principle also work for PPC64 BE but for the time being
> >something goes wrong. In the beginning I had a segfaut hence the first
> >patch. But I still get no mcount section in the files.
> Since PPC64 BE uses older elfv1 ABI, it prepends a dot to symbols.
> And so, the relocation records in case of PPC64BE point to "._mcount",
> rather than just "_mcount". We should be looking for "._mcount" to be
> able to generate mcount_loc section in the files.
The dotted symbol is on the actual function. The "normal" symbol is on
the "official procedure descriptor" (opd), which is what you get if you
(in C) take the address of a function. A procedure descriptor holds one
or two more pointers, the GOT and environment pointers. We don't use
the environment one, but the GOT pointer is necessary everywhere :-)
Segher
Powered by blists - more mailing lists