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