From: "Ashutosh Yeole" <ashutoshy@KPITCummins.com>
To: <binutils@sourceware.org>
Cc: "Ben Elliston" <bje@au1.ibm.com>
Subject: RE: NOLOAD problem with binutils 2.16.92
Date: Mon, 31 Jul 2006 13:21:00 -0000 [thread overview]
Message-ID: <4A1BE23A7B777442B60F4B4916AE0F130D2059AB@sohm.kpit.com> (raw)
In-Reply-To: <20060728073331.GB22431@ozlabs.au.ibm.com>
Hi,
I have tried this problem using the latest snapshot of binutils dated
30th July 2006, however the same problem still exists. With this
snapshot, I tested for SH as well as H8 targets.
http://lists.gnu.org/archive/html/bug-binutils/2006-07/msg00041.html
(Link to the actual problem)
I have further investigated and developed a workaround patch which
solves the NOLOAD problem. In function ' elf_fake_sections' from
elf.c, "this_hdr" is populated. However, value for section header
(sh_type) is assigned only if "this_hdr->sh_type" is NULL. However,
I have found that, even for section with "NOLOAD" attribute, the
value of section header (this_hdr->sh_type) is 'SHT_PROGBITS' instead
of 'SHT_NOBITS' or 'SHT_NULL'. In case, it is SHT_NULL, then the
value for section type is found depending upon the other flags from
'asect->flags' (SEC_NEVER_LOAD).
Therefore, I have added a extra check to see if the 'SHT_PROGBITS' is
correct assignment in earlier processing or not.
No new regressions found with the following patch.
ChangeLog:
2006-07-31 Ashutosh Yeole <ashutoshy@kpitcummins.com>
* Binutils/bfd/elf.c (elf_fake_sections): Condition added for
section header type.
========================================================================
===
--- binutils-2.16.92/bfd/elf.c.orig 2006-03-16 17:50:15.000000000
+0530
+++ binutils-2.16.92/bfd/elf.c 2006-07-31 15:41:18.000000000 +0530
@@ -2695,7 +2695,7 @@ elf_fake_sections (bfd *abfd, asection *
/* If the section type is unspecified, we set it based on
asect->flags. */
- if (this_hdr->sh_type == SHT_NULL)
+ if ((this_hdr->sh_type == SHT_NULL) || (this_hdr->sh_type ==
SHT_PROGBITS))
{
if ((asect->flags & SEC_GROUP) != 0)
this_hdr->sh_type = SHT_GROUP;
========================================================================
===
However I am not very sure about the patch and I understand it may be
fixed somewhere else. I would like to know your comments on the same.
Regards,
Ashutosh Yeole
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH, H8, R8C, M16C
and M32C Series. The following site also offers free technical support
to its users. Visit http://www.kpitgnutools.com for details.
Latest versions of KPIT GNU tools were released on June 1, 2006.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regards,
Ashutosh A Yeole
System Executive - SSG | KPIT Cummins Infosystems Ltd.| Ph: +91 020 2538
2358 Ext: 420
-----Original Message-----
From: Ben Elliston [mailto:bje@au1.ibm.com]
Sent: Friday, July 28, 2006 1:04 PM
To: Ashutosh Yeole
Cc: binutils@sourceware.org
Subject: Re: NOLOAD problem with binutils 2.16.92
> I had posted a problem related to binutils 2.16.92
>
> Please refer to the following link for the posted problem,
> http://sourceware.org/ml/binutils/2006-07/msg00225.html
> After further investigation, I found that this problem also exists for
> ARM and m32r targets also.
Before we go much further, have you tested with CVS binutils?
Cheers, Ben
next prev parent reply other threads:[~2006-07-31 13:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 10:01 Ashutosh Yeole
2006-07-26 20:11 ` Ramana Radhakrishnan
2006-07-28 7:32 ` Ben Elliston
2006-07-31 13:21 ` Ashutosh Yeole [this message]
2006-07-31 14:54 ` H. J. Lu
2006-07-31 20:03 ` H. J. Lu
2006-07-31 23:45 ` Alan Modra
2006-08-01 17:43 ` H. J. Lu
-- strict thread matches above, loose matches on Subject: below --
2006-07-18 12:54 Ashutosh Yeole
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1BE23A7B777442B60F4B4916AE0F130D2059AB@sohm.kpit.com \
--to=ashutoshy@kpitcummins.com \
--cc=binutils@sourceware.org \
--cc=bje@au1.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).