lkml.org 
[lkml]   [2022]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 0/4] LoongArch: Support new relocation types
    From
    Date
    On Tue, 2022-08-02 at 14:39 +0800, Lulu Cheng wrote:

    > >
    > >  OO, old toolchains require extra handlingg no matter how modified.
    > >  Maybe rejecting old toolchain builds is a good option as Huacai
    > > said.

    > Sorry to ask, is it possible to use an absolute address to visit here?
    > Like precpu, do not use pcrel or got, and it directly uses
    > four instructions to obtain the absolute address.
    > The same is achieved by adding attributes in GCC.

    Both GOT and ABS will work. But to me GOT is better because it only
    needs two instructions while ABS needs four.

    The most troubling issue is how to support the old GCC. It seems we
    have to check GCC version and use -Wa,-mla-local-with-pcrel for GCC 12
    (while I still think GOT is better but we don't have -mla-local-with-
    got, *and* it will cause make every local object address load cost 4
    instructions), or we just say "it's impossible to use GCC 12 to build
    Linux 6.0 for LoongArch".

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

    \
     
     \ /
      Last update: 2022-08-02 09:16    [W:2.653 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site