summaryrefslogtreecommitdiffstats
path: root/x86-64-pc32-relocs.patch
blob: 53da6aa7afee438052057ed12cca654659230cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Index: bfd/cofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/cofflink.c,v
retrieving revision 1.84
diff -c -p -r1.84 cofflink.c
*** bfd/cofflink.c	10 Jan 2013 20:03:52 -0000	1.84
--- bfd/cofflink.c	4 Jun 2013 12:03:23 -0000
*************** _bfd_coff_generic_relocate_section (bfd 
*** 3060,3065 ****
--- 3060,3070 ----
  	  else
  	    {
  	      sec = sections[symndx];
+ 
+ 	      /* If the output section has been discarded then ignore this reloc.  */
+ 	      if (sec->output_section->vma == 0)
+ 		continue;
+ 
                val = (sec->output_section->vma
  		     + sec->output_offset
  		     + sym->n_value);
*************** _bfd_coff_generic_relocate_section (bfd 
*** 3080,3086 ****
  		     + sec->output_section->vma
  		     + sec->output_offset);
  	    }
- 
  	  else if (h->root.type == bfd_link_hash_undefweak)
  	    {
                if (h->symbol_class == C_NT_WEAK && h->numaux == 1)
--- 3085,3090 ----
*************** _bfd_coff_generic_relocate_section (bfd 
*** 3116,3122 ****
                  /* This is a GNU extension.  */
  		val = 0;
  	    }
- 
  	  else if (! info->relocatable)
  	    {
  	      if (! ((*info->callbacks->undefined_symbol)
--- 3120,3125 ----
*************** _bfd_coff_generic_relocate_section (bfd 
*** 3183,3189 ****
  		if (name == NULL)
  		  return FALSE;
  	      }
- 
  	    if (! ((*info->callbacks->reloc_overflow)
  		   (info, (h ? &h->root : NULL), name, howto->name,
  		    (bfd_vma) 0, input_bfd, input_section,
--- 3186,3191 ----