This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Special ELF section flags vs. linker-specified bfd flags
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sourceware dot org, richard at codesourcery dot com
- Date: Wed, 18 Oct 2006 07:40:40 -0700
- Subject: Re: Special ELF section flags vs. linker-specified bfd flags
- References: <87k62ynd4r.fsf@talisman.home>
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.