Closed hchunhui closed 1 year ago
@hchunhui thanks for the contribution, but I think that this fix should go in the AppImageKit repo instead. As we moved that function in a legacy header so it may be deorecated at some point.
@probonopd @TheAssassin may have some comments on this.
appimage_get_elf_size()
can be replace by appimage_get_payload_offset()
according to current implementation, but after the replacement we have to link to the whole C++ library instead of libappimage_shared (relatively small, written by C). As the function is used by runtime
of AppImageKit, and we may want to keep runtime
small, so it may be worth to restore it.
Yes, we want runtime.c
to be as small and lightweight as possible and no heavyweight C++ dependencies in runtime.c
.
Once we had: https://github.com/AppImage/AppImageKit/blob/d66acbafe8e17f82f19d644b09df45c4e0bcd284/elf.c
What's the state of this? Without this fixed it looks like AppImageKit can not use any libappimage after https://github.com/AppImage/libappimage/commit/4f22f90020f3fc5b9e37a2d5f048eb7fed690a54 from Jan 2019
I think we should not duplicate code within here, but instead really just move this code to AppImageKit's repository for now. Thanks anyway!
Currently AppImageKit can not be compiled with the master branch of libappimage, the build script reports "undefined reference to
appimage_get_elf_size()
".the
runtime
of AppImageKit can only be linked withlibappimage_shared
, butappimage_get_elf_size()
is moved intolibappimage
since 4f22f90020f3fc5b9e37a2d5f048eb7fed690a54 . Restoring the function will fix the issue.