Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map dynamic library globals to root set on CHERI
(a cherry-pick of commit 61c5a8a partly from capablevms/bdwgc) Issue #627 (bdwgc). Without `DYNAMIC_LOADING` being defined, libgc only marks global variables in the compiled executable. Variables in the `.data` and `.bss` sections of dynamically linked libraries are ignored in this scenario. The current commit adds a valid capability with required bounds to scan global global variables in additional dynamically linked libraries. * dyn_load.c [DYNAMIC_LOADING && !ANY_MSWIN && (DGUX || HURD || NACL || SCO_ELF || (ANY_BSD || LINUX) && __ELF__) && !USE_PROC_FOR_LIBRARIES && HAVE_DL_ITERATE_PHDR && CHERI_PURECAP] (GC_register_dynlib_callback): Align `my_start` up; align `my_end` down; call `SPANNING_CAPABILITY()` and `cheri_bounds_set()`.
- Loading branch information