This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Special ELF section flags vs. linker-specified bfd flags


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]