• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修订版2e0ce1c84d328bde4dca24b7cfc8b9c033ed271c (tree)
时间2017-03-05 13:19:54
作者Alan Modra <amodra@gmai...>
CommiterAlan Modra

Log Message

Align eh_frame FDEs according to their encoding

bfd/
* elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
* elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
(next_cie_fde_offset): New function.
(_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
(_bfd_elf_discard_section_eh_frame): Align zero terminator to
four bytes. Align CIEs to four or eight bytes depending on
per_encoding_aligned8. Align FDEs according to their encoding.
Pad last FDE to output section alignment.
(_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
assertion.
* elf64-ppc.c (glink_eh_frame_cie): Delete padding.
(ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
(ppc64_elf_finish_dynamic_sections): Adjust to suit.
ld/
* testsuite/ld-elf/eh3.d: Adjust for eh_frame alignment change.
* testsuite/ld-elf/eh6.d: Likewise.
* testsuite/ld-alpha/tlsbin.dd: Likewise.
* testsuite/ld-alpha/tlsbin.td: Likewise.
* testsuite/ld-alpha/tlsbinr.dd: Likewise.
* testsuite/ld-alpha/tlspic.dd: Likewise.
* testsuite/ld-alpha/tlspic.rd: Likewise.
* testsuite/ld-alpha/tlspic.sd: Likewise.
* testsuite/ld-alpha/tlspic.td: Likewise.
* testsuite/ld-mips-elf/eh-frame1-n64.d: Likewise.
* testsuite/ld-mips-elf/eh-frame2-n64.d: Likewise.
* testsuite/ld-mips-elf/eh-frame3.d: Likewise.
* testsuite/ld-x86-64/pr20830a.d: Likewise.
* testsuite/ld-x86-64/pr21038a.d: Likewise.
* testsuite/ld-x86-64/pr21038b.d: Likewise.
* testsuite/ld-x86-64/pr21038c.d: Likewise.

更改概述

差异

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,19 @@
1+2017-03-05 Alan Modra <amodra@gmail.com>
2+
3+ * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4+ * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
5+ (next_cie_fde_offset): New function.
6+ (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
7+ (_bfd_elf_discard_section_eh_frame): Align zero terminator to
8+ four bytes. Align CIEs to four or eight bytes depending on
9+ per_encoding_aligned8. Align FDEs according to their encoding.
10+ Pad last FDE to output section alignment.
11+ (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
12+ assertion.
13+ * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
14+ (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
15+ (ppc64_elf_finish_dynamic_sections): Adjust to suit.
16+
117 2017-03-02 Martin Bickel <binutils@ineranves.de>
218
319 PR ld/21212
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -342,6 +342,10 @@ struct eh_cie_fde
342342 make_per_encoding_relative is. */
343343 unsigned int per_encoding_relative : 1;
344344
345+ /* True if the CIE contains personality data aligned to a
346+ multiple of eight bytes. */
347+ unsigned int per_encoding_aligned8 : 1;
348+
345349 /* True if we need to add an 'R' (FDE encoding) entry to the
346350 CIE's augmentation data. */
347351 unsigned int add_fde_encoding : 1;
@@ -350,7 +354,7 @@ struct eh_cie_fde
350354 unsigned int merged : 1;
351355
352356 /* Unused bits. */
353- unsigned int pad1 : 18;
357+ unsigned int pad1 : 17;
354358 } cie;
355359 } u;
356360 unsigned int reloc_index;
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -309,11 +309,10 @@ extra_augmentation_data_bytes (struct eh_cie_fde *entry)
309309 return size;
310310 }
311311
312-/* Return the size that ENTRY will have in the output. ALIGNMENT is the
313- required alignment of ENTRY in bytes. */
312+/* Return the size that ENTRY will have in the output. */
314313
315314 static unsigned int
316-size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment)
315+size_of_output_cie_fde (struct eh_cie_fde *entry)
317316 {
318317 if (entry->removed)
319318 return 0;
@@ -321,8 +320,22 @@ size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment)
321320 return 4;
322321 return (entry->size
323322 + extra_augmentation_string_bytes (entry)
324- + extra_augmentation_data_bytes (entry)
325- + alignment - 1) & -alignment;
323+ + extra_augmentation_data_bytes (entry));
324+}
325+
326+/* Return the offset of the FDE or CIE after ENT. */
327+
328+static unsigned int
329+next_cie_fde_offset (struct eh_cie_fde *ent,
330+ struct eh_cie_fde *last,
331+ asection *sec)
332+{
333+ while (++ent < last)
334+ {
335+ if (!ent->removed)
336+ return ent->new_offset;
337+ }
338+ return sec->size;
326339 }
327340
328341 /* Assume that the bytes between *ITER and END are CFA instructions.
@@ -811,6 +824,8 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
811824 {
812825 length = -(buf - ehbuf) & (per_width - 1);
813826 REQUIRE (skip_bytes (&buf, end, length));
827+ if (per_width == 8)
828+ this_inf->u.cie.per_encoding_aligned8 = 1;
814829 }
815830 this_inf->u.cie.personality_offset = buf - start;
816831 ENSURE_NO_RELOCS (buf);
@@ -1326,7 +1341,7 @@ _bfd_elf_discard_section_eh_frame
13261341 struct eh_cie_fde *ent;
13271342 struct eh_frame_sec_info *sec_info;
13281343 struct eh_frame_hdr_info *hdr_info;
1329- unsigned int ptr_size, offset;
1344+ unsigned int ptr_size, offset, eh_alignment;
13301345
13311346 if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
13321347 return FALSE;
@@ -1406,14 +1421,46 @@ _bfd_elf_discard_section_eh_frame
14061421 sec_info->cies = NULL;
14071422 }
14081423
1424+ /* It may be that some .eh_frame input section has greater alignment
1425+ than other .eh_frame sections. In that case we run the risk of
1426+ padding with zeros before that section, which would be seen as a
1427+ zero terminator. Alignment padding must be added *inside* the
1428+ last FDE instead. For other FDEs we align according to their
1429+ encoding, in order to align FDE address range entries naturally. */
14091430 offset = 0;
14101431 for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
14111432 if (!ent->removed)
14121433 {
1434+ eh_alignment = 4;
1435+ if (ent->size == 4)
1436+ ;
1437+ else if (ent->cie)
1438+ {
1439+ if (ent->u.cie.per_encoding_aligned8)
1440+ eh_alignment = 8;
1441+ }
1442+ else
1443+ {
1444+ eh_alignment = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
1445+ if (eh_alignment < 4)
1446+ eh_alignment = 4;
1447+ }
1448+ offset = (offset + eh_alignment - 1) & -eh_alignment;
14131449 ent->new_offset = offset;
1414- offset += size_of_output_cie_fde (ent, ptr_size);
1450+ offset += size_of_output_cie_fde (ent);
14151451 }
14161452
1453+ /* Pad the last FDE out to the output section alignment if there are
1454+ following sections, in order to ensure no padding between this
1455+ section and the next. (Relies on the output section alignment
1456+ being the maximum of all input sections alignments, which is the
1457+ case unless someone is overriding alignment via scripts.) */
1458+ eh_alignment = 4;
1459+ if (sec->map_head.s != NULL
1460+ && (sec->map_head.s->size != 4
1461+ || sec->map_head.s->map_head.s != NULL))
1462+ eh_alignment = 1 << sec->output_section->alignment_power;
1463+ offset = (offset + eh_alignment - 1) & -eh_alignment;
14171464 sec->rawsize = sec->size;
14181465 sec->size = offset;
14191466 return offset != sec->rawsize;
@@ -1732,8 +1779,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
17321779 struct elf_link_hash_table *htab;
17331780 struct eh_frame_hdr_info *hdr_info;
17341781 unsigned int ptr_size;
1735- struct eh_cie_fde *ent;
1736- bfd_size_type sec_size;
1782+ struct eh_cie_fde *ent, *last_ent;
17371783
17381784 if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
17391785 /* FIXME: octets_per_byte. */
@@ -1771,7 +1817,8 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
17711817 if (!ent->removed && ent->new_offset < ent->offset)
17721818 memmove (contents + ent->new_offset, contents + ent->offset, ent->size);
17731819
1774- for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
1820+ last_ent = sec_info->entry + sec_info->count;
1821+ for (ent = sec_info->entry; ent < last_ent; ++ent)
17751822 {
17761823 unsigned char *buf, *end;
17771824 unsigned int new_size;
@@ -1782,13 +1829,13 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
17821829 if (ent->size == 4)
17831830 {
17841831 /* Any terminating FDE must be at the end of the section. */
1785- BFD_ASSERT (ent == sec_info->entry + sec_info->count - 1);
1832+ BFD_ASSERT (ent == last_ent - 1);
17861833 continue;
17871834 }
17881835
17891836 buf = contents + ent->new_offset;
17901837 end = buf + ent->size;
1791- new_size = size_of_output_cie_fde (ent, ptr_size);
1838+ new_size = next_cie_fde_offset (ent, last_ent, sec) - ent->new_offset;
17921839
17931840 /* Update the size. It may be shrinked. */
17941841 bfd_put_32 (abfd, new_size - 4, buf);
@@ -2059,18 +2106,6 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
20592106 }
20602107 }
20612108
2062- /* We don't align the section to its section alignment since the
2063- runtime library only expects all CIE/FDE records aligned at
2064- the pointer size. _bfd_elf_discard_section_eh_frame should
2065- have padded CIE/FDE records to multiple of pointer size with
2066- size_of_output_cie_fde. */
2067- sec_size = sec->size;
2068- if (sec_info->count != 0
2069- && sec_info->entry[sec_info->count - 1].size == 4)
2070- sec_size -= 4;
2071- if ((sec_size % ptr_size) != 0)
2072- abort ();
2073-
20742109 /* FIXME: octets_per_byte. */
20752110 return bfd_set_section_contents (abfd, sec->output_section,
20762111 contents, (file_ptr) sec->output_offset,
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -12232,8 +12232,7 @@ static const unsigned char glink_eh_frame_cie[] =
1223212232 65, /* RA reg. */
1223312233 1, /* Augmentation size. */
1223412234 DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding. */
12235- DW_CFA_def_cfa, 1, 0, /* def_cfa: r1 offset 0. */
12236- 0, 0, 0, 0
12235+ DW_CFA_def_cfa, 1, 0 /* def_cfa: r1 offset 0. */
1223712236 };
1223812237
1223912238 /* Stripping output sections is normally done before dynamic section
@@ -12686,21 +12685,19 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
1268612685 && !bfd_is_abs_section (htab->glink_eh_frame->output_section)
1268712686 && htab->glink_eh_frame->output_section->size != 0)
1268812687 {
12689- size_t size = 0, align;
12688+ size_t size = 0, align = 4;
1269012689
1269112690 for (stub_sec = htab->params->stub_bfd->sections;
1269212691 stub_sec != NULL;
1269312692 stub_sec = stub_sec->next)
1269412693 if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
12695- size += 24;
12694+ size += (17 + align - 1) & -align;
1269612695 if (htab->glink != NULL && htab->glink->size != 0)
12697- size += 24;
12696+ size += (24 + align - 1) & -align;
1269812697 if (size != 0)
12699- size += sizeof (glink_eh_frame_cie);
12700- align = 1;
12701- align <<= htab->glink_eh_frame->output_section->alignment_power;
12702- align -= 1;
12703- size = (size + align) & ~align;
12698+ size += (sizeof (glink_eh_frame_cie) + align - 1) & -align;
12699+ align = 1ul << htab->glink_eh_frame->output_section->alignment_power;
12700+ size = (size + align - 1) & -align;
1270412701 htab->glink_eh_frame->rawsize = htab->glink_eh_frame->size;
1270512702 htab->glink_eh_frame->size = size;
1270612703 }
@@ -12745,12 +12742,13 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
1274512742 return FALSE;
1274612743 htab->glink_eh_frame->contents = p;
1274712744 last_fde = p;
12745+ align = 4;
1274812746
1274912747 memcpy (p, glink_eh_frame_cie, sizeof (glink_eh_frame_cie));
1275012748 /* CIE length (rewrite in case little-endian). */
12751- last_fde_len = sizeof (glink_eh_frame_cie) - 4;
12749+ last_fde_len = ((sizeof (glink_eh_frame_cie) + align - 1) & -align) - 4;
1275212750 bfd_put_32 (htab->elf.dynobj, last_fde_len, p);
12753- p += sizeof (glink_eh_frame_cie);
12751+ p += last_fde_len + 4;
1275412752
1275512753 for (stub_sec = htab->params->stub_bfd->sections;
1275612754 stub_sec != NULL;
@@ -12758,9 +12756,9 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
1275812756 if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
1275912757 {
1276012758 last_fde = p;
12761- last_fde_len = 20;
12759+ last_fde_len = ((17 + align - 1) & -align) - 4;
1276212760 /* FDE length. */
12763- bfd_put_32 (htab->elf.dynobj, 20, p);
12761+ bfd_put_32 (htab->elf.dynobj, last_fde_len, p);
1276412762 p += 4;
1276512763 /* CIE pointer. */
1276612764 val = p - htab->glink_eh_frame->contents;
@@ -12774,14 +12772,14 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
1277412772 /* Augmentation. */
1277512773 p += 1;
1277612774 /* Pad. */
12777- p += 7;
12775+ p += ((17 + align - 1) & -align) - 17;
1277812776 }
1277912777 if (htab->glink != NULL && htab->glink->size != 0)
1278012778 {
1278112779 last_fde = p;
12782- last_fde_len = 20;
12780+ last_fde_len = ((24 + align - 1) & -align) - 4;
1278312781 /* FDE length. */
12784- bfd_put_32 (htab->elf.dynobj, 20, p);
12782+ bfd_put_32 (htab->elf.dynobj, last_fde_len, p);
1278512783 p += 4;
1278612784 /* CIE pointer. */
1278712785 val = p - htab->glink_eh_frame->contents;
@@ -12802,15 +12800,14 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
1280212800 *p++ = DW_CFA_advance_loc + 4;
1280312801 *p++ = DW_CFA_restore_extended;
1280412802 *p++ = 65;
12803+ p += ((24 + align - 1) & -align) - 24;
1280512804 }
1280612805 /* Subsume any padding into the last FDE if user .eh_frame
1280712806 sections are aligned more than glink_eh_frame. Otherwise any
1280812807 zero padding will be seen as a terminator. */
12808+ align = 1ul << htab->glink_eh_frame->output_section->alignment_power;
1280912809 size = p - htab->glink_eh_frame->contents;
12810- align = 1;
12811- align <<= htab->glink_eh_frame->output_section->alignment_power;
12812- align -= 1;
12813- pad = ((size + align) & ~align) - size;
12810+ pad = ((size + align - 1) & -align) - size;
1281412811 htab->glink_eh_frame->size = size + pad;
1281512812 bfd_put_32 (htab->elf.dynobj, last_fde_len + pad, last_fde);
1281612813 }
@@ -15667,8 +15664,10 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
1566715664 bfd_vma val;
1566815665 bfd_byte *p;
1566915666 asection *stub_sec;
15667+ size_t align = 4;
1567015668
15671- p = htab->glink_eh_frame->contents + sizeof (glink_eh_frame_cie);
15669+ p = htab->glink_eh_frame->contents;
15670+ p += (sizeof (glink_eh_frame_cie) + align - 1) & -align;
1567215671 for (stub_sec = htab->params->stub_bfd->sections;
1567315672 stub_sec != NULL;
1567415673 stub_sec = stub_sec->next)
@@ -15698,7 +15697,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
1569815697 /* Augmentation. */
1569915698 p += 1;
1570015699 /* Pad. */
15701- p += 7;
15700+ p += ((17 + align - 1) & -align) - 17;
1570215701 }
1570315702 if (htab->glink != NULL && htab->glink->size != 0)
1570415703 {
@@ -15728,6 +15727,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
1572815727 p += 1;
1572915728 /* Ops. */
1573015729 p += 7;
15730+ p += ((24 + align - 1) & -align) - 24;
1573115731 }
1573215732
1573315733 if (htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,22 @@
1+2017-03-05 Alan Modra <amodra@gmail.com>
2+
3+ * testsuite/ld-elf/eh3.d: Adjust for eh_frame alignment change.
4+ * testsuite/ld-elf/eh6.d: Likewise.
5+ * testsuite/ld-alpha/tlsbin.dd: Likewise.
6+ * testsuite/ld-alpha/tlsbin.td: Likewise.
7+ * testsuite/ld-alpha/tlsbinr.dd: Likewise.
8+ * testsuite/ld-alpha/tlspic.dd: Likewise.
9+ * testsuite/ld-alpha/tlspic.rd: Likewise.
10+ * testsuite/ld-alpha/tlspic.sd: Likewise.
11+ * testsuite/ld-alpha/tlspic.td: Likewise.
12+ * testsuite/ld-mips-elf/eh-frame1-n64.d: Likewise.
13+ * testsuite/ld-mips-elf/eh-frame2-n64.d: Likewise.
14+ * testsuite/ld-mips-elf/eh-frame3.d: Likewise.
15+ * testsuite/ld-x86-64/pr20830a.d: Likewise.
16+ * testsuite/ld-x86-64/pr21038a.d: Likewise.
17+ * testsuite/ld-x86-64/pr21038b.d: Likewise.
18+ * testsuite/ld-x86-64/pr21038c.d: Likewise.
19+
120 2017-03-03 Max Bolingbroke <batterseapower@hotmail.com>
221
322 PR 12969
--- a/ld/testsuite/ld-alpha/tlsbin.dd
+++ b/ld/testsuite/ld-alpha/tlsbin.dd
@@ -12,30 +12,30 @@ Disassembly of section \.text:
1212
1313 0+120001000 <fn2>:
1414 120001000: 02 00 bb 27 ldah gp,2\(t12\)
15- 120001004: b0 82 bd 23 lda gp,-32080\(gp\)
15+ 120001004: a8 82 bd 23 lda gp,-32088\(gp\)
1616 120001008: 3e 15 c2 43 subq sp,0x10,sp
1717 12000100c: 00 00 5e b7 stq ra,0\(sp\)
1818 120001010: 18 80 1d 22 lda a0,-32744\(gp\)
1919 120001014: 08 80 7d a7 ldq t12,-32760\(gp\)
2020 120001018: 00 40 5b 6b jsr ra,\(t12\),12000101c <.*>
2121 12000101c: 02 00 ba 27 ldah gp,2\(ra\)
22- 120001020: 94 82 bd 23 lda gp,-32108\(gp\)
22+ 120001020: 8c 82 bd 23 lda gp,-32116\(gp\)
2323 120001024: 38 80 1d 22 lda a0,-32712\(gp\)
2424 120001028: 08 80 7d a7 ldq t12,-32760\(gp\)
2525 12000102c: 00 40 5b 6b jsr ra,\(t12\),120001030 <.*>
2626 120001030: 02 00 ba 27 ldah gp,2\(ra\)
27- 120001034: 80 82 bd 23 lda gp,-32128\(gp\)
27+ 120001034: 78 82 bd 23 lda gp,-32136\(gp\)
2828 120001038: 28 80 1d 22 lda a0,-32728\(gp\)
2929 12000103c: 08 80 7d a7 ldq t12,-32760\(gp\)
3030 120001040: 00 40 5b 6b jsr ra,\(t12\),120001044 <.*>
3131 120001044: 02 00 ba 27 ldah gp,2\(ra\)
32- 120001048: 6c 82 bd 23 lda gp,-32148\(gp\)
32+ 120001048: 64 82 bd 23 lda gp,-32156\(gp\)
3333 12000104c: 21 00 20 20 lda t0,33\(v0\)
3434 120001050: 28 80 1d 22 lda a0,-32728\(gp\)
3535 120001054: 08 80 7d a7 ldq t12,-32760\(gp\)
3636 120001058: 00 40 5b 6b jsr ra,\(t12\),12000105c <.*>
3737 12000105c: 02 00 ba 27 ldah gp,2\(ra\)
38- 120001060: 54 82 bd 23 lda gp,-32172\(gp\)
38+ 120001060: 4c 82 bd 23 lda gp,-32180\(gp\)
3939 120001064: 40 00 20 20 lda t0,64\(v0\)
4040 120001068: 46 00 20 20 lda t0,70\(v0\)
4141 12000106c: 00 00 20 24 ldah t0,0\(v0\)
--- a/ld/testsuite/ld-alpha/tlsbin.td
+++ b/ld/testsuite/ld-alpha/tlsbin.td
@@ -9,9 +9,9 @@
99 .*: +file format elf64-alpha
1010
1111 Contents of section .tdata:
12- 1?200110f0 11000000 12000000 13000000 14000000 .*
13- 1?20011100 15000000 16000000 17000000 18000000 .*
14- 1?20011110 41000000 42000000 43000000 44000000 .*
15- 1?20011120 45000000 46000000 47000000 48000000 .*
16- 1?20011130 01010000 02010000 03010000 04010000 .*
17- 1?20011140 05010000 06010000 07010000 08010000 .*
12+ 1?200110e8 11000000 12000000 13000000 14000000 .*
13+ 1?200110f8 15000000 16000000 17000000 18000000 .*
14+ 1?20011108 41000000 42000000 43000000 44000000 .*
15+ 1?20011118 45000000 46000000 47000000 48000000 .*
16+ 1?20011128 01010000 02010000 03010000 04010000 .*
17+ 1?20011138 05010000 06010000 07010000 08010000 .*
--- a/ld/testsuite/ld-alpha/tlsbinr.dd
+++ b/ld/testsuite/ld-alpha/tlsbinr.dd
@@ -12,7 +12,7 @@ Disassembly of section \.text:
1212
1313 0+120001000 <fn2>:
1414 120001000: 02 00 bb 27 ldah gp,2\(t12\)
15- 120001004: a0 82 bd 23 lda gp,-32096\(gp\)
15+ 120001004: 98 82 bd 23 lda gp,-32104\(gp\)
1616 120001008: 3e 15 c2 43 subq sp,0x10,sp
1717 12000100c: 00 00 5e b7 stq ra,0\(sp\)
1818 120001010: 08 80 1d a6 ldq a0,-32760\(gp\)
--- a/ld/testsuite/ld-alpha/tlspic.dd
+++ b/ld/testsuite/ld-alpha/tlspic.dd
@@ -12,7 +12,7 @@ Disassembly of section .text:
1212
1313 0+1000 <fn1>:
1414 1000: 02 00 bb 27 ldah gp,2\(t12\)
15- 1004: 90 82 bd 23 lda gp,-32112\(gp\)
15+ 1004: 88 82 bd 23 lda gp,-32120\(gp\)
1616 1008: 3e 15 c2 43 subq sp,0x10,sp
1717 100c: 00 00 5e b7 stq ra,0\(sp\)
1818 1010: 08 00 3e b5 stq s0,8\(sp\)
@@ -22,23 +22,23 @@ Disassembly of section .text:
2222 1020: 00 80 7d a7 ldq t12,-32768\(gp\)
2323 1024: 00 40 5b 6b jsr ra,\(t12\),1028 <.*>
2424 1028: 02 00 ba 27 ldah gp,2\(ra\)
25- 102c: 68 82 bd 23 lda gp,-32152\(gp\)
25+ 102c: 60 82 bd 23 lda gp,-32160\(gp\)
2626 1030: 30 80 1d 22 lda a0,-32720\(gp\)
2727 1034: 00 80 7d a7 ldq t12,-32768\(gp\)
2828 1038: 00 40 5b 6b jsr ra,\(t12\),103c <.*>
2929 103c: 02 00 ba 27 ldah gp,2\(ra\)
30- 1040: 54 82 bd 23 lda gp,-32172\(gp\)
30+ 1040: 4c 82 bd 23 lda gp,-32180\(gp\)
3131 1044: 40 80 1d 22 lda a0,-32704\(gp\)
3232 1048: 00 80 7d a7 ldq t12,-32768\(gp\)
3333 104c: 00 40 5b 6b jsr ra,\(t12\),1050 <.*>
3434 1050: 02 00 ba 27 ldah gp,2\(ra\)
35- 1054: 40 82 bd 23 lda gp,-32192\(gp\)
35+ 1054: 38 82 bd 23 lda gp,-32200\(gp\)
3636 1058: 21 00 20 20 lda t0,33\(v0\)
3737 105c: 40 80 1d 22 lda a0,-32704\(gp\)
3838 1060: 00 80 7d a7 ldq t12,-32768\(gp\)
3939 1064: 00 40 5b 6b jsr ra,\(t12\),1068 <.*>
4040 1068: 02 00 ba 27 ldah gp,2\(ra\)
41- 106c: 28 82 bd 23 lda gp,-32216\(gp\)
41+ 106c: 20 82 bd 23 lda gp,-32224\(gp\)
4242 1070: 40 00 20 20 lda t0,64\(v0\)
4343 1074: 62 00 20 20 lda t0,98\(v0\)
4444 1078: 00 00 20 24 ldah t0,0\(v0\)
--- a/ld/testsuite/ld-alpha/tlspic.rd
+++ b/ld/testsuite/ld-alpha/tlspic.rd
@@ -37,7 +37,7 @@ Program Headers:
3737 +LOAD +0x0+ 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
3838 +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW 0x10000
3939 +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
40- +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
40+ +TLS +0x0+10d8 0x0+110d8 0x0+110d8 0x0+60 0x0+80 R +0x4
4141 #...
4242
4343 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
--- a/ld/testsuite/ld-alpha/tlspic.sd
+++ b/ld/testsuite/ld-alpha/tlspic.sd
@@ -9,10 +9,10 @@
99 .*: +file format elf64-alpha
1010
1111 Contents of section .got:
12- 11280 00000000 00000000 00000000 00000000 .*
13- 11290 44040000 00000000 00000000 00000000 .*
14- 112a0 00000000 00000000 71000000 00000000 .*
15- 112b0 00000000 00000000 00000000 00000000 .*
16- 112c0 00000000 00000000 44000000 00000000 .*
17- 112d0 00000000 00000000 00000000 00000000 .*
18- 112e0 00000000 00000000 .*
12+ 11278 00000000 00000000 00000000 00000000 .*
13+ 11288 44040000 00000000 00000000 00000000 .*
14+ 11298 00000000 00000000 71000000 00000000 .*
15+ 112a8 00000000 00000000 00000000 00000000 .*
16+ 112b8 00000000 00000000 44000000 00000000 .*
17+ 112c8 00000000 00000000 00000000 00000000 .*
18+ 112d8 00000000 00000000 .*
--- a/ld/testsuite/ld-alpha/tlspic.td
+++ b/ld/testsuite/ld-alpha/tlspic.td
@@ -9,9 +9,9 @@
99 .*: +file format elf64-alpha
1010
1111 Contents of section .tdata:
12- 110e0 11000000 12000000 13000000 14000000 .*
13- 110f0 15000000 16000000 17000000 18000000 .*
14- 11100 41000000 42000000 43000000 44000000 .*
15- 11110 45000000 46000000 47000000 48000000 .*
16- 11120 01010000 02010000 03010000 04010000 .*
17- 11130 05010000 06010000 07010000 08010000 .*
12+ 110d8 11000000 12000000 13000000 14000000 .*
13+ 110e8 15000000 16000000 17000000 18000000 .*
14+ 110f8 41000000 42000000 43000000 44000000 .*
15+ 11108 45000000 46000000 47000000 48000000 .*
16+ 11118 01010000 02010000 03010000 04010000 .*
17+ 11128 05010000 06010000 07010000 08010000 .*
--- a/ld/testsuite/ld-elf/eh3.d
+++ b/ld/testsuite/ld-elf/eh3.d
@@ -23,12 +23,20 @@ Contents of the .eh_frame section:
2323 DW_CFA_nop
2424 DW_CFA_nop
2525
26-0+0018 0+001c 0+001c FDE cie=0+0000 pc=0+400078\.\.0+400090
26+0+0018 0+0024 0+001c FDE cie=0+0000 pc=0+400078\.\.0+400090
2727 DW_CFA_advance_loc: 8 to 0+400080
2828 DW_CFA_def_cfa_offset: 16
2929 DW_CFA_offset: r6 \(rbp\) at cfa-16
3030 DW_CFA_advance_loc: 8 to 0+400088
3131 DW_CFA_def_cfa_register: r6 \(rbp\)
32+ DW_CFA_nop
33+ DW_CFA_nop
34+ DW_CFA_nop
35+ DW_CFA_nop
36+ DW_CFA_nop
37+ DW_CFA_nop
38+ DW_CFA_nop
39+ DW_CFA_nop
3240
33-0+0038 ZERO terminator
41+0+0040 ZERO terminator
3442 #pass
--- a/ld/testsuite/ld-elf/eh6.d
+++ b/ld/testsuite/ld-elf/eh6.d
@@ -8,7 +8,7 @@
88 #...
99 Contents of the .eh_frame section:
1010
11-0+0000 0+001[4c] 0+0000 CIE
11+0+0000 0+001[48] 0+0000 CIE
1212 Version: 1
1313 Augmentation: "zPR"
1414 Code alignment factor: 1
--- a/ld/testsuite/ld-mips-elf/eh-frame1-n64.d
+++ b/ld/testsuite/ld-mips-elf/eh-frame1-n64.d
@@ -12,25 +12,25 @@ Relocation section '\.rel\.dyn' .*:
1212 *Type2: R_MIPS_NONE *
1313 *Type3: R_MIPS_NONE *
1414 # Initial PCs for the FDEs attached to CIE 0x120
15-0+00030148 [0-9a-f]+ R_MIPS_REL32 *
15+0+00030140 [0-9a-f]+ R_MIPS_REL32 *
1616 *Type2: R_MIPS_64 *
1717 *Type3: R_MIPS_NONE *
18-0+00030168 [0-9a-f]+ R_MIPS_REL32 *
18+0+00030160 [0-9a-f]+ R_MIPS_REL32 *
1919 *Type2: R_MIPS_64 *
2020 *Type3: R_MIPS_NONE *
21-0+00030308 [0-9a-f]+ R_MIPS_REL32 *
21+0+00030300 [0-9a-f]+ R_MIPS_REL32 *
2222 *Type2: R_MIPS_64 *
2323 *Type3: R_MIPS_NONE *
24-0+00030328 [0-9a-f]+ R_MIPS_REL32 *
24+0+00030320 [0-9a-f]+ R_MIPS_REL32 *
2525 *Type2: R_MIPS_64 *
2626 *Type3: R_MIPS_NONE *
27-0+000300cb [0-9a-f]+ R_MIPS_REL32 0+00+00+00 foo
27+0+000300c7 [0-9a-f]+ R_MIPS_REL32 0+00+00+00 foo
2828 *Type2: R_MIPS_64 *
2929 *Type3: R_MIPS_NONE *
30-0+00030138 [0-9a-f]+ R_MIPS_REL32 0+00+00+00 foo
30+0+00030130 [0-9a-f]+ R_MIPS_REL32 0+00+00+00 foo
3131 *Type2: R_MIPS_64 *
3232 *Type3: R_MIPS_NONE *
33-0+00030192 [0-9a-f]+ R_MIPS_REL32 0+00+00+00 foo
33+0+0003018a [0-9a-f]+ R_MIPS_REL32 0+00+00+00 foo
3434 *Type2: R_MIPS_64 *
3535 *Type3: R_MIPS_NONE *
3636 Contents of the \.eh_frame section:
@@ -90,16 +90,12 @@ Contents of the \.eh_frame section:
9090 DW_CFA_nop
9191
9292 # basic4 removed
93-0+0098 0+001c 0+009c FDE cie=0+0000 pc=0+0200a0..0+0200f0
94- DW_CFA_nop
95- DW_CFA_nop
96- DW_CFA_nop
97- DW_CFA_nop
93+0+0098 0+0018 0+009c FDE cie=0+0000 pc=0+0200a0..0+0200f0
9894 DW_CFA_nop
9995 DW_CFA_nop
10096 DW_CFA_nop
10197
102-0+00b8 0+0024 0+0000 CIE
98+0+00b4 0+0020 0+0000 CIE
10399 Version: 1
104100 Augmentation: "zRP"
105101 Code alignment factor: 1
@@ -116,12 +112,8 @@ Contents of the \.eh_frame section:
116112 DW_CFA_advance_loc: 0 to 0+0000
117113 DW_CFA_nop
118114 DW_CFA_nop
119- DW_CFA_nop
120- DW_CFA_nop
121- DW_CFA_nop
122- DW_CFA_nop
123115
124-0+00e0 0+001c 0+002c FDE cie=0+00b8 pc=0+0200f0..0+020100
116+0+00d8 0+001c 0+0028 FDE cie=0+00b4 pc=0+0200f0..0+020100
125117 DW_CFA_advance_loc: 0 to 0+0200f0
126118 DW_CFA_advance_loc: 0 to 0+0200f0
127119 DW_CFA_advance_loc: 0 to 0+0200f0
@@ -130,7 +122,7 @@ Contents of the \.eh_frame section:
130122 DW_CFA_advance_loc: 0 to 0+0200f0
131123 DW_CFA_advance_loc: 0 to 0+0200f0
132124
133-0+0100 0+001c 0+004c FDE cie=0+00b8 pc=0+020100..0+020120
125+0+00f8 0+001c 0+0048 FDE cie=0+00b4 pc=0+020100..0+020120
134126 DW_CFA_advance_loc: 0 to 0+020100
135127 DW_CFA_advance_loc: 0 to 0+020100
136128 DW_CFA_advance_loc: 0 to 0+020100
@@ -139,7 +131,7 @@ Contents of the \.eh_frame section:
139131 DW_CFA_advance_loc: 0 to 0+020100
140132 DW_CFA_advance_loc: 0 to 0+020100
141133
142-0+0120 0+001c 0+0000 CIE
134+0+0118 0+001c 0+0000 CIE
143135 Version: 1
144136 Augmentation: "zP"
145137 Code alignment factor: 1
@@ -148,7 +140,7 @@ Contents of the \.eh_frame section:
148140 Augmentation data: 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
149141
150142
151-0+0140 0+001c 0+0024 FDE cie=0+0120 pc=0+020120..0+020130
143+0+0138 0+001c 0+0024 FDE cie=0+0118 pc=0+020120..0+020130
152144 DW_CFA_advance_loc: 0 to 0+020120
153145 DW_CFA_advance_loc: 0 to 0+020120
154146 DW_CFA_advance_loc: 0 to 0+020120
@@ -157,7 +149,7 @@ Contents of the \.eh_frame section:
157149 DW_CFA_advance_loc: 0 to 0+020120
158150 DW_CFA_advance_loc: 0 to 0+020120
159151
160-0+0160 0+001c 0+0044 FDE cie=0+0120 pc=0+020130..0+020150
152+0+0158 0+001c 0+0044 FDE cie=0+0118 pc=0+020130..0+020150
161153 DW_CFA_advance_loc: 0 to 0+020130
162154 DW_CFA_advance_loc: 0 to 0+020130
163155 DW_CFA_advance_loc: 0 to 0+020130
@@ -166,7 +158,7 @@ Contents of the \.eh_frame section:
166158 DW_CFA_advance_loc: 0 to 0+020130
167159 DW_CFA_advance_loc: 0 to 0+020130
168160
169-0+0180 0+001c 0+0000 CIE
161+0+0178 0+001c 0+0000 CIE
170162 Version: 1
171163 Augmentation: "zPR"
172164 Code alignment factor: 1
@@ -180,7 +172,7 @@ Contents of the \.eh_frame section:
180172 DW_CFA_advance_loc: 0 to 0+0000
181173 DW_CFA_advance_loc: 0 to 0+0000
182174
183-0+01a0 0+001c 0+0024 FDE cie=0+0180 pc=0+020150..0+020160
175+0+0198 0+001c 0+0024 FDE cie=0+0178 pc=0+020150..0+020160
184176 DW_CFA_advance_loc: 0 to 0+020150
185177 DW_CFA_advance_loc: 0 to 0+020150
186178 DW_CFA_advance_loc: 0 to 0+020150
@@ -191,7 +183,7 @@ Contents of the \.eh_frame section:
191183
192184 # FDE for .discard removed
193185 # zPR2 removed
194-0+01c0 0+001c 0+0044 FDE cie=0+0180 pc=0+020160..0+020190
186+0+01b8 0+001c 0+0044 FDE cie=0+0178 pc=0+020160..0+020190
195187 DW_CFA_advance_loc: 0 to 0+020160
196188 DW_CFA_advance_loc: 0 to 0+020160
197189 DW_CFA_advance_loc: 0 to 0+020160
@@ -200,7 +192,7 @@ Contents of the \.eh_frame section:
200192 DW_CFA_advance_loc: 0 to 0+020160
201193 DW_CFA_advance_loc: 0 to 0+020160
202194
203-0+01e0 0+001c 0+0064 FDE cie=0+0180 pc=0+020190..0+0201d0
195+0+01d8 0+001c 0+0064 FDE cie=0+0178 pc=0+020190..0+0201d0
204196 DW_CFA_advance_loc: 0 to 0+020190
205197 DW_CFA_advance_loc: 0 to 0+020190
206198 DW_CFA_advance_loc: 0 to 0+020190
@@ -209,7 +201,7 @@ Contents of the \.eh_frame section:
209201 DW_CFA_advance_loc: 0 to 0+020190
210202 DW_CFA_advance_loc: 0 to 0+020190
211203
212-0+0200 0+001c 0+0204 FDE cie=0+0000 pc=0+0201d0..0+0201e0
204+0+01f8 0+001c 0+01fc FDE cie=0+0000 pc=0+0201d0..0+0201e0
213205 DW_CFA_nop
214206 DW_CFA_nop
215207 DW_CFA_nop
@@ -219,7 +211,7 @@ Contents of the \.eh_frame section:
219211 DW_CFA_nop
220212
221213 # basic1 removed, followed by repeat of above
222-0+0220 0+001c 0+0224 FDE cie=0+0000 pc=0+0201e0..0+0201f0
214+0+0218 0+001c 0+021c FDE cie=0+0000 pc=0+0201e0..0+0201f0
223215 DW_CFA_nop
224216 DW_CFA_nop
225217 DW_CFA_nop
@@ -228,7 +220,7 @@ Contents of the \.eh_frame section:
228220 DW_CFA_nop
229221 DW_CFA_nop
230222
231-0+0240 0+001c 0+0244 FDE cie=0+0000 pc=0+0201f0..0+020210
223+0+0238 0+001c 0+023c FDE cie=0+0000 pc=0+0201f0..0+020210
232224 DW_CFA_nop
233225 DW_CFA_nop
234226 DW_CFA_nop
@@ -237,7 +229,7 @@ Contents of the \.eh_frame section:
237229 DW_CFA_nop
238230 DW_CFA_nop
239231
240-0+0260 0+001c 0+0264 FDE cie=0+0000 pc=0+020210..0+020240
232+0+0258 0+001c 0+025c FDE cie=0+0000 pc=0+020210..0+020240
241233 DW_CFA_nop
242234 DW_CFA_nop
243235 DW_CFA_nop
@@ -246,7 +238,7 @@ Contents of the \.eh_frame section:
246238 DW_CFA_nop
247239 DW_CFA_nop
248240
249-0+0280 0+001c 0+0284 FDE cie=0+0000 pc=0+020240..0+020280
241+0+0278 0+001c 0+027c FDE cie=0+0000 pc=0+020240..0+020280
250242 DW_CFA_nop
251243 DW_CFA_nop
252244 DW_CFA_nop
@@ -255,7 +247,7 @@ Contents of the \.eh_frame section:
255247 DW_CFA_nop
256248 DW_CFA_nop
257249
258-0+02a0 0+001c 0+02a4 FDE cie=0+0000 pc=0+020280..0+0202d0
250+0+0298 0+001c 0+029c FDE cie=0+0000 pc=0+020280..0+0202d0
259251 DW_CFA_nop
260252 DW_CFA_nop
261253 DW_CFA_nop
@@ -264,7 +256,7 @@ Contents of the \.eh_frame section:
264256 DW_CFA_nop
265257 DW_CFA_nop
266258
267-0+02c0 0+001c 0+020c FDE cie=0+00b8 pc=0+0202d0..0+0202e0
259+0+02b8 0+001c 0+0208 FDE cie=0+00b4 pc=0+0202d0..0+0202e0
268260 DW_CFA_advance_loc: 0 to 0+0202d0
269261 DW_CFA_advance_loc: 0 to 0+0202d0
270262 DW_CFA_advance_loc: 0 to 0+0202d0
@@ -273,7 +265,7 @@ Contents of the \.eh_frame section:
273265 DW_CFA_advance_loc: 0 to 0+0202d0
274266 DW_CFA_advance_loc: 0 to 0+0202d0
275267
276-0+02e0 0+001c 0+022c FDE cie=0+00b8 pc=0+0202e0..0+020300
268+0+02d8 0+001c 0+0228 FDE cie=0+00b4 pc=0+0202e0..0+020300
277269 DW_CFA_advance_loc: 0 to 0+0202e0
278270 DW_CFA_advance_loc: 0 to 0+0202e0
279271 DW_CFA_advance_loc: 0 to 0+0202e0
@@ -282,7 +274,7 @@ Contents of the \.eh_frame section:
282274 DW_CFA_advance_loc: 0 to 0+0202e0
283275 DW_CFA_advance_loc: 0 to 0+0202e0
284276
285-0+0300 0+001c 0+01e4 FDE cie=0+0120 pc=0+020300..0+020310
277+0+02f8 0+001c 0+01e4 FDE cie=0+0118 pc=0+020300..0+020310
286278 DW_CFA_advance_loc: 0 to 0+020300
287279 DW_CFA_advance_loc: 0 to 0+020300
288280 DW_CFA_advance_loc: 0 to 0+020300
@@ -291,7 +283,7 @@ Contents of the \.eh_frame section:
291283 DW_CFA_advance_loc: 0 to 0+020300
292284 DW_CFA_advance_loc: 0 to 0+020300
293285
294-0+0320 0+001c 0+0204 FDE cie=0+0120 pc=0+020310..0+020330
286+0+0318 0+001c 0+0204 FDE cie=0+0118 pc=0+020310..0+020330
295287 DW_CFA_advance_loc: 0 to 0+020310
296288 DW_CFA_advance_loc: 0 to 0+020310
297289 DW_CFA_advance_loc: 0 to 0+020310
@@ -300,7 +292,7 @@ Contents of the \.eh_frame section:
300292 DW_CFA_advance_loc: 0 to 0+020310
301293 DW_CFA_advance_loc: 0 to 0+020310
302294
303-0+0340 0+001c 0+01c4 FDE cie=0+0180 pc=0+020330..0+020340
295+0+0338 0+001c 0+01c4 FDE cie=0+0178 pc=0+020330..0+020340
304296 DW_CFA_advance_loc: 0 to 0+020330
305297 DW_CFA_advance_loc: 0 to 0+020330
306298 DW_CFA_advance_loc: 0 to 0+020330
@@ -309,7 +301,7 @@ Contents of the \.eh_frame section:
309301 DW_CFA_advance_loc: 0 to 0+020330
310302 DW_CFA_advance_loc: 0 to 0+020330
311303
312-0+0360 0+001c 0+01e4 FDE cie=0+0180 pc=0+020340..0+020370
304+0+0358 0+001c 0+01e4 FDE cie=0+0178 pc=0+020340..0+020370
313305 DW_CFA_advance_loc: 0 to 0+020340
314306 DW_CFA_advance_loc: 0 to 0+020340
315307 DW_CFA_advance_loc: 0 to 0+020340
@@ -318,7 +310,7 @@ Contents of the \.eh_frame section:
318310 DW_CFA_advance_loc: 0 to 0+020340
319311 DW_CFA_advance_loc: 0 to 0+020340
320312
321-0+0380 0+001c 0+0204 FDE cie=0+0180 pc=0+020370..0+0203b0
313+0+0378 0+001c 0+0204 FDE cie=0+0178 pc=0+020370..0+0203b0
322314 DW_CFA_advance_loc: 0 to 0+020370
323315 DW_CFA_advance_loc: 0 to 0+020370
324316 DW_CFA_advance_loc: 0 to 0+020370
@@ -327,11 +319,7 @@ Contents of the \.eh_frame section:
327319 DW_CFA_advance_loc: 0 to 0+020370
328320 DW_CFA_advance_loc: 0 to 0+020370
329321
330-0+03a0 0+001c 0+03a4 FDE cie=0+0000 pc=0+0203b0..0+0203c0
331- DW_CFA_nop
332- DW_CFA_nop
333- DW_CFA_nop
334- DW_CFA_nop
322+0+0398 0+0018 0+039c FDE cie=0+0000 pc=0+0203b0..0+0203c0
335323 DW_CFA_nop
336324 DW_CFA_nop
337325 DW_CFA_nop
--- a/ld/testsuite/ld-mips-elf/eh-frame2-n64.d
+++ b/ld/testsuite/ld-mips-elf/eh-frame2-n64.d
@@ -12,25 +12,25 @@ Relocation section '\.rel\.dyn' .*:
1212 *Type2: R_MIPS_NONE *
1313 *Type3: R_MIPS_NONE *
1414 # Initial PCs for the FDEs attached to CIE 0x118
15-0+00030140 [0-9a-f]+ R_MIPS_REL32 *
15+0+00030138 [0-9a-f]+ R_MIPS_REL32 *
1616 *Type2: R_MIPS_64 *
1717 *Type3: R_MIPS_NONE *
18-0+00030160 [0-9a-f]+ R_MIPS_REL32 *
18+0+00030158 [0-9a-f]+ R_MIPS_REL32 *
1919 *Type2: R_MIPS_64 *
2020 *Type3: R_MIPS_NONE *
21-0+00030300 [0-9a-f]+ R_MIPS_REL32 *
21+0+000302f0 [0-9a-f]+ R_MIPS_REL32 *
2222 *Type2: R_MIPS_64 *
2323 *Type3: R_MIPS_NONE *
24-0+00030320 [0-9a-f]+ R_MIPS_REL32 *
24+0+00030310 [0-9a-f]+ R_MIPS_REL32 *
2525 *Type2: R_MIPS_64 *
2626 *Type3: R_MIPS_NONE *
27-0+000300cb [0-9a-f]+ R_MIPS_REL32 0+000 foo
27+0+000300c7 [0-9a-f]+ R_MIPS_REL32 0+000 foo
2828 *Type2: R_MIPS_64 *
2929 *Type3: R_MIPS_NONE *
30-0+00030130 [0-9a-f]+ R_MIPS_REL32 0+000 foo
30+0+00030128 [0-9a-f]+ R_MIPS_REL32 0+000 foo
3131 *Type2: R_MIPS_64 *
3232 *Type3: R_MIPS_NONE *
33-0+0003018a [0-9a-f]+ R_MIPS_REL32 0+000 foo
33+0+0003017e [0-9a-f]+ R_MIPS_REL32 0+000 foo
3434 *Type2: R_MIPS_64 *
3535 *Type3: R_MIPS_NONE *
3636 Contents of the \.eh_frame section:
@@ -90,16 +90,12 @@ Contents of the \.eh_frame section:
9090 DW_CFA_nop
9191
9292 # basic4 removed
93-0+0098 0+001c 0+009c FDE cie=0+0000 pc=0+0200a0..0+0200f0
94- DW_CFA_nop
95- DW_CFA_nop
96- DW_CFA_nop
97- DW_CFA_nop
93+0+0098 0+0018 0+009c FDE cie=0+0000 pc=0+0200a0..0+0200f0
9894 DW_CFA_nop
9995 DW_CFA_nop
10096 DW_CFA_nop
10197
102-0+00b8 0+001c 0+0000 CIE
98+0+00b4 0+0018 0+0000 CIE
10399 Version: 1
104100 Augmentation: "zRP"
105101 Code alignment factor: 1
@@ -108,12 +104,8 @@ Contents of the \.eh_frame section:
108104 Augmentation data: 1c 00 00 00 00 00 00 00 00 00
109105
110106 DW_CFA_nop
111- DW_CFA_nop
112- DW_CFA_nop
113- DW_CFA_nop
114- DW_CFA_nop
115107
116-0+00d8 0+001c 0+0024 FDE cie=0+00b8 pc=0+0200f0..0+020100
108+0+00d0 0+001c 0+0020 FDE cie=0+00b4 pc=0+0200f0..0+020100
117109 DW_CFA_nop
118110 DW_CFA_nop
119111 DW_CFA_nop
@@ -122,7 +114,7 @@ Contents of the \.eh_frame section:
122114 DW_CFA_nop
123115 DW_CFA_nop
124116
125-0+00f8 0+001c 0+0044 FDE cie=0+00b8 pc=0+020100..0+020120
117+0+00f0 0+001c 0+0040 FDE cie=0+00b4 pc=0+020100..0+020120
126118 DW_CFA_nop
127119 DW_CFA_nop
128120 DW_CFA_nop
@@ -131,7 +123,7 @@ Contents of the \.eh_frame section:
131123 DW_CFA_nop
132124 DW_CFA_nop
133125
134-0+0118 0+001c 0+0000 CIE
126+0+0110 0+001c 0+0000 CIE
135127 Version: 1
136128 Augmentation: "zP"
137129 Code alignment factor: 1
@@ -140,7 +132,7 @@ Contents of the \.eh_frame section:
140132 Augmentation data: 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
141133
142134
143-0+0138 0+001c 0+0024 FDE cie=0+0118 pc=0+020120..0+020130
135+0+0130 0+001c 0+0024 FDE cie=0+0110 pc=0+020120..0+020130
144136 DW_CFA_nop
145137 DW_CFA_nop
146138 DW_CFA_nop
@@ -149,16 +141,12 @@ Contents of the \.eh_frame section:
149141 DW_CFA_nop
150142 DW_CFA_nop
151143
152-0+0158 0+001c 0+0044 FDE cie=0+0118 pc=0+020130..0+020150
153- DW_CFA_nop
154- DW_CFA_nop
155- DW_CFA_nop
156- DW_CFA_nop
144+0+0150 0+0018 0+0044 FDE cie=0+0110 pc=0+020130..0+020150
157145 DW_CFA_nop
158146 DW_CFA_nop
159147 DW_CFA_nop
160148
161-0+0178 0+001c 0+0000 CIE
149+0+016c 0+0018 0+0000 CIE
162150 Version: 1
163151 Augmentation: "zPR"
164152 Code alignment factor: 1
@@ -167,12 +155,8 @@ Contents of the \.eh_frame section:
167155 Augmentation data: 00 00 00 00 00 00 00 00 00 1c
168156
169157 DW_CFA_nop
170- DW_CFA_nop
171- DW_CFA_nop
172- DW_CFA_nop
173- DW_CFA_nop
174158
175-0+0198 0+001c 0+0024 FDE cie=0+0178 pc=0+020150..0+020160
159+0+0188 0+001c 0+0020 FDE cie=0+016c pc=0+020150..0+020160
176160 DW_CFA_nop
177161 DW_CFA_nop
178162 DW_CFA_nop
@@ -183,7 +167,7 @@ Contents of the \.eh_frame section:
183167
184168 # FDE for .discard removed
185169 # zPR2 removed
186-0+01b8 0+001c 0+0044 FDE cie=0+0178 pc=0+020160..0+020190
170+0+01a8 0+001c 0+0040 FDE cie=0+016c pc=0+020160..0+020190
187171 DW_CFA_nop
188172 DW_CFA_nop
189173 DW_CFA_nop
@@ -192,7 +176,7 @@ Contents of the \.eh_frame section:
192176 DW_CFA_nop
193177 DW_CFA_nop
194178
195-0+01d8 0+001c 0+0064 FDE cie=0+0178 pc=0+020190..0+0201d0
179+0+01c8 0+001c 0+0060 FDE cie=0+016c pc=0+020190..0+0201d0
196180 DW_CFA_nop
197181 DW_CFA_nop
198182 DW_CFA_nop
@@ -201,7 +185,7 @@ Contents of the \.eh_frame section:
201185 DW_CFA_nop
202186 DW_CFA_nop
203187
204-0+01f8 0+001c 0+01fc FDE cie=0+0000 pc=0+0201d0..0+0201e0
188+0+01e8 0+001c 0+01ec FDE cie=0+0000 pc=0+0201d0..0+0201e0
205189 DW_CFA_nop
206190 DW_CFA_nop
207191 DW_CFA_nop
@@ -211,7 +195,7 @@ Contents of the \.eh_frame section:
211195 DW_CFA_nop
212196
213197 # basic1 removed, followed by repeat of above
214-0+0218 0+001c 0+021c FDE cie=0+0000 pc=0+0201e0..0+0201f0
198+0+0208 0+001c 0+020c FDE cie=0+0000 pc=0+0201e0..0+0201f0
215199 DW_CFA_nop
216200 DW_CFA_nop
217201 DW_CFA_nop
@@ -220,7 +204,7 @@ Contents of the \.eh_frame section:
220204 DW_CFA_nop
221205 DW_CFA_nop
222206
223-0+0238 0+001c 0+023c FDE cie=0+0000 pc=0+0201f0..0+020210
207+0+0228 0+001c 0+022c FDE cie=0+0000 pc=0+0201f0..0+020210
224208 DW_CFA_nop
225209 DW_CFA_nop
226210 DW_CFA_nop
@@ -229,7 +213,7 @@ Contents of the \.eh_frame section:
229213 DW_CFA_nop
230214 DW_CFA_nop
231215
232-0+0258 0+001c 0+025c FDE cie=0+0000 pc=0+020210..0+020240
216+0+0248 0+001c 0+024c FDE cie=0+0000 pc=0+020210..0+020240
233217 DW_CFA_nop
234218 DW_CFA_nop
235219 DW_CFA_nop
@@ -238,7 +222,7 @@ Contents of the \.eh_frame section:
238222 DW_CFA_nop
239223 DW_CFA_nop
240224
241-0+0278 0+001c 0+027c FDE cie=0+0000 pc=0+020240..0+020280
225+0+0268 0+001c 0+026c FDE cie=0+0000 pc=0+020240..0+020280
242226 DW_CFA_nop
243227 DW_CFA_nop
244228 DW_CFA_nop
@@ -247,7 +231,7 @@ Contents of the \.eh_frame section:
247231 DW_CFA_nop
248232 DW_CFA_nop
249233
250-0+0298 0+001c 0+029c FDE cie=0+0000 pc=0+020280..0+0202d0
234+0+0288 0+001c 0+028c FDE cie=0+0000 pc=0+020280..0+0202d0
251235 DW_CFA_nop
252236 DW_CFA_nop
253237 DW_CFA_nop
@@ -256,7 +240,7 @@ Contents of the \.eh_frame section:
256240 DW_CFA_nop
257241 DW_CFA_nop
258242
259-0+02b8 0+001c 0+0204 FDE cie=0+00b8 pc=0+0202d0..0+0202e0
243+0+02a8 0+001c 0+01f8 FDE cie=0+00b4 pc=0+0202d0..0+0202e0
260244 DW_CFA_nop
261245 DW_CFA_nop
262246 DW_CFA_nop
@@ -265,7 +249,7 @@ Contents of the \.eh_frame section:
265249 DW_CFA_nop
266250 DW_CFA_nop
267251
268-0+02d8 0+001c 0+0224 FDE cie=0+00b8 pc=0+0202e0..0+020300
252+0+02c8 0+001c 0+0218 FDE cie=0+00b4 pc=0+0202e0..0+020300
269253 DW_CFA_nop
270254 DW_CFA_nop
271255 DW_CFA_nop
@@ -274,7 +258,7 @@ Contents of the \.eh_frame section:
274258 DW_CFA_nop
275259 DW_CFA_nop
276260
277-0+02f8 0+001c 0+01e4 FDE cie=0+0118 pc=0+020300..0+020310
261+0+02e8 0+001c 0+01dc FDE cie=0+0110 pc=0+020300..0+020310
278262 DW_CFA_nop
279263 DW_CFA_nop
280264 DW_CFA_nop
@@ -283,7 +267,7 @@ Contents of the \.eh_frame section:
283267 DW_CFA_nop
284268 DW_CFA_nop
285269
286-0+0318 0+001c 0+0204 FDE cie=0+0118 pc=0+020310..0+020330
270+0+0308 0+001c 0+01fc FDE cie=0+0110 pc=0+020310..0+020330
287271 DW_CFA_nop
288272 DW_CFA_nop
289273 DW_CFA_nop
@@ -292,7 +276,7 @@ Contents of the \.eh_frame section:
292276 DW_CFA_nop
293277 DW_CFA_nop
294278
295-0+0338 0+001c 0+01c4 FDE cie=0+0178 pc=0+020330..0+020340
279+0+0328 0+001c 0+01c0 FDE cie=0+016c pc=0+020330..0+020340
296280 DW_CFA_nop
297281 DW_CFA_nop
298282 DW_CFA_nop
@@ -301,7 +285,7 @@ Contents of the \.eh_frame section:
301285 DW_CFA_nop
302286 DW_CFA_nop
303287
304-0+0358 0+001c 0+01e4 FDE cie=0+0178 pc=0+020340..0+020370
288+0+0348 0+001c 0+01e0 FDE cie=0+016c pc=0+020340..0+020370
305289 DW_CFA_nop
306290 DW_CFA_nop
307291 DW_CFA_nop
@@ -310,7 +294,7 @@ Contents of the \.eh_frame section:
310294 DW_CFA_nop
311295 DW_CFA_nop
312296
313-0+0378 0+001c 0+0204 FDE cie=0+0178 pc=0+020370..0+0203b0
297+0+0368 0+001c 0+0200 FDE cie=0+016c pc=0+020370..0+0203b0
314298 DW_CFA_nop
315299 DW_CFA_nop
316300 DW_CFA_nop
@@ -319,11 +303,7 @@ Contents of the \.eh_frame section:
319303 DW_CFA_nop
320304 DW_CFA_nop
321305
322-0+0398 0+001c 0+039c FDE cie=0+0000 pc=0+0203b0..0+0203c0
323- DW_CFA_nop
324- DW_CFA_nop
325- DW_CFA_nop
326- DW_CFA_nop
306+0+0388 0+0018 0+038c FDE cie=0+0000 pc=0+0203b0..0+0203c0
327307 DW_CFA_nop
328308 DW_CFA_nop
329309 DW_CFA_nop
--- a/ld/testsuite/ld-mips-elf/eh-frame3.d
+++ b/ld/testsuite/ld-mips-elf/eh-frame3.d
@@ -87,16 +87,12 @@ Contents of the \.eh_frame section:
8787 DW_CFA_nop
8888 DW_CFA_nop
8989
90-0+0128 0+001c 0+0044 FDE cie=0+00e8 pc=0+020130..0+020150
91- DW_CFA_nop
92- DW_CFA_nop
93- DW_CFA_nop
94- DW_CFA_nop
90+0+0128 0+0018 0+0044 FDE cie=0+00e8 pc=0+020130..0+020150
9591 DW_CFA_nop
9692 DW_CFA_nop
9793 DW_CFA_nop
9894
99-0+0148 0+001c 0+0000 CIE
95+0+0144 0+0018 0+0000 CIE
10096 Version: 1
10197 Augmentation: "zPR"
10298 Code alignment factor: 1
@@ -105,12 +101,8 @@ Contents of the \.eh_frame section:
105101 Augmentation data: 00 00 00 00 00 50 60 70 80 00
106102
107103 DW_CFA_nop
108- DW_CFA_nop
109- DW_CFA_nop
110- DW_CFA_nop
111- DW_CFA_nop
112104
113-0+0168 0+001c 0+0024 FDE cie=0+0148 pc=0+020150..0+020160
105+0+0160 0+001c 0+0020 FDE cie=0+0144 pc=0+020150..0+020160
114106 DW_CFA_nop
115107 DW_CFA_nop
116108 DW_CFA_nop
@@ -121,7 +113,7 @@ Contents of the \.eh_frame section:
121113
122114 # FDE for .discard removed
123115 # zPR2 removed
124-0+0188 0+001c 0+0044 FDE cie=0+0148 pc=0+020160..0+020190
116+0+0180 0+001c 0+0040 FDE cie=0+0144 pc=0+020160..0+020190
125117 DW_CFA_nop
126118 DW_CFA_nop
127119 DW_CFA_nop
@@ -130,7 +122,7 @@ Contents of the \.eh_frame section:
130122 DW_CFA_nop
131123 DW_CFA_nop
132124
133-0+01a8 0+001c 0+0064 FDE cie=0+0148 pc=0+020190..0+0201d0
125+0+01a0 0+001c 0+0060 FDE cie=0+0144 pc=0+020190..0+0201d0
134126 DW_CFA_nop
135127 DW_CFA_nop
136128 DW_CFA_nop
@@ -139,20 +131,20 @@ Contents of the \.eh_frame section:
139131 DW_CFA_nop
140132 DW_CFA_nop
141133
142-0+01c8 0+0014 0+01cc FDE cie=0+0000 pc=0+0201d0..0+0201e0
134+0+01c0 0+0014 0+01c4 FDE cie=0+0000 pc=0+0201d0..0+0201e0
143135
144136 # basic1 removed, followed by repeat of above
145-0+01e0 0+0014 0+01e4 FDE cie=0+0000 pc=0+0201e0..0+0201f0
137+0+01d8 0+0014 0+01dc FDE cie=0+0000 pc=0+0201e0..0+0201f0
146138
147-0+01f8 0+0014 0+01fc FDE cie=0+0000 pc=0+0201f0..0+020210
139+0+01f0 0+0014 0+01f4 FDE cie=0+0000 pc=0+0201f0..0+020210
148140
149-0+0210 0+0014 0+0214 FDE cie=0+0000 pc=0+020210..0+020240
141+0+0208 0+0014 0+020c FDE cie=0+0000 pc=0+020210..0+020240
150142
151-0+0228 0+0014 0+022c FDE cie=0+0000 pc=0+020240..0+020280
143+0+0220 0+0014 0+0224 FDE cie=0+0000 pc=0+020240..0+020280
152144
153-0+0240 0+0014 0+0244 FDE cie=0+0000 pc=0+020280..0+0202d0
145+0+0238 0+0014 0+023c FDE cie=0+0000 pc=0+020280..0+0202d0
154146
155-0+0258 0+001c 0+01d4 FDE cie=0+0088 pc=0+0202d0..0+0202e0
147+0+0250 0+001c 0+01cc FDE cie=0+0088 pc=0+0202d0..0+0202e0
156148 DW_CFA_nop
157149 DW_CFA_nop
158150 DW_CFA_nop
@@ -161,7 +153,7 @@ Contents of the \.eh_frame section:
161153 DW_CFA_nop
162154 DW_CFA_nop
163155
164-0+0278 0+001c 0+01f4 FDE cie=0+0088 pc=0+0202e0..0+020300
156+0+0270 0+001c 0+01ec FDE cie=0+0088 pc=0+0202e0..0+020300
165157 DW_CFA_nop
166158 DW_CFA_nop
167159 DW_CFA_nop
@@ -170,7 +162,7 @@ Contents of the \.eh_frame section:
170162 DW_CFA_nop
171163 DW_CFA_nop
172164
173-0+0298 0+001c 0+01b4 FDE cie=0+00e8 pc=0+020300..0+020310
165+0+0290 0+001c 0+01ac FDE cie=0+00e8 pc=0+020300..0+020310
174166 DW_CFA_nop
175167 DW_CFA_nop
176168 DW_CFA_nop
@@ -179,7 +171,7 @@ Contents of the \.eh_frame section:
179171 DW_CFA_nop
180172 DW_CFA_nop
181173
182-0+02b8 0+001c 0+01d4 FDE cie=0+00e8 pc=0+020310..0+020330
174+0+02b0 0+001c 0+01cc FDE cie=0+00e8 pc=0+020310..0+020330
183175 DW_CFA_nop
184176 DW_CFA_nop
185177 DW_CFA_nop
@@ -188,7 +180,7 @@ Contents of the \.eh_frame section:
188180 DW_CFA_nop
189181 DW_CFA_nop
190182
191-0+02d8 0+001c 0+0194 FDE cie=0+0148 pc=0+020330..0+020340
183+0+02d0 0+001c 0+0190 FDE cie=0+0144 pc=0+020330..0+020340
192184 DW_CFA_nop
193185 DW_CFA_nop
194186 DW_CFA_nop
@@ -199,7 +191,7 @@ Contents of the \.eh_frame section:
199191
200192 # FDE for .discard removed
201193 # zPR2 removed
202-0+02f8 0+001c 0+01b4 FDE cie=0+0148 pc=0+020340..0+020370
194+0+02f0 0+001c 0+01b0 FDE cie=0+0144 pc=0+020340..0+020370
203195 DW_CFA_nop
204196 DW_CFA_nop
205197 DW_CFA_nop
@@ -208,7 +200,7 @@ Contents of the \.eh_frame section:
208200 DW_CFA_nop
209201 DW_CFA_nop
210202
211-0+0318 0+001c 0+01d4 FDE cie=0+0148 pc=0+020370..0+0203b0
203+0+0310 0+001c 0+01d0 FDE cie=0+0144 pc=0+020370..0+0203b0
212204 DW_CFA_nop
213205 DW_CFA_nop
214206 DW_CFA_nop
@@ -217,4 +209,4 @@ Contents of the \.eh_frame section:
217209 DW_CFA_nop
218210 DW_CFA_nop
219211
220-0+0338 0+0014 0+033c FDE cie=0+0000 pc=0+0203b0..0+0203c0
212+0+0330 0+0014 0+0334 FDE cie=0+0000 pc=0+0203b0..0+0203c0
--- a/ld/testsuite/ld-x86-64/pr20830a.d
+++ b/ld/testsuite/ld-x86-64/pr20830a.d
@@ -41,11 +41,7 @@ Contents of the .eh_frame section:
4141 DW_CFA_nop
4242 DW_CFA_nop
4343
44-0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238
45- DW_CFA_nop
46- DW_CFA_nop
47- DW_CFA_nop
48- DW_CFA_nop
44+0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238
4945 DW_CFA_nop
5046 DW_CFA_nop
5147 DW_CFA_nop
--- a/ld/testsuite/ld-x86-64/pr21038a.d
+++ b/ld/testsuite/ld-x86-64/pr21038a.d
@@ -40,11 +40,7 @@ Contents of the .eh_frame section:
4040 DW_CFA_nop
4141 DW_CFA_nop
4242
43-0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238
44- DW_CFA_nop
45- DW_CFA_nop
46- DW_CFA_nop
47- DW_CFA_nop
43+0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238
4844 DW_CFA_nop
4945 DW_CFA_nop
5046 DW_CFA_nop
--- a/ld/testsuite/ld-x86-64/pr21038b.d
+++ b/ld/testsuite/ld-x86-64/pr21038b.d
@@ -40,11 +40,7 @@ Contents of the .eh_frame section:
4040 DW_CFA_nop
4141 DW_CFA_nop
4242
43-0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000240..0000000000000248
44- DW_CFA_nop
45- DW_CFA_nop
46- DW_CFA_nop
47- DW_CFA_nop
43+0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000240..0000000000000248
4844 DW_CFA_nop
4945 DW_CFA_nop
5046 DW_CFA_nop
--- a/ld/testsuite/ld-x86-64/pr21038c.d
+++ b/ld/testsuite/ld-x86-64/pr21038c.d
@@ -49,11 +49,7 @@ Contents of the .eh_frame section:
4949 DW_CFA_nop
5050 DW_CFA_nop
5151
52-0+70 0000000000000014 00000074 FDE cie=00000000 pc=0000000000000280..0000000000000288
53- DW_CFA_nop
54- DW_CFA_nop
55- DW_CFA_nop
56- DW_CFA_nop
52+0+70 0000000000000010 00000074 FDE cie=00000000 pc=0000000000000280..0000000000000288
5753 DW_CFA_nop
5854 DW_CFA_nop
5955 DW_CFA_nop