elf64del.c - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
       elf64del.c (416B)
       ---
            1 #include <stdio.h>
            2 #include <stdlib.h>
            3 
            4 #include <scc/mach.h>
            5 
            6 #include "../libmach.h"
            7 #include "elf64.h"
            8 
            9 void
           10 elf64del(Obj *obj)
           11 {
           12         struct elf64 *elf = obj->data;
           13 
           14         if (elf) {
           15                 free(elf->phdr);
           16                 free(elf->shdr);
           17                 free(elf->syms);
           18                 free(elf->strtbl[0]);
           19                 free(elf->strtbl[1]);
           20         }
           21         free(obj->data);
           22         obj->data = NULL;
           23 }