[PATCH] D70468: [ELF] Error if -Ttext-segment is specified

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 00:45:08 PST 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1020
+  if (args.hasArg(OPT_Ttext_segment))
+    error("-Ttext-segment is not supported. Use --image-base if you "
+          "intend to set the base address");
----------------
grimar wrote:
> `-Ttext-segment`->`--Ttext-segment`?
> (here and in the comment)
> 
> I'd also suggest to add a test for this error. At least testing errors is useful for people who wants to search for a test for a particular option to see if it is supported and how.
> 
`-Ttext-segment` is mix cased and documented in GNU ld as a one-dash option. Options that are documented as double-dash ones are exclusively lower case only. So I think we probably should just use `-Ttext-segment`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70468/new/

https://reviews.llvm.org/D70468





More information about the llvm-commits mailing list