bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/24992] RISC-V: partial relaxing against global pointer with sdat


From: wilson at gcc dot gnu.org
Subject: [Bug ld/24992] RISC-V: partial relaxing against global pointer with sdata section alignment
Date: Thu, 12 Sep 2019 16:50:48 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24992

--- Comment #4 from Jim Wilson <wilson at gcc dot gnu.org> ---
It is the same underlying problem.  Addresses can increase by up to section
alignment after relaxation, so we have to reduce gp range by the alignment of
the largest section in between gp and the variable, but we don't try to compute
that, we just use the maximum alignment of all sections in the file.  Unless gp
and the variable are in the same section, in which case we can ignore the
problem.  gp used to be in sdata, but is now in the abs section because it is
defined at the end of the linker script, hence in the past we could sometimes
ignore the alignment problem, but now we never do.  The gp definition change
reduces size of most programs.  There are a few cases like this one where it
hurts.

So if you put a variable in sdata are align it, then you are reducing gp range,
and the more you align it the more the gp range decreases.

There is another example of this reported here
https://github.com/riscv/riscv-gnu-toolchain/issues/497

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]