patches/binutils/2.15/binutils-arm-undef-imm.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.15/binutils-arm-undef-imm.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,51 @@
     1.4 +From http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.168&r2=1.169&cvsroot=src
     1.5 +See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
     1.6 +"[CRITICAL PATCH] 2.6: fix silent build error]"
     1.7 +
     1.8 +Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
     1.9 +Branch: MAIN
    1.10 +CVS Tags: binutils_latest_snapshot, HEAD
    1.11 +Changes since 1.168: +14 -1 lines
    1.12 +
    1.13 +(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
    1.14 +from undefined symbols.
    1.15 +Always consider this fixup to have been processed as a reloc cannot be
    1.16 +generated for it.
    1.17 +
    1.18 +
    1.19 +===================================================================
    1.20 +RCS file: /cvs/src/src/gas/config/tc-arm.c,v
    1.21 +retrieving revision 1.168
    1.22 +retrieving revision 1.169
    1.23 +diff -u -r1.168 -r1.169
    1.24 +--- src/gas/config/tc-arm.c	2004/04/30 10:51:12	1.168
    1.25 ++++ src/gas/config/tc-arm.c	2004/07/02 11:12:29	1.169
    1.26 +@@ -12186,6 +12186,20 @@
    1.27 +   switch (fixP->fx_r_type)
    1.28 +     {
    1.29 +     case BFD_RELOC_ARM_IMMEDIATE:
    1.30 ++      /* We claim that this fixup has been processed here,
    1.31 ++	 even if in fact we generate an error because we do
    1.32 ++	 not have a reloc for it, so tc_gen_reloc will reject it.  */
    1.33 ++      fixP->fx_done = 1;
    1.34 ++
    1.35 ++      if (fixP->fx_addsy
    1.36 ++	  && ! S_IS_DEFINED (fixP->fx_addsy))
    1.37 ++	{
    1.38 ++	  as_bad_where (fixP->fx_file, fixP->fx_line,
    1.39 ++			_("undefined symbol %s used as an immediate value"),
    1.40 ++			S_GET_NAME (fixP->fx_addsy));
    1.41 ++	  break;
    1.42 ++	}
    1.43 ++
    1.44 +       newimm = validate_immediate (value);
    1.45 +       temp = md_chars_to_number (buf, INSN_SIZE);
    1.46 + 
    1.47 +@@ -12202,7 +12216,6 @@
    1.48 + 
    1.49 +       newimm |= (temp & 0xfffff000);
    1.50 +       md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
    1.51 +-      fixP->fx_done = 1;
    1.52 +       break;
    1.53 + 
    1.54 +     case BFD_RELOC_ARM_ADRL_IMMEDIATE: