[PATCH] D13565: [ELF2] Allow PPC64 to add the TOC-restore after .plt-based relocations

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 11:20:32 PDT 2015


hfinkel added a comment.

In http://reviews.llvm.org/D13565#263112, @ruiu wrote:

> Does writing the instruction only when there's nop there work? I don't like to pass BufEnd for all these functions.


Sure. But how do I avoid running off the end of the buffer checking if the nop is there in the first place?

More generally, however, since we don't otherwise validate the offset member of the relocation field (and probably can't in a completely-target-independent way), it seems like we should be checking that against the end of the buffer anyway for all relocations everywhere.

Nevertheless, I agree this looks somewhat ugly. Would it be better to pass a pair of some kind?


http://reviews.llvm.org/D13565





More information about the llvm-commits mailing list