OLD | NEW |
1 /* BFD back-end for AMD 64 COFF files. | 1 /* BFD back-end for AMD 64 COFF files. |
2 Copyright 2006, 2007, 2008, 2009, 2010, 2011 | 2 Copyright 2006, 2007, 2008, 2009, 2010, 2011 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of BFD, the Binary File Descriptor library. | 5 This file is part of BFD, the Binary File Descriptor library. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 } | 612 } |
613 | 613 |
614 if (rel->r_type == R_AMD64_IMAGEBASE | 614 if (rel->r_type == R_AMD64_IMAGEBASE |
615 && (bfd_get_flavour (sec->output_section->owner) == bfd_target_coff_flavou
r)) | 615 && (bfd_get_flavour (sec->output_section->owner) == bfd_target_coff_flavou
r)) |
616 *addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase; | 616 *addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase; |
617 | 617 |
618 if (rel->r_type == R_AMD64_SECREL) | 618 if (rel->r_type == R_AMD64_SECREL) |
619 { | 619 { |
620 bfd_vma osect_vma; | 620 bfd_vma osect_vma; |
621 | 621 |
622 if (h && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_def
weak)) | 622 if (h && (h->root.type == bfd_link_hash_defined |
| 623 » » || h->root.type == bfd_link_hash_defweak)) |
623 osect_vma = h->root.u.def.section->output_section->vma; | 624 osect_vma = h->root.u.def.section->output_section->vma; |
624 else | 625 else |
625 { | 626 { |
626 asection *s; | 627 asection *s; |
627 int i; | 628 int i; |
628 | 629 |
629 /* Sigh, the only way to get the section to offset against | 630 /* Sigh, the only way to get the section to offset against |
630 is to find it the hard way. */ | 631 is to find it the hard way. */ |
631 for (s = abfd->sections, i = 1; i < sym->n_scnum; i++) | 632 for (s = abfd->sections, i = 1; i < sym->n_scnum; i++) |
632 s = s->next; | 633 s = s->next; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 BFD_JUMP_TABLE_SYMBOLS (coff), | 788 BFD_JUMP_TABLE_SYMBOLS (coff), |
788 BFD_JUMP_TABLE_RELOCS (coff), | 789 BFD_JUMP_TABLE_RELOCS (coff), |
789 BFD_JUMP_TABLE_WRITE (coff), | 790 BFD_JUMP_TABLE_WRITE (coff), |
790 BFD_JUMP_TABLE_LINK (coff), | 791 BFD_JUMP_TABLE_LINK (coff), |
791 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), | 792 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), |
792 | 793 |
793 NULL, | 794 NULL, |
794 | 795 |
795 COFF_SWAP_TABLE | 796 COFF_SWAP_TABLE |
796 }; | 797 }; |
OLD | NEW |