[PATCH 2/2] linker_lists: Rework start/end macros to not rely on undefined behavior

Simon Glass sjg at chromium.org
Wed Mar 29 22:02:29 CEST 2023

On Wed, 29 Mar 2023 at 07:55, Tom Rini <trini at konsulko.com> wrote:
> 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 at google.com>
> Suggested-by: Andrew Pinski <pinskia at gcc.gnu.org>
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108915
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Andrew, please feel free to reply with any further tags you want here, I
> wasn't exactly sure of the best way to attribute this to you.  Thanks!
> ---
>  include/linker_lists.h | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)

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

More information about the U-Boot mailing list