ppc_elf_cons and reloc modifiers

Alan Modra amodra@gmail.com
Fri Aug 16 13:00:00 GMT 2013


I'm not sure why ppc_elf_cons restricted expressions that may have @l
and other modifiers to O_symbol, but it's been that way since rev 1.1
of tc-ppc.c.  This change allows gas to handle code like
	.short x-.@l
	.short 0x12345678@h

	* config/tc-ppc.c (ppc_elf_cons): Allow @l and other reloc
	modifiers generally.

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.203
diff -u -p -r1.203 tc-ppc.c
--- gas/config/tc-ppc.c	14 Aug 2013 20:52:55 -0000	1.203
+++ gas/config/tc-ppc.c	16 Aug 2013 12:03:56 -0000
@@ -2050,8 +2050,7 @@ ppc_elf_cons (int nbytes /* 1=.byte, 2=.
   do
     {
       expression (&exp);
-      if (exp.X_op == O_symbol
-	  && *input_line_pointer == '@'
+      if (*input_line_pointer == '@'
 	  && (reloc = ppc_elf_suffix (&input_line_pointer,
 				      &exp)) != BFD_RELOC_UNUSED)
 	{

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list