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: Richard Sandiford <richard at codesourcery dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sourceware dot org
- Date: Wed, 18 Oct 2006 15:52:16 +0100
- Subject: Re: Special ELF section flags vs. linker-specified bfd flags
- References: <87k62ynd4r.fsf@talisman.home> <20061018144040.GA18689@lucon.org>
"H. J. Lu" <hjl@lucon.org> writes:
> 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.
I don't see how that's related to my patch though. I'd rather just
change this one thing. I don't object to someone changing the condition
too, but I think it should be done separately.
Richard