Files
Fangrui Song 71c76755a8 [ELF] Move layout-changing transforms before address assignment (#232189)
finalizeAddressDependentContent assigns addresses, then
--randomize-section-padding and CFI jump table relaxation
(--branch-to-branch, implied by -O2) move input sections, so the first
fixed-point iteration computes address-dependent content from stale
addresses. Since #179089, EhFrameHeader::updateAllocSize caches the
.eh_frame_hdr search table; if no iteration changes anything, the loop
exits and the table keys no longer match the FDEs' initial_location.

Neither transform reads addresses, so run them before the first
assignAddresses. SHF_LINK_ORDER sections are now sorted by the relaxed
layout as well.

LLM-aided. Partially fix #226166

(cherry picked from commit 115554f90f920fc000234c2c247b8318d4e7d2d8)
2026-10-18 14:08:32 +02:00
..
…
…
…
…
…
…
…
…