R_386_GOTOFF is calculated as S + A - GOT, where:
S - Represents the value of the symbol whose index resides in the relocation entry.
A - Represents the addend used to compute the value of the relocatable field.
GOT - Represents the address of the global offset table.
This relocation needs got address.
Problem here was that got table was not created if had no entries. Had to change how GOT gets to the output, test covers that case.