James Henderson via llvm-dev
2018-Jan-22 10:00 UTC
[llvm-dev] [ELF] Symbol-ordering-file warnings
Hi, In our proprietary linker, we have a switch which has essentially identical functionality to the --symbol-ordering-file LLD switch. One of the main areas that it differs in is that our linker warns in various circumstances, if there is a problem with the contents of the order file. We would like to propose adding these same warnings to LLD, if there is interest in them. Following are the situations we warn in, and some of the justifications behind them: When a symbol in the order file is not found - might help catch typos in that file. Imported/undefined symbols - symbols in other modules clearly can’t be reordered in the current link. Absolute symbols - these do not have a position in the file, so ordering them makes no sense. Removed symbols (i.e. via --gc-sections) - it doesn’t make much sense to try to order such symbols, since they have no position in the output. Would people be interested in these warnings? Regards, James -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180122/7ff9b2df/attachment.html>
Rui Ueyama via llvm-dev
2018-Jan-23 00:28 UTC
[llvm-dev] [ELF] Symbol-ordering-file warnings
On Mon, Jan 22, 2018 at 2:00 AM, James Henderson via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > > > In our proprietary linker, we have a switch which has essentially > identical functionality to the --symbol-ordering-file LLD switch. One of > the main areas that it differs in is that our linker warns in various > circumstances, if there is a problem with the contents of the order file. > We would like to propose adding these same warnings to LLD, if there is > interest in them. Following are the situations we warn in, and some of the > justifications behind them: > > > > When a symbol in the order file is not found - might help catch typos in > that file. > > Imported/undefined symbols - symbols in other modules clearly can’t be > reordered in the current link. > > Absolute symbols - these do not have a position in the file, so ordering > them makes no sense. > > Removed symbols (i.e. via --gc-sections) - it doesn’t make much sense to > try to order such symbols, since they have no position in the output. >All sound good to me, and these features will be pretty useful.> > Would people be interested in these warnings? > > > > Regards, > > > > James > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180122/c49fdce6/attachment.html>
Peter Collingbourne via llvm-dev
2018-Jan-23 01:02 UTC
[llvm-dev] [ELF] Symbol-ordering-file warnings
These warnings do not seem useful for all users of --symbol-ordering-file. I am aware of at least one user that uses --symbol-ordering-file as an opportunistic request for sections to appear in a particular order, rather than a mandatory request. This user has --fatal-warnings enabled, and would not want the build to fail if an older --symbol-ordering-file is being used and a symbol disappears from the final output due to a refactoring. I imagine that one option would be to put these warnings behind a default-on flag. Peter On Mon, Jan 22, 2018 at 4:28 PM, Rui Ueyama via llvm-dev < llvm-dev at lists.llvm.org> wrote:> On Mon, Jan 22, 2018 at 2:00 AM, James Henderson via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> >> >> In our proprietary linker, we have a switch which has essentially >> identical functionality to the --symbol-ordering-file LLD switch. One of >> the main areas that it differs in is that our linker warns in various >> circumstances, if there is a problem with the contents of the order file. >> We would like to propose adding these same warnings to LLD, if there is >> interest in them. Following are the situations we warn in, and some of the >> justifications behind them: >> >> >> >> When a symbol in the order file is not found - might help catch typos in >> that file. >> >> Imported/undefined symbols - symbols in other modules clearly can’t be >> reordered in the current link. >> >> Absolute symbols - these do not have a position in the file, so ordering >> them makes no sense. >> >> Removed symbols (i.e. via --gc-sections) - it doesn’t make much sense to >> try to order such symbols, since they have no position in the output. >> > > All sound good to me, and these features will be pretty useful. > > >> >> Would people be interested in these warnings? >> >> >> >> Regards, >> >> >> >> James >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-- -- Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180122/7fc935c2/attachment.html>