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

--- Comment #168 from dave.anglin at bell dot net ---
On 2020-02-13 12:24 a.m., peter.bisroev at groundlabs dot com wrote:
> Tonight I have been trying to find a test case where this problem can be
> reproduced with gcc and then compiled with aCC. Unfortunately no luck so far. 
>
> With objdump I can see PCREL21B relocations in my .o files. However after the
> final linking, disassembly shows direct short branch if the distance is small
> enough and a call through a stub with brl.few if the distance is large enough.
> I have almost no experience with IA-64 arch, but this behavior seems expected
> to me.
The ia64 PCREL21B relocation is very similar to the PA-RISC 2.0
R_PARISC_PCREL22F relocation.
These determine the maximum branch distance by a pc-relative branch.  I believe
ia64 aligns
code on 8-byte boundaries.  PA-RISC aligns on 4-byte boundaries.  So, in both
cases a branch
is capable of branching about 8 MB from call point.

There seems to be something broken regarding stub insertion for calls to weak
functions.  Are we
using the correct branch form for calls to weak?  There doesn't seem to be a
problem with branches
to functions that aren't defined in the module.

Could you try compiling sancov.c from gcc-8 with aCC in C++ mode.  Use -S to
get assembler output.
What happens to weak calls (e.g., the one I pointed out previously)?

Dave

Reply via email to