Special ELF section flags vs. linker-specified bfd flags
Richard Sandiford
richard@codesourcery.com
Thu Oct 19 01:12:00 GMT 2006
"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
More information about the Binutils
mailing list