GNU Binutils with patches for OS216
修訂 | d0509e7f90c3131357c2d4f1d37a989eb3bb4a31 (tree) |
---|---|
時間 | 2016-03-15 19:53:20 |
作者 | Leon Winter <winter-gcc@bfw-...> |
Commiter | Nick Clifton |
Fix erroneous relocations applied to absolute symbols in COFF format targets.
PR ld/19623
* cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
relocations against absolute symbols.
@@ -1,3 +1,12 @@ | ||
1 | +2016-03-15 Nick Clifton <nickc@redhat.com> | |
2 | + | |
3 | + Backport from master: | |
4 | + 2016-03-09 Leon Winter <winter-gcc@bfw-online.de> | |
5 | + | |
6 | + PR ld/19623 | |
7 | + * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply | |
8 | + relocations against absolute symbols. | |
9 | + | |
1 | 10 | 2016-03-14 H.J. Lu <hongjiu.lu@intel.com> |
2 | 11 | |
3 | 12 | Backport from master |
@@ -2977,6 +2977,12 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, | ||
2977 | 2977 | else |
2978 | 2978 | { |
2979 | 2979 | sec = sections[symndx]; |
2980 | + | |
2981 | + /* PR 19623: Relocations against symbols in | |
2982 | + the absolute sections should ignored. */ | |
2983 | + if (bfd_is_abs_section (sec)) | |
2984 | + continue; | |
2985 | + | |
2980 | 2986 | val = (sec->output_section->vma |
2981 | 2987 | + sec->output_offset |
2982 | 2988 | + sym->n_value); |