Thread (22 messages) 22 messages, 4 authors, 2022-06-24

Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

From: Segher Boessenkool <hidden>
Date: 2022-05-25 16:58:42
Also in: lkml

On Wed, May 25, 2022 at 03:44:04PM +0530, Sathvika Vasireddy wrote:
On 24/05/22 18:47, Christophe Leroy wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help