[PATCH] D15383: [ELF] - R_386_GOTOFF relocation implemented.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 09:32:03 PST 2016


On Sat, Dec 26, 2015 at 1:41 PM, George Rimar <grimar at accesssoftek.com>
wrote:

> grimar added inline comments.
>
> ================
> Comment at: lld/trunk/ELF/Writer.cpp:214
> @@ -212,1 +213,3 @@
> +      HasGotOffRel = true;
> +
>      if (Target->isTlsLocalDynamicReloc(Type)) {
> ----------------
> btw, what about making this more generic ?
>
> 1) Change HasGotOffRel to be not a global variable but a public member of
> target.
> 2) remove isGotRelative(Type), create visitRelocation(Type) or something
> alike instead. Which purpose would be to review relocation and set flags
> like HasGotOffRel inside.


That sounds a little bit more complicated than the current code. To me, the
use of the global variable here is not a necessary evil, but it is actually
improving the readability of the code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160105/e8bf155a/attachment.html>


More information about the llvm-commits mailing list