This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

`ptraddr_t` in GCC compiler

As part of a CHERI hybrid project I'm working on, I recently have attempted to use Morello gcc as my compiler, having used the CheriBSD `clang` compiler built via `cheribuild` [1] before. I downloaded pre-built binaries for x86_64 host and AArch64 targets, namely `arm-gnu-toolchain-10.1.morello-alp2-x86_64-aarch64-none-linux-gnu.tar.xz` [2]. One of the errors I encountered seems to be it doesn't know the type `ptraddr_t` (nor the older `vaddr_t`), which, as far as I'm aware, should be a CHERI type, as per Section 4.2.1 in the CHERI C Programming Guide [3]. I can `typedef` it to something like `intptr_t` or so for myself, but the lack of it might be seen as a bug (unless it was included in a more recent version I couldn't find after a cursory search).

Regards,
Andrei.

[1] https://github.com/CTSRD-CHERI/cheribuild
[2] developer.arm.com/.../arm-gnu-toolchain-for-morello-downloads
[3] www.cl.cam.ac.uk/.../UCAM-CL-TR-947.pdf

Parents
  • Hi Andrei,

    ptraddr_t is defined by Morello glibc in <stddef.h>, so if you are using the whole sysroot provided in that tarball and include that header, ptraddr_t should be available. Note that Clang also defines ptraddr_t in <stddef.h>.

    Cheers,
    Kevin

Reply
  • Hi Andrei,

    ptraddr_t is defined by Morello glibc in <stddef.h>, so if you are using the whole sysroot provided in that tarball and include that header, ptraddr_t should be available. Note that Clang also defines ptraddr_t in <stddef.h>.

    Cheers,
    Kevin

Children