Skip to content
Commit 96d1b9ac authored by Palmer Dabbelt's avatar Palmer Dabbelt Committed by Andreas Schwab
Browse files

RISC-V: Fix the static-PIE non-relocated object check



The value of l_scope is only valid post relocation, so this original
check was triggering undefined behavior.  Instead just directly check to
see if the object has been relocated, at which point using l_scope is
safe.

Reported-by: default avatarAndreas Schwab <schwab@suse.de>
Closes: BZ #31317
Fixes: e0590f41 ("RISC-V: Enable static-pie.")
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent dc1a7726
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment