You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The entry for the large model in this column mentions that the max distance between the GOT and text must be <4GiB.
From what I could see in the text there doesn't seem to be any mention of the medium code model having some special handling of a GOT being further than 4GiB away from the code access to it.
Is there a reason that I'm missing that this limitation needed for the large model is not needed for the medium model?
Or is the "no additional GOT restrictions" mention overlooking that 4GiB limit on distance between text and GOT?
The text was updated successfully, but these errors were encountered:
This looks like an oversight to me. My understanding is that the restriction "max distance from text to GOT < 4 GiB" is that the linker generated PLT entries use ADRP so the .got.plt needs to be within 4 GiB of the .got. This will remain true for the medium code-model. I'd also expect the .text sections to access the .got via ADRP too, further strengthening the case for putting the same restriction on the medium code model.
Yes this restriction applies to all models. However the maximum .text size of 2GB means that the GOT is always within 4GB as long as you don't create a gap between code and data that is larger than 2GB. Note both medium and large code models assume you place data after code and got sections before .data and .bss.
The table
Code Models
in the section https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst#7code-models of the sysvabi64 seems to say that there are no restrictions on the GOT forPIC
code.The entry for the
large
model in this column mentions that the max distance between the GOT and text must be <4GiB.From what I could see in the text there doesn't seem to be any mention of the
medium
code model having some special handling of a GOT being further than 4GiB away from the code access to it.Is there a reason that I'm missing that this limitation needed for the
large
model is not needed for themedium
model?Or is the "no additional GOT restrictions" mention overlooking that 4GiB limit on distance between text and GOT?
The text was updated successfully, but these errors were encountered: