[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incorrect handling of NOLOAD by ld version 2.11.2 (elf).
From: |
Alan Modra |
Subject: |
Re: Incorrect handling of NOLOAD by ld version 2.11.2 (elf). |
Date: |
Thu, 14 Feb 2002 14:38:25 +1030 |
User-agent: |
Mutt/1.3.25i |
On Wed, Feb 13, 2002 at 09:14:54PM +0300, Sergei Organov wrote:
>
> It seems that ld version 2.11.2 incorrectly handles NOLOAD output section type
> specification when input section(s) do contain data. Neither 2.9.5 nor 2.10
> have this problem.
I guess it was this change
2000-09-29 Momchil Velikov <address@hidden>
* elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
is has the SEC_HAS_CONTENTS flag set.
I'm checking in the following to fix this problem, mainline and branch.
bfd/ChangeLog
* elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.129
diff -u -p -r1.129 elf.c
--- elf.c 2002/02/13 21:53:31 1.129
+++ elf.c 2002/02/14 04:04:53
@@ -2219,7 +2219,8 @@ elf_fake_sections (abfd, asect, failedpt
this_hdr->sh_entsize = 4;
}
else if ((asect->flags & SEC_ALLOC) != 0
- && ((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0))
+ && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ || (asect->flags & SEC_NEVER_LOAD) != 0))
this_hdr->sh_type = SHT_NOBITS;
else
this_hdr->sh_type = SHT_PROGBITS;
--
Alan Modra
IBM OzLabs - Linux Technology Centre