aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/yasm/modules
diff options
context:
space:
mode:
authordvshkurko <dvshkurko@yandex-team.ru>2022-02-10 16:45:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:52 +0300
commitc768a99151e47c3a4bb7b92c514d256abd301c4d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/tools/yasm/modules
parent321ee9bce31ec6e238be26dbcbe539cffa2c3309 (diff)
downloadydb-c768a99151e47c3a4bb7b92c514d256abd301c4d.tar.gz
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/yasm/modules')
-rw-r--r--contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-info.c22
-rw-r--r--contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-line.c30
-rw-r--r--contrib/tools/yasm/modules/init_plugin.c40
-rw-r--r--contrib/tools/yasm/modules/objfmts/coff/coff-objfmt.c12
-rw-r--r--contrib/tools/yasm/modules/objfmts/elf/elf-objfmt.c24
5 files changed, 64 insertions, 64 deletions
diff --git a/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-info.c b/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-info.c
index 667665e89c..96d24db06a 100644
--- a/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-info.c
+++ b/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-info.c
@@ -326,21 +326,21 @@ yasm_dwarf2__generate_info(yasm_object *object, yasm_section *debug_line,
/* input filename */
abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_name, DW_FORM_string);
- if (!object->deb_filename) {
- object->deb_filename = yasm_replace_path(
- dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
- object->src_filename, strlen(object->src_filename));
- }
- dwarf2_append_str(debug_info, object->deb_filename);
+ if (!object->deb_filename) {
+ object->deb_filename = yasm_replace_path(
+ dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
+ object->src_filename, strlen(object->src_filename));
+ }
+ dwarf2_append_str(debug_info, object->deb_filename);
/* compile directory (current working directory) */
abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_comp_dir, DW_FORM_string);
buf = yasm__getcwd();
- char * new_cwd_name = yasm_replace_path(
- dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
- buf, strlen(buf));
- dwarf2_append_str(debug_info, new_cwd_name);
- yasm_xfree(new_cwd_name);
+ char * new_cwd_name = yasm_replace_path(
+ dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
+ buf, strlen(buf));
+ dwarf2_append_str(debug_info, new_cwd_name);
+ yasm_xfree(new_cwd_name);
yasm_xfree(buf);
/* producer - assembler name */
diff --git a/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-line.c b/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-line.c
index 8f21363be9..14639ca429 100644
--- a/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-line.c
+++ b/contrib/tools/yasm/modules/dbgfmts/dwarf2/dwarf2-line.c
@@ -532,21 +532,21 @@ dwarf2_generate_line_bc(yasm_bytecode *bc, /*@null@*/ void *d)
yasm_linemap_lookup(info->linemap, bc->line, &pathname, &info->loc.line);
dirlen = yasm__splitpath(pathname, &filename);
- char * new_dir_name = yasm_replace_path(
- dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
- pathname, dirlen);
- dirlen = strlen(new_dir_name);
+ char * new_dir_name = yasm_replace_path(
+ dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
+ pathname, dirlen);
+ dirlen = strlen(new_dir_name);
/* Find file index; just linear search it unless it was the last used */
if (info->lastfile > 0
&& dwarf2_filename_equals(&dbgfmt_dwarf2->filenames[info->lastfile-1],
- dbgfmt_dwarf2->dirs, new_dir_name, dirlen,
+ dbgfmt_dwarf2->dirs, new_dir_name, dirlen,
filename))
info->loc.file = info->lastfile;
else {
for (i=0; i<dbgfmt_dwarf2->filenames_size; i++) {
if (dwarf2_filename_equals(&dbgfmt_dwarf2->filenames[i],
- dbgfmt_dwarf2->dirs, new_dir_name, dirlen,
+ dbgfmt_dwarf2->dirs, new_dir_name, dirlen,
filename))
break;
}
@@ -555,7 +555,7 @@ dwarf2_generate_line_bc(yasm_bytecode *bc, /*@null@*/ void *d)
info->loc.file = i+1;
info->lastfile = i+1;
}
- yasm_xfree(new_dir_name);
+ yasm_xfree(new_dir_name);
if (dwarf2_dbgfmt_gen_line_op(info->debug_line, info->state, &info->loc,
NULL))
return 1;
@@ -682,11 +682,11 @@ static int
dwarf2_generate_filename(const char *filename, void *d)
{
yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = (yasm_dbgfmt_dwarf2 *)d;
- char *deb_name = yasm_replace_path(
- dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
- filename, strlen(filename));
- dwarf2_dbgfmt_add_file(dbgfmt_dwarf2, 0, deb_name);
- yasm_xfree(deb_name);
+ char *deb_name = yasm_replace_path(
+ dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
+ filename, strlen(filename));
+ dwarf2_dbgfmt_add_file(dbgfmt_dwarf2, 0, deb_name);
+ yasm_xfree(deb_name);
return 0;
}
@@ -1130,9 +1130,9 @@ yasm_dwarf2__dir_file(yasm_object *object, yasm_valparamhead *valparams,
if (yasm_vp_string(vp)) {
/* Just a bare filename */
yasm_object_set_source_fn(object, yasm_vp_string(vp));
- object->deb_filename = yasm_replace_path(
- dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
- yasm_vp_string(vp), strlen(yasm_vp_string(vp)));
+ object->deb_filename = yasm_replace_path(
+ dbgfmt_dwarf2->dbgfmt.module->replace_map, dbgfmt_dwarf2->dbgfmt.module->replace_map_size,
+ yasm_vp_string(vp), strlen(yasm_vp_string(vp)));
return;
}
diff --git a/contrib/tools/yasm/modules/init_plugin.c b/contrib/tools/yasm/modules/init_plugin.c
index e4ca32da7f..86ae4c53f9 100644
--- a/contrib/tools/yasm/modules/init_plugin.c
+++ b/contrib/tools/yasm/modules/init_plugin.c
@@ -64,23 +64,23 @@ yasm_init_plugin(void)
yasm_register_module(YASM_MODULE_OBJFMT, "xdf", &yasm_xdf_LTX_objfmt);
}
-void
-yasm_plugin_set_replace(const char* replace_params[], int size) {
- yasm_dwarf2_LTX_dbgfmt.replace_map = replace_params;
- yasm_dwarf2_LTX_dbgfmt.replace_map_size = size;
- yasm_elf_LTX_objfmt.replace_map = replace_params;
- yasm_elf_LTX_objfmt.replace_map_size = size;
- yasm_elf32_LTX_objfmt.replace_map = replace_params;
- yasm_elf32_LTX_objfmt.replace_map_size = size;
- yasm_elf64_LTX_objfmt.replace_map = replace_params;
- yasm_elf64_LTX_objfmt.replace_map_size = size;
- yasm_elfx32_LTX_objfmt.replace_map = replace_params;
- yasm_elfx32_LTX_objfmt.replace_map_size = size;
-
- yasm_macho_LTX_objfmt.replace_map = replace_params;
- yasm_macho_LTX_objfmt.replace_map_size = size;
- yasm_macho32_LTX_objfmt.replace_map = replace_params;
- yasm_macho32_LTX_objfmt.replace_map_size = size;
- yasm_macho64_LTX_objfmt.replace_map = replace_params;
- yasm_macho64_LTX_objfmt.replace_map_size = size;
-}
+void
+yasm_plugin_set_replace(const char* replace_params[], int size) {
+ yasm_dwarf2_LTX_dbgfmt.replace_map = replace_params;
+ yasm_dwarf2_LTX_dbgfmt.replace_map_size = size;
+ yasm_elf_LTX_objfmt.replace_map = replace_params;
+ yasm_elf_LTX_objfmt.replace_map_size = size;
+ yasm_elf32_LTX_objfmt.replace_map = replace_params;
+ yasm_elf32_LTX_objfmt.replace_map_size = size;
+ yasm_elf64_LTX_objfmt.replace_map = replace_params;
+ yasm_elf64_LTX_objfmt.replace_map_size = size;
+ yasm_elfx32_LTX_objfmt.replace_map = replace_params;
+ yasm_elfx32_LTX_objfmt.replace_map_size = size;
+
+ yasm_macho_LTX_objfmt.replace_map = replace_params;
+ yasm_macho_LTX_objfmt.replace_map_size = size;
+ yasm_macho32_LTX_objfmt.replace_map = replace_params;
+ yasm_macho32_LTX_objfmt.replace_map_size = size;
+ yasm_macho64_LTX_objfmt.replace_map = replace_params;
+ yasm_macho64_LTX_objfmt.replace_map_size = size;
+}
diff --git a/contrib/tools/yasm/modules/objfmts/coff/coff-objfmt.c b/contrib/tools/yasm/modules/objfmts/coff/coff-objfmt.c
index 9f7e76bd30..388b09af32 100644
--- a/contrib/tools/yasm/modules/objfmts/coff/coff-objfmt.c
+++ b/contrib/tools/yasm/modules/objfmts/coff/coff-objfmt.c
@@ -1192,13 +1192,13 @@ coff_objfmt_output(yasm_object *object, FILE *f, int all_syms,
if (objfmt_coff->filesym_data->aux[0].fname)
yasm_xfree(objfmt_coff->filesym_data->aux[0].fname);
- if (!object->deb_filename) {
- object->deb_filename = yasm_replace_path(
- objfmt_coff->objfmt.module->replace_map, objfmt_coff->objfmt.module->replace_map_size,
- object->src_filename, strlen(object->src_filename));
- }
+ if (!object->deb_filename) {
+ object->deb_filename = yasm_replace_path(
+ objfmt_coff->objfmt.module->replace_map, objfmt_coff->objfmt.module->replace_map_size,
+ object->src_filename, strlen(object->src_filename));
+ }
objfmt_coff->filesym_data->aux[0].fname =
- yasm__xstrdup(object->deb_filename);
+ yasm__xstrdup(object->deb_filename);
/* Force all syms for win64 because they're needed for relocations.
* FIXME: Not *all* syms need to be output, only the ones needed for
diff --git a/contrib/tools/yasm/modules/objfmts/elf/elf-objfmt.c b/contrib/tools/yasm/modules/objfmts/elf/elf-objfmt.c
index 20fc1dec0d..6874a1689f 100644
--- a/contrib/tools/yasm/modules/objfmts/elf/elf-objfmt.c
+++ b/contrib/tools/yasm/modules/objfmts/elf/elf-objfmt.c
@@ -370,14 +370,14 @@ elf_objfmt_create_common(yasm_object *object, yasm_objfmt_module *module,
/* FIXME: misuse of NULL bytecode here; it works, but only barely. */
filesym = yasm_symtab_define_label(object->symtab, ".file", NULL, 0, 0);
- if (!object->deb_filename) {
- object->deb_filename = yasm_replace_path(
- module->replace_map, module->replace_map_size,
- object->src_filename, strlen(object->src_filename));
- }
+ if (!object->deb_filename) {
+ object->deb_filename = yasm_replace_path(
+ module->replace_map, module->replace_map_size,
+ object->src_filename, strlen(object->src_filename));
+ }
/* Put in current input filename; we'll replace it in output() */
objfmt_elf->file_strtab_entry =
- elf_strtab_append_str(objfmt_elf->strtab, object->deb_filename);
+ elf_strtab_append_str(objfmt_elf->strtab, object->deb_filename);
entry = elf_symtab_entry_create(objfmt_elf->file_strtab_entry, filesym);
yasm_symrec_add_data(filesym, &elf_symrec_data, entry);
elf_symtab_set_nonzero(entry, NULL, SHN_ABS, STB_LOCAL, STT_FILE, NULL,
@@ -758,14 +758,14 @@ elf_objfmt_output(yasm_object *object, FILE *f, int all_syms,
info.f = f;
info.GOT_sym = yasm_symtab_get(object->symtab, "_GLOBAL_OFFSET_TABLE_");
- if (!object->deb_filename) {
- object->deb_filename = yasm_replace_path(
- objfmt_elf->objfmt.module->replace_map, objfmt_elf->objfmt.module->replace_map_size,
- object->src_filename, strlen(object->src_filename));
- }
+ if (!object->deb_filename) {
+ object->deb_filename = yasm_replace_path(
+ objfmt_elf->objfmt.module->replace_map, objfmt_elf->objfmt.module->replace_map_size,
+ object->src_filename, strlen(object->src_filename));
+ }
/* Update filename strtab */
elf_strtab_entry_set_str(objfmt_elf->file_strtab_entry,
- object->deb_filename);
+ object->deb_filename);
/* Allocate space for Ehdr by seeking forward */
if (fseek(f, (long)(elf_proghead_get_size()), SEEK_SET) < 0) {