[PATCH] D18190: [ELF] - Error out when R_X86_64_PC32/R_X86_64_32 are used against preemptible symbol when linking shared object.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 06:09:54 PDT 2016
rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.
LGTM with nits.
I think this is OK.
Once we have a better foundation we should spend time trying to get better error messages, but for now this at least makes sure we notice the error.
================
Comment at: ELF/Target.cpp:739
@@ +738,3 @@
+ if (Config->Shared)
+ error("relocation " + getELFRelocationTypeName(EM_X86_64, Type) +
+ " cannot be used when making a shared object; "
----------------
I am not a very big fan of the wording.
The relocation *can* be used when making a shared object, it just has to resolve.
We could say something like "cannot be used in a dynamic relocation", but not sure if that is more useful.
================
Comment at: test/ELF/x86-64-reloc-32-fpic.s:6
@@ +5,3 @@
+
+.globl _start
+_start:
----------------
You don't need _start in here.
================
Comment at: test/ELF/x86-64-reloc-pc32-fpic.s:6
@@ +5,3 @@
+
+.globl _start
+_start:
----------------
or here.
http://reviews.llvm.org/D18190
More information about the llvm-commits
mailing list