public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Xtensa] preserve assembly no-transform flag for data
@ 2007-12-20 17:28 Bob Wilson
  0 siblings, 0 replies; only message in thread
From: Bob Wilson @ 2007-12-20 17:28 UTC (permalink / raw)
  To: binutils

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

This patch fixes an obscure case where the Xtensa "no-transform" directive was 
not being honored by the linker for data included inside the no-tranform region. 
  The property table flags used to mark such a region were only being set for 
instructions and literals.  Committed.

2007-12-20  Bob Wilson  <bob.wilson@acm.org>
	
	* config/tc-xtensa.c (xtensa_elf_cons): Set frag flags for
	expressions without suffixes.
	(get_frag_property_flags): Preserve is_no_transform flag for frags
	not marked as either instructions or literals.

[-- Attachment #2: gas-data-prop.patch --]
[-- Type: text/x-diff, Size: 1070 bytes --]

Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.95
diff -u -p -r1.95 tc-xtensa.c
--- config/tc-xtensa.c	13 Dec 2007 19:03:44 -0000	1.95
+++ config/tc-xtensa.c	20 Dec 2007 17:13:56 -0000
@@ -1558,7 +1558,10 @@ xtensa_elf_cons (int nbytes)
 	    }
 	}
       else
-	emit_expr (&exp, (unsigned int) nbytes);
+	{
+	  xtensa_set_frag_assembly_state (frag_now);
+	  emit_expr (&exp, (unsigned int) nbytes);
+	}
     }
   while (*input_line_pointer++ == ',');
 
@@ -10670,7 +10673,11 @@ get_frag_property_flags (const fragS *fr
     prop_flags->is_literal = TRUE;
   if (fragP->tc_frag_data.is_specific_opcode
       || fragP->tc_frag_data.is_no_transform)
-    prop_flags->is_no_transform = TRUE;
+    {
+      prop_flags->is_no_transform = TRUE;
+      if (xtensa_frag_flags_is_empty (prop_flags))
+	prop_flags->is_data = TRUE;
+    }
   if (fragP->tc_frag_data.is_unreachable)
     prop_flags->is_unreachable = TRUE;
   else if (fragP->tc_frag_data.is_insn)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-20 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-20 17:28 [Xtensa] preserve assembly no-transform flag for data Bob Wilson

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).