[PATCH] D76410: [ELF] Don't combine SHF_LINK_ORDER sections linking different output sections

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 13:38:46 PDT 2020


pcc added a comment.

Having given this some more thought, I'm still not in favour of this change even with start/stop symbols excluded, since there are other cases where enumeration of SHF_LINK_ORDER sections may be possible/desirable. To give one example, imagine that you have `.init_array` sections linked to the globals that they initialize (this may be possible if you can prove that the constructor has no side effects other than initializing the object). With this change we may for example have multiple `.init_array` sections for `.bss` and `.data`, which would need to be accounted for when computing DT_INIT_ARRAY/DT_INIT_ARRAY_SZ. There are various ways that you could deal with this sort of situation, but it seems like the simplest one would be to stick with one output section per file.

Given that the tool that deals with `.stack_size` sections has apparently been fixed, is there a need to make this change?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76410





More information about the llvm-commits mailing list