Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RISC-V] Unresolvable relocation with -fdirect-access-external-data -fstack-protector-all #88079

Open
patrick-rivos opened this issue Apr 9, 2024 · 0 comments

Comments

@patrick-rivos
Copy link
Contributor

Testcase:

int main() {}

Error:

> /scratch/tc-testing/tc-apr-4/build-rv64gcv/build-llvm-linux/bin/clang -fdirect-access-external-data -fstack-protector-all red.c -o rv64gcv.o
/scratch/tc-testing/tc-apr-4/build-rv64gcv/build-llvm-linux/bin/../sysroot/lib/gcc/riscv64-unknown-linux-gnu/14.0.1/../../../../riscv64-unknown-linux-gnu/bin/ld: unresolvable R_RISCV_PCREL_HI20 relocation against symbol `__stack_chk_guard@@GLIBC_2.27'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Godbolt: https://godbolt.org/z/GTYnbnEd6

Found via fuzzer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant