€•ñ²Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/pt_BR/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/core-api/asm-annotations”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒAssembler Annotations”h]”hŒAssembler Annotations”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒF/var/lib/git/docbuild/linux/Documentation/core-api/asm-annotations.rst”h´KubhŒ paragraph”“”)�”}”(hŒ"Copyright (c) 2017-2019 Jiri Slaby”h]”hŒ"Copyright (c) 2017-2019 Jiri Slaby”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒÇThis document describes the new macros for annotation of data and code in assembly. In particular, it contains information about ``SYM_FUNC_START``, ``SYM_FUNC_END``, ``SYM_CODE_START``, and similar.”h]”(hŒ�This document describes the new macros for annotation of data and code in assembly. In particular, it contains information about ”…”�”}”(hhÛh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``SYM_FUNC_START``”h]”hŒSYM_FUNC_START”…”�”}”(hhåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhhÛubhŒ, ”…”�”}”(hhÛh²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_END``”h]”hŒ SYM_FUNC_END”…”�”}”(hh÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhhÛubhŒ, ”…”�”}”(hhÛh²hh³Nh´Nubhä)�”}”(hŒ``SYM_CODE_START``”h]”hŒSYM_CODE_START”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhhÛubhŒ, and similar.”…”�”}”(hhÛh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ Rationale”h]”hŒ Rationale”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj!h²hh³hÊh´K ubhÌ)�”}”(hX Some code like entries, trampolines, or boot code needs to be written in assembly. The same as in C, such code is grouped into functions and accompanied with data. Standard assemblers do not force users into precisely marking these pieces as code, data, or even specifying their length. Nevertheless, assemblers provide developers with such annotations to aid debuggers throughout assembly. On top of that, developers also want to mark some functions as *global* in order to be visible outside of their translation units.”h]”(hXÆSome code like entries, trampolines, or boot code needs to be written in assembly. The same as in C, such code is grouped into functions and accompanied with data. Standard assemblers do not force users into precisely marking these pieces as code, data, or even specifying their length. Nevertheless, assemblers provide developers with such annotations to aid debuggers throughout assembly. On top of that, developers also want to mark some functions as ”…”�”}”(hj2h²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*global*”h]”hŒglobal”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j:hj2ubhŒ; in order to be visible outside of their translation units.”…”�”}”(hj2h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj!h²hubhÌ)�”}”(hXnOver time, the Linux kernel has adopted macros from various projects (like ``binutils``) to facilitate such annotations. So for historic reasons, developers have been using ``ENTRY``, ``END``, ``ENDPROC``, and other annotations in assembly. Due to the lack of their documentation, the macros are used in rather wrong contexts at some locations. Clearly, ``ENTRY`` was intended to denote the beginning of global symbols (be it data or code). ``END`` used to mark the end of data or end of special functions with *non-standard* calling convention. In contrast, ``ENDPROC`` should annotate only ends of *standard* functions.”h]”(hŒKOver time, the Linux kernel has adopted macros from various projects (like ”…”�”}”(hjTh²hh³Nh´Nubhä)�”}”(hŒ ``binutils``”h]”hŒbinutils”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒV) to facilitate such annotations. So for historic reasons, developers have been using ”…”�”}”(hjTh²hh³Nh´Nubhä)�”}”(hŒ ``ENTRY``”h]”hŒENTRY”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒ, ”…”�”}”(hjTh²hh³Nh´Nubhä)�”}”(hŒ``END``”h]”hŒEND”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒ, ”…”�”}”hjTsbhä)�”}”(hŒ ``ENDPROC``”h]”hŒENDPROC”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒ—, and other annotations in assembly. Due to the lack of their documentation, the macros are used in rather wrong contexts at some locations. Clearly, ”…”�”}”(hjTh²hh³Nh´Nubhä)�”}”(hŒ ``ENTRY``”h]”hŒENTRY”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒN was intended to denote the beginning of global symbols (be it data or code). ”…”�”}”(hjTh²hh³Nh´Nubhä)�”}”(hŒ``END``”h]”hŒEND”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒ? used to mark the end of data or end of special functions with ”…”�”}”(hjTh²hh³Nh´Nubj;)�”}”(hŒ*non-standard*”h]”hŒ non-standard”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j:hjTubhŒ" calling convention. In contrast, ”…”�”}”(hjTh²hh³Nh´Nubhä)�”}”(hŒ ``ENDPROC``”h]”hŒENDPROC”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjTubhŒ should annotate only ends of ”…”�”}”(hjTh²hh³Nh´Nubj;)�”}”(hŒ *standard*”h]”hŒstandard”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j:hjTubhŒ functions.”…”�”}”(hjTh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj!h²hubhÌ)�”}”(hŒ²When these macros are used correctly, they help assemblers generate a nice object with both sizes and types set correctly. For example, the result of ``arch/x86/lib/putuser.S``::”h]”(hŒ–When these macros are used correctly, they help assemblers generate a nice object with both sizes and types set correctly. For example, the result of ”…”�”}”(hjh²hh³Nh´Nubhä)�”}”(hŒ``arch/x86/lib/putuser.S``”h]”hŒarch/x86/lib/putuser.S”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ:”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj!h²hubhŒ literal_block”“”)�”}”(hXPNum: Value Size Type Bind Vis Ndx Name 25: 0000000000000000 33 FUNC GLOBAL DEFAULT 1 __put_user_1 29: 0000000000000030 37 FUNC GLOBAL DEFAULT 1 __put_user_2 32: 0000000000000060 36 FUNC GLOBAL DEFAULT 1 __put_user_4 35: 0000000000000090 37 FUNC GLOBAL DEFAULT 1 __put_user_8”h]”hXPNum: Value Size Type Bind Vis Ndx Name 25: 0000000000000000 33 FUNC GLOBAL DEFAULT 1 __put_user_1 29: 0000000000000030 37 FUNC GLOBAL DEFAULT 1 __put_user_2 32: 0000000000000060 36 FUNC GLOBAL DEFAULT 1 __put_user_4 35: 0000000000000090 37 FUNC GLOBAL DEFAULT 1 __put_user_8”…”�”}”hj&sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j$h³hÊh´K#hj!h²hubhÌ)�”}”(hXŒThis is not only important for debugging purposes. When there are properly annotated objects like this, tools can be run on them to generate more useful information. In particular, on properly annotated objects, ``objtool`` can be run to check and fix the object if needed. Currently, ``objtool`` can report missing frame pointer setup/destruction in functions. It can also automatically generate annotations for the ORC unwinder (Documentation/arch/x86/orc-unwinder.rst) for most code. Both of these are especially important to support reliable stack traces which are in turn necessary for kernel live patching (Documentation/livepatch/livepatch.rst).”h]”(hŒÔThis is not only important for debugging purposes. When there are properly annotated objects like this, tools can be run on them to generate more useful information. In particular, on properly annotated objects, ”…”�”}”(hj6h²hh³Nh´Nubhä)�”}”(hŒ ``objtool``”h]”hŒobjtool”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj6ubhŒ> can be run to check and fix the object if needed. Currently, ”…”�”}”(hj6h²hh³Nh´Nubhä)�”}”(hŒ ``objtool``”h]”hŒobjtool”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj6ubhXd can report missing frame pointer setup/destruction in functions. It can also automatically generate annotations for the ORC unwinder (Documentation/arch/x86/orc-unwinder.rst) for most code. Both of these are especially important to support reliable stack traces which are in turn necessary for kernel live patching (Documentation/livepatch/livepatch.rst).”…”�”}”(hj6h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K)hj!h²hubeh}”(h]”Œ rationale”ah ]”h"]”Œ rationale”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)�”}”(hhh]”(h»)�”}”(hŒCaveat and Discussion”h]”hŒCaveat and Discussion”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjph²hh³hÊh´K5ubhÌ)�”}”(hŒ‚As one might realize, there were only three macros previously. That is indeed insufficient to cover all the combinations of cases:”h]”hŒ‚As one might realize, there were only three macros previously. That is indeed insufficient to cover all the combinations of cases:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K6hjph²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒstandard/non-standard function”h]”hÌ)�”}”(hj˜h]”hŒstandard/non-standard function”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K9hj–ubah}”(h]”h ]”h"]”h$]”h&]”uh1j”hj‘h²hh³hÊh´Nubj•)�”}”(hŒ code/data”h]”hÌ)�”}”(hj¯h]”hŒ code/data”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K:hj­ubah}”(h]”h ]”h"]”h$]”h&]”uh1j”hj‘h²hh³hÊh´Nubj•)�”}”(hŒglobal/local symbol ”h]”hÌ)�”}”(hŒglobal/local symbol”h]”hŒglobal/local symbol”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K;hjÄubah}”(h]”h ]”h"]”h$]”h&]”uh1j”hj‘h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1j�h³hÊh´K9hjph²hubhÌ)�”}”(hŒ—There was a discussion_ and instead of extending the current ``ENTRY/END*`` macros, it was decided that brand new macros should be introduced instead::”h]”(hŒ There was a ”…”�”}”(hjäh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ discussion_”h]”hŒ discussion”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ discussion”Œrefuri”Œ?https://lore.kernel.org/r/20170217104757.28588-1-jslaby@suse.cz”uh1jìhjäŒresolved”KubhŒ& and instead of extending the current ”…”�”}”(hjäh²hh³Nh´Nubhä)�”}”(hŒ``ENTRY/END*``”h]”hŒ ENTRY/END*”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjäubhŒK macros, it was decided that brand new macros should be introduced instead:”…”�”}”(hjäh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K=hjph²hubj%)�”}”(hŒÇSo how about using macro names that actually show the purpose, instead of importing all the crappy, historic, essentially randomly chosen debug symbol macro names from the binutils and older kernels?”h]”hŒÇSo how about using macro names that actually show the purpose, instead of importing all the crappy, historic, essentially randomly chosen debug symbol macro names from the binutils and older kernels?”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´K@hjph²hubhŒtarget”“”)�”}”(hŒO.. _discussion: https://lore.kernel.org/r/20170217104757.28588-1-jslaby@suse.cz”h]”h}”(h]”Œ discussion”ah ]”h"]”Œ discussion”ah$]”h&]”jþjÿuh1j+h´KDhjph²hh³hÊŒ referenced”Kubeh}”(h]”Œcaveat-and-discussion”ah ]”h"]”Œcaveat and discussion”ah$]”h&]”uh1hµhh·h²hh³hÊh´K5ubh¶)�”}”(hhh]”(h»)�”}”(hŒMacros Description”h]”hŒMacros Description”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjBh²hh³hÊh´KGubhÌ)�”}”(hŒ_The new macros are prefixed with the ``SYM_`` prefix and can be divided into three main groups:”h]”(hŒ%The new macros are prefixed with the ”…”�”}”(hjSh²hh³Nh´Nubhä)�”}”(hŒ``SYM_``”h]”hŒSYM_”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjSubhŒ2 prefix and can be divided into three main groups:”…”�”}”(hjSh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KIhjBh²hubhŒenumerated_list”“”)�”}”(hhh]”(j•)�”}”(hXS``SYM_FUNC_*`` -- to annotate C-like functions. This means functions with standard C calling conventions. For example, on x86, this means that the stack contains a return address at the predefined place and a return from the function can happen in a standard way. When frame pointers are enabled, save/restore of frame pointer shall happen at the start/end of a function, respectively, too. Checking tools like ``objtool`` should ensure such marked functions conform to these rules. The tools can also easily annotate these functions with debugging information (like *ORC data*) automatically. ”h]”(hÌ)�”}”(hX†``SYM_FUNC_*`` -- to annotate C-like functions. This means functions with standard C calling conventions. For example, on x86, this means that the stack contains a return address at the predefined place and a return from the function can happen in a standard way. When frame pointers are enabled, save/restore of frame pointer shall happen at the start/end of a function, respectively, too.”h]”(hä)�”}”(hŒ``SYM_FUNC_*``”h]”hŒ SYM_FUNC_*”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj|ubhXx -- to annotate C-like functions. This means functions with standard C calling conventions. For example, on x86, this means that the stack contains a return address at the predefined place and a return from the function can happen in a standard way. When frame pointers are enabled, save/restore of frame pointer shall happen at the start/end of a function, respectively, too.”…”�”}”(hj|h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhjxubhÌ)�”}”(hŒÊChecking tools like ``objtool`` should ensure such marked functions conform to these rules. The tools can also easily annotate these functions with debugging information (like *ORC data*) automatically.”h]”(hŒChecking tools like ”…”�”}”(hj˜h²hh³Nh´Nubhä)�”}”(hŒ ``objtool``”h]”hŒobjtool”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj˜ubhŒ‘ should ensure such marked functions conform to these rules. The tools can also easily annotate these functions with debugging information (like ”…”�”}”(hj˜h²hh³Nh´Nubj;)�”}”(hŒ *ORC data*”h]”hŒORC data”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j:hj˜ubhŒ) automatically.”…”�”}”(hj˜h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KShjxubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjuh²hh³hÊh´Nubj•)�”}”(hXs``SYM_CODE_*`` -- special functions called with special stack. Be it interrupt handlers with special stack content, trampolines, or startup functions. Checking tools mostly ignore checking of these functions. But some debug information still can be generated automatically. For correct debug data, this code needs hints like ``UNWIND_HINT_REGS`` provided by developers. ”h]”(hÌ)�”}”(hŒ–``SYM_CODE_*`` -- special functions called with special stack. Be it interrupt handlers with special stack content, trampolines, or startup functions.”h]”(hä)�”}”(hŒ``SYM_CODE_*``”h]”hŒ SYM_CODE_*”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÔubhŒˆ -- special functions called with special stack. Be it interrupt handlers with special stack content, trampolines, or startup functions.”…”�”}”(hjÔh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KWhjÐubhÌ)�”}”(hŒÚChecking tools mostly ignore checking of these functions. But some debug information still can be generated automatically. For correct debug data, this code needs hints like ``UNWIND_HINT_REGS`` provided by developers.”h]”(hŒ®Checking tools mostly ignore checking of these functions. But some debug information still can be generated automatically. For correct debug data, this code needs hints like ”…”�”}”(hjðh²hh³Nh´Nubhä)�”}”(hŒ``UNWIND_HINT_REGS``”h]”hŒUNWIND_HINT_REGS”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjðubhŒ provided by developers.”…”�”}”(hjðh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K[hjÐubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjuh²hh³hÊh´Nubj•)�”}”(hX``SYM_DATA*`` -- obviously data belonging to ``.data`` sections and not to ``.text``. Data do not contain instructions, so they have to be treated specially by the tools: they should not treat the bytes as instructions, nor assign any debug information to them. ”h]”hÌ)�”}”(hX``SYM_DATA*`` -- obviously data belonging to ``.data`` sections and not to ``.text``. Data do not contain instructions, so they have to be treated specially by the tools: they should not treat the bytes as instructions, nor assign any debug information to them.”h]”(hä)�”}”(hŒ ``SYM_DATA*``”h]”hŒ SYM_DATA*”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ -- obviously data belonging to ”…”�”}”(hjh²hh³Nh´Nubhä)�”}”(hŒ ``.data``”h]”hŒ.data”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ sections and not to ”…”�”}”(hjh²hh³Nh´Nubhä)�”}”(hŒ ``.text``”h]”hŒ.text”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ±. Data do not contain instructions, so they have to be treated specially by the tools: they should not treat the bytes as instructions, nor assign any debug information to them.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K_hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j”hjuh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1jshjBh²hh³hÊh´KLubh¶)�”}”(hhh]”(h»)�”}”(hŒInstruction Macros”h]”hŒInstruction Macros”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjkh²hh³hÊh´KeubhÌ)�”}”(hŒGThis section covers ``SYM_FUNC_*`` and ``SYM_CODE_*`` enumerated above.”h]”(hŒThis section covers ”…”�”}”(hj|h²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_*``”h]”hŒ SYM_FUNC_*”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj|ubhŒ and ”…”�”}”(hj|h²hh³Nh´Nubhä)�”}”(hŒ``SYM_CODE_*``”h]”hŒ SYM_CODE_*”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj|ubhŒ enumerated above.”…”�”}”(hj|h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kfhjkh²hubhÌ)�”}”(hX!``objtool`` requires that all code must be contained in an ELF symbol. Symbol names that have a ``.L`` prefix do not emit symbol table entries. ``.L`` prefixed symbols can be used within a code region, but should be avoided for denoting a range of code via ``SYM_*_START/END`` annotations.”h]”(hä)�”}”(hŒ ``objtool``”h]”hŒobjtool”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj®ubhŒU requires that all code must be contained in an ELF symbol. Symbol names that have a ”…”�”}”(hj®h²hh³Nh´Nubhä)�”}”(hŒ``.L``”h]”hŒ.L”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj®ubhŒ* prefix do not emit symbol table entries. ”…”�”}”(hj®h²hh³Nh´Nubhä)�”}”(hŒ``.L``”h]”hŒ.L”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj®ubhŒk prefixed symbols can be used within a code region, but should be avoided for denoting a range of code via ”…”�”}”(hj®h²hh³Nh´Nubhä)�”}”(hŒ``SYM_*_START/END``”h]”hŒSYM_*_START/END”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj®ubhŒ annotations.”…”�”}”(hj®h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhjkh²hubj�)�”}”(hhh]”(j•)�”}”(hXx``SYM_FUNC_START`` and ``SYM_FUNC_START_LOCAL`` are supposed to be **the most frequent markings**. They are used for functions with standard calling conventions -- global and local. Like in C, they both align the functions to architecture specific ``__ALIGN`` bytes. There are also ``_NOALIGN`` variants for special cases where developers do not want this implicit alignment. ``SYM_FUNC_START_WEAK`` and ``SYM_FUNC_START_WEAK_NOALIGN`` markings are also offered as an assembler counterpart to the *weak* attribute known from C. All of these **shall** be coupled with ``SYM_FUNC_END``. First, it marks the sequence of instructions as a function and computes its size to the generated object file. Second, it also eases checking and processing such object files as the tools can trivially find exact function boundaries. So in most cases, developers should write something like in the following example, having some asm instructions in between the macros, of course:: SYM_FUNC_START(memset) ... asm insns ... SYM_FUNC_END(memset) In fact, this kind of annotation corresponds to the now deprecated ``ENTRY`` and ``ENDPROC`` macros. ”h]”(hÌ)�”}”(hXw``SYM_FUNC_START`` and ``SYM_FUNC_START_LOCAL`` are supposed to be **the most frequent markings**. They are used for functions with standard calling conventions -- global and local. Like in C, they both align the functions to architecture specific ``__ALIGN`` bytes. There are also ``_NOALIGN`` variants for special cases where developers do not want this implicit alignment.”h]”(hä)�”}”(hŒ``SYM_FUNC_START``”h]”hŒSYM_FUNC_START”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ and ”…”�”}”(hjh²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_START_LOCAL``”h]”hŒSYM_FUNC_START_LOCAL”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ are supposed to be ”…”�”}”(hjh²hh³Nh´NubhŒstrong”“”)�”}”(hŒ**the most frequent markings**”h]”hŒthe most frequent markings”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j/hjubhŒ—. They are used for functions with standard calling conventions -- global and local. Like in C, they both align the functions to architecture specific ”…”�”}”(hjh²hh³Nh´Nubhä)�”}”(hŒ ``__ALIGN``”h]”hŒ__ALIGN”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒ bytes. There are also ”…”�”}”(hjh²hh³Nh´Nubhä)�”}”(hŒ ``_NOALIGN``”h]”hŒ_NOALIGN”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjubhŒQ variants for special cases where developers do not want this implicit alignment.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KmhjubhÌ)�”}”(hŒ—``SYM_FUNC_START_WEAK`` and ``SYM_FUNC_START_WEAK_NOALIGN`` markings are also offered as an assembler counterpart to the *weak* attribute known from C.”h]”(hä)�”}”(hŒ``SYM_FUNC_START_WEAK``”h]”hŒSYM_FUNC_START_WEAK”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjmubhŒ and ”…”�”}”(hjmh²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_START_WEAK_NOALIGN``”h]”hŒSYM_FUNC_START_WEAK_NOALIGN”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjmubhŒ> markings are also offered as an assembler counterpart to the ”…”�”}”(hjmh²hh³Nh´Nubj;)�”}”(hŒ*weak*”h]”hŒweak”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j:hjmubhŒ attribute known from C.”…”�”}”(hjmh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KshjubhÌ)�”}”(hX"All of these **shall** be coupled with ``SYM_FUNC_END``. First, it marks the sequence of instructions as a function and computes its size to the generated object file. Second, it also eases checking and processing such object files as the tools can trivially find exact function boundaries.”h]”(hŒ All of these ”…”�”}”(hj­h²hh³Nh´Nubj0)�”}”(hŒ **shall**”h]”hŒshall”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j/hj­ubhŒ be coupled with ”…”�”}”(hj­h²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_END``”h]”hŒ SYM_FUNC_END”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj­ubhŒë. First, it marks the sequence of instructions as a function and computes its size to the generated object file. Second, it also eases checking and processing such object files as the tools can trivially find exact function boundaries.”…”�”}”(hj­h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KwhjubhÌ)�”}”(hŒ’So in most cases, developers should write something like in the following example, having some asm instructions in between the macros, of course::”h]”hŒ‘So in most cases, developers should write something like in the following example, having some asm instructions in between the macros, of course:”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K|hjubj%)�”}”(hŒASYM_FUNC_START(memset) ... asm insns ... SYM_FUNC_END(memset)”h]”hŒASYM_FUNC_START(memset) ... asm insns ... SYM_FUNC_END(memset)”…”�”}”hjísbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´KhjubhÌ)�”}”(hŒdIn fact, this kind of annotation corresponds to the now deprecated ``ENTRY`` and ``ENDPROC`` macros.”h]”(hŒCIn fact, this kind of annotation corresponds to the now deprecated ”…”�”}”(hjûh²hh³Nh´Nubhä)�”}”(hŒ ``ENTRY``”h]”hŒENTRY”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjûubhŒ and ”…”�”}”(hjûh²hh³Nh´Nubhä)�”}”(hŒ ``ENDPROC``”h]”hŒENDPROC”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjûubhŒ macros.”…”�”}”(hjûh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kƒhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjh²hh³hÊh´Nubj•)�”}”(hXÏ``SYM_FUNC_ALIAS``, ``SYM_FUNC_ALIAS_LOCAL``, and ``SYM_FUNC_ALIAS_WEAK`` can be used to define multiple names for a function. The typical use is:: SYM_FUNC_START(__memset) ... asm insns ... SYN_FUNC_END(__memset) SYM_FUNC_ALIAS(memset, __memset) In this example, one can call ``__memset`` or ``memset`` with the same result, except the debug information for the instructions is generated to the object file only once -- for the non-``ALIAS`` case. ”h]”(hÌ)�”}”(hŒ“``SYM_FUNC_ALIAS``, ``SYM_FUNC_ALIAS_LOCAL``, and ``SYM_FUNC_ALIAS_WEAK`` can be used to define multiple names for a function. The typical use is::”h]”(hä)�”}”(hŒ``SYM_FUNC_ALIAS``”h]”hŒSYM_FUNC_ALIAS”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj7ubhŒ, ”…”�”}”(hj7h²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_ALIAS_LOCAL``”h]”hŒSYM_FUNC_ALIAS_LOCAL”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj7ubhŒ, and ”…”�”}”(hj7h²hh³Nh´Nubhä)�”}”(hŒ``SYM_FUNC_ALIAS_WEAK``”h]”hŒSYM_FUNC_ALIAS_WEAK”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj7ubhŒI can be used to define multiple names for a function. The typical use is:”…”�”}”(hj7h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K†hj3ubj%)�”}”(hŒfSYM_FUNC_START(__memset) ... asm insns ... SYN_FUNC_END(__memset) SYM_FUNC_ALIAS(memset, __memset)”h]”hŒfSYM_FUNC_START(__memset) ... asm insns ... SYN_FUNC_END(__memset) SYM_FUNC_ALIAS(memset, __memset)”…”�”}”hjwsbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´K‰hj3ubhÌ)�”}”(hŒÉIn this example, one can call ``__memset`` or ``memset`` with the same result, except the debug information for the instructions is generated to the object file only once -- for the non-``ALIAS`` case.”h]”(hŒIn this example, one can call ”…”�”}”(hj…h²hh³Nh´Nubhä)�”}”(hŒ ``__memset``”h]”hŒ__memset”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj…ubhŒ or ”…”�”}”(hj…h²hh³Nh´Nubhä)�”}”(hŒ ``memset``”h]”hŒmemset”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj…ubhŒ‚ with the same result, except the debug information for the instructions is generated to the object file only once -- for the non-”…”�”}”(hj…h²hh³Nh´Nubhä)�”}”(hŒ ``ALIAS``”h]”hŒALIAS”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj…ubhŒ case.”…”�”}”(hj…h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŽhj3ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjh²hh³hÊh´Nubj•)�”}”(hXc``SYM_CODE_START`` and ``SYM_CODE_START_LOCAL`` should be used only in special cases -- if you know what you are doing. This is used exclusively for interrupt handlers and similar where the calling convention is not the C one. ``_NOALIGN`` variants exist too. The use is the same as for the ``FUNC`` category above:: SYM_CODE_START_LOCAL(bad_put_user) ... asm insns ... SYM_CODE_END(bad_put_user) Again, every ``SYM_CODE_START*`` **shall** be coupled by ``SYM_CODE_END``. To some extent, this category corresponds to deprecated ``ENTRY`` and ``END``. Except ``END`` had several other meanings too. ”h]”(hÌ)�”}”(hX<``SYM_CODE_START`` and ``SYM_CODE_START_LOCAL`` should be used only in special cases -- if you know what you are doing. This is used exclusively for interrupt handlers and similar where the calling convention is not the C one. ``_NOALIGN`` variants exist too. The use is the same as for the ``FUNC`` category above::”h]”(hä)�”}”(hŒ``SYM_CODE_START``”h]”hŒSYM_CODE_START”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÓubhŒ and ”…”�”}”(hjÓh²hh³Nh´Nubhä)�”}”(hŒ``SYM_CODE_START_LOCAL``”h]”hŒSYM_CODE_START_LOCAL”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÓubhŒ´ should be used only in special cases -- if you know what you are doing. This is used exclusively for interrupt handlers and similar where the calling convention is not the C one. ”…”�”}”(hjÓh²hh³Nh´Nubhä)�”}”(hŒ ``_NOALIGN``”h]”hŒ_NOALIGN”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÓubhŒ4 variants exist too. The use is the same as for the ”…”�”}”(hjÓh²hh³Nh´Nubhä)�”}”(hŒ``FUNC``”h]”hŒFUNC”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÓubhŒ category above:”…”�”}”(hjÓh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K’hjÏubj%)�”}”(hŒSSYM_CODE_START_LOCAL(bad_put_user) ... asm insns ... SYM_CODE_END(bad_put_user)”h]”hŒSSYM_CODE_START_LOCAL(bad_put_user) ... asm insns ... SYM_CODE_END(bad_put_user)”…”�”}”hj%sbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´K˜hjÏubhÌ)�”}”(hŒJAgain, every ``SYM_CODE_START*`` **shall** be coupled by ``SYM_CODE_END``.”h]”(hŒ Again, every ”…”�”}”(hj3h²hh³Nh´Nubhä)�”}”(hŒ``SYM_CODE_START*``”h]”hŒSYM_CODE_START*”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3ubhŒ ”…”�”}”(hj3h²hh³Nh´Nubj0)�”}”(hŒ **shall**”h]”hŒshall”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j/hj3ubhŒ be coupled by ”…”�”}”(hj3h²hh³Nh´Nubhä)�”}”(hŒ``SYM_CODE_END``”h]”hŒ SYM_CODE_END”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3ubhŒ.”…”�”}”(hj3h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KœhjÏubhÌ)�”}”(hŒ}To some extent, this category corresponds to deprecated ``ENTRY`` and ``END``. Except ``END`` had several other meanings too.”h]”(hŒ8To some extent, this category corresponds to deprecated ”…”�”}”(hjwh²hh³Nh´Nubhä)�”}”(hŒ ``ENTRY``”h]”hŒENTRY”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjwubhŒ and ”…”�”}”(hjwh²hh³Nh´Nubhä)�”}”(hŒ``END``”h]”hŒEND”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjwubhŒ . Except ”…”�”}”(hjwh²hh³Nh´Nubhä)�”}”(hŒ``END``”h]”hŒEND”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjwubhŒ had several other meanings too.”…”�”}”(hjwh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KžhjÏubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjh²hh³hÊh´Nubj•)�”}”(hX ``SYM_INNER_LABEL*`` is used to denote a label inside some ``SYM_{CODE,FUNC}_START`` and ``SYM_{CODE,FUNC}_END``. They are very similar to C labels, except they can be made global. An example of use:: SYM_CODE_START(ftrace_caller) /* save_mcount_regs fills in first two parameters */ ... SYM_INNER_LABEL(ftrace_caller_op_ptr, SYM_L_GLOBAL) /* Load the ftrace_ops into the 3rd parameter */ ... SYM_INNER_LABEL(ftrace_call, SYM_L_GLOBAL) call ftrace_stub ... retq SYM_CODE_END(ftrace_caller) ”h]”(hÌ)�”}”(hŒÉ``SYM_INNER_LABEL*`` is used to denote a label inside some ``SYM_{CODE,FUNC}_START`` and ``SYM_{CODE,FUNC}_END``. They are very similar to C labels, except they can be made global. An example of use::”h]”(hä)�”}”(hŒ``SYM_INNER_LABEL*``”h]”hŒSYM_INNER_LABEL*”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÅubhŒ' is used to denote a label inside some ”…”�”}”(hjÅh²hh³Nh´Nubhä)�”}”(hŒ``SYM_{CODE,FUNC}_START``”h]”hŒSYM_{CODE,FUNC}_START”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÅubhŒ and ”…”�”}”(hjÅh²hh³Nh´Nubhä)�”}”(hŒ``SYM_{CODE,FUNC}_END``”h]”hŒSYM_{CODE,FUNC}_END”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÅubhŒX. They are very similar to C labels, except they can be made global. An example of use:”…”�”}”(hjÅh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¡hjÁubj%)�”}”(hX>SYM_CODE_START(ftrace_caller) /* save_mcount_regs fills in first two parameters */ ... SYM_INNER_LABEL(ftrace_caller_op_ptr, SYM_L_GLOBAL) /* Load the ftrace_ops into the 3rd parameter */ ... SYM_INNER_LABEL(ftrace_call, SYM_L_GLOBAL) call ftrace_stub ... retq SYM_CODE_END(ftrace_caller)”h]”hX>SYM_CODE_START(ftrace_caller) /* save_mcount_regs fills in first two parameters */ ... SYM_INNER_LABEL(ftrace_caller_op_ptr, SYM_L_GLOBAL) /* Load the ftrace_ops into the 3rd parameter */ ... SYM_INNER_LABEL(ftrace_call, SYM_L_GLOBAL) call ftrace_stub ... retq SYM_CODE_END(ftrace_caller)”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´K¥hjÁubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jâjãuh1j�h³hÊh´Kmhjkh²hubeh}”(h]”Œinstruction-macros”ah ]”h"]”Œinstruction macros”ah$]”h&]”uh1hµhjBh²hh³hÊh´Keubh¶)�”}”(hhh]”(h»)�”}”(hŒ Data Macros”h]”hŒ Data Macros”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj'h²hh³hÊh´K´ubhÌ)�”}”(hŒVSimilar to instructions, there is a couple of macros to describe data in the assembly.”h]”hŒVSimilar to instructions, there is a couple of macros to describe data in the assembly.”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kµhj'h²hubj�)�”}”(hhh]”(j•)�”}”(hXŽ``SYM_DATA_START`` and ``SYM_DATA_START_LOCAL`` mark the start of some data and shall be used in conjunction with either ``SYM_DATA_END``, or ``SYM_DATA_END_LABEL``. The latter adds also a label to the end, so that people can use ``lstack`` and (local) ``lstack_end`` in the following example:: SYM_DATA_START_LOCAL(lstack) .skip 4096 SYM_DATA_END_LABEL(lstack, SYM_L_LOCAL, lstack_end) ”h]”(hÌ)�”}”(hX&``SYM_DATA_START`` and ``SYM_DATA_START_LOCAL`` mark the start of some data and shall be used in conjunction with either ``SYM_DATA_END``, or ``SYM_DATA_END_LABEL``. The latter adds also a label to the end, so that people can use ``lstack`` and (local) ``lstack_end`` in the following example::”h]”(hä)�”}”(hŒ``SYM_DATA_START``”h]”hŒSYM_DATA_START”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjMubhŒ and ”…”�”}”(hjMh²hh³Nh´Nubhä)�”}”(hŒ``SYM_DATA_START_LOCAL``”h]”hŒSYM_DATA_START_LOCAL”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjMubhŒJ mark the start of some data and shall be used in conjunction with either ”…”�”}”(hjMh²hh³Nh´Nubhä)�”}”(hŒ``SYM_DATA_END``”h]”hŒ SYM_DATA_END”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjMubhŒ, or ”…”�”}”(hjMh²hh³Nh´Nubhä)�”}”(hŒ``SYM_DATA_END_LABEL``”h]”hŒSYM_DATA_END_LABEL”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjMubhŒB. The latter adds also a label to the end, so that people can use ”…”�”}”(hjMh²hh³Nh´Nubhä)�”}”(hŒ ``lstack``”h]”hŒlstack”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjMubhŒ and (local) ”…”�”}”(hjMh²hh³Nh´Nubhä)�”}”(hŒ``lstack_end``”h]”hŒ lstack_end”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjMubhŒ in the following example:”…”�”}”(hjMh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¸hjIubj%)�”}”(hŒ_SYM_DATA_START_LOCAL(lstack) .skip 4096 SYM_DATA_END_LABEL(lstack, SYM_L_LOCAL, lstack_end)”h]”hŒ_SYM_DATA_START_LOCAL(lstack) .skip 4096 SYM_DATA_END_LABEL(lstack, SYM_L_LOCAL, lstack_end)”…”�”}”hjÃsbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´K¾hjIubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjFh²hh³hÊh´Nubj•)�”}”(hŒï``SYM_DATA`` and ``SYM_DATA_LOCAL`` are variants for simple, mostly one-line data:: SYM_DATA(HEAP, .long rm_heap) SYM_DATA(heap_end, .long rm_stack) In the end, they expand to ``SYM_DATA_START`` with ``SYM_DATA_END`` internally. ”h]”(hÌ)�”}”(hŒS``SYM_DATA`` and ``SYM_DATA_LOCAL`` are variants for simple, mostly one-line data::”h]”(hä)�”}”(hŒ ``SYM_DATA``”h]”hŒSYM_DATA”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÛubhŒ and ”…”�”}”(hjÛh²hh³Nh´Nubhä)�”}”(hŒ``SYM_DATA_LOCAL``”h]”hŒSYM_DATA_LOCAL”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjÛubhŒ/ are variants for simple, mostly one-line data:”…”�”}”(hjÛh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÂhj×ubj%)�”}”(hŒDSYM_DATA(HEAP, .long rm_heap) SYM_DATA(heap_end, .long rm_stack)”h]”hŒDSYM_DATA(HEAP, .long rm_heap) SYM_DATA(heap_end, .long rm_stack)”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”j4j5uh1j$h³hÊh´KÅhj×ubhÌ)�”}”(hŒOIn the end, they expand to ``SYM_DATA_START`` with ``SYM_DATA_END`` internally.”h]”(hŒIn the end, they expand to ”…”�”}”(hj h²hh³Nh´Nubhä)�”}”(hŒ``SYM_DATA_START``”h]”hŒSYM_DATA_START”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj ubhŒ with ”…”�”}”(hj h²hh³Nh´Nubhä)�”}”(hŒ``SYM_DATA_END``”h]”hŒ SYM_DATA_END”…”�”}”(hj1 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj ubhŒ internally.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÈhj×ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjFh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jâjãuh1j�h³hÊh´K¸hj'h²hubeh}”(h]”Œ data-macros”ah ]”h"]”Œ data macros”ah$]”h&]”uh1hµhjBh²hh³hÊh´K´ubh¶)�”}”(hhh]”(h»)�”}”(hŒSupport Macros”h]”hŒSupport Macros”…”�”}”(hj` h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj] h²hh³hÊh´KÌubhÌ)�”}”(hŒšAll the above reduce themselves to some invocation of ``SYM_START``, ``SYM_END``, or ``SYM_ENTRY`` at last. Normally, developers should avoid using these.”h]”(hŒ6All the above reduce themselves to some invocation of ”…”�”}”(hjn h²hh³Nh´Nubhä)�”}”(hŒ ``SYM_START``”h]”hŒ SYM_START”…”�”}”(hjv h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjn ubhŒ, ”…”�”}”(hjn h²hh³Nh´Nubhä)�”}”(hŒ ``SYM_END``”h]”hŒSYM_END”…”�”}”(hjˆ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjn ubhŒ, or ”…”�”}”(hjn h²hh³Nh´Nubhä)�”}”(hŒ ``SYM_ENTRY``”h]”hŒ SYM_ENTRY”…”�”}”(hjš h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhjn ubhŒ8 at last. Normally, developers should avoid using these.”…”�”}”(hjn h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÍhj] h²hubhÌ)�”}”(hX Further, in the above examples, one could see ``SYM_L_LOCAL``. There are also ``SYM_L_GLOBAL`` and ``SYM_L_WEAK``. All are intended to denote linkage of a symbol marked by them. They are used either in ``_LABEL`` variants of the earlier macros, or in ``SYM_START``.”h]”(hŒ.Further, in the above examples, one could see ”…”�”}”(hj² h²hh³Nh´Nubhä)�”}”(hŒ``SYM_L_LOCAL``”h]”hŒ SYM_L_LOCAL”…”�”}”(hjº h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj² ubhŒ. There are also ”…”�”}”(hj² h²hh³Nh´Nubhä)�”}”(hŒ``SYM_L_GLOBAL``”h]”hŒ SYM_L_GLOBAL”…”�”}”(hjÌ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj² ubhŒ and ”…”�”}”(hj² h²hh³Nh´Nubhä)�”}”(hŒ``SYM_L_WEAK``”h]”hŒ SYM_L_WEAK”…”�”}”(hjÞ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj² ubhŒY. All are intended to denote linkage of a symbol marked by them. They are used either in ”…”�”}”(hj² h²hh³Nh´Nubhä)�”}”(hŒ ``_LABEL``”h]”hŒ_LABEL”…”�”}”(hjð h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj² ubhŒ' variants of the earlier macros, or in ”…”�”}”(hj² h²hh³Nh´Nubhä)�”}”(hŒ ``SYM_START``”h]”hŒ SYM_START”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj² ubhŒ.”…”�”}”(hj² h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÑhj] h²hubeh}”(h]”Œsupport-macros”ah ]”h"]”Œsupport macros”ah$]”h&]”uh1hµhjBh²hh³hÊh´KÌubh¶)�”}”(hhh]”(h»)�”}”(hŒOverriding Macros”h]”hŒOverriding Macros”…”�”}”(hj% h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj" h²hh³hÊh´KØubhÌ)�”}”(hXmArchitecture can also override any of the macros in their own ``asm/linkage.h``, including macros specifying the type of a symbol (``SYM_T_FUNC``, ``SYM_T_OBJECT``, and ``SYM_T_NONE``). As every macro described in this file is surrounded by ``#ifdef`` + ``#endif``, it is enough to define the macros differently in the aforementioned architecture-dependent header.”h]”(hŒ>Architecture can also override any of the macros in their own ”…”�”}”(hj3 h²hh³Nh´Nubhä)�”}”(hŒ``asm/linkage.h``”h]”hŒ asm/linkage.h”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3 ubhŒ4, including macros specifying the type of a symbol (”…”�”}”(hj3 h²hh³Nh´Nubhä)�”}”(hŒ``SYM_T_FUNC``”h]”hŒ SYM_T_FUNC”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3 ubhŒ, ”…”�”}”(hj3 h²hh³Nh´Nubhä)�”}”(hŒ``SYM_T_OBJECT``”h]”hŒ SYM_T_OBJECT”…”�”}”(hj_ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3 ubhŒ, and ”…”�”}”(hj3 h²hh³Nh´Nubhä)�”}”(hŒ``SYM_T_NONE``”h]”hŒ SYM_T_NONE”…”�”}”(hjq h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3 ubhŒ;). As every macro described in this file is surrounded by ”…”�”}”(hj3 h²hh³Nh´Nubhä)�”}”(hŒ ``#ifdef``”h]”hŒ#ifdef”…”�”}”(hjƒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3 ubhŒ + ”…”�”}”(hj3 h²hh³Nh´Nubhä)�”}”(hŒ ``#endif``”h]”hŒ#endif”…”�”}”(hj• h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhj3 ubhŒd, it is enough to define the macros differently in the aforementioned architecture-dependent header.”…”�”}”(hj3 h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÙhj" h²hubeh}”(h]”Œoverriding-macros”ah ]”h"]”Œoverriding macros”ah$]”h&]”uh1hµhjBh²hh³hÊh´KØubeh}”(h]”Œmacros-description”ah ]”h"]”Œmacros description”ah$]”h&]”uh1hµhh·h²hh³hÊh´KGubeh}”(h]”Œassembler-annotations”ah ]”h"]”Œassembler annotations”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jè Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œ discussion”]”jîasŒrefids”}”Œnameids”}”(j j¿ jmjjj?j<j6j3jº j· j$j!jZ jW j j j² j¯ uŒ nametypes”}”(j ‰jm‰j?‰j6ˆjº ‰j$‰jZ ‰j ‰j² ‰uh}”(j¿ h·jjj!j<jpj3j-j· jBj!jkjW j'j j] j¯ j" uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.