Deleted Added
full compact
elf64-x86-64.c (89857) elf64-x86-64.c (91041)
1/* X86-64 specific support for 64-bit ELF
2 Copyright 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Jan Hubicka <jh@suse.cz>.
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 1452 unchanged lines hidden (view full) ---

1461 input_section),
1462 name + 5) == 0);
1463
1464 sreloc = bfd_get_section_by_name (dynobj, name);
1465 BFD_ASSERT (sreloc != NULL);
1466 }
1467
1468 skip = false;
1/* X86-64 specific support for 64-bit ELF
2 Copyright 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Jan Hubicka <jh@suse.cz>.
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 1452 unchanged lines hidden (view full) ---

1461 input_section),
1462 name + 5) == 0);
1463
1464 sreloc = bfd_get_section_by_name (dynobj, name);
1465 BFD_ASSERT (sreloc != NULL);
1466 }
1467
1468 skip = false;
1469 relocate = false;
1469
1470 outrel.r_offset =
1471 _bfd_elf_section_offset (output_bfd, info, input_section,
1472 rela->r_offset);
1473 if (outrel.r_offset == (bfd_vma) -1)
1474 skip = true;
1470
1471 outrel.r_offset =
1472 _bfd_elf_section_offset (output_bfd, info, input_section,
1473 rela->r_offset);
1474 if (outrel.r_offset == (bfd_vma) -1)
1475 skip = true;
1476 else if (outrel.r_offset == (bfd_vma) -1)
1477 skip = true, relocate = true;
1475
1476 outrel.r_offset += (input_section->output_section->vma
1477 + input_section->output_offset);
1478
1479 if (skip)
1478
1479 outrel.r_offset += (input_section->output_section->vma
1480 + input_section->output_offset);
1481
1482 if (skip)
1480 {
1481 memset (&outrel, 0, sizeof outrel);
1482 relocate = false;
1483 }
1483 memset (&outrel, 0, sizeof outrel);
1484 /* h->dynindx may be -1 if this symbol was marked to
1485 become local. */
1486 else if (h != NULL
1487 && ((! info->symbolic && h->dynindx != -1)
1488 || (h->elf_link_hash_flags
1489 & ELF_LINK_HASH_DEF_REGULAR) == 0))
1490 {
1491 BFD_ASSERT (h->dynindx != -1);
1484 /* h->dynindx may be -1 if this symbol was marked to
1485 become local. */
1486 else if (h != NULL
1487 && ((! info->symbolic && h->dynindx != -1)
1488 || (h->elf_link_hash_flags
1489 & ELF_LINK_HASH_DEF_REGULAR) == 0))
1490 {
1491 BFD_ASSERT (h->dynindx != -1);
1492 relocate = false;
1493 outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
1494 outrel.r_addend = relocation + rela->r_addend;
1495 }
1496 else
1497 {
1498 if (r_type == R_X86_64_64)
1499 {
1500 relocate = true;

--- 24 unchanged lines hidden (view full) ---

1525 {
1526 asection *osec;
1527
1528 osec = sec->output_section;
1529 sindx = elf_section_data (osec)->dynindx;
1530 BFD_ASSERT (sindx > 0);
1531 }
1532
1492 outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
1493 outrel.r_addend = relocation + rela->r_addend;
1494 }
1495 else
1496 {
1497 if (r_type == R_X86_64_64)
1498 {
1499 relocate = true;

--- 24 unchanged lines hidden (view full) ---

1524 {
1525 asection *osec;
1526
1527 osec = sec->output_section;
1528 sindx = elf_section_data (osec)->dynindx;
1529 BFD_ASSERT (sindx > 0);
1530 }
1531
1533 relocate = false;
1534 outrel.r_info = ELF64_R_INFO (sindx, r_type);
1535 outrel.r_addend = relocation + rela->r_addend;
1536 }
1537
1538 }
1539
1540 bfd_elf64_swap_reloca_out (output_bfd, &outrel,
1541 (((Elf64_External_Rela *)

--- 424 unchanged lines hidden ---
1532 outrel.r_info = ELF64_R_INFO (sindx, r_type);
1533 outrel.r_addend = relocation + rela->r_addend;
1534 }
1535
1536 }
1537
1538 bfd_elf64_swap_reloca_out (output_bfd, &outrel,
1539 (((Elf64_External_Rela *)

--- 424 unchanged lines hidden ---