[PATCH] D14955: [ELF] - Lazy relocations support for x86 target.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 15:41:58 PST 2015
ruiu added inline comments.
================
Comment at: ELF/Writer.cpp:248-250
@@ -247,2 +247,5 @@
continue;
- Out<ELFT>::Plt->addEntry(Body);
+ unsigned RelOff = Target->supportsLazyRelocations()
+ ? Out<ELFT>::RelaPlt->getRelocOffset()
+ : Out<ELFT>::RelaDyn->getRelocOffset();
+ Out<ELFT>::Plt->addEntry(Body, RelOff);
----------------
This piece of code does not depends on any local context of Writer.cpp, so I think you can move this into a function that handles i386 PLT entries instead of propagating this unsigned value all the way to the consumer.
http://reviews.llvm.org/D14955
More information about the llvm-commits
mailing list