]> git.baikalelectronics.ru Git - uboot.git/commit
linker_lists: Rework start/end macros to not rely on undefined behavior
authorTom Rini <trini@konsulko.com>
Tue, 28 Mar 2023 18:54:51 +0000 (14:54 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 4 Apr 2023 16:24:29 +0000 (12:24 -0400)
commita8cec56a8adcf2071483817320beadecd3681bdf
treeea6d2e931dc7abc39ebba345d72c5892371bf9ad
parentd2430ade97c690f3d839e7182d83cc29caa44f55
linker_lists: Rework start/end macros to not rely on undefined behavior

Per the GCC bug listed below, the way we do linker lists is relying on
undefined behavior that seems to work in gcc, but doesn't always work in
clang. Andrew suggests rewriting our start/end macros in a different way
(as implemented here, from what he said in comment 1) to avoid these
problems.

Reported-by: AdityaK <appujee@google.com>
Suggested-by: Andrew Pinski <apinski@marvell.com>
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108915
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andrew Pinski <apinski@marvell.com>
include/linker_lists.h