CTSRD-CHERI / clang

DO NOT USE. Use llvm-project instead
Other
9 stars 8 forks source link

Relocatable expression incorrectly handled in purecap code. #159

Closed qwattash closed 6 years ago

qwattash commented 7 years ago

Compling the following snippet in purecap ABI fails with "expected relocatable expression" error. The issue occurs on the dev branch.

extern char end[];
unsigned long foo = (unsigned long)&end;

This seems to fail because the assembler finds a fixup "end & -1" which it refuses to resolve because of the bitwise AND with the non-constant left-hand-side operand.

qwattash commented 6 years ago

This should be fixed by CTSRD-CHERI/llvm@f77c553b3925bb4fef13ec86f4510a31a52fc8ee