Special ELF section flags vs. linker-specified bfd flags
H. J. Lu
hjl@lucon.org
Wed Oct 18 16:20:00 GMT 2006
On Wed, Oct 18, 2006 at 11:15:32AM +0100, Richard Sandiford wrote:
> Index: bfd/elf.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elf.c,v
> retrieving revision 1.359
> diff -u -p -r1.359 elf.c
> --- bfd/elf.c 15 Oct 2006 14:22:13 -0000 1.359
> +++ bfd/elf.c 18 Oct 2006 10:10:31 -0000
> @@ -5954,7 +5954,10 @@ _bfd_elf_init_private_section_data (bfd
> section flags. */
> if (osec->flags == isec->flags
> || (osec->flags == 0 && elf_section_type (osec) == SHT_NULL))
> - elf_section_type (osec) = elf_section_type (isec);
> + {
> + elf_section_type (osec) = elf_section_type (isec);
> + elf_section_flags (osec) = elf_section_flags (isec);
> + }
I don't think we need to check elf_section_type (osec) == SHT_NULL.
If elf_section_type (osec) != SHT_NULL, we may have a problem
elsewhere.
H.J.
More information about the Binutils
mailing list