Commit 94197a8c authored by Mitchell Horne's avatar Mitchell Horne Committed by Anup Patel
Browse files

fw_base.S: Fix assembler error with clang 16+



Attempting to build OpenSBI with clang 16 and the following command:

   $ make LLVM=1 PLATFORM=generic

Results in the following error:

    AS        platform/generic/firmware/fw_dynamic.o
   /tmp/fw_dynamic-d000a6.s:429:9: error: symbol '_fw_start' can not be undefined in a subtraction expression
    .dword _fw_rw_start - _fw_start

Work around this issue by eliminating the __fw_rw_offset variable and
performing the offset calculation at run-time instead. This takes
advantage of the fact that the a4 register contains the value of
_fw_start.

Signed-off-by: default avatarMitchell Horne <mhorne@FreeBSD.org>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent f46a5643
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment