The basic requirement for position independent code and data in the small data area is, at runtime, maintaining the link time address relationships between the startup code ( .init ) and the .sdata and .sdata2 segments. For example, if the link time addresses are:
.init = 0x00002000
.sdata2 = 0x00003000
.sdata = 0x00004000
but .init somehow is executed at 0x00002500, then those link time addresses must all increment by 0x00000500 for their runtime addresses.
Any segment that does not maintain the address relationship at runtime is considered external and must be addressed with absolute addresses. Segments that do maintain their link time address relationship at runtime are considered internal and must be addressed with PC-relative and SDA-relative addressing.