23 #include <linux/types.h>
77 static bool no_op(
void);
82 static s32 cod_f_close(
struct file *filp)
94 static struct file *cod_f_open(
const char *psz_file_name,
const char *sz_mode)
120 if ((size > 0) && (count > 0) && pbuffer) {
127 dw_bytes_read = filp->
f_op->read(filp, pbuffer, size * count,
134 return dw_bytes_read /
size;
149 dw_cur_pos = filp->
f_op->llseek(filp, offset, origin);
151 if ((
s32) dw_cur_pos < 0)
158 static s32 cod_f_tell(
struct file *filp)
168 if ((
s32) dw_cur_pos < 0)
210 mgr_new->
fxns = ldr_fxns;
213 mgr_new->
fxns.init_fxn();
232 mgr_new->
attrs = zl_attrs;
234 status = mgr_new->
fxns.create_fxn(&mgr_new->
target, &zl_attrs);
257 &cod_mgr_obj->
attrs);
261 if (cod_mgr_obj->
target) {
262 cod_mgr_obj->
fxns.delete_fxn(cod_mgr_obj->
target);
263 cod_mgr_obj->
fxns.exit_fxn();
307 *entry_pt = cod_mgr_obj->
entry;
343 status = cod_mgr_obj->
fxns.get_sect_fxn(lib->
dbll_lib, str_sect,
365 dev_dbg(
bridge,
"%s: cod_mgr_obj: %p str_sym: %s pul_value: %p\n",
366 __func__, cod_mgr_obj, str_sym, pul_value);
368 if (!cod_mgr_obj->
fxns.
369 get_addr_fxn(cod_mgr_obj->
base_lib, str_sym, &dbll_sym)) {
370 if (!cod_mgr_obj->
fxns.
371 get_c_addr_fxn(cod_mgr_obj->
base_lib, str_sym,
379 *pul_value = dbll_sym->
value;
410 for (i = 0; i < num_argc; i++) {
411 if (args[i] ==
NULL) {
418 cod_mgr_obj->
fxns.get_attrs_fxn(cod_mgr_obj->
target, &save_attrs);
420 new_attrs = save_attrs;
430 status = cod_mgr_obj->
fxns.load_fxn(cod_mgr_obj->
base_lib, flags,
432 &cod_mgr_obj->
entry);
437 cod_mgr_obj->
loaded =
true;
462 status = hmgr->
fxns.open_fxn(hmgr->
target, sz_coff_path, flags,
469 pr_err(
"%s: error status 0x%x, sz_coff_path: %s flags: 0x%x\n",
470 __func__, status, sz_coff_path, flags);
494 status = hmgr->
fxns.open_fxn(hmgr->
target, sz_coff_path, flags, &lib);
503 pr_err(
"%s: error status 0x%x sz_coff_path: %s\n", __func__,
504 status, sz_coff_path);
514 char *str_content,
u32 content_size)
521 str_content, content_size);
534 static bool no_op(
void)