Before this change, compiler would generate symbol that points right past .rodata.str section. While GNU ld handles this just fine, LLVM ld will complain:
ld.lld: error: common/device-tree/device-tree.o:(.rodata.str): offset is outside the section Fix this issue by providing literal zero instead of calculated zero if there is no error message in a bugframe. Signed-off-by: Volodymyr Babchuk <[email protected]> --- xen/arch/arm/include/asm/bug.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/include/asm/bug.h b/xen/arch/arm/include/asm/bug.h index cacaf014ab..9339e3bbf6 100644 --- a/xen/arch/arm/include/asm/bug.h +++ b/xen/arch/arm/include/asm/bug.h @@ -47,7 +47,11 @@ struct bug_frame { ".p2align 2\n" \ ".long (1b - 4b)\n" \ ".long (2b - 4b)\n" \ + ".if " #has_msg "\n" \ ".long (3b - 4b)\n" \ + ".else\n" \ + ".long 0\n" \ + ".endif\n" \ ".hword " __stringify(line) ", 0\n" \ ".popsection"); \ } while (0) -- 2.47.0
