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

Errors in compilation of complier-rt-sanititizers recipe file in aarch64 platform. #1044

Open
YaswanthDara opened this issue Jan 2, 2025 · 2 comments

Comments

@YaswanthDara
Copy link

YaswanthDara commented Jan 2, 2025

Hi team,
I am using address sanitizers and able to compile our recipe file which uses complier-rt-sanititizers across all platforms but its throwing the following errors for the aarch64.

  1. relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__hwasan_shadow_memory_dynamic_address' which may bind externally can not be used when making a shared object.
  2. DWARF error: invalid or unhandled FORM value: 0x23.

I tried adding the -fPIC flags but still throwing different errors. Below is the full error. Pls help me with this. Thanks.

/tmp/work/cortexa78c-poky-linux/compiler-rt-sanitizers/14.0.6-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld: projects/compiler-rt/lib/hwasan/CMakeFiles/RTHwasan_dynamic.aarch64.dir/hwasan.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol __hwasan_shadow_memory_dynamic_address' which may bind externally can not be used when making a shared object; recompile with -fPIC tmp/work/cortexa78c-poky-linux/compiler-rt-sanitizers/14.0.6-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld: DWARF error: invalid or unhandled FORM value: 0x23 | projects/compiler-rt/lib/hwasan/CMakeFiles/RTHwasan_dynamic.aarch64.dir/hwasan.cpp.o: in function __hwasan_print_shadow: | hwasan.cpp:(.text+0xeec): dangerous relocation: unsupported relocation

I also found that from table here https://github.com/google/sanitizers/wiki/AddressSanitizer that asan is not supported for arm64.

@kraj
Copy link
Owner

kraj commented Jan 2, 2025

@YaswanthDara thanks for the report, it seems you are on clang 14.x release. Are you able to repeoduce same error on master branch with Clang 19 as well ?

@YaswanthDara
Copy link
Author

hi @kraj currently i was unable to upgrade the clang version upgrade in my organisation. can u pls suggest other ways? Thanks

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

No branches or pull requests

2 participants