patches/binutils/2.15/750-binutils-arm-undef-imm.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 26 09:31:07 2008 +0000 (2008-07-26)
changeset 727 33c246763c8a
permissions -rw-r--r--
Update the PPC sample, add a new softfloat PPC sample, thanks to Thomas JOURDAN.

/trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 54 42 12 0 ++
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 331 331 0 0 +++++++++++++++
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/reported.by | 2 2 0 0 +
3 files changed, 375 insertions(+), 12 deletions(-)
     1 From http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.168&r2=1.169&cvsroot=src
     2 See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
     3 "[CRITICAL PATCH] 2.6: fix silent build error]"
     4 
     5 Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
     6 Branch: MAIN
     7 CVS Tags: binutils_latest_snapshot, HEAD
     8 Changes since 1.168: +14 -1 lines
     9 
    10 (md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
    11 from undefined symbols.
    12 Always consider this fixup to have been processed as a reloc cannot be
    13 generated for it.
    14 
    15 
    16 ===================================================================
    17 RCS file: /cvs/src/src/gas/config/tc-arm.c,v
    18 retrieving revision 1.168
    19 retrieving revision 1.169
    20 diff -u -r1.168 -r1.169
    21 --- src/gas/config/tc-arm.c	2004/04/30 10:51:12	1.168
    22 +++ src/gas/config/tc-arm.c	2004/07/02 11:12:29	1.169
    23 @@ -12186,6 +12186,20 @@
    24    switch (fixP->fx_r_type)
    25      {
    26      case BFD_RELOC_ARM_IMMEDIATE:
    27 +      /* We claim that this fixup has been processed here,
    28 +	 even if in fact we generate an error because we do
    29 +	 not have a reloc for it, so tc_gen_reloc will reject it.  */
    30 +      fixP->fx_done = 1;
    31 +
    32 +      if (fixP->fx_addsy
    33 +	  && ! S_IS_DEFINED (fixP->fx_addsy))
    34 +	{
    35 +	  as_bad_where (fixP->fx_file, fixP->fx_line,
    36 +			_("undefined symbol %s used as an immediate value"),
    37 +			S_GET_NAME (fixP->fx_addsy));
    38 +	  break;
    39 +	}
    40 +
    41        newimm = validate_immediate (value);
    42        temp = md_chars_to_number (buf, INSN_SIZE);
    43  
    44 @@ -12202,7 +12216,6 @@
    45  
    46        newimm |= (temp & 0xfffff000);
    47        md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
    48 -      fixP->fx_done = 1;
    49        break;
    50  
    51      case BFD_RELOC_ARM_ADRL_IMMEDIATE: