Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: bfd/elf32-tilepro.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/elf32-tilegx.c ('k') | bfd/elf32-v850.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* TILEPro-specific support for 32-bit ELF. 1 /* TILEPro-specific support for 32-bit ELF.
2 Copyright 2011 Free Software Foundation, Inc. 2 Copyright 2011, 2012 Free Software Foundation, Inc.
3 3
4 This file is part of BFD, the Binary File Descriptor library. 4 This file is part of BFD, the Binary File Descriptor library.
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */ 19 MA 02110-1301, USA. */
20 20
21 #include "sysdep.h"
21 #include "bfd.h" 22 #include "bfd.h"
22 #include "sysdep.h"
23 #include "libbfd.h" 23 #include "libbfd.h"
24 #include "elf-bfd.h" 24 #include "elf-bfd.h"
25 #include "elf/tilepro.h" 25 #include "elf/tilepro.h"
26 #include "opcode/tilepro.h" 26 #include "opcode/tilepro.h"
27 #include "libiberty.h" 27 #include "libiberty.h"
28 #include "elf32-tilepro.h" 28 #include "elf32-tilepro.h"
29 29
30 #define TILEPRO_BYTES_PER_WORD 4 30 #define TILEPRO_BYTES_PER_WORD 4
31 31
32 static reloc_howto_type tilepro_elf_howto_table [] = 32 static reloc_howto_type tilepro_elf_howto_table [] =
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_Y0, 0, 5), 373 TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_Y0, 0, 5),
374 TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_Y1, 0, 5), 374 TILEPRO_UIMM_HOWTO(R_TILEPRO_SHAMT_Y1, 0, 5),
375 375
376 TILEPRO_IMM_HOWTO(R_TILEPRO_DEST_IMM8_X1, 0, 8), 376 TILEPRO_IMM_HOWTO(R_TILEPRO_DEST_IMM8_X1, 0, 8),
377 377
378 /* These relocs are currently not defined. */ 378 /* These relocs are currently not defined. */
379 EMPTY_HOWTO (56), 379 EMPTY_HOWTO (56),
380 EMPTY_HOWTO (57), 380 EMPTY_HOWTO (57),
381 EMPTY_HOWTO (58), 381 EMPTY_HOWTO (58),
382 EMPTY_HOWTO (59), 382 EMPTY_HOWTO (59),
383 EMPTY_HOWTO (60), 383
384 EMPTY_HOWTO (61), 384 HOWTO (R_TILEPRO_TLS_GD_CALL, /* type */
385 EMPTY_HOWTO (62), 385 » TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */
386 EMPTY_HOWTO (63), 386 » 2,» » » /* size (0 = byte, 1 = short, 2 = long) */
387 EMPTY_HOWTO (64), 387 » 29,» » » /* bitsize */
388 EMPTY_HOWTO (65), 388 » TRUE,» » » /* pc_relative */
389 » 0,» » » /* bitpos */
390 » complain_overflow_signed,/* complain_on_overflow */
391 » bfd_elf_generic_reloc, /* special_function */
392 » "R_TILEPRO_TLS_GD_CALL", /* name */
393 » FALSE,»» » /* partial_inplace */
394 » 0,» » » /* src_mask */
395 » -1,» » » /* dst_mask */
396 » TRUE), » » /* pcrel_offset */
397
398 TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X0_TLS_GD_ADD, 0, 8),
399 TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X1_TLS_GD_ADD, 0, 8),
400 TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_Y0_TLS_GD_ADD, 0, 8),
401 TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_Y1_TLS_GD_ADD, 0, 8),
402 TILEPRO_IMM_HOWTO(R_TILEPRO_TLS_IE_LOAD, 0, 8),
389 403
390 /* Offsets into the GOT of TLS Descriptors. */ 404 /* Offsets into the GOT of TLS Descriptors. */
391 405
392 HOWTO (R_TILEPRO_IMM16_X0_TLS_GD,/* type */ 406 HOWTO (R_TILEPRO_IMM16_X0_TLS_GD,/* type */
393 0, /* rightshift */ 407 0, /* rightshift */
394 1, /* size (0 = byte, 1 = short, 2 = long) */ 408 1, /* size (0 = byte, 1 = short, 2 = long) */
395 16, /* bitsize */ 409 16, /* bitsize */
396 FALSE, /* pc_relative */ 410 FALSE, /* pc_relative */
397 0, /* bitpos */ 411 0, /* bitpos */
398 complain_overflow_signed, /* complain_on_overflow */ 412 complain_overflow_signed, /* complain_on_overflow */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 FALSE, /* pc_relative */ 461 FALSE, /* pc_relative */
448 0, /* bitpos */ 462 0, /* bitpos */
449 complain_overflow_signed, /* complain_on_overflow */ 463 complain_overflow_signed, /* complain_on_overflow */
450 bfd_elf_generic_reloc, /* special_function */ 464 bfd_elf_generic_reloc, /* special_function */
451 "R_TILEPRO_IMM16_X1_TLS_IE",/* name */ 465 "R_TILEPRO_IMM16_X1_TLS_IE",/* name */
452 FALSE, /* partial_inplace */ 466 FALSE, /* partial_inplace */
453 0, /* src_mask */ 467 0, /* src_mask */
454 -1, /* dst_mask */ 468 -1, /* dst_mask */
455 TRUE), /* pcrel_offset */ 469 TRUE), /* pcrel_offset */
456 470
457 #define TILEPRO_IMM16_HOWTO_TLS_IE(name, rshift) \ 471 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_IE_LO, 0),
458 HOWTO (name, rshift, 1, 16, FALSE, 0, \ 472 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_IE_LO, 0),
459 complain_overflow_dont, bfd_elf_generic_reloc, \ 473 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_IE_HI, 16),
460 #name, FALSE, 0, 0xffff, TRUE) 474 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_IE_HI, 16),
461 475 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_IE_HA, 16),
462 TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X0_TLS_IE_LO, 0), 476 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_IE_HA, 16),
463 TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X1_TLS_IE_LO, 0),
464 TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X0_TLS_IE_HI, 16),
465 TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X1_TLS_IE_HI, 16),
466 TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X0_TLS_IE_HA, 16),
467 TILEPRO_IMM16_HOWTO_TLS_IE (R_TILEPRO_IMM16_X1_TLS_IE_HA, 16),
468 477
469 /* These are common with the Solaris TLS implementation. */ 478 /* These are common with the Solaris TLS implementation. */
470 HOWTO(R_TILEPRO_TLS_DTPMOD32, 0, 0, 0, FALSE, 0, complain_overflow_dont, 479 HOWTO(R_TILEPRO_TLS_DTPMOD32, 0, 0, 0, FALSE, 0, complain_overflow_dont,
471 bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPMOD32", 480 bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPMOD32",
472 FALSE, 0, 0, TRUE), 481 FALSE, 0, 0, TRUE),
473 HOWTO(R_TILEPRO_TLS_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 482 HOWTO(R_TILEPRO_TLS_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
474 bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPOFF32", 483 bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPOFF32",
475 FALSE, 0, 0xFFFFFFFF, TRUE), 484 FALSE, 0, 0xFFFFFFFF, TRUE),
476 HOWTO(R_TILEPRO_TLS_TPOFF32, 0, 0, 0, FALSE, 0, complain_overflow_dont, 485 HOWTO(R_TILEPRO_TLS_TPOFF32, 0, 0, 0, FALSE, 0, complain_overflow_dont,
477 bfd_elf_generic_reloc, "R_TILEPRO_TLS_TPOFF32", 486 bfd_elf_generic_reloc, "R_TILEPRO_TLS_TPOFF32",
478 FALSE, 0, 0, TRUE) 487 FALSE, 0, 0, TRUE),
479 488
489 HOWTO (R_TILEPRO_IMM16_X0_TLS_LE,/* type */
490 0, /* rightshift */
491 1, /* size (0 = byte, 1 = short, 2 = long) */
492 16, /* bitsize */
493 FALSE, /* pc_relative */
494 0, /* bitpos */
495 complain_overflow_signed, /* complain_on_overflow */
496 bfd_elf_generic_reloc, /* special_function */
497 "R_TILEPRO_IMM16_X0_TLS_LE",/* name */
498 FALSE, /* partial_inplace */
499 0, /* src_mask */
500 -1, /* dst_mask */
501 TRUE), /* pcrel_offset */
502
503 HOWTO (R_TILEPRO_IMM16_X1_TLS_LE,/* type */
504 0, /* rightshift */
505 1, /* size (0 = byte, 1 = short, 2 = long) */
506 16, /* bitsize */
507 FALSE, /* pc_relative */
508 0, /* bitpos */
509 complain_overflow_signed, /* complain_on_overflow */
510 bfd_elf_generic_reloc, /* special_function */
511 "R_TILEPRO_IMM16_X1_TLS_LE",/* name */
512 FALSE, /* partial_inplace */
513 0, /* src_mask */
514 -1, /* dst_mask */
515 TRUE), /* pcrel_offset */
516
517 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_LE_LO, 0),
518 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_LE_LO, 0),
519 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_LE_HI, 16),
520 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_LE_HI, 16),
521 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_LE_HA, 16),
522 TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_LE_HA, 16),
480 }; 523 };
481 524
482 static reloc_howto_type tilepro_elf_howto_table2 [] = 525 static reloc_howto_type tilepro_elf_howto_table2 [] =
483 { 526 {
484 /* GNU extension to record C++ vtable hierarchy */ 527 /* GNU extension to record C++ vtable hierarchy */
485 HOWTO (R_TILEPRO_GNU_VTINHERIT, /* type */ 528 HOWTO (R_TILEPRO_GNU_VTINHERIT, /* type */
486 0, /* rightshift */ 529 0, /* rightshift */
487 2, /* size (0 = byte, 1 = short, 2 = long) */ 530 2, /* size (0 = byte, 1 = short, 2 = long) */
488 0, /* bitsize */ 531 0, /* bitsize */
489 FALSE, /* pc_relative */ 532 FALSE, /* pc_relative */
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI, R_TILEPRO_IMM16_X0_GOT_HI) 623 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI, R_TILEPRO_IMM16_X0_GOT_HI)
581 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI, R_TILEPRO_IMM16_X1_GOT_HI) 624 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI, R_TILEPRO_IMM16_X1_GOT_HI)
582 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA, R_TILEPRO_IMM16_X0_GOT_HA) 625 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA, R_TILEPRO_IMM16_X0_GOT_HA)
583 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA, R_TILEPRO_IMM16_X1_GOT_HA) 626 TH_REMAP (BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA, R_TILEPRO_IMM16_X1_GOT_HA)
584 627
585 TH_REMAP (BFD_RELOC_TILEPRO_MMSTART_X0, R_TILEPRO_MMSTART_X0) 628 TH_REMAP (BFD_RELOC_TILEPRO_MMSTART_X0, R_TILEPRO_MMSTART_X0)
586 TH_REMAP (BFD_RELOC_TILEPRO_MMEND_X0, R_TILEPRO_MMEND_X0) 629 TH_REMAP (BFD_RELOC_TILEPRO_MMEND_X0, R_TILEPRO_MMEND_X0)
587 TH_REMAP (BFD_RELOC_TILEPRO_MMSTART_X1, R_TILEPRO_MMSTART_X1) 630 TH_REMAP (BFD_RELOC_TILEPRO_MMSTART_X1, R_TILEPRO_MMSTART_X1)
588 TH_REMAP (BFD_RELOC_TILEPRO_MMEND_X1, R_TILEPRO_MMEND_X1) 631 TH_REMAP (BFD_RELOC_TILEPRO_MMEND_X1, R_TILEPRO_MMEND_X1)
589 TH_REMAP (BFD_RELOC_TILEPRO_SHAMT_X0, R_TILEPRO_SHAMT_X0) 632 TH_REMAP (BFD_RELOC_TILEPRO_SHAMT_X0, R_TILEPRO_SHAMT_X0)

error: old chunk mismatch

OLDNEW
« no previous file with comments | « bfd/elf32-tilegx.c ('k') | bfd/elf32-v850.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698