[PATCH] D37517: [ELF] - Report orphan sections if -verbose given.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 01:36:13 PDT 2017


grimar added a comment.

In https://reviews.llvm.org/D37517#862294, @ruiu wrote:

> This may be a good addition, but why do you want this?


In comments for original patch (https://reviews.llvm.org/D24725) initially implemented was concluded that
--orphan-handling (initially implemented option for reporting) could be extremely helpful
for bringing FreeBSD's kernel up. Now it is already up, but can be used for other projects
in still.

Placing orphans as you know is not well documented and often probably people considers
that there should be no orphans in their linker scripts, but how can they check it for sure
when there is still no way to know about where orphans were placed ? Examining
outputs is a bit painfull usually and not always can reveal orphan if it placed to desided output
occasionally.

I believe this option can be helpful for people who writes/supports all kinds of linkerscripts.
Since LLD aims to improve diagnostics and --verbose itself is an option used for that,
I think it is nice feature to have. It could be part of -Map probably instead, implementing
via -verbose is much simpler though.


https://reviews.llvm.org/D37517





More information about the llvm-commits mailing list