[LLD][ELF] Support for SHN_AMD64_LCOMMON and lbss on x86-64 #161697
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Place LARGE_COMMON (SHN_AMD64_LCOMMON) into lbss on x86-64. Needed to
support large Fortran common blocks with medium and large code models on
x86-64:
Sections:
...
25 .lbss b44834508 0000000000004060 0000000000004060 0000304c 2**3
ALLOC
...
SYMBOL TABLE:
...
0000000000004060 g O .lbss 0000000b44834508 BLNK
where BLNK is a large common block resulting from:
program test
implicit integer (i-n)
implicit real8 (a-h, o-z)
parameter (n1=77777, n2=77777)
common v2(n1,n2)
common /ccc/ v6
v6 = 1
v2(6777,6777) = 2
write (,*) v6, v2(6777, 6777)
end program test
There is a sperate PR for emitting SHN_AMD64_LCOMMON.