D91426 makes .got possibly empty while needed. If .got and .data have the same
address, and .got's content is written after .data, the first word of .data will
be corrupted.
The bug is not testable without
D131247.
(cherry picked from commit
28d05d672300e51f53c73fe9a4bd053e73844247)
}
void GotSection::writeTo(uint8_t *buf) {
+ // On PPC64 .got may be needed but empty. Skip the write.
+ if (size == 0)
+ return;
target->writeGotHeader(buf);
relocateAlloc(buf, buf + size);
}