radare2/libr/bin/t/rpathdel.c
Nibble cec1f3fa73 * r_bin
- Refactor r_bin to work better with big fatbins
  - Don't load all sub-bins in memory
    Only load the fatbin and the selected sub-bin
  - Add r_bin_set_archidx() and r_bin_list_archs()
  - Update t/{rpathdel.c, test_meta.c}
* rabin2
  - Use '-f str' to select sub-bin by name
2010-10-04 03:46:58 +02:00

31 lines
549 B
C

/* rpathdel.c - 2010 - nibble<develsec.org> */
#include <stdio.h>
#include <r_bin.h>
int main(int argc, char **argv) {
RBin *bin;
char *input, *output;
if (argc != 3) {
fprintf (stderr, "Usage: %s <input file> <output file>\n", argv[0]);
return 1;
}
input = argv[1];
output = argv[2];
bin = r_bin_new ();
if (!r_bin_load (bin, input, R_FALSE)) {
fprintf (stderr, "Error: Cannot open file '%s'\n", input);
return 1;
}
if (!r_bin_wr_rpath_del (bin))
return 1;
r_bin_wr_output (bin, output);
r_bin_free (bin);
return 0;
}