[PATCH] D72904: [ELF] Allow SHF_LINK_ORDER sections to have sh_link=0

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 23:09:30 PDT 2020


MaskRay added a comment.

D72899 <https://reviews.llvm.org/D72899> has been submitted. PTAL

My understanding about the situation:

- The overloaded semantics of SHF_LINK_ORDER are indeed unfortunate and do get in the way.
- GNU ld already has support for SHF_LINK_ORDER, and chances are that it can allow mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER as well (Solaris ld has done this for years)
- It'd be difficult to get a new section flag for metadata semantics. Even if we can invent one for LLVM, we want to defer the decision because an early decision may restrict our design space. We might not be able to sort out all the implications. (I highly believe in this)
- In the meantime,,,,,,,, let's stick with SHF_LINK_ORDER. The Solaris ld semantics are not too bad. We can just follow. We can continue using SHF_LINK_ORDER until we botch it ;-)
- `TODO Allow non-contiguous SHF_LINK_ORDER sections in an output section` in the comment will be fixed by D84001 <https://reviews.llvm.org/D84001>

@lebedev.ri Is https://bugs.llvm.org/show_bug.cgi?id=41734 still alive and does this address the problem?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72904



More information about the llvm-commits mailing list