[Bug target/105649] New: Wrong .localentry address on powerpc64le with -fpatchable-function-entry=1
giuliano.belinassi at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed May 18 19:56:45 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105649
Bug ID: 105649
Summary: Wrong .localentry address on powerpc64le with
-fpatchable-function-entry=1
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: giuliano.belinassi at gmail dot com
Target Milestone: ---
(this bug triggered PR105647)
With the following input file:
```
struct WinsockInterfaceClass
{
WinsockInterfaceClass(void);
virtual int Get_Protocol(void)
{
return 0;
};
};
WinsockInterfaceClass::WinsockInterfaceClass(void)
{
}
```
Saved as test.C, compiling with
> powerpc64le-suse-linux-gcc-11 -c -fpatchable-function-entry=1 test.C
Results in the following error:
```
/tmp/cczW6LfZ.s: Assembler messages:
/tmp/cczW6LfZ.s:56: Error: .localentry expression for
`_ZN21WinsockInterfaceClassC2Ev' is not a valid power of 2
```
The reason for that maybe is because the addition of nops cause the address of
.localentry to be shifted according to how many nops inserted.
OTOH
> powerpc64le-suse-linux-gcc-11 -c -fpatchable-function-entry=2 test.C
works.
More information about the Gcc-bugs
mailing list