shithub: scc

ref: 6ac1bf55142759cdd9837f9c11103d1b0e4e15f7
dir: /src/libmach/elf64/elf64del.c/

View raw version
#include <stdio.h>
#include <stdlib.h>

#include <scc/mach.h>

#include "../libmach.h"
#include "elf64.h"

void
elf64del(Obj *obj)
{
        struct elf64 *elf = obj->data;

        if (elf) {
                free(elf->phdr);
                free(elf->shdr);
		free(elf->syms);
                free(elf->strtbl[0]);
                free(elf->strtbl[1]);
        }
        free(obj->data);
        obj->data = NULL;
}