public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Prevent h8300 targeted gas from aborting on .quad pseudo-ops
@ 2007-09-19 15:39 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2007-09-19 15:39 UTC (permalink / raw)
  To: binutils

Hi Guys,

  The h8300 port of gas can run into an abort if it is asked to apply
  a fixup for an 8-byte value.  eg:

  	.section .debug_line
	.4byte		0xffffffff
	.quad		bar - foo
       foo:
       bar:

  I am applying the patch below so that an error message is generated
  instead.

Cheers
  Nick

gas/ChangeLog
2007-09-19  Nick Clifton  <nickc@redhat.com>

	* config/tc-h8300.c (md_apply_fix): Do not abort or handle 8 byte
	fixups.

Index: gas/config/tc-h8300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-h8300.c,v
retrieving revision 1.54
diff -c -3 -p -r1.54 tc-h8300.c
*** gas/config/tc-h8300.c	3 Jul 2007 11:01:04 -0000	1.54
--- gas/config/tc-h8300.c	19 Sep 2007 15:22:03 -0000
*************** md_apply_fix (fixS *fixP, valueT *valP, 
*** 2129,2134 ****
--- 2129,2141 ----
        *buf++ = (val >> 8);
        *buf++ = val;
        break;
+     case 8:
+       /* This can arise when the .quad or .8byte pseudo-ops are used.
+ 	 Returning here (without setting fx_done) will cause the code
+ 	 to attempt to generate a reloc which will then fail with the
+ 	 slightly more helpful error message: "Cannot represent
+ 	 relocation type BFD_RELOC_64".  */
+       return;
      default:
        abort ();
      }

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

only message in thread, other threads:[~2007-09-19 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-19 15:39 PATCH: Prevent h8300 targeted gas from aborting on .quad pseudo-ops Nick Clifton

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