This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: hppa unwind broken for cross-assemblers


On Tue, 6 Feb 2001, Alan Modra wrote:

> I'm about to check this patch in to correct a problem with .PARISC.unwind
> info on hppa*-linux when cross assembling from i686-linux.  It's a bad
> idea to store structure bitfieds directly in object files.

Oops.  I should _not_ try to optimise, tidy up etc., code when fixing
bugs.  The above introduced a bug which I didn't see due to testing with a
64 bit target enabled.

gas/ChangeLog
	* config/tc-hppa.c (pa_build_unwind_subspace): Don't call
	md_number_to_char with size > sizeof (valueT).

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

Index: gas/config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.78.2.2
diff -u -p -r1.78.2.2 tc-hppa.c
--- tc-hppa.c	2001/02/06 02:58:28	1.78.2.2
+++ tc-hppa.c	2001/02/08 00:03:11
@@ -6108,9 +6108,9 @@ pa_build_unwind_subspace (call_info)
   /* Get some space to hold relocation information for the unwind
      descriptor.  */
   p = frag_more (16);
-  md_number_to_chars (p, 0, 8);
 
   /* Relocation info. for start offset of the function.  */
+  md_number_to_chars (p, 0, 4);
   fix_new_hppa (frag_now, p - frag_now->fr_literal, 4,
 		call_info->start_symbol, (offsetT) 0,
 		(expressionS *) NULL, 0, reloc,
@@ -6123,7 +6123,7 @@ pa_build_unwind_subspace (call_info)
      symbol into the symbol table.  It (should) end up giving the same
      value as call_info->start_symbol + function size once the linker is
      finished with its work.  */
-
+  md_number_to_chars (p + 4, 0, 4);
   fix_new_hppa (frag_now, p + 4 - frag_now->fr_literal, 4,
 		call_info->end_symbol, (offsetT) 0,
 		(expressionS *) NULL, 0, reloc,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]