/external/elfutils/libasm/ |
asm_align.c | 43 asm_align (AsmScn_t *asmscn, GElf_Word value) 45 if (asmscn == NULL) 56 if (unlikely (asmscn->ctx->textp)) 58 fprintf (asmscn->ctx->out.file, "\t.align %" PRId32 ", ", 60 if (asmscn->pattern->len == 1) 61 fprintf (asmscn->ctx->out.file, "%02hhx\n", asmscn->pattern->bytes[0]); 64 fputc_unlocked ('"', asmscn->ctx->out.file); 66 for (size_t cnt = 0; cnt < asmscn->pattern->len; ++cnt) 67 fprintf (asmscn->ctx->out.file, "\\x%02hhx" [all...] |
asm_adduleb128.c | 41 asm_adduleb128 (AsmScn_t *asmscn, uint32_t num) 43 if (asmscn == NULL) 46 if (asmscn->type == SHT_NOBITS && unlikely (num != 0)) 52 if (unlikely (asmscn->ctx->textp)) 53 fprintf (asmscn->ctx->out.file, "\t.uleb128\t%" PRIu32 "\n", num); 78 if (__libasm_ensure_section_space (asmscn, nbytes) != 0) 82 if (likely (asmscn->type != SHT_NOBITS)) 83 memcpy (&asmscn->content->data[asmscn->content->len], tmpbuf, nbytes); 86 asmscn->content->len += nbytes [all...] |
asm_addstrz.c | 41 /* Add zero terminated string STR of size LEN to (sub)section ASMSCN. */ 43 asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len) 45 if (asmscn == NULL) 48 if (unlikely (asmscn->type == SHT_NOBITS)) 74 if (unlikely (asmscn->ctx->textp)) 82 fputs ("\t.string\t\"", asmscn->ctx->out.file); 87 fputs ("\\000", asmscn->ctx->out.file); 89 fprintf (asmscn->ctx->out.file, "\\%03o", 92 fputs ("\\\\", asmscn->ctx->out.file); 95 fputs ("\\n\"", asmscn->ctx->out.file) [all...] |
asm_addint8.c | 54 FCT(SIZE) (AsmScn_t *asmscn, TYPE(SIZE) num) 56 if (asmscn == NULL) 59 if (asmscn->type == SHT_NOBITS && unlikely (num != 0)) 65 if (unlikely (asmscn->ctx->textp)) 69 fprintf (asmscn->ctx->out.file, "\t.byte\t%" PRId8 "\n", (int8_t) num); 71 fprintf (asmscn->ctx->out.file, "\t.value\t%" PRId16 "\n", 74 fprintf (asmscn->ctx->out.file, "\t.long\t%" PRId32 "\n", 79 bool is_leb = (elf_getident (asmscn->ctx->out.elf, NULL)[EI_DATA] 82 fprintf (asmscn->ctx->out.file, 93 bool is_leb = (elf_getident (asmscn->ctx->out.elf, NULL)[EI_DATA [all...] |
asm_newsym.c | 44 asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, 51 if (asmscn == NULL) 67 snprintf (tempsym, TEMPSYMLEN, ".L%07u", asmscn->ctx->tempsym_count++); 78 rwlock_wrlock (asmscn->ctx->lock); 80 result->scn = asmscn; 81 result->offset = asmscn->offset; 86 result->strent = ebl_strtabadd (asmscn->ctx->symbol_strtab, 89 if (unlikely (asmscn->ctx->textp)) 95 fprintf (asmscn->ctx->out.file, "\t.globl\t%s\n", name); 97 fprintf (asmscn->ctx->out.file, "\t.weak\t%s\n", name) [all...] |
asm_addsleb128.c | 41 asm_addsleb128 (AsmScn_t *asmscn, int32_t num) 43 if (asmscn == NULL) 46 if (asmscn->type == SHT_NOBITS && unlikely (num != 0)) 52 if (unlikely (asmscn->ctx->textp)) 53 fprintf (asmscn->ctx->out.file, "\t.sleb128\t%" PRId32 "\n", num); 82 if (__libasm_ensure_section_space (asmscn, nbytes) != 0) 86 if (likely (asmscn->type != SHT_NOBITS)) 87 memcpy (&asmscn->content->data[asmscn->content->len], tmpbuf, nbytes); 90 asmscn->content->len += nbytes [all...] |
asm_fill.c | 42 asm_fill (AsmScn_t *asmscn, void *bytes, size_t len) 47 if (asmscn == NULL) 66 old_pattern = asmscn->pattern; 67 asmscn->pattern = pattern;
|
libasm.h | 42 typedef struct AsmScn AsmScn_t; 96 extern AsmScn_t *asm_newsubscn (AsmScn_t *asmscn, unsigned int nr); 108 /* Add zero terminated string STR of size LEN to (sub)section ASMSCN. */ 109 extern int asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len); 111 /* Add 8-bit signed integer NUM to (sub)section ASMSCN. */ 112 extern int asm_addint8 (AsmScn_t *asmscn, int8_t num); 114 /* Add 8-bit unsigned integer NUM to (sub)section ASMSCN. */ 115 extern int asm_adduint8 (AsmScn_t *asmscn, uint8_t num); 117 /* Add 16-bit signed integer NUM to (sub)section ASMSCN. */ 118 extern int asm_addint16 (AsmScn_t *asmscn, int16_t num) [all...] |
asm_newsubscn.c | 41 asm_newsubscn (AsmScn_t *asmscn, unsigned int nr) 48 if (asmscn == NULL) 52 runp = asmscn->subsection_id == 0 ? asmscn : asmscn->data.up; 90 newp->pattern = asmscn->pattern;
|
asm_adduint8.c | 51 UFCT(SIZE) (AsmScn_t *asmscn, UTYPE(SIZE) num) 53 return INTUSE(FCT(SIZE)) (asmscn, (TYPE(SIZE)) num);
|
libasmP.h | 68 struct AsmScn 91 struct AsmScn *next_in_group; 227 struct AsmScn *members; 263 for ASMSCN. */ 264 extern int __libasm_ensure_section_space (AsmScn_t *asmscn, size_t len) 281 extern int __asm_addint8_internal (AsmScn_t *asmscn, int8_t num) 283 extern int __asm_addint16_internal (AsmScn_t *asmscn, int16_t num) 285 extern int __asm_addint32_internal (AsmScn_t *asmscn, int32_t num) 287 extern int __asm_addint64_internal (AsmScn_t *asmscn, int64_t num)
|
asm_end.c | 82 AsmScn_t *asmscn; local 87 for (asmscn = ctx->section_list; asmscn != NULL; asmscn = asmscn->allnext) 90 Elf_Scn *scn = elf_getscn (ctx->out.elf, asmscn->data.main.scnndx); 92 Elf_Scn *scn = asmscn->data.main.scn; 95 AsmScn_t *asmsubscn = asmscn; 420 for (asmscn = ctx->section_list; asmscn != NULL; asmscn = asmscn->allnext [all...] |