Skip to content
Commit 906e9a18 authored by Peter Smith's avatar Peter Smith
Browse files

[ELF] Extract temporary state used in assignAddresses()

The assignAddresses() function accumulates state in the LinkerScript that
prevents it from being called multiple times. This change moves the state
into a separate structure AddressState that is created at the start of the
function and disposed of at the end.

CurAddressState is used rather than passing a reference to the state as a
parameter to the functions used by assignAddresses(). This is because the
getSymbolValue function needs to be executed in the context of AddressState
but it is stored in ScriptParser when AddressState is not available.

The AddressState is also used in a limited context by processCommands()

Differential Revision: https://reviews.llvm.org/D34345

llvm-svn: 307367
parent 77367378
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment