Mercurial > hg > index.cgi
comparison lwlink/map.c @ 8:fdc11ef4115b
Switched lwlink to lw_cmdline from argp and also brought in lw_alloc and lw_string to replace util.c
author | lost@l-w.ca |
---|---|
date | Sat, 22 Jan 2011 09:58:24 -0700 |
parents | 7317fbe024af |
children | fc8386b13399 |
comparison
equal
deleted
inserted
replaced
7:917b608b8c66 | 8:fdc11ef4115b |
---|---|
24 #include <errno.h> | 24 #include <errno.h> |
25 #include <stdio.h> | 25 #include <stdio.h> |
26 #include <stdlib.h> | 26 #include <stdlib.h> |
27 #include <string.h> | 27 #include <string.h> |
28 | 28 |
29 #include <lw_alloc.h> | |
30 | |
29 #include "lwlink.h" | 31 #include "lwlink.h" |
30 #include "util.h" | |
31 | 32 |
32 struct symliste | 33 struct symliste |
33 { | 34 { |
34 char *name; | 35 char *name; |
35 char *fn; | 36 char *fn; |
89 } | 90 } |
90 if (i > 0) | 91 if (i > 0) |
91 break; | 92 break; |
92 pe = ce; | 93 pe = ce; |
93 } | 94 } |
94 ne = lw_malloc(sizeof(struct symliste)); | 95 ne = lw_alloc(sizeof(struct symliste)); |
95 ne -> ext = 0; | 96 ne -> ext = 0; |
96 ne -> addr = sym -> offset + sectlist[sn].ptr -> loadaddress; | 97 ne -> addr = sym -> offset + sectlist[sn].ptr -> loadaddress; |
97 ne -> next = ce; | 98 ne -> next = ce; |
98 ne -> name = (char *)(sym -> sym); | 99 ne -> name = (char *)(sym -> sym); |
99 ne -> fn = sectlist[sn].ptr -> file -> filename; | 100 ne -> fn = sectlist[sn].ptr -> file -> filename; |