Lines Matching refs:symtab
37 struct arlib_symtab symtab;
46 obstack_init (&symtab.symsoffob);
47 obstack_init (&symtab.symsnameob);
48 obstack_init (&symtab.longnamesob);
79 obstack_grow (&symtab.symsoffob, &ar_hdr, sizeof (ar_hdr));
85 obstack_int_grow (&symtab.symsoffob, 0);
96 obstack_grow (&symtab.longnamesob, &ar_hdr, sizeof (ar_hdr));
99 symtab.symsofflen = 0;
100 symtab.symsoff = NULL;
101 symtab.symsnamelen = 0;
102 symtab.symsname = NULL;
112 symtab.longnameslen = obstack_object_size (&symtab.longnamesob);
113 if (symtab.longnameslen != sizeof (struct ar_hdr))
115 if ((symtab.longnameslen & 1) != 0)
118 obstack_grow (&symtab.longnamesob, "\n", 1);
119 ++symtab.longnameslen;
122 symtab.longnames = obstack_finish (&symtab.longnamesob);
126 symtab.longnameslen - sizeof (struct ar_hdr));
127 memcpy (&((struct ar_hdr *) symtab.longnames)->ar_size, tmpbuf, s);
130 symtab.symsofflen = obstack_object_size (&symtab.symsoffob);
131 assert (symtab.symsofflen % sizeof (uint32_t) == 0);
132 if (symtab.symsofflen != 0)
134 symtab.symsoff = (uint32_t *) obstack_finish (&symtab.symsoffob);
137 symtab.symsoff[AR_HDR_WORDS] = le_bswap_32 ((symtab.symsofflen
142 symtab.symsnamelen = obstack_object_size (&symtab.symsnameob);
143 if ((symtab.symsnamelen & 1) != 0)
146 obstack_grow (&symtab.symsnameob, "", 1);
147 ++symtab.symsnamelen;
149 symtab.symsname = obstack_finish (&symtab.symsnameob);
153 if (symtab.symsnamelen > 0)
154 disp = symtab.symsofflen + symtab.symsnamelen;
155 if (symtab.longnameslen > sizeof (struct ar_hdr))
156 disp += symtab.longnameslen;
158 if (disp != 0 && symtab.symsoff != NULL)
160 uint32_t nsyms = le_bswap_32 (symtab.symsoff[AR_HDR_WORDS]);
164 uint32_t val = le_bswap_32 (symtab.symsoff[AR_HDR_WORDS + cnt]);
166 symtab.symsoff[AR_HDR_WORDS + cnt] = le_bswap_32 (val);
171 memcpy (&((struct ar_hdr *) symtab.symsoff)->ar_size, tmpbuf,
174 symtab.symsofflen + symtab.symsnamelen
183 obstack_free (&symtab.symsoffob, NULL);
184 obstack_free (&symtab.symsnameob, NULL);
185 obstack_free (&symtab.longnamesob, NULL);
195 obstack_int_grow (&symtab.symsoffob, (int) le_bswap_32 (symoff));
198 obstack_grow (&symtab.symsnameob, symname, symname_len);