mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12144 from ethereum/clarify-linkersymbol-docs-regarding-fqln
Clarify that `linkersymbol()` accepts but does not require a fully qualified library name
This commit is contained in:
commit
719b70893f
11
docs/yul.rst
11
docs/yul.rst
@ -959,10 +959,13 @@ to ``loadimmutable("name")`` in the runtime code.
|
|||||||
|
|
||||||
linkersymbol
|
linkersymbol
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
The function ``linkersymbol("library_id")`` is a placeholder for an address literal to be substituted
|
||||||
The function ``linkersymbol("fq_library_name")`` is a placeholder for an address literal to be
|
by the linker.
|
||||||
substituted by the linker. Its first and only argument must be a string literal and represents the
|
Its first and only argument must be a string literal and uniquely represents the address to be inserted.
|
||||||
fully qualified library name used with the ``--libraries`` option.
|
Identifiers can be arbitrary but when the compiler produces Yul code from Solidity sources,
|
||||||
|
it uses a library name qualified with the name of the source unit that defines that library.
|
||||||
|
To link the code with a particular library address, the same identifier must be provided to the
|
||||||
|
``--libraries`` option on the command line.
|
||||||
|
|
||||||
For example this code
|
For example this code
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user