On Sun, 2022-09-04 at 00:38 -0700, Fangrui Song wrote:
> On Sun, Sep 4, 2022 at 12:00 AM Lulu Cheng <chengl...@loongson.cn>
> wrote:

> > I have thought about this problem. For example, there is no '%plt'
> > in
> > aarch64, but I think it can be added and easily distinguished at the
> > assembly code level,
> > 
> > so this is not removed.
> 
> I think @plt should be removed unconditionally. It was a mistake in
> some ABI (e.g. i386, riscv).

I've sent v2
(https://gcc.gnu.org/pipermail/gcc-patches/2022-September/600955.html),
with TARGET_DIRECT_EXTERN_ACCESS check in loongarch_symbol_binds_local_p
so we don't need to duplicate the check 3 times.

Regarding "%plt", I still suggest to remove it globally.  It's not so
easy to be distinguished in the compile time, as only the linker will
know if the PLT should be used (unless, if -fPIC -fplt and calling a
default-visible function then we know PLT must be used).  An explicit
"%plt" sometimes misleads newbies to think %plt would force the linker
to emit a PLT entry but it's not true.  You can discuss this with
Zhensong internally in the following week, I think.

But let's defer the "controversial" thing and eliminate the GOT in
upcoming Linux-6.1 first...

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

Reply via email to