Where is the documentation on what llvm::CodeModel values mean?
I observe that with Small code model, elf relocation entries become 32 bit, and the corresponding functions are expected to be in the same 32-bit memory segment.
But is it possible to make specific call instances still treated as far calls?
What is the difference between those values in general?
Where is the documentation on what llvm::CodeModel values mean?
It's mostly in the platform ABI documents since each architecture has
different thresholds where the benefits appear, depending on what
instructions are available. LLVM just exposes an enum of the common
ones, interpreted by each backend as it wants.
But is it possible to make specific call instances still treated as far
calls?
Not really. The historical solution to that problem was separating
"near" and "far" pointers, I think, which LLVM doesn't support as far
as I know. It might be implementable in terms of addressspaces in
LLVM, though the targets don't at the moment.
Other than that, compiling PIC and getting a GOT entry might work,
depending on what your situation is.