mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 15:04:23 +00:00
793dae395d
- Add support for fatbins (currently only fatmach0) - Minimize creation of r_buffers * rabin2 - Add flag -A for listing archs - Add flags -a and -B for selecting arch - In the next commit -A and -B will be removed and -a will work with the following format: [-a arch bits] for selecting arch [-a] for listing them --HG-- rename : libr/bin/p/bin_fatmach0.c => libr/bin/p/bin_xtr_fatmach0.c
29 lines
893 B
C
29 lines
893 B
C
/* radare - LGPL - Copyright 2009-2010 nibble<.ds@gmail.com> */
|
|
|
|
#include <r_types.h>
|
|
#include <r_util.h>
|
|
#include <r_bin.h>
|
|
|
|
/* XXX Implement r__bin_wr_scn_{set, del} instead */
|
|
R_API ut64 r_bin_wr_scn_resize(RBin *bin, const char *name, ut64 size) {
|
|
if (bin->curarch && bin->curarch->curplugin &&
|
|
bin->curarch->curplugin->write &&
|
|
bin->curarch->curplugin->write->scn_resize)
|
|
return bin->curarch->curplugin->write->scn_resize (bin->curarch,
|
|
name, size);
|
|
return R_FALSE;
|
|
}
|
|
|
|
R_API int r_bin_wr_rpath_del(RBin *bin) {
|
|
if (bin->curarch && bin->curarch->curplugin &&
|
|
bin->curarch->curplugin->write &&
|
|
bin->curarch->curplugin->write->rpath_del)
|
|
return bin->curarch->curplugin->write->rpath_del (bin->curarch);
|
|
return R_FALSE;
|
|
}
|
|
|
|
R_API int r_bin_wr_output(RBin *bin, const char *filename) {
|
|
return r_file_dump (filename, bin->curarch->buf->buf,
|
|
bin->curarch->buf->length);
|
|
}
|