/toolchain/binutils/binutils-2.25/gold/testsuite/ |
D | leb128_unittest.cc | 39 size_t len; in Leb128_test() local 64 CHECK(read_unsigned_LEB_128(u1, &len) == 0 && len == sizeof(u1)); in Leb128_test() 65 CHECK(read_unsigned_LEB_128(u2, &len) == 1 && len == sizeof(u2)); in Leb128_test() 66 CHECK(read_unsigned_LEB_128(u3, &len) == 126 && len == sizeof(u3)); in Leb128_test() 67 CHECK(read_unsigned_LEB_128(u4, &len) == 127 && len == sizeof(u4)); in Leb128_test() 68 CHECK(read_unsigned_LEB_128(u5, &len) == 128 && len == sizeof(u5)); in Leb128_test() 69 CHECK(read_unsigned_LEB_128(u6, &len) == 129 && len == sizeof(u6)); in Leb128_test() 70 CHECK(read_unsigned_LEB_128(u7, &len) == 12857 && len == sizeof(u7)); in Leb128_test() 71 CHECK(read_unsigned_LEB_128(u8, &len) == (1ULL << 63) && len == sizeof(u8)); in Leb128_test() 73 CHECK(read_signed_LEB_128(s1, &len) == 0 && len == sizeof(s1)); in Leb128_test() [all …]
|
/toolchain/binutils/binutils-2.25/gas/ |
D | sb.c | 64 ptr->len = 0; in sb_build() 86 sb_check (ptr, s->len); in sb_add_sb() 87 memcpy (ptr->ptr + ptr->len, s->ptr, s->len); in sb_add_sb() 88 ptr->len += s->len; in sb_add_sb() 99 copy = sb_to_scrub->len - (scrub_position - sb_to_scrub->ptr); in scrub_from_sb() 116 sb_check (ptr, s->len); in sb_scrub_and_add_sb() 117 ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len, s->len); in sb_scrub_and_add_sb() 127 sb_check (sb *ptr, size_t len) in sb_check() argument 129 size_t want = ptr->len + len; in sb_check() 159 ptr->len = 0; in sb_reset() [all …]
|
D | macro.c | 117 size_t line_start = ptr->len; in buffer_and_nest() 142 while (i < ptr->len && ISWHITE (ptr->ptr[i])) in buffer_and_nest() 149 if (i >= ptr->len || ! is_name_beginner (ptr->ptr[i])) in buffer_and_nest() 152 while (i < ptr->len && is_part_of_name (ptr->ptr[i])) in buffer_and_nest() 154 if (i < ptr->len && is_name_ender (ptr->ptr[i])) in buffer_and_nest() 157 while (i < ptr->len && ISWHITE (ptr->ptr[i])) in buffer_and_nest() 160 if (i >= ptr->len || ptr->ptr[i] != ':') in buffer_and_nest() 177 while (i < ptr->len && ISWHITE (ptr->ptr[i])) in buffer_and_nest() 180 if (i < ptr->len && (ptr->ptr[i] == '.' in buffer_and_nest() 197 && (ptr->len == (i + from_len) in buffer_and_nest() [all …]
|
/toolchain/binutils/binutils-2.25/bfd/ |
D | elf-strtab.c | 35 int len; member 86 ret->len = 0; in elf_strtab_hash_newfunc() 161 if (entry->len == 0) in _bfd_elf_strtab_add() 163 entry->len = strlen (str) + 1; in _bfd_elf_strtab_add() 165 BFD_ASSERT (entry->len > 0); in _bfd_elf_strtab_add() 234 tab->array[idx]->len = 0; in _bfd_elf_strtab_restore_size() 270 register unsigned int len; in _bfd_elf_strtab_emit() local 273 len = tab->array[i]->len; in _bfd_elf_strtab_emit() 274 if ((int) len < 0) in _bfd_elf_strtab_emit() 278 if (bfd_bwrite (str, len, abfd) != len) in _bfd_elf_strtab_emit() [all …]
|
D | merge.c | 40 unsigned int len; member 142 unsigned int len, i; in sec_merge_hash_lookup() local 146 len = 0; in sec_merge_hash_lookup() 156 ++len; in sec_merge_hash_lookup() 158 hash += len + (len << 17); in sec_merge_hash_lookup() 175 ++len; in sec_merge_hash_lookup() 177 hash += len + (len << 17); in sec_merge_hash_lookup() 178 len *= table->entsize; in sec_merge_hash_lookup() 181 len += table->entsize; in sec_merge_hash_lookup() 191 len = table->entsize; in sec_merge_hash_lookup() [all …]
|
D | tekhex.c | 274 unsigned int len; in getvalue() local 279 len = hex_value (*src++); in getvalue() 280 if (len == 0) in getvalue() 281 len = 16; in getvalue() 282 while (len--) in getvalue() 299 unsigned int len; in getsym() local 304 len = hex_value (*src++); in getsym() 305 if (len == 0) in getsym() 306 len = 16; in getsym() 307 for (i = 0; i < len; i++) in getsym() [all …]
|
D | hash.c | 435 unsigned int len; in bfd_hash_hash() local 439 len = 0; in bfd_hash_hash() 446 len = (s - (const unsigned char *) string) - 1; in bfd_hash_hash() 447 hash += len + (len << 17); in bfd_hash_hash() 450 *lenp = len; in bfd_hash_hash() 464 unsigned int len; in bfd_hash_lookup() local 467 hash = bfd_hash_hash (string, &len); in bfd_hash_lookup() 486 len + 1); in bfd_hash_lookup() 492 memcpy (new_string, string, len + 1); in bfd_hash_lookup() 838 size_t len = strlen (str) + 1; in _bfd_stringtab_add() local [all …]
|
/toolchain/binutils/binutils-2.25/intl/ |
D | l10nflist.c | 87 static size_t argz_count__ PARAMS ((const char *argz, size_t len)); 90 argz_count__ (argz, len) in argz_count__() argument 92 size_t len; 95 while (len > 0) 99 len -= part_len + 1; 105 # define __argz_count(argz, len) argz_count__ (argz, len) argument 108 # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) argument 115 static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); 118 argz_stringify__ (argz, len, sep) in argz_stringify__() argument 120 size_t len; [all …]
|
D | bindtextdom.c | 161 size_t len = strlen (dirname) + 1; 162 result = (char *) malloc (len); 164 memcpy (result, dirname, len); 199 size_t len = strlen (codeset) + 1; 200 result = (char *) malloc (len); 202 memcpy (result, codeset, len); 231 size_t len = strlen (domainname) + 1; local 233 (struct binding *) malloc (offsetof (struct binding, domainname) + len); 238 memcpy (new_binding->domainname, domainname, len); 259 size_t len = strlen (dirname) + 1; local [all …]
|
/toolchain/binutils/binutils-2.25/binutils/ |
D | winduni.c | 460 int len; in unichar_dup() local 464 for (len = 0; unicode[len] != 0; ++len) in unichar_dup() 466 ++len; in unichar_dup() 467 r = ((unichar *) res_alloc (len * sizeof (unichar))); in unichar_dup() 468 memcpy (r, unicode, len * sizeof (unichar)); in unichar_dup() 490 unichar_isascii (const unichar *u, rc_uint_type len) in unichar_isascii() argument 494 if ((bfd_signed_vma) len < 0) in unichar_isascii() 497 len = (rc_uint_type) unichar_len (u); in unichar_isascii() 499 len = 0; in unichar_isascii() 502 for (i = 0; i < len; i++) in unichar_isascii() [all …]
|
D | nlmheader.y | 167 int len; variable 170 len = strlen ($2); 171 if (len >= NLM_MAX_COPYRIGHT_MESSAGE_LENGTH) 175 len = NLM_MAX_COPYRIGHT_MESSAGE_LENGTH - 1; 177 copyright_hdr->copyrightMessageLength = len; 178 strncpy (copyright_hdr->copyrightMessage, $2, len); 179 copyright_hdr->copyrightMessage[len] = '\0'; 210 int len; variable 212 len = strlen ($2); 213 if (len > NLM_MAX_DESCRIPTION_LENGTH) [all …]
|
D | rclex.c | 145 size_t len, mlen; in cpp_line() local 152 len = strlen (s); in cpp_line() 154 if (len > mlen && memcmp (s, "pragma", mlen) == 0 && ISSPACE (s[mlen])) in cpp_line() 161 len = strlen (s); in cpp_line() 163 if (len <= mlen || memcmp (s, "code_page", mlen) != 0) in cpp_line() 178 len = (size_t) (end - s); in cpp_line() 179 fn = xmalloc (len + 1); in cpp_line() 180 if (len) in cpp_line() 181 memcpy (fn, s, len); in cpp_line() 182 fn[len] = 0; in cpp_line() [all …]
|
D | mclex.c | 223 size_t len = unichar_len (usz); in mc_add_keyword() local 229 if (c->len > len) in mc_add_keyword() 231 if (c->len == len) in mc_add_keyword() 233 int e = memcmp (usz, c->usz, len * sizeof (unichar)); in mc_add_keyword() 259 n->len = len; in mc_add_keyword() 279 mc_token (const unichar *t, size_t len) in mc_token() argument 306 if (!len || !t || *t == 0) in mc_token() 310 if (k->len > len) in mc_token() 312 if (k->len == len) in mc_token() 314 if (! memcmp (k->usz, t, len * sizeof (unichar))) in mc_token()
|
/toolchain/binutils/binutils-2.25/gas/config/ |
D | obj-evax.c | 236 int len = strlen (id); in evax_shorten_name() local 237 int suffix_dotdot = len; in evax_shorten_name() 242 if (len <= MAX_LABEL_LENGTH) in evax_shorten_name() 249 if (strncmp (&id[len-4], "..", 2) == 0) in evax_shorten_name() 251 suffix_dotdot = len - 4; in evax_shorten_name() 252 strncpy (suffix, &id[len-4], 4); in evax_shorten_name() 261 for (i=2; i < len; i++) in evax_shorten_name() 369 crc32 (unsigned char *buf, int len) in crc32() argument 390 while (len--) in crc32() 460 int crc, len, sum, x, final_len; in shorten_identifier() local [all …]
|
D | tc-h8300.c | 262 int len, cmplen = 0; in md_begin() local 283 len = dst - buffer; in md_begin() 285 cmplen = len; in md_begin() 304 if (strncmp (p->name, buffer, len) != 0) in md_begin() 312 pi->size = p->name[len] == '.' ? p->name[len + 1] : 0; in md_begin() 379 int len; in parse_reg() local 387 len = end - src; in parse_reg() 389 if (len == 2 && TOLOWER (src[0]) == 's' && TOLOWER (src[1]) == 'p') in parse_reg() 393 return len; in parse_reg() 395 if (len == 3 && in parse_reg() [all …]
|
/toolchain/binutils/binutils-2.25/libiberty/ |
D | objalloc.c | 117 unsigned long len = original_len; in _objalloc_alloc() local 121 if (len == 0) in _objalloc_alloc() 122 len = 1; in _objalloc_alloc() 124 len = (len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); in _objalloc_alloc() 128 if (len + CHUNK_HEADER_SIZE < original_len) in _objalloc_alloc() 131 if (len <= o->current_space) in _objalloc_alloc() 133 o->current_ptr += len; in _objalloc_alloc() 134 o->current_space -= len; in _objalloc_alloc() 135 return (PTR) (o->current_ptr - len); in _objalloc_alloc() 138 if (len >= BIG_REQUEST) in _objalloc_alloc() [all …]
|
D | make-temp-file.c | 113 unsigned int len; in choose_tmpdir() local 143 len = strlen (base); in choose_tmpdir() 144 tmpdir = XNEWVEC (char, len + 2); in choose_tmpdir() 146 tmpdir[len] = DIR_SEPARATOR; in choose_tmpdir() 147 tmpdir[len+1] = '\0'; in choose_tmpdir() 150 DWORD len; in choose_tmpdir() 153 len = GetTempPath(0, NULL); in choose_tmpdir() 154 if (len) in choose_tmpdir() 156 memoized_tmpdir = XNEWVEC (char, len); in choose_tmpdir() 157 if (!GetTempPath(len, memoized_tmpdir)) in choose_tmpdir()
|
D | cp-demint.c | 135 int len; in cplus_demangle_fill_builtin_type() local 140 len = strlen (type_name); in cplus_demangle_fill_builtin_type() 143 if (len == cplus_demangle_builtin_types[i].len in cplus_demangle_fill_builtin_type() 160 int len; in cplus_demangle_fill_operator() local 165 len = strlen (opname); in cplus_demangle_fill_operator() 168 if (len == cplus_demangle_operators[i].len in cplus_demangle_fill_operator() 185 size_t len; in cplus_demangle_v3_components() local 190 len = strlen (mangled); in cplus_demangle_v3_components() 201 cplus_demangle_init_info (mangled, options, len, &di); in cplus_demangle_v3_components()
|
D | xstrndup.c | 51 size_t len = strlen (s); in xstrndup() local 53 if (n < len) in xstrndup() 54 len = n; in xstrndup() 56 result = XNEWVEC (char, len + 1); in xstrndup() 58 result[len] = '\0'; in xstrndup() 59 return (char *) memcpy (result, s, len); in xstrndup()
|
D | strndup.c | 44 size_t len = strlen (s); in strndup() local 46 if (n < len) in strndup() 47 len = n; in strndup() 49 result = (char *) malloc (len + 1); in strndup() 53 result[len] = '\0'; in strndup() 54 return (char *) memcpy (result, s, len); in strndup()
|
/toolchain/binutils/binutils-2.25/gold/ |
D | target.cc | 182 size_t len) const in match_view() 184 if (offset + len > view_size) in match_view() 186 return memcmp(view + offset, bytes, len) == 0; in match_view() 194 section_offset_type offset, size_t len) const in set_view_to_nop() 196 gold_assert(offset >= 0 && offset + len <= view_size); in set_view_to_nop() 198 memset(view + offset, 0, len); in set_view_to_nop() 201 std::string fill = this->code_fill(len); in set_view_to_nop() 202 memcpy(view + offset, fill.data(), len); in set_view_to_nop() 209 uint64_t* address, off_t* len) const in do_plt_fde_location() 212 *len = plt->data_size(); in do_plt_fde_location() [all …]
|
D | stringpool.cc | 151 size_t len) in add_string() argument 165 len = (len + 1) * sizeof(Stringpool_char); in add_string() 169 if (len > buffer_size) in add_string() 171 alc = sizeof(Stringdata) + len; in add_string() 179 if (len > psd->alc - psd->len) in add_string() 183 char* ret = psd->data + psd->len; in add_string() 184 memcpy(ret, s, len - sizeof(Stringpool_char)); in add_string() 185 memset(ret + len - sizeof(Stringpool_char), 0, in add_string() 188 psd->len += len; in add_string() 196 memcpy(psd->data, s, len - sizeof(Stringpool_char)); in add_string() [all …]
|
D | dwarf_reader.cc | 240 size_t len; in do_get_abbrev() local 243 uint64_t nextcode = read_unsigned_LEB_128(this->buffer_pos_, &len); in do_get_abbrev() 249 this->buffer_pos_ += len; in do_get_abbrev() 254 uint64_t tag = read_unsigned_LEB_128(this->buffer_pos_, &len); in do_get_abbrev() 255 this->buffer_pos_ += len; in do_get_abbrev() 270 uint64_t attr = read_unsigned_LEB_128(this->buffer_pos_, &len); in do_get_abbrev() 271 this->buffer_pos_ += len; in do_get_abbrev() 276 uint64_t form = read_unsigned_LEB_128(this->buffer_pos_, &len); in do_get_abbrev() 277 this->buffer_pos_ += len; in do_get_abbrev() 657 size_t len; in Dwarf_die() local [all …]
|
/toolchain/binutils/binutils-2.25/libiberty/testsuite/ |
D | test-expandargv.c | 166 hook_char_replace (char *string, size_t len, char replacethis, char withthis) in hook_char_replace() argument 169 for (i = 0; i < len; i++) in hook_char_replace() 183 size_t len = strlen (string); in run_replaces() local 184 hook_char_replace (string, len, '\b', '\0'); in run_replaces() 195 size_t len, sys_fwrite; in writeout_test() local 205 len = strlen (test_data); in writeout_test() 206 parse = malloc (sizeof (char) * (len + 1)); in writeout_test() 210 memcpy (parse, test_data, sizeof (char) * (len + 1)); in writeout_test() 214 sys_fwrite = fwrite (parse, sizeof (char), len, fd); in writeout_test() 215 if (sys_fwrite != len) in writeout_test()
|
/toolchain/binutils/binutils-2.25/gprof/ |
D | sym_ids.c | 93 int len = strlen (spec); in sym_id_add() local 95 id = (struct sym_id *) xmalloc (sizeof (*id) + len + 1); in sym_id_add() 248 tab->base[tab->len] = *sym; in extend_match() 249 m->prev_index = tab->len; in extend_match() 252 tab->base[tab->len].next = m->first_match; in extend_match() 253 m->first_match = &tab->base[tab->len]; in extend_match() 256 ++tab->len; in extend_match() 302 if (tab->len) in sym_id_parse() 304 tab->base = (Sym *) xmalloc (tab->len * sizeof (Sym)); in sym_id_parse() 305 tab->limit = tab->base + tab->len; in sym_id_parse() [all …]
|