public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: binutils@sources.redhat.com, rth@redhat.com
Subject: [PATCH] Use 'M' and 'S' in section string instead of 'm' and 's'
Date: Mon, 10 Sep 2001 13:41:00 -0000	[thread overview]
Message-ID: <20010910224334.A554@sunsite.ms.mff.cuni.cz> (raw)

Hi!

's' in .section foo, "s" is supposed to be SHF_IA_64_SMALL_DATA according to
Richard, which clashes with use of "s" for SHF_STRINGS.
The following patch uses 'M' for SHF_MERGE, 'S' for SHF_STRINGS but
for compatibility recognizes "am" and "ams" too (SHF_STRINGS has no sense
without SHF_MERGE and if somebody wants to use SHF_MERGE and
SHF_IA_64_SMALL_DATA at the same time "Ms" should be used.
Ok to commit or should I keep the 'm' compatibility support as RH specific
patch (where gcc uses "am" and "ams" for a few months now)?

2001-09-10  Jakub Jelinek  <jakub@redhat.com>

	* config/obj-elf.c (obj_elf_parse_section_letters): Use 'M' instead
	of 'm', 'S' instead of 's'. Support "m" and "ms" for compatibility.

--- gas/config/obj-elf.c.jj	Thu Aug 23 13:06:46 2001
+++ gas/config/obj-elf.c	Mon Sep 10 22:35:18 2001
@@ -750,15 +750,24 @@ obj_elf_parse_section_letters (str, len)
 	case 'x':
 	  attr |= SHF_EXECINSTR;
 	  break;
-	case 'm':
+	case 'M':
 	  attr |= SHF_MERGE;
 	  break;
-	case 's':
+	case 'S':
 	  attr |= SHF_STRINGS;
 	  break;
+	/* Compatibility.  */
+	case 'm':
+	  attr |= SHF_MERGE;
+	  if (len > 1 && str[1] == 's')
+	    {
+	      attr |= SHF_STRINGS;
+	      str++, len--;
+	    }
+	  break;
 	default:
 	  {
-	    char *bad_msg = _("Unrecognized .section attribute: want a,m,s,w,x");
+	    char *bad_msg = _("Unrecognized .section attribute: want a,w,x,M,S");
 #ifdef md_elf_section_letter
 	    int md_attr = md_elf_section_letter (*str, &bad_msg);
 	    if (md_attr >= 0)

	Jakub

             reply	other threads:[~2001-09-10 13:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10 13:41 Jakub Jelinek [this message]
2001-09-10 17:26 ` Alan Modra
2001-09-11  2:44   ` [PATCH] Use 'M' and 'S' in section string instead of 'm' and 's' (take 2) Jakub Jelinek
2001-09-11  8:26     ` Richard Henderson

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=20010910224334.A554@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=rth@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).