Arlleex 131 25 ноября, 2023 Опубликовано 25 ноября, 2023 · Жалоба 5 часов назад, haker_fox сказал: Возможно, остался такой подход от каких-то старых версий компилятора, например, даже созданный из ошибочных предположений. Все может быть. Но просто этот самый банан задокументирован, а значит, все-таки, какое-то осмысленное назначение бесполезных инструкций осталось Цитата Weak references Weak symbol references can be used in a similar way to weak symbol definitions. They can act as placeholders until the actual definition becomes available. This placeholder allows you the option to begin testing a particular part of the application, for example, at an earlier stage in the project, without having to wait for a new module that contains the definition to become available. // foo.c void bar(void) __attribute__ ((weak)); // weak function prototype declaration for bar() void foo(void) // global function definition for foo() { bar(); // global function reference bar() with weak binding } This example contains a weak symbol reference to the function bar(). An unresolved weak function call is replaced with either: • A no-operation instruction, NOP. • A branch with link instruction, BL, to the following instruction. That is, the function call does not happen. When the module that contains the definition for bar() is finally ready, it can be linked in instead. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться