* Create new data for a section using libbfd */
| 517 | * Create new data for a section using libbfd |
| 518 | */ |
| 519 | libr_data *new_data(libr_file *file_handle, libr_section *scn) |
| 520 | { |
| 521 | /* NOTE: expanding data is handled by set_data for libbfd */ |
| 522 | if(scn->userdata != NULL) |
| 523 | return scn->userdata; |
| 524 | scn->size = 0; |
| 525 | scn->userdata = malloc(0); |
| 526 | return scn->userdata; |
| 527 | } |
| 528 | |
| 529 | /* |
| 530 | * Create new data for a section using libbfd (at least, do so memory-wise) |