[PATCH] D38170: [ELF] - Drop SHF_LINK_ORDER flag from output.

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 05:04:54 PDT 2017


peter.smith added a comment.

I agree that the SHF_LINK_ORDER flag shouldn't need to be kept in a non-relocatable object, I kept it in I've run into at least one ELF disassembler that complained about it not being there as it was inferring that one should be there from the .ARM.exidx section name. This was many years ago and I can't remember the program though. It might be worth trying to output the exceptions with GNU readelf just to check.

The reordering of the link order sections can be moved earlier than finalize(), as soon as the order of InputSections within the OutputSections is known.

I've not got any major objections to the patch, my one minor concern is that we are treating the SHF_LINK_ORDER flag differently to all/most of the other ELF flags which could catch someone out in the future if they weren't aware of it. I'm not sure if there is a good solution for that as I don't know where a comment could be put that we could guarantee a future developer would see.


https://reviews.llvm.org/D38170





More information about the llvm-commits mailing list