[PATCH] D16145: Stop increasing alignment of externally-visible globals on ELF platforms.

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 15:27:29 PST 2016


jyknight marked 2 inline comments as done.

================
Comment at: lib/IR/Globals.cpp:170-173
@@ +169,6 @@
+  //
+  // TODO: is it possible to determine if the relocation mode is PIC
+  // at this point in the code? I think it'd be correct to skip this
+  // check in non-PIC mode. We'd need something like:
+  //  TargetMachine.getRelocationModel() == Reloc::PIC_;
+
----------------
t.p.northover wrote:
> It depends what we want to support, but non-PIC shared libraries certainly used to be a thing. They're now strongly discouraged, but we'd probably still have to think carefully before breaking them.
Ahhh, right, forgot about that. Now, for some archs (x86-64, any others?) it's not possible to include non-PIC code in a shared-library. But, I'll just take out that TODO.


http://reviews.llvm.org/D16145





More information about the llvm-commits mailing list