about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2024-02-22 15:24:00 -0800
committerAndreas Schwab <schwab@suse.de>2024-03-25 15:17:13 +0100
commit96d1b9ac2321b565f340ba8f3674597141e3450d (patch)
treeeecd6098943c84de0895e23b1f26e2dc0358318a /elf
parentdc1a77269c971652a8a5167ec366792eae052e65 (diff)
downloadglibc-96d1b9ac2321b565f340ba8f3674597141e3450d.tar.gz
glibc-96d1b9ac2321b565f340ba8f3674597141e3450d.tar.xz
glibc-96d1b9ac2321b565f340ba8f3674597141e3450d.zip
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: Andreas Schwab <schwab@suse.de>
Closes: BZ #31317
Fixes: e0590f41fe ("RISC-V: Enable static-pie.")
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'elf')
0 files changed, 0 insertions, 0 deletions