[PATCH] D41025: ELF: Ignore --long-plt flag.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 10:35:01 PST 2017


pcc created this revision.
Herald added subscribers: kristof.beyls, emaste, aemerson.

This flag causes bfd and gold to use a longer PLT format on ARM that
allows for the offset between the PLT and the GOT to exceed 256MB.
It seems unlikely that we would need to implement long PLTs because
by default we lay out .plt at the end of the executable segment (as
opposed to the other linkers, which lay it out at the beginning),
which means that the size of the non-relro part of the r/w segment
would need to exceed 256MB before a long PLT becomes necessary.

Even if we did implement long PLTs, I think it should be done by
recalculating the size of .plt as part of our convergent address
assignment loop, rather than requiring the user to request a long
PLT explicitly.

In any event, we would end up ignoring the flag, so this patch does so.


https://reviews.llvm.org/D41025

Files:
  lld/ELF/Options.td


Index: lld/ELF/Options.td
===================================================================
--- lld/ELF/Options.td
+++ lld/ELF/Options.td
@@ -406,6 +406,7 @@
 def cref: F<"cref">;
 def detect_odr_violations: F<"detect-odr-violations">;
 def g: Flag<["-"], "g">;
+def long_plt: F<"long-plt">;
 def no_add_needed: F<"no-add-needed">;
 def no_allow_shlib_undefined: F<"no-allow-shlib-undefined">;
 def no_copy_dt_needed_entries: F<"no-copy-dt-needed-entries">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41025.126180.patch
Type: text/x-patch
Size: 460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171208/128b255a/attachment.bin>


More information about the llvm-commits mailing list