[PATCH] [AArch64] Handle weak references to variables in small model when using the static relocation model

Tim Northover t.p.northover at gmail.com
Wed Sep 10 03:58:57 PDT 2014


> My understanding of the AArch64 backend (and llvm for that matter) is little
> limited, but this is how the old ARM64 backend used to load weak references
> in the absence of a GOT. This is a regression from the backend merge.

It was actually an intentional cunning plan on my part: if the linker
is going to deal with GOT entries anyway (and the ones I tested did),
why bother with faffing around in constant pools. Unfortunately, it
sounds like there's some linker out there that can't cope so we'll
need it anyway.

>From Renato:
> Maybe a short comment describing the range would be good measure.

I don't think that's necessary. In fact, I think the small model
implies that the constant *will* be in range. We certainly don't need
to call it out in just this one case.

Cheers.

Tim.



More information about the llvm-commits mailing list