[PATCH] D39000: [ELF] - Implement --orphan-handling option.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 06:19:22 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

We have PR34946 about that LLD does not support this option.

Spec (http://man7.org/linux/man-pages/man1/ld.1.html) tells about --orphan-handling=MODE,
option where MODE can be one of four: "place", "discard", "warn", "error".
Currently we already report orphans when -verbose given, what becomes excessive with option implemented.

Given above I think reasonable behavior is to stop reporting orphans when -versbose is given,
and support "place", "warn" and "error" modes. I am not sure about usefulness of "discard"
and its a bit scary, so I suggest to not implement it. Patch demonstrate the change I am suggesting.


https://reviews.llvm.org/D39000

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/LinkerScript.cpp
  ELF/Options.td
  test/ELF/linkerscript/orphan-report.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39000.119304.patch
Type: text/x-patch
Size: 8140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171017/c00a060d/attachment.bin>


More information about the llvm-commits mailing list