+2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
+ ch_type.
+ (bfd_check_compression_header): Use bfd_get_32 on ch_type.
+ (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
+ on ch_type.
+
2015-09-20 Rich Felker <dalias@libc.org>
* elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
{
Elf64_External_Chdr *echdr
= (Elf64_External_Chdr *) contents;
- bfd_put_64 (abfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
+ bfd_put_32 (abfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
bfd_put_64 (abfd, sec->size, &echdr->ch_size);
bfd_put_64 (abfd, 1 << sec->alignment_power,
&echdr->ch_addralign);
else
{
Elf64_External_Chdr *echdr = (Elf64_External_Chdr *) contents;
- chdr.ch_type = bfd_get_64 (abfd, &echdr->ch_type);
+ chdr.ch_type = bfd_get_32 (abfd, &echdr->ch_type);
chdr.ch_size = bfd_get_64 (abfd, &echdr->ch_size);
chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign);
}
else
{
Elf64_External_Chdr *echdr = (Elf64_External_Chdr *) contents;
- chdr.ch_type = bfd_get_64 (ibfd, &echdr->ch_type);
+ chdr.ch_type = bfd_get_32 (ibfd, &echdr->ch_type);
chdr.ch_size = bfd_get_64 (ibfd, &echdr->ch_size);
chdr.ch_addralign = bfd_get_64 (ibfd, &echdr->ch_addralign);
else
{
Elf64_External_Chdr *echdr = (Elf64_External_Chdr *) contents;
- bfd_put_64 (obfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
+ bfd_put_32 (obfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
bfd_put_64 (obfd, chdr.ch_size, &echdr->ch_size);
bfd_put_64 (obfd, chdr.ch_addralign, &echdr->ch_addralign);
}