https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60406

--- Comment #10 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to boger from comment #9)
> On ppc64le, this works as expected but on ppc64(be) the code that is
> generated from this is not the address of the function but the address of
> the .opd entry that is used to call the function.  As a result the setting
> of the deferring function is incorrect and it does not appear as if it can
> recover because of the way __go_can_recover uses the deferring function's
> address to see if it is in the correct range.

On BE, a "function pointer" (unlike on LE or x64* or ...) always points to a
function's function descriptor (ie, the .opd entry) and not the code address. 
The function descriptor contains 3 64-bit doublewords.  The first doubleword is
the address of the function's code.  The second doubleword is the TOC value
that needs to be in r2 while we execute the function and the third doubleword
contains an environment pointer for languages such as Pascal and PL/1.

Reply via email to