Open johnothwolo opened 6 years ago
Any updates on this?
Nope, there was no response from anyone!
TBH, I hit this error in a completely different context. I have a feeling it's LLVM specific, just stirring the pot in hope for some clues...
What exactly did you do?
Ok, so the context is probably completely unrelated.
I have a piece of ARM code I'm compiling for a Cortex-M4 which calls into a specific function. This function references the pointer to a specific section(call it __test sitting in the RAM) by pointing to the label directly. Note that the labels exist in a .s assembler file(but I don't think this is relevant).
During link-time, it throws the hi16 relocation error, pointing to the __test line. Ultimately, I got around the issue by #defining the address instead of a direct pointer to the section. I got past the error but I'm not sure it actually 'works' yet. Still in the middle of functional testing.
Not sure if that made any sense to you, so apologies in advance...
You guys are trying to use macOS libclang_rt.cc_kext.a, in my .travis.yml, line 38 and 39 shows you a quick workaround. Please tell me if it works.
It doesn't work, I still get:
ld: no supported runtime hi16 relocation in ___cxx_global_var_init from /Users/Mac/xnu/xnu-arm/BUILD/obj//DEBUG_ARM_ARMPBA8/libkern/DEBUG/./OSDebug.cpo to ___stack_chk_guard for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hi John,
Can you try appending a "-mlong-calls" to your linker call? I found that it does fix some issues(although I haven't tested it for this one).
I tried commenting out -fstack-protector-all but got:
ld: no supported runtime hi16 relocation in _trace_backtrace from /Users/mac/xnu/xnu-arm/BUILD/obj//DEBUG_ARM_OMAP3530/libkern/DEBUG/./OSDebug.cpo to ___stack_chk_guard for architecture armv7
llvm is compromising my computer
I'm having this compiling error: