diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/lto/ChangeLog | 34 | ||||
-rw-r--r-- | gcc/lto/lto-elf.c | 16 | ||||
-rw-r--r-- | gcc/lto/lto-lang.c | 6 | ||||
-rw-r--r-- | gcc/lto/lto.c | 18 | ||||
-rw-r--r-- | gcc/lto/lto.h | 14 |
5 files changed, 61 insertions, 27 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 2ce58d7..069b589 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,37 @@ +2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com> + + * lto.h (lto_elf_file_open): Rename prototype from this ... + (lto_obj_file_open): ... to this. + (lto_elf_file_close): Likewise ... + (lto_obj_file_close): ... and likewise. + (lto_elf_build_section_table): Likewise ... + (lto_obj_build_section_table): ... and likewise. + (lto_elf_begin_section): Likewise ... + (lto_obj_begin_section): ... and likewise. + (lto_elf_append_data): Likewise ... + (lto_obj_append_data): ... and likewise. + (lto_elf_end_section): Likewise ... + (lto_obj_end_section): ... and likewise. + * lto.c (lto_file_read): Update references to the above. + (lto_wpa_write_files): Likewise. + (lto_read_all_file_options): Likewise. + (read_cgraph_and_symbols): Likewise. + * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise. + (LANG_HOOKS_APPEND_DATA): Likewise. + (LANG_HOOKS_END_SECTION): Likewise. + * lto-elf.c (lto_elf_file_open): Rename from this ... + (lto_obj_file_open): ... to this, updating any references. + (lto_elf_file_close): Likewise ... + (lto_obj_file_close): ... and likewise. + (lto_elf_build_section_table): Likewise ... + (lto_obj_build_section_table): ... and likewise. + (lto_elf_begin_section): Likewise ... + (lto_obj_begin_section): ... and likewise. + (lto_elf_append_data): Likewise ... + (lto_obj_append_data): ... and likewise. + (lto_elf_end_section): Likewise ... + (lto_obj_end_section): ... and likewise. + 2010-04-21 Jan Hubicka <jh@suse.cz> * lto.c (lto_fixup_tree): Do not call wpa fixup. diff --git a/gcc/lto/lto-elf.c b/gcc/lto/lto-elf.c index c777da7..1796888 100644 --- a/gcc/lto/lto-elf.c +++ b/gcc/lto/lto-elf.c @@ -179,7 +179,7 @@ eq_name (const void *p1, const void *p2) the start and size of each section in the .o file. */ htab_t -lto_elf_build_section_table (lto_file *lto_file) +lto_obj_build_section_table (lto_file *lto_file) { lto_elf_file *elf_file = (lto_elf_file *)lto_file; htab_t section_hash_table; @@ -322,7 +322,7 @@ lto_elf_begin_section_with_type (const char *name, size_t type) /* Begin a new ELF section named NAME in the current output file. */ void -lto_elf_begin_section (const char *name) +lto_obj_begin_section (const char *name) { lto_elf_begin_section_with_type (name, SHT_PROGBITS); } @@ -333,7 +333,7 @@ lto_elf_begin_section (const char *name) been written. */ void -lto_elf_append_data (const void *data, size_t len, void *block) +lto_obj_append_data (const void *data, size_t len, void *block) { lto_elf_file *file; Elf_Data *elf_data; @@ -370,7 +370,7 @@ lto_elf_append_data (const void *data, size_t len, void *block) and sets the current output file's scn member to NULL. */ void -lto_elf_end_section (void) +lto_obj_end_section (void) { lto_elf_file *file; @@ -604,7 +604,7 @@ init_ehdr (lto_elf_file *elf_file) Returns the opened file. */ lto_file * -lto_elf_file_open (const char *filename, bool writable) +lto_obj_file_open (const char *filename, bool writable) { lto_elf_file *elf_file; lto_file *result = NULL; @@ -704,7 +704,7 @@ lto_elf_file_open (const char *filename, bool writable) fail: if (result) - lto_elf_file_close (result); + lto_obj_file_close (result); return NULL; } @@ -714,7 +714,7 @@ lto_elf_file_open (const char *filename, bool writable) any cached data buffers are freed. */ void -lto_elf_file_close (lto_file *file) +lto_obj_file_close (lto_file *file) { lto_elf_file *elf_file = (lto_elf_file *) file; struct lto_char_ptr_base *cur, *tmp; @@ -750,7 +750,7 @@ lto_elf_file_close (lto_file *file) if (gelf_update_ehdr (elf_file->elf, ehdr_p) == 0) fatal_error ("gelf_update_ehdr() failed: %s", elf_errmsg (-1)); lto_write_stream (elf_file->shstrtab_stream); - lto_elf_end_section (); + lto_obj_end_section (); lto_set_current_out_file (old_file); free (elf_file->shstrtab_stream); diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index aea5ab2..8c4b254 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -1158,11 +1158,11 @@ static void lto_init_ts (void) #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE lto_format_attribute_table #undef LANG_HOOKS_BEGIN_SECTION -#define LANG_HOOKS_BEGIN_SECTION lto_elf_begin_section +#define LANG_HOOKS_BEGIN_SECTION lto_obj_begin_section #undef LANG_HOOKS_APPEND_DATA -#define LANG_HOOKS_APPEND_DATA lto_elf_append_data +#define LANG_HOOKS_APPEND_DATA lto_obj_append_data #undef LANG_HOOKS_END_SECTION -#define LANG_HOOKS_END_SECTION lto_elf_end_section +#define LANG_HOOKS_END_SECTION lto_obj_end_section #undef LANG_HOOKS_INIT_TS #define LANG_HOOKS_INIT_TS lto_init_ts diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 115d1cc..b6001d8 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -378,7 +378,7 @@ lto_file_read (lto_file *file, FILE *resolution_file) file_data = XCNEW (struct lto_file_decl_data); file_data->file_name = file->filename; - file_data->section_hash_table = lto_elf_build_section_table (file); + file_data->section_hash_table = lto_obj_build_section_table (file); file_data->renaming_hash_table = lto_create_renaming_table (); data = lto_get_section_data (file_data, LTO_section_decls, NULL, &len); @@ -1040,16 +1040,16 @@ lto_wpa_write_files (void) if (cgraph_node_set_needs_ltrans_p (set)) { /* Write all the nodes in SET to TEMP_FILENAME. */ - file = lto_elf_file_open (temp_filename, true); + file = lto_obj_file_open (temp_filename, true); if (!file) - fatal_error ("lto_elf_file_open() failed"); + fatal_error ("lto_obj_file_open() failed"); lto_set_current_out_file (file); ipa_write_optimization_summaries (set); lto_set_current_out_file (NULL); - lto_elf_file_close (file); + lto_obj_file_close (file); } } @@ -1740,17 +1740,17 @@ lto_read_all_file_options (void) for (i = 0; i < num_in_fnames; i++) { struct lto_file_decl_data *file_data; - lto_file *file = lto_elf_file_open (in_fnames[i], false); + lto_file *file = lto_obj_file_open (in_fnames[i], false); if (!file) break; file_data = XCNEW (struct lto_file_decl_data); file_data->file_name = file->filename; - file_data->section_hash_table = lto_elf_build_section_table (file); + file_data->section_hash_table = lto_obj_build_section_table (file); lto_read_file_options (file_data); - lto_elf_file_close (file); + lto_obj_file_close (file); htab_delete (file_data->section_hash_table); free (file_data); } @@ -1813,7 +1813,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) fflush (stderr); } - current_lto_file = lto_elf_file_open (fnames[i], false); + current_lto_file = lto_obj_file_open (fnames[i], false); if (!current_lto_file) break; @@ -1823,7 +1823,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) all_file_decl_data[last_file_ix++] = file_data; - lto_elf_file_close (current_lto_file); + lto_obj_file_close (current_lto_file); current_lto_file = NULL; } diff --git a/gcc/lto/lto.h b/gcc/lto/lto.h index 0c4305a..e55342b 100644 --- a/gcc/lto/lto.h +++ b/gcc/lto/lto.h @@ -38,13 +38,13 @@ extern const char *resolution_file_name; extern void lto_main (int); extern void lto_read_all_file_options (void); -/* In lto-elf.c */ -extern lto_file *lto_elf_file_open (const char *filename, bool writable); -extern void lto_elf_file_close (lto_file *file); -extern htab_t lto_elf_build_section_table (lto_file *file); -extern void lto_elf_begin_section (const char *name); -extern void lto_elf_append_data (const void *data, size_t len, void *block); -extern void lto_elf_end_section (void); +/* In lto-elf.c or lto-coff.c */ +extern lto_file *lto_obj_file_open (const char *filename, bool writable); +extern void lto_obj_file_close (lto_file *file); +extern htab_t lto_obj_build_section_table (lto_file *file); +extern void lto_obj_begin_section (const char *name); +extern void lto_obj_append_data (const void *data, size_t len, void *block); +extern void lto_obj_end_section (void); extern lto_file *lto_set_current_out_file (lto_file *file); extern lto_file *lto_get_current_out_file (void); |