Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-09 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-08-09 at 21:03 +0800, Lulu Cheng wrote: > > 在 2022/8/9 下午7:30, Xi Ruoyao 写道: >   > > > > > Sorry for late reply, I'm rebuilding my entire Linux system (from > > scratch) for Glibc-2.36 and Binutils-2.39 update and I just reached the > > mail client. > > > > On Mon, 2022-08-08 at 1

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-09 Thread Lulu Cheng
在 2022/8/9 下午7:30, Xi Ruoyao 写道: Sorry for late reply, I'm rebuilding my entire Linux system (from scratch) for Glibc-2.36 and Binutils-2.39 update and I just reached the mail client. On Mon, 2022-08-08 at 12:53 +0800, Lulu Cheng wrote: I still think it makes a little bit more sense to put at

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-09 Thread Xi Ruoyao via Gcc-patches
Sorry for late reply, I'm rebuilding my entire Linux system (from scratch) for Glibc-2.36 and Binutils-2.39 update and I just reached the mail client. On Mon, 2022-08-08 at 12:53 +0800, Lulu Cheng wrote: > I still think it makes a little bit more sense to put attribute(model) > and -mcmodel togeth

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-07 Thread Lulu Cheng
在 2022/8/5 下午5:53, Xi Ruoyao 写道: On Fri, 2022-08-05 at 15:58 +0800, Lulu Cheng wrote: I think the model of precpu is not very easy to describe. model(got)?model(global)? I also want to use attribute model and -mcmodel together, but this is just an initial idea, what do you think? It seems I

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-05 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-08-05 at 15:58 +0800, Lulu Cheng wrote: > I think the model of precpu is not very easy to describe. > model(got)?model(global)? > I also want to use attribute model and -mcmodel together, but this is just an > initial idea, > what do you think? It seems I had some misunderstanding

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-05 Thread Lulu Cheng
在 2022/8/5 下午3:41, WANG Xuerui 写道: On 2022/8/5 15:19, Lulu Cheng wrote: 在 2022/8/5 下午2:03, Xi Ruoyao 写道: On Fri, 2022-08-05 at 12:01 +0800, Lulu Cheng wrote: 在 2022/8/5 上午11:45, Xi Ruoyao 写道: On Fri, 2022-08-05 at 11:34 +0800, Xi Ruoyao via Gcc-patches wrote: Or maybe we should just us

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-05 Thread WANG Xuerui
On 2022/8/5 15:19, Lulu Cheng wrote: 在 2022/8/5 下午2:03, Xi Ruoyao 写道: On Fri, 2022-08-05 at 12:01 +0800, Lulu Cheng wrote: 在 2022/8/5 上午11:45, Xi Ruoyao 写道: On Fri, 2022-08-05 at 11:34 +0800, Xi Ruoyao via Gcc-patches wrote: Or maybe we should just use a PC-relative addressing with 4 inst

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-05 Thread Lulu Cheng
在 2022/8/5 下午2:03, Xi Ruoyao 写道: On Fri, 2022-08-05 at 12:01 +0800, Lulu Cheng wrote: 在 2022/8/5 上午11:45, Xi Ruoyao 写道: On Fri, 2022-08-05 at 11:34 +0800, Xi Ruoyao via Gcc-patches wrote: Or maybe we should just use a PC-relative addressing with 4 instructions instead of GOT f

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-08-05 at 12:01 +0800, Lulu Cheng wrote: > > 在 2022/8/5 上午11:45, Xi Ruoyao 写道: >   > > > > > On Fri, 2022-08-05 at 11:34 +0800, Xi Ruoyao via Gcc-patches wrote: > > > >   > > > > > > > > > Or maybe we should just use a PC-relative addressing with 4 instructions > > > instead of

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Lulu Cheng
在 2022/8/5 上午11:45, Xi Ruoyao 写道: On Fri, 2022-08-05 at 11:34 +0800, Xi Ruoyao via Gcc-patches wrote: Or maybe we should just use a PC-relative addressing with 4 instructions instead of GOT for -fno-PIC? Not possible, Glibc does not support R_LARCH_PCALA* relocations in ld.so. So we still n

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-08-05 at 11:34 +0800, Xi Ruoyao via Gcc-patches wrote: > Or maybe we should just use a PC-relative addressing with 4 instructions > instead of GOT for -fno-PIC? Not possible, Glibc does not support R_LARCH_PCALA* relocations in ld.so. So we still need a -mno-got (or something) optio

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-08-05 at 10:51 +0800, Xi Ruoyao via Gcc-patches wrote: > > If it is accessed through the GOT table, dynamic relocation is required > > when the module is loaded. > > Dynamic relocation is required when the module is loaded anyway.  The > .ko modules are actually relocatable ELF obje

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-08-05 at 10:38 +0800, Lulu Cheng wrote: > > > I'm working on the implementation of specifing attributes of variables > > > for other architectures. > > > If the address is obtained through the GOT table and 4 instructions, > > > there is not much difference in performance. > > In th

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Lulu Cheng
在 2022/8/5 上午9:28, Xi Ruoyao 写道: On Fri, 2022-08-05 at 09:05 +0800, Lulu Cheng wrote: I'm working on the implementation of specifing attributes of variables for other architectures. If the address is obtained through the GOT table and 4 instructions, there is not much difference in performan

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-08-05 at 09:05 +0800, Lulu Cheng wrote: > I'm working on the implementation of specifing attributes of variables for > other architectures. > If the address is obtained through the GOT table and 4 instructions, there is > not much difference in performance. In this case I still pref

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Lulu Cheng
I'm working on the implementation of specifing attributes of variables for other architectures. If the address is obtained through the GOT table and 4 instructions, there is not much difference in performance. Is it more reasonable for us to refer to the implementation of the model attribute un

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-04 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-08-03 at 11:10 +0800, Xi Ruoyao via Gcc-patches wrote: > > I'd like to wait for the kernel team to test the performance data of > > the two implementations before deciding whether to support this > > attribute. > > > > What do you think? > > Perhaps, I can't access my dev system now

Re: 回复:[PATCH v5] LoongArch: add movable attribute

2022-08-02 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-08-03 at 10:55 +0800, chengl...@loongson.cn wrote: > I think there is no problem with this patch。But I have a question. The > visibility attribute works, so is it necessary to add the moveable > attribute? 1. My use of -fPIC and visibility is not in the way ELF visibility has been des