mer-hybris / libgbinder

GLib-style interface to binder
BSD 3-Clause "New" or "Revised" License
50 stars 42 forks source link

Clang CFI support #121

Open JamiKettunen opened 11 months ago

JamiKettunen commented 11 months ago

Similar to the stuff merged in https://github.com/sailfishos/libglibutil/pull/9 and https://github.com/sailfishos/libglibutil/pull/10 could also be done here with e.g. unit_bridge failing with https://paste.c-net.org/nhzo1ahqzuij (and on runtime with just hidden visibility https://github.com/erfanoabdi/gbinder-python fails to find gbinder_bridge_free symbol for example)

A minimal test env can similar to before be created with:

git clone https://github.com/JamiKettunen/cports -b libgbinder-cfi
cd cports
wget https://repo.chimera-linux.org/apk/apk-x86_64-3.0.0_pre2-r0.static
mv apk-x86_64-3.0.0_pre2-r0.static apk
chmod +x apk
PATH=$PWD:$PATH
cbuild keygen
cbuild binary-bootstrap
cbuild pkg contrib/libgbinder   # this will fail as described above
cbuild chroot

apk add lldb glib-dbg
lldb /builddir/libgbinder-1.1.35/unit/unit_bridge/build/debug/unit_bridge