https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95285
--- Comment #15 from Wilco <wilco at gcc dot gnu.org> --- (In reply to Bu Le from comment #14) > > > Anyway, my point is that the size of single data does't affact the fact > > > that > > > medium code model is missing in aarch64 and aarch64 is lack of PIC large > > > code model. > > > > What is missing is efficient support for >4GB of data, right? How that is > > implemented is a different question - my point is that it does not require a > > new code model. It would be much better if it just worked without users even > > needing to think about code models. > > > > Also, what is the purpose of a large fpic model? Are there any applications > > that use shared libraries larger than 4GB? > > Yes, I understand, and I am grateful for you suggestion. I have to say it is > not a critical problem. After all, most applications works fine with > curreent code modes. > > But there are some cases, like CESM with certain configuration, or my test > case, which cannot be compiled with current gcc compiler on aarch64. > Unfortunately, applications that large than 4GB is quiet normal in HPC > feild. In the meantime, x86 and llvm-aarch64 can compile it, with medium or > large-pic code model. That is the purpose I am proposing it. By adding this > feature, we can make a step forward for aarch64 gcc compiler, making it more > powerful and robust. > > Clear enough for your concern? Yes but such a feature needs to be defined in an ABI and well specified. This is why I'm trying to get the underlying requirements first. Note that while LLVM allows -fpic in large model, it doesn't correctly implement it. The large model shouldn't ever be needed by actual applications. > And for the implementation you suggested, I believe it is a promissing plan. > I would like to try to implement it first. Might take weeks of development. > I will see what I can get. I will give you update with progress. > > Thanks for the suggestion again. As discussed, there are many different ways of supporting the requirement of >4GB of data, so I wouldn't start on the implementation before there is a good specification. GCC and LLVM would need to implement it in the same way after all.