[PATCH v4 03/42] linker_lists: Allow use in data structures

Simon Glass sjg at chromium.org
Wed Mar 17 02:29:00 CET 2021


At present linker lists are designed for use in code. They make use of
statements within expressions ({...}), for example.

It is possible to generate a reference to a linker_list entry that can
be used in data structures, where such features are not permitted. It
requires that the reference first be declared as extern. In other
words the existing macro needs to be split into two parts.

Add new macros to support this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v3)

Changes in v3:
- Drop the decl() variant since it is just as easy to use extern

 include/linker_lists.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list