/external/elfutils/libasm/ |
D | asm_align.c | 27 asm_align (asmscn, value) in asm_align() argument 28 AsmScn_t *asmscn; in asm_align() 31 if (asmscn == NULL) 42 rwlock_wrlock (asmscn->ctx->lock); 47 if ((asmscn->offset & (value - 1)) != 0) 53 cnt = value - (asmscn->offset & (value - 1)); 56 result = __libasm_ensure_section_space (asmscn, cnt); 62 byteptr = asmscn->offset % asmscn->pattern->len; 65 asmscn->offset += cnt; 69 asmscn->content->data[asmscn->content->len++] [all …]
|
D | asm_addstrz.c | 28 asm_addstrz (asmscn, str, len) in asm_addstrz() argument 29 AsmScn_t *asmscn; in asm_addstrz() 33 if (asmscn == NULL) 36 if (unlikely (asmscn->type == SHT_NOBITS)) 62 if (unlikely (asmscn->ctx->textp)) 70 fputs ("\t.string\t\"", asmscn->ctx->out.file); 75 fputs ("\\000", asmscn->ctx->out.file); 77 fprintf (asmscn->ctx->out.file, "\\%03o", 80 fputs ("\\\\", asmscn->ctx->out.file); 83 fputs ("\\n\"", asmscn->ctx->out.file); [all …]
|
D | asm_newsym.c | 29 asm_newsym (asmscn, name, size, type, binding) in asm_newsym() argument 30 AsmScn_t *asmscn; in asm_newsym() 40 if (asmscn == NULL) 56 snprintf (tempsym, TEMPSYMLEN, ".L%07u", asmscn->ctx->tempsym_count++); 63 rwlock_wrlock (asmscn->ctx->lock); 65 result->scn = asmscn; 66 result->offset = asmscn->offset; 71 result->strent = ebl_strtabadd (asmscn->ctx->symbol_strtab, 74 if (unlikely (asmscn->ctx->textp)) 83 fprintf (asmscn->ctx->out.file, "\t.globl\t%s\n", name); [all …]
|
D | libasm.h | 68 extern AsmScn_t *asm_newsubscn (AsmScn_t *asmscn, unsigned int nr); 81 extern int asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len); 84 extern int asm_addint8 (AsmScn_t *asmscn, int8_t num); 87 extern int asm_adduint8 (AsmScn_t *asmscn, uint8_t num); 90 extern int asm_addint16 (AsmScn_t *asmscn, int16_t num); 93 extern int asm_adduint16 (AsmScn_t *asmscn, uint16_t num); 96 extern int asm_addint32 (AsmScn_t *asmscn, int32_t num); 99 extern int asm_adduint32 (AsmScn_t *asmscn, uint32_t num); 102 extern int asm_addint64 (AsmScn_t *asmscn, int64_t num); 105 extern int asm_adduint64 (AsmScn_t *asmscn, uint64_t num); [all …]
|
D | asm_addint8.c | 39 FCT(SIZE) (asmscn, num) 40 AsmScn_t *asmscn; 43 if (asmscn == NULL) 46 if (asmscn->type == SHT_NOBITS && unlikely (num != 0)) 52 if (unlikely (asmscn->ctx->textp)) 64 bool is_leb = (elf_getident (asmscn->ctx->out.elf, NULL)[EI_DATA] 77 bool is_leb = (elf_getident (asmscn->ctx->out.elf, NULL)[EI_DATA] 83 if (__libasm_ensure_section_space (asmscn, SIZE / 8) != 0) 93 if (likely (asmscn->type == SHT_NOBITS)) 94 memcpy (&asmscn->content->data[asmscn->content->len], &var, SIZE / 8); [all …]
|
D | asm_adduleb128.c | 26 asm_adduleb128 (asmscn, num) in asm_adduleb128() argument 27 AsmScn_t *asmscn; in asm_adduleb128() 30 if (asmscn == NULL) 33 if (asmscn->type == SHT_NOBITS && unlikely (num != 0)) 39 if (unlikely (asmscn->ctx->textp)) 65 if (__libasm_ensure_section_space (asmscn, nbytes) != 0) 69 if (likely (asmscn->type != SHT_NOBITS)) 70 memcpy (&asmscn->content->data[asmscn->content->len], tmpbuf, nbytes); 73 asmscn->content->len += nbytes; 76 asmscn->offset += nbytes;
|
D | asm_addsleb128.c | 26 asm_addsleb128 (asmscn, num) in asm_addsleb128() argument 27 AsmScn_t *asmscn; in asm_addsleb128() 30 if (asmscn == NULL) 33 if (asmscn->type == SHT_NOBITS && unlikely (num != 0)) 39 if (unlikely (asmscn->ctx->textp)) 69 if (__libasm_ensure_section_space (asmscn, nbytes) != 0) 73 if (likely (asmscn->type != SHT_NOBITS)) 74 memcpy (&asmscn->content->data[asmscn->content->len], tmpbuf, nbytes); 77 asmscn->content->len += nbytes; 80 asmscn->offset += nbytes;
|
D | asm_newsubscn.c | 26 asm_newsubscn (asmscn, nr) in asm_newsubscn() argument 27 AsmScn_t *asmscn; in asm_newsubscn() 35 if (asmscn == NULL) 39 runp = asmscn->subsection_id == 0 ? asmscn : asmscn->data.up; 77 newp->pattern = asmscn->pattern;
|
D | asm_fill.c | 27 asm_fill (asmscn, bytes, len) in asm_fill() argument 28 AsmScn_t *asmscn; in asm_fill() 35 if (asmscn == NULL) 54 old_pattern = asmscn->pattern; 55 asmscn->pattern = pattern;
|
D | asm_end.c | 62 AsmScn_t *asmscn; in binary_end() local 67 for (asmscn = ctx->section_list; asmscn != NULL; asmscn = asmscn->allnext) in binary_end() 70 Elf_Scn *scn = elf_getscn (ctx->out.elf, asmscn->data.main.scnndx); in binary_end() 72 Elf_Scn *scn = asmscn->data.main.scn; in binary_end() 75 AsmScn_t *asmsubscn = asmscn; in binary_end() 404 for (asmscn = ctx->section_list; asmscn != NULL; asmscn = asmscn->allnext) in binary_end() 406 shdr = gelf_getshdr (asmscn->data.main.scn, &shdr_mem); in binary_end() 410 shdr->sh_name = ebl_strtaboffset (asmscn->data.main.strent); in binary_end() 413 shdr->sh_addralign = asmscn->max_align; in binary_end() 415 (void) gelf_update_shdr (asmscn->data.main.scn, shdr); in binary_end()
|
D | libasmP.h | 233 extern int __libasm_ensure_section_space (AsmScn_t *asmscn, size_t len) 250 extern int __asm_addint8_internal (AsmScn_t *asmscn, int8_t num) 252 extern int __asm_addint16_internal (AsmScn_t *asmscn, int16_t num) 254 extern int __asm_addint32_internal (AsmScn_t *asmscn, int32_t num) 256 extern int __asm_addint64_internal (AsmScn_t *asmscn, int64_t num)
|
D | asm_adduint8.c | 36 UFCT(SIZE) (asmscn, num) 37 AsmScn_t *asmscn; 40 return INTUSE(FCT(SIZE)) (asmscn, (TYPE(SIZE)) num);
|