public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sources.redhat.com
Subject: Re: PATCH: Don't use section name to set ELF section data
Date: Fri, 25 Jul 2003 16:10:00 -0000	[thread overview]
Message-ID: <20030725161018.GA31551@lucon.org> (raw)
In-Reply-To: <20030725143806.GA29992@lucon.org>

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

On Fri, Jul 25, 2003 at 07:38:06AM -0700, H. J. Lu wrote:
> On Fri, Jul 25, 2003 at 01:25:31PM +0100, Nick Clifton wrote:
> > Hi H.J.
> > 
> > > Here is the new patch. It caused no regressions on all targets
> > > affected. It fixed an ELF/ppc64 bug.
> > 
> > Excellent.
> 
> ...
> 
> > Approved - please apply.
> > 
> 
> Done. I made a small change. I used
> 
>   if (! BFD_SEND ((B), _new_section_hook, ((B), (S)))) \
> 
> instead of
> 
>   if (!_bfd_elf_new_section_hook ((B), (S)))                  \
>  

My patch mishandled the case:

	.section .foo,"aw",@nobits

I checked in the following patch as an obvious fix.


H.J.

[-- Attachment #2: gas-type.patch --]
[-- Type: text/plain, Size: 641 bytes --]

2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-elf.c (obj_elf_change_section): Always set section
	type and flags.

--- gas/config/obj-elf.c.type	2003-07-25 09:03:06.000000000 -0700
+++ gas/config/obj-elf.c	2003-07-25 08:59:49.000000000 -0700
@@ -681,11 +681,11 @@ obj_elf_change_section (name, type, attr
 		     name);
 	}
       attr |= def_attr;
-
-      elf_section_type (sec) = type;
-      elf_section_flags (sec) = attr;
     }
 
+  elf_section_type (sec) = type;
+  elf_section_flags (sec) = attr;
+
   /* Convert ELF type and flags to BFD flags.  */
   flags = (SEC_RELOC
 	   | ((attr & SHF_WRITE) ? 0 : SEC_READONLY)

  reply	other threads:[~2003-07-25 16:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-14 19:14 RFC: " H. J. Lu
2003-06-19 19:17 ` Andreas Schwab
     [not found] ` <m3y901rluw.fsf@redhat.com>
2003-07-25  1:36   ` PATCH: " H. J. Lu
2003-07-25  4:48     ` Alan Modra
2003-07-25 14:39       ` H. J. Lu
2003-07-25 12:29     ` Nick Clifton
2003-07-25 14:38       ` H. J. Lu
2003-07-25 16:10         ` H. J. Lu [this message]
2003-07-25 17:43           ` H. J. Lu
2003-07-25 17:59             ` H. J. Lu
2003-07-26  0:09               ` Alan Modra

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=20030725161018.GA31551@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sources.redhat.com \
    --cc=nickc@redhat.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).