From d8464101724016dc4f16bababf2994ab7df22c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 14 Oct 2021 20:57:15 +0200 Subject: [PATCH] yul.rst: Clarify that linkersymbol() accepts but does not require a fully qualified library name --- docs/yul.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/yul.rst b/docs/yul.rst index 0a90a2825..9aad572c8 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -959,10 +959,13 @@ to ``loadimmutable("name")`` in the runtime code. linkersymbol ^^^^^^^^^^^^ - -The function ``linkersymbol("fq_library_name")`` is a placeholder for an address literal to be -substituted by the linker. Its first and only argument must be a string literal and represents the -fully qualified library name used with the ``--libraries`` option. +The function ``linkersymbol("library_id")`` is a placeholder for an address literal to be substituted +by the linker. +Its first and only argument must be a string literal and uniquely represents the address to be inserted. +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