SUSE / clang-extract

A tool to extract code content from source files using the clang and LLVM infrastructure.
Other
12 stars 2 forks source link

static function removed from the final closure #20

Closed marcosps closed 4 months ago

marcosps commented 4 months ago

When extracting function _iwl_dbg_tlv_time_point from drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c it doesn't bring the static function iwl_dbg_tlv_init_cfg, which fails to compile the created livepatch:

/home/mpdesouza/kgr/livepatches/bsc1221302/ce/15.4u11/work_drivers_net_wireless_intel_iwlwifi_iwl-dbg-tlv.c/livepatch.c: In function ‘klpp__iwl_dbg_tlv_time_point’:
/home/mpdesouza/kgr/livepatches/bsc1221302/ce/15.4u11/work_drivers_net_wireless_intel_iwlwifi_iwl-dbg-tlv.c/livepatch.c:1153:14: error: implicit declaration of function ‘iwl_trans_dbg_ini_valid’ [-Werror=implicit-function-declaration]
 1153 |         if (!iwl_trans_dbg_ini_valid(fwrt->trans) ||
      |              ^~~~~~~~~~~~~~~~~~~~~~~
/home/mpdesouza/kgr/livepatches/bsc1221302/ce/15.4u11/work_drivers_net_wireless_intel_iwlwifi_iwl-dbg-tlv.c/livepatch.c:1164:17: error: implicit declaration of function ‘iwl_dbg_tlv_init_cfg’ [-Werror=implicit-function-declaration]
 1164 |                 iwl_dbg_tlv_init_cfg(fwrt);

There are more functions that are removed from the closure, but I believe it's the same issue.