OLD | NEW |
1 /* AVR-specific support for 32-bit ELF | 1 /* AVR-specific support for 32-bit ELF |
2 Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, | 2 Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
3 2010, 2011 Free Software Foundation, Inc. | 3 2010, 2011, 2012 |
| 4 Free Software Foundation, Inc. |
4 Contributed by Denis Chertykov <denisc@overta.ru> | 5 Contributed by Denis Chertykov <denisc@overta.ru> |
5 | 6 |
6 This file is part of BFD, the Binary File Descriptor library. | 7 This file is part of BFD, the Binary File Descriptor library. |
7 | 8 |
8 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 11 the Free Software Foundation; either version 3 of the License, or |
11 (at your option) any later version. | 12 (at your option) any later version. |
12 | 13 |
13 This program is distributed in the hope that it will be useful, | 14 This program is distributed in the hope that it will be useful, |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 8, /* bitsize */ | 510 8, /* bitsize */ |
510 FALSE, /* pc_relative */ | 511 FALSE, /* pc_relative */ |
511 0, /* bitpos */ | 512 0, /* bitpos */ |
512 complain_overflow_bitfield,/* complain_on_overflow */ | 513 complain_overflow_bitfield,/* complain_on_overflow */ |
513 bfd_elf_generic_reloc, /* special_function */ | 514 bfd_elf_generic_reloc, /* special_function */ |
514 "R_AVR_8", /* name */ | 515 "R_AVR_8", /* name */ |
515 FALSE, /* partial_inplace */ | 516 FALSE, /* partial_inplace */ |
516 0x000000ff, /* src_mask */ | 517 0x000000ff, /* src_mask */ |
517 0x000000ff, /* dst_mask */ | 518 0x000000ff, /* dst_mask */ |
518 FALSE), /* pcrel_offset */ | 519 FALSE), /* pcrel_offset */ |
| 520 /* lo8-part to use in .byte lo8(sym). */ |
| 521 HOWTO (R_AVR_8_LO8, /* type */ |
| 522 0, /* rightshift */ |
| 523 0, /* size (0 = byte, 1 = short, 2 = long) */ |
| 524 8, /* bitsize */ |
| 525 FALSE, /* pc_relative */ |
| 526 0, /* bitpos */ |
| 527 complain_overflow_dont,/* complain_on_overflow */ |
| 528 bfd_elf_generic_reloc, /* special_function */ |
| 529 "R_AVR_8_LO8", /* name */ |
| 530 FALSE, /* partial_inplace */ |
| 531 0xffffff, /* src_mask */ |
| 532 0xffffff, /* dst_mask */ |
| 533 FALSE), /* pcrel_offset */ |
| 534 /* hi8-part to use in .byte hi8(sym). */ |
| 535 HOWTO (R_AVR_8_HI8, /* type */ |
| 536 8, /* rightshift */ |
| 537 0, /* size (0 = byte, 1 = short, 2 = long) */ |
| 538 8, /* bitsize */ |
| 539 FALSE, /* pc_relative */ |
| 540 0, /* bitpos */ |
| 541 complain_overflow_dont,/* complain_on_overflow */ |
| 542 bfd_elf_generic_reloc, /* special_function */ |
| 543 "R_AVR_8_HI8", /* name */ |
| 544 FALSE, /* partial_inplace */ |
| 545 0xffffff, /* src_mask */ |
| 546 0xffffff, /* dst_mask */ |
| 547 FALSE), /* pcrel_offset */ |
| 548 /* hlo8-part to use in .byte hlo8(sym). */ |
| 549 HOWTO (R_AVR_8_HLO8, /* type */ |
| 550 16, /* rightshift */ |
| 551 0, /* size (0 = byte, 1 = short, 2 = long) */ |
| 552 8, /* bitsize */ |
| 553 FALSE, /* pc_relative */ |
| 554 0, /* bitpos */ |
| 555 complain_overflow_dont,/* complain_on_overflow */ |
| 556 bfd_elf_generic_reloc, /* special_function */ |
| 557 "R_AVR_8_HLO8", /* name */ |
| 558 FALSE, /* partial_inplace */ |
| 559 0xffffff, /* src_mask */ |
| 560 0xffffff, /* dst_mask */ |
| 561 FALSE), /* pcrel_offset */ |
519 }; | 562 }; |
520 | 563 |
521 /* Map BFD reloc types to AVR ELF reloc types. */ | 564 /* Map BFD reloc types to AVR ELF reloc types. */ |
522 | 565 |
523 struct avr_reloc_map | 566 struct avr_reloc_map |
524 { | 567 { |
525 bfd_reloc_code_real_type bfd_reloc_val; | 568 bfd_reloc_code_real_type bfd_reloc_val; |
526 unsigned int elf_reloc_val; | 569 unsigned int elf_reloc_val; |
527 }; | 570 }; |
528 | 571 |
(...skipping 18 matching lines...) Expand all Loading... |
547 { BFD_RELOC_AVR_HI8_LDI_PM, R_AVR_HI8_LDI_PM }, | 590 { BFD_RELOC_AVR_HI8_LDI_PM, R_AVR_HI8_LDI_PM }, |
548 { BFD_RELOC_AVR_HI8_LDI_GS, R_AVR_HI8_LDI_GS }, | 591 { BFD_RELOC_AVR_HI8_LDI_GS, R_AVR_HI8_LDI_GS }, |
549 { BFD_RELOC_AVR_HH8_LDI_PM, R_AVR_HH8_LDI_PM }, | 592 { BFD_RELOC_AVR_HH8_LDI_PM, R_AVR_HH8_LDI_PM }, |
550 { BFD_RELOC_AVR_LO8_LDI_PM_NEG, R_AVR_LO8_LDI_PM_NEG }, | 593 { BFD_RELOC_AVR_LO8_LDI_PM_NEG, R_AVR_LO8_LDI_PM_NEG }, |
551 { BFD_RELOC_AVR_HI8_LDI_PM_NEG, R_AVR_HI8_LDI_PM_NEG }, | 594 { BFD_RELOC_AVR_HI8_LDI_PM_NEG, R_AVR_HI8_LDI_PM_NEG }, |
552 { BFD_RELOC_AVR_HH8_LDI_PM_NEG, R_AVR_HH8_LDI_PM_NEG }, | 595 { BFD_RELOC_AVR_HH8_LDI_PM_NEG, R_AVR_HH8_LDI_PM_NEG }, |
553 { BFD_RELOC_AVR_CALL, R_AVR_CALL }, | 596 { BFD_RELOC_AVR_CALL, R_AVR_CALL }, |
554 { BFD_RELOC_AVR_LDI, R_AVR_LDI }, | 597 { BFD_RELOC_AVR_LDI, R_AVR_LDI }, |
555 { BFD_RELOC_AVR_6, R_AVR_6 }, | 598 { BFD_RELOC_AVR_6, R_AVR_6 }, |
556 { BFD_RELOC_AVR_6_ADIW, R_AVR_6_ADIW }, | 599 { BFD_RELOC_AVR_6_ADIW, R_AVR_6_ADIW }, |
557 { BFD_RELOC_8, R_AVR_8 } | 600 { BFD_RELOC_8, R_AVR_8 }, |
| 601 { BFD_RELOC_AVR_8_LO, R_AVR_8_LO8 }, |
| 602 { BFD_RELOC_AVR_8_HI, R_AVR_8_HI8 }, |
| 603 { BFD_RELOC_AVR_8_HLO, R_AVR_8_HLO8 } |
558 }; | 604 }; |
559 | 605 |
560 /* Meant to be filled one day with the wrap around address for the | 606 /* Meant to be filled one day with the wrap around address for the |
561 specific device. I.e. should get the value 0x4000 for 16k devices, | 607 specific device. I.e. should get the value 0x4000 for 16k devices, |
562 0x8000 for 32k devices and so on. | 608 0x8000 for 32k devices and so on. |
563 | 609 |
564 We initialize it here with a value of 0x1000000 resulting in | 610 We initialize it here with a value of 0x1000000 resulting in |
565 that we will never suggest a wrap-around jump during relaxation. | 611 that we will never suggest a wrap-around jump during relaxation. |
566 The logic of the source code later on assumes that in | 612 The logic of the source code later on assumes that in |
567 avr_pc_wrap_around one single bit is set. */ | 613 avr_pc_wrap_around one single bit is set. */ |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; | 1225 name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; |
1180 } | 1226 } |
1181 else | 1227 else |
1182 { | 1228 { |
1183 bfd_boolean unresolved_reloc, warned; | 1229 bfd_boolean unresolved_reloc, warned; |
1184 | 1230 |
1185 RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, | 1231 RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, |
1186 r_symndx, symtab_hdr, sym_hashes, | 1232 r_symndx, symtab_hdr, sym_hashes, |
1187 h, sec, relocation, | 1233 h, sec, relocation, |
1188 unresolved_reloc, warned); | 1234 unresolved_reloc, warned); |
error: old chunk mismatch |
None
OLD | NEW |