Silence uninitialized warning on ehdr_start_save

Older GCC, like 4.1/4.2, will issue an uninitialized warning on
ehdr_start_save.  This patch silences by using

struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;

	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Silence uninitialized warning on ehdr_start_save with older
	GCC.
This commit is contained in:
H.J. Lu 2014-01-15 07:43:19 -08:00
parent b0a16e66b0
commit f9c316c4d7
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Silence uninitialized warning on ehdr_start_save with older
GCC.
2014-01-15 Alan Modra <amodra@gmail.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define

View File

@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void)
asection *sinterp;
bfd *abfd;
struct elf_link_hash_entry *ehdr_start = NULL;
struct bfd_link_hash_entry ehdr_start_save;
struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
if (is_elf_hash_table (link_info.hash))
{