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