/tmp/ccj3o8jr.ltrans19.ltrans.o: in function `.L0 ':
/builddir/build/BUILD/mvapich2-2.3.7-1/default/src/mpi/coll/bcast_tuning.c:1034:(.text+0x3d2): relocation truncated to fit: R_RISCV_JAL against `.L314'
collect2: error: ld returned 1 exit status
“The code for a executable program image can be up to 4GB in size and still use pc-relative branching — it would use what we refer to as far branches, where the branch sequence is composed of two instructions (auipc and jal ). To be clear, 4GB is a very large code segment. Most of the value of a 64-bit architecture is being able to work with over 4GB of data, not over 4GB of code. To reach code sizes over 4GB, you would use pointers (e.g. stored in tables), since pointers can be full 64-bits wide. This technique is already used for DLLs (even though they generally won’t come close to exceeding 4GB of code when the size of each is added together) since they are usually loaded independently (and thus while pc-relative branches will work inside a single code section, it won’t work to go in between code sections)”
`-mcmodel=medlow`
Generate code for the medium-low code model. The program and its statically defined symbols must lie within a single 2 GiB address range and must lie between absolute addresses −2 GiB and +2 GiB. Programs can be statically or dynamically linked. This is the default code model.
`-mcmodel=medany`
Generate code for the medium-any code model. The program and its statically defined symbols must be within any single 2 GiB address range. Programs can be statically or dynamically linked.
The code generated by the medium-any code model is position-independent, but is not guaranteed to function correctly when linked into position-independent executables or libraries.