gcc-4.9 doesn't like an empty initialiser.
binutils/readelf.c: In function ‘process_relocs’:
binutils/readelf.c:10229:5: error: missing initializer for field ‘sh_name’ of ‘Elf_Internal_Shdr’ [-Werror=missing-field-initializers]
Elf_Internal_Shdr section = {};
* readelf.c (process_relocs): Avoid gcc-4.9 compile error.
is passed to readelf. */
uint64_t num_reloc;
uint64_t *relrs = NULL;
- Elf_Internal_Shdr section = {};
- section.sh_offset
- = filedata->dynamic_info[DT_RELR];
- section.sh_size = rel_size;
- section.sh_entsize = rel_entsz;
- section.sh_type = SHT_RELR;
+ Elf_Internal_Shdr section = {
+ .sh_type = SHT_RELR,
+ .sh_offset = filedata->dynamic_info[DT_RELR],
+ .sh_size = rel_size,
+ .sh_entsize = rel_entsz
+ };
validate_section_info (§ion, NULL, 0, filedata);
num_reloc = count_relr_relocations (filedata,
§ion,