[Ups-cvs] ups/ups ao_dwfutil.c, 1.27, 1.28 ao_syms.h, 1.10, 1.11 ao_text.c, 1.14, 1.15
Brought to you by:
ianedwards
From: Tom H. <th...@us...> - 2014-01-24 16:46:33
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29122/ups Modified Files: ao_dwfutil.c ao_syms.h ao_text.c Log Message: Avoid creating duplicate fil_t records for the same header file when it is referenced from more than one source file in the same executable or shared library. Index: ao_syms.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_syms.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ao_syms.h 14 Jan 2014 12:39:53 -0000 1.10 --- ao_syms.h 24 Jan 2014 16:46:31 -0000 1.11 *************** *** 147,150 **** --- 147,151 ---- #if WANT_DWARF + fil_t *st_source_files; /* Source files */ hashtab_t *st_type_names; /* Type name -> DIE. */ Dwarf_Debug st_dw_dbg; /* Handle for libdwarf calls on main object */ Index: ao_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_text.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ao_text.c 7 Jul 2009 15:42:44 -0000 1.14 --- ao_text.c 24 Jan 2014 16:46:31 -0000 1.15 *************** *** 253,256 **** --- 253,257 ---- #if WANT_DWARF + ast->st_source_files = NULL; ast->st_type_names = NULL; ast->st_dw_dbg = 0; Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ao_dwfutil.c 17 Jan 2014 16:09:35 -0000 1.27 --- ao_dwfutil.c 24 Jan 2014 16:46:31 -0000 1.28 *************** *** 371,374 **** --- 371,380 ---- int comp_dir_len = 0; hf_t **list, *file; + ao_stdata_t *ast; + + /* + * Initalise + */ + ast = AO_STDATA(stf->stf_symtab); /* *************** *** 411,415 **** hf_stf->stf_compiler_type = stf->stf_compiler_type; hf_stf->stf_parent = stf; ! hf_stf->stf_fil = ao_make_fil(hf_stf, (block_t *)NULL, comp_dir, (fil_t *)NULL); } hf_stf->stf_fnum = i + 1; /* numbers start at 1 */ --- 417,425 ---- hf_stf->stf_compiler_type = stf->stf_compiler_type; hf_stf->stf_parent = stf; ! ! if (!find_sol_fil(ast->st_source_files, comp_dir, hf_stf->stf_name, &hf_stf->stf_fil)) { ! ast->st_source_files = ao_make_fil(hf_stf, (block_t *)NULL, comp_dir, ast->st_source_files); ! hf_stf->stf_fil = ast->st_source_files; ! } } hf_stf->stf_fnum = i + 1; /* numbers start at 1 */ |