Home
last modified time | relevance | path

Searched refs:asmscn (Results 1 – 12 of 12) sorted by relevance

/external/elfutils/libasm/
Dasm_align.c40 asm_align (asmscn, value) in asm_align() argument
41 AsmScn_t *asmscn; in asm_align()
44 if (asmscn == NULL)
55 if (unlikely (asmscn->ctx->textp))
57 fprintf (asmscn->ctx->out.file, "\t.align %" PRId32 ", ",
59 if (asmscn->pattern->len == 1)
60 fprintf (asmscn->ctx->out.file, "%02hhx\n", asmscn->pattern->bytes[0]);
63 fputc_unlocked ('"', asmscn->ctx->out.file);
65 for (size_t cnt = 0; cnt < asmscn->pattern->len; ++cnt)
66 fprintf (asmscn->ctx->out.file, "\\x%02hhx",
[all …]
Dasm_addstrz.c40 asm_addstrz (asmscn, str, len) in asm_addstrz() argument
41 AsmScn_t *asmscn; in asm_addstrz()
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 …]
Dasm_addint8.c51 FCT(SIZE) (asmscn, num)
52 AsmScn_t *asmscn;
55 if (asmscn == NULL)
58 if (asmscn->type == SHT_NOBITS && unlikely (num != 0))
64 if (unlikely (asmscn->ctx->textp))
68 fprintf (asmscn->ctx->out.file, "\t.byte\t%" PRId8 "\n", (int8_t) num);
70 fprintf (asmscn->ctx->out.file, "\t.value\t%" PRId16 "\n",
73 fprintf (asmscn->ctx->out.file, "\t.long\t%" PRId32 "\n",
78 bool is_leb = (elf_getident (asmscn->ctx->out.elf, NULL)[EI_DATA]
81 fprintf (asmscn->ctx->out.file,
[all …]
Dasm_newsym.c41 asm_newsym (asmscn, name, size, type, binding) in asm_newsym() argument
42 AsmScn_t *asmscn; in asm_newsym()
52 if (asmscn == NULL)
68 snprintf (tempsym, TEMPSYMLEN, ".L%07u", asmscn->ctx->tempsym_count++);
79 rwlock_wrlock (asmscn->ctx->lock);
81 result->scn = asmscn;
82 result->offset = asmscn->offset;
87 result->strent = ebl_strtabadd (asmscn->ctx->symbol_strtab,
90 if (unlikely (asmscn->ctx->textp))
96 fprintf (asmscn->ctx->out.file, "\t.globl\t%s\n", name);
[all …]
Dasm_adduleb128.c38 asm_adduleb128 (asmscn, num) in asm_adduleb128() argument
39 AsmScn_t *asmscn; in asm_adduleb128()
42 if (asmscn == NULL)
45 if (asmscn->type == SHT_NOBITS && unlikely (num != 0))
51 if (unlikely (asmscn->ctx->textp))
52 fprintf (asmscn->ctx->out.file, "\t.uleb128\t%" PRIu32 "\n", num);
77 if (__libasm_ensure_section_space (asmscn, nbytes) != 0)
81 if (likely (asmscn->type != SHT_NOBITS))
82 memcpy (&asmscn->content->data[asmscn->content->len], tmpbuf, nbytes);
85 asmscn->content->len += nbytes;
[all …]
Dasm_addsleb128.c38 asm_addsleb128 (asmscn, num) in asm_addsleb128() argument
39 AsmScn_t *asmscn; in asm_addsleb128()
42 if (asmscn == NULL)
45 if (asmscn->type == SHT_NOBITS && unlikely (num != 0))
51 if (unlikely (asmscn->ctx->textp))
52 fprintf (asmscn->ctx->out.file, "\t.sleb128\t%" PRId32 "\n", num);
81 if (__libasm_ensure_section_space (asmscn, nbytes) != 0)
85 if (likely (asmscn->type != SHT_NOBITS))
86 memcpy (&asmscn->content->data[asmscn->content->len], tmpbuf, nbytes);
89 asmscn->content->len += nbytes;
[all …]
Dlibasm.h93 extern AsmScn_t *asm_newsubscn (AsmScn_t *asmscn, unsigned int nr);
106 extern int asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len);
109 extern int asm_addint8 (AsmScn_t *asmscn, int8_t num);
112 extern int asm_adduint8 (AsmScn_t *asmscn, uint8_t num);
115 extern int asm_addint16 (AsmScn_t *asmscn, int16_t num);
118 extern int asm_adduint16 (AsmScn_t *asmscn, uint16_t num);
121 extern int asm_addint32 (AsmScn_t *asmscn, int32_t num);
124 extern int asm_adduint32 (AsmScn_t *asmscn, uint32_t num);
127 extern int asm_addint64 (AsmScn_t *asmscn, int64_t num);
130 extern int asm_adduint64 (AsmScn_t *asmscn, uint64_t num);
[all …]
Dasm_newsubscn.c38 asm_newsubscn (asmscn, nr) in asm_newsubscn() argument
39 AsmScn_t *asmscn; in asm_newsubscn()
47 if (asmscn == NULL)
51 runp = asmscn->subsection_id == 0 ? asmscn : asmscn->data.up;
89 newp->pattern = asmscn->pattern;
Dasm_fill.c39 asm_fill (asmscn, bytes, len) in asm_fill() argument
40 AsmScn_t *asmscn; in asm_fill()
47 if (asmscn == NULL)
66 old_pattern = asmscn->pattern;
67 asmscn->pattern = pattern;
Dasm_end.c79 AsmScn_t *asmscn; in binary_end() local
84 for (asmscn = ctx->section_list; asmscn != NULL; asmscn = asmscn->allnext) in binary_end()
87 Elf_Scn *scn = elf_getscn (ctx->out.elf, asmscn->data.main.scnndx); in binary_end()
89 Elf_Scn *scn = asmscn->data.main.scn; in binary_end()
92 AsmScn_t *asmsubscn = asmscn; in binary_end()
417 for (asmscn = ctx->section_list; asmscn != NULL; asmscn = asmscn->allnext) in binary_end()
419 shdr = gelf_getshdr (asmscn->data.main.scn, &shdr_mem); in binary_end()
423 shdr->sh_name = ebl_strtaboffset (asmscn->data.main.strent); in binary_end()
426 shdr->sh_addralign = asmscn->max_align; in binary_end()
428 (void) gelf_update_shdr (asmscn->data.main.scn, shdr); in binary_end()
DlibasmP.h261 extern int __libasm_ensure_section_space (AsmScn_t *asmscn, size_t len)
278 extern int __asm_addint8_internal (AsmScn_t *asmscn, int8_t num)
280 extern int __asm_addint16_internal (AsmScn_t *asmscn, int16_t num)
282 extern int __asm_addint32_internal (AsmScn_t *asmscn, int32_t num)
284 extern int __asm_addint64_internal (AsmScn_t *asmscn, int64_t num)
Dasm_adduint8.c48 UFCT(SIZE) (asmscn, num)
49 AsmScn_t *asmscn;
52 return INTUSE(FCT(SIZE)) (asmscn, (TYPE(SIZE)) num);