getKindForGlobal is currently a static member of TargetLoweringObjectFile and can't be easily customised. One of the more complicated uses is to decide whether a IR constant with relocations can be emitted as constant section.
The default implementation can deal with static vs PIC, but the SYSV ABI for PPC64 is special in that it always requires the PIC rules to be followed. The patch introduces a new method getSectionKindForGlobal with a matching override in the PPC implementation to get the right behavior.