[PATCH v3] LoongArch: Fix the issue of excessive relocation generated by IE

Xi Ruoyao xry111@xry111.site
Wed Jun 19 06:06:28 GMT 2024


On Wed, 2024-06-19 at 13:02 +0800, Xi Ruoyao wrote:
> On Thu, 2024-03-28 at 19:49 +0800, Lulu Cai wrote:
> > Currently, whether GD and IE generate dynamic relocation is
> > determined by SYMBOL_REFERENCES_LOCAL and bfd_link_executable.
> > This results in dynamic relocations still being generated in some
> > situations where dynamic relocations are not necessary (such as
> > the undefined weak symbol in static links).
> > 
> > We use RLARCH_TLS_GD_IE_NEED_DYN_RELOC macros to determine whether
> > GD/IE needs dynamic relocation. If GD/IE requires dynamic relocation,
> > set need_reloc to true and indx to be a dynamic index.
> > 
> > At the same time, some test cases were modified to use regular
> > expression matching instead of complete disassembly matching.
> 
> Hi,
> 
> The change has caused ld to emit some R_LARCH_NONE for many Glibc shared
> libraries.  I'm investigating the issue...

https://sourceware.org/pipermail/binutils/2024-June/134902.html

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Binutils mailing list