This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Compatibility with "am"/"ams"
- To: Jakub Jelinek <jakub at redhat dot com>, amodra at bigpond dot net dot au
- Subject: PATCH: Compatibility with "am"/"ams"
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Sat, 29 Sep 2001 21:40:59 -0700
- Cc: binutils at sourceware dot cygnus dot com
gcc 2.96 from Red Hat uses "am"/"ams" for SHF_MERGE. But now binutils
no longer accepts them. That means you cannot use the current binutils
with gcc 2.96. That can lead to many unnecessary problems. I can deal
with it myself. I think we should provide a safe compatible binutils.
H.J.
----
2001-09-29 H.J. Lu <hjl@gnu.org>
* config/obj-elf.c (obj_elf_parse_section_letters): Accept "am"
and "ams" for compatibility.
Index: gas/config/obj-elf.c
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/config/obj-elf.c,v
retrieving revision 1.36
diff -u -p -r1.36 obj-elf.c
--- gas/config/obj-elf.c 2001/09/19 06:23:39 1.36
+++ gas/config/obj-elf.c 2001/09/30 04:34:31
@@ -757,6 +757,18 @@ obj_elf_parse_section_letters (str, len)
case 'S':
attr |= SHF_STRINGS;
break;
+ /* Compatibility. */
+ case 'm':
+ if (*(str - 1) == 'a')
+ {
+ attr |= SHF_MERGE;
+ if (len > 1 && str[1] == 's')
+ {
+ attr |= SHF_STRINGS;
+ str++, len--;
+ }
+ break;
+ }
default:
{
char *bad_msg = _("Unrecognized .section attribute: want a,w,x,M,S");