[all-commits] [llvm/llvm-project] 383438: [ELF] Move SHF_LINK_ORDER till OutputSection addre...
Peter Smith via All-commits
all-commits at lists.llvm.org
Mon May 4 06:26:44 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3834385f27aeb4cafe1f5f957bff36bdbececf81
https://github.com/llvm/llvm-project/commit/3834385f27aeb4cafe1f5f957bff36bdbececf81
Author: Peter Smith <peter.smith at arm.com>
Date: 2020-05-04 (Mon, 04 May 2020)
Changed paths:
M lld/ELF/Writer.cpp
A lld/test/ELF/linkorder-script.s
Log Message:
-----------
[ELF] Move SHF_LINK_ORDER till OutputSection addresses are known
Sections with the SHF_LINK_ORDER flag must be ordered in the same relative
order as the Sections they have a link to. When using a linker script an
arbitrary expression may be used for the virtual address of the
OutputSection. In some cases the virtual address does not monotonically
increase as the OutputSection index increases, so if we base the ordering
of the SHF_LINK_ORDER sections on the index then we can get the order
wrong. We fix this by moving SHF_LINK_ORDER resolution till after we have
created OutputSection virtual addresses.
Differential Revision: https://reviews.llvm.org/D79286
More information about the All-commits
mailing list