aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog28
-rw-r--r--bfd/elfxx-mips.c135
-rw-r--r--ld/testsuite/ChangeLog15
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n32.d136
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d140
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d196
-rw-r--r--ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d199
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-pic-1.dd36
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-pic-1.gd53
-rw-r--r--ld/testsuite/ld-mips-elf/multi-got-no-shared.d6
10 files changed, 481 insertions, 463 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d6ffa69..5778bd7e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,33 @@
2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
+ * elfxx-mips.c (mips_got_entry): Adjust commentary.
+ (mips_elf_create_local_got_entry): If given a symbol, check that it
+ has been assigned to the local part of the GOT.
+ (mips_elf_count_got_symbols): Take the bfd_link_info as argument
+ instead of the master GOT. Put all locally-binding symbols in
+ the local area.
+ (mips_elf_make_got_per_bfd): Use global_got_area to decide whether
+ a symbol lives in the local or global area.
+ (mips_elf_local_relocation_p): Remove check_forced argument and
+ retain only the !check_forced behavior.
+ (mips_elf_calculate_relocation): Adjust call accordingly.
+ Use global_got_area to decide whether an output relocation
+ should be local or global. Explicitly decay R_MIPS_GOT_PAGE
+ into R_MIPS_GOT_DISP where appropriate. Fix selection of
+ local vs. global semantics for R_MIPS*_26. Remove redundant
+ reevaluation of what is stored in was_local_p.
+ (mips_elf_create_dynamic_relocation): Use global_got_area to decide
+ whether the relocation should be against a global or local symbol.
+ (mips_elf_lay_out_got): Update the GOT traversal after the above
+ change to mips_elf_count_got_symbols.
+ (mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p.
+ (_bfd_mips_elf_relocate_section): Likewise.
+ (_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide
+ whether the symbol has a global got entry.
+ (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+
+2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
+
* elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols
to the global GOT on VxWorks.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 6b30f11..804a7d4 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -53,7 +53,7 @@
(abfd == NULL)
(2) SYMBOL + OFFSET addresses, where SYMBOL is local to an input bfd
(abfd != NULL, symndx >= 0)
- (3) global and forced-local symbols
+ (3) SYMBOL addresses, where SYMBOL is not local to an input bfd
(abfd != NULL, symndx == -1)
Type (3) entries are treated differently for different types of GOT.
@@ -94,8 +94,9 @@ struct mips_got_entry
that should be added to the symbol value. */
bfd_vma addend;
/* If abfd != NULL && symndx == -1, the hash table entry
- corresponding to a global symbol in the got (or, local, if
- h->forced_local). */
+ corresponding to symbol in the GOT. The symbol's entry
+ is in the local area if h->global_got_area is GGA_NONE,
+ otherwise it is in the global area. */
struct mips_elf_link_hash_entry *h;
} d;
@@ -3202,8 +3203,8 @@ mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
}
/* Find a local GOT entry for an R_MIPS*_GOT16 relocation against VALUE.
- EXTERNAL is true if the relocation was against a global symbol
- that has been forced local. */
+ EXTERNAL is true if the relocation was originally against a global
+ symbol that binds locally. */
static bfd_vma
mips_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
@@ -3281,11 +3282,9 @@ mips_elf_create_local_got_entry (bfd *abfd, struct bfd_link_info *info,
BFD_ASSERT (g != NULL);
}
- /* We might have a symbol, H, if it has been forced local. Use the
- global entry then. It doesn't matter whether an entry is local
- or global for TLS, since the dynamic linker does not
- automatically relocate TLS GOT entries. */
- BFD_ASSERT (h == NULL || h->root.forced_local);
+ /* This function shouldn't be called for symbols that live in the global
+ area of the GOT. */
+ BFD_ASSERT (h == NULL || h->global_got_area == GGA_NONE);
if (TLS_RELOC_P (r_type))
{
struct mips_got_entry *p;
@@ -3850,21 +3849,33 @@ mips_elf_resolve_final_got_entries (struct mips_got_info *g)
}
/* A mips_elf_link_hash_traverse callback for which DATA points
- to a mips_got_info. Count the number of type (3) entries. */
+ to the link_info structure. Count the number of type (3) entries
+ in the master GOT. */
static int
mips_elf_count_got_symbols (struct mips_elf_link_hash_entry *h, void *data)
{
+ struct bfd_link_info *info;
struct mips_got_info *g;
- g = (struct mips_got_info *) data;
+ info = (struct bfd_link_info *) data;
+ g = mips_elf_hash_table (info)->got_info;
if (h->global_got_area != GGA_NONE)
{
- if (h->root.forced_local || h->root.dynindx == -1)
+ /* Make a final decision about whether the symbol belongs in the
+ local or global GOT. Symbols that bind locally can (and in the
+ case of forced-local symbols, must) live in the local GOT.
+ Those that are aren't in the dynamic symbol table must also
+ live in the local GOT.
+
+ Note that the former condition does not always imply the
+ latter: symbols do not bind locally if they are completely
+ undefined. We'll report undefined symbols later if appropriate. */
+ if (h->root.dynindx == -1 || SYMBOL_REFERENCES_LOCAL (info, &h->root))
{
- /* We no longer need this entry if it was only used for
- relocations; those relocations will be against the
- null or section symbol instead of H. */
+ /* The symbol belongs in the local GOT. We no longer need this
+ entry if it was only used for relocations; those relocations
+ will be against the null or section symbol instead of H. */
if (h->global_got_area != GGA_RELOC_ONLY)
g->local_gotno++;
h->global_got_area = GGA_NONE;
@@ -4010,7 +4021,7 @@ mips_elf_make_got_per_bfd (void **entryp, void *p)
if (entry->tls_type & GOT_TLS_IE)
g->tls_gotno += 1;
}
- else if (entry->symndx >= 0 || entry->d.h->root.forced_local)
+ else if (entry->symndx >= 0 || entry->d.h->global_got_area == GGA_NONE)
++g->local_gotno;
else
++g->global_gotno;
@@ -4557,17 +4568,15 @@ mips_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
return NULL;
}
-/* Return whether a relocation is against a local symbol. */
+/* Return whether an input relocation is against a local symbol. */
static bfd_boolean
mips_elf_local_relocation_p (bfd *input_bfd,
const Elf_Internal_Rela *relocation,
- asection **local_sections,
- bfd_boolean check_forced)
+ asection **local_sections)
{
unsigned long r_symndx;
Elf_Internal_Shdr *symtab_hdr;
- struct mips_elf_link_hash_entry *h;
size_t extsymoff;
r_symndx = ELF_R_SYM (input_bfd, relocation->r_info);
@@ -4579,20 +4588,6 @@ mips_elf_local_relocation_p (bfd *input_bfd,
if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL)
return TRUE;
- if (check_forced)
- {
- /* Look up the hash table to check whether the symbol
- was forced local. */
- h = (struct mips_elf_link_hash_entry *)
- elf_sym_hashes (input_bfd) [r_symndx - extsymoff];
- /* Find the real hash-table entry for this symbol. */
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
- if (h->root.forced_local)
- return TRUE;
- }
-
return FALSE;
}
@@ -4900,7 +4895,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
used in the array of hash table entries. */
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
local_p = mips_elf_local_relocation_p (input_bfd, relocation,
- local_sections, FALSE);
+ local_sections);
was_local_p = local_p;
if (! elf_bad_symtab (input_bfd))
extsymoff = symtab_hdr->sh_info;
@@ -5134,8 +5129,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
|| ((r_type == R_MIPS_26 || r_type == R_MIPS_JALR)
&& target_is_16_bit_code_p));
- local_p = mips_elf_local_relocation_p (input_bfd, relocation,
- local_sections, TRUE);
+ local_p = h == NULL || SYMBOL_REFERENCES_LOCAL (info, &h->root);
gp0 = _bfd_get_gp_value (input_bfd);
gp = _bfd_get_gp_value (abfd);
@@ -5145,19 +5139,18 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
if (gnu_local_gp_p)
symbol = gp;
+ /* Global R_MIPS_GOT_PAGE relocations are equivalent to R_MIPS_GOT_DISP.
+ The addend is applied by the corresponding R_MIPS_GOT_OFST. */
+ if (r_type == R_MIPS_GOT_PAGE && !local_p)
+ {
+ r_type = R_MIPS_GOT_DISP;
+ addend = 0;
+ }
+
/* If we haven't already determined the GOT offset, oand we're going
to need it, get it now. */
switch (r_type)
{
- case R_MIPS_GOT_PAGE:
- case R_MIPS_GOT_OFST:
- /* We need to decay to GOT_DISP/addend if the symbol doesn't
- bind locally. */
- local_p = local_p || _bfd_elf_symbol_refs_local_p (&h->root, info, 1);
- if (local_p || r_type == R_MIPS_GOT_OFST)
- break;
- /* Fall through. */
-
case R_MIPS16_CALL16:
case R_MIPS16_GOT16:
case R_MIPS_CALL16:
@@ -5193,21 +5186,12 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
}
else
{
- /* GOT_PAGE may take a non-zero addend, that is ignored in a
- GOT_PAGE relocation that decays to GOT_DISP because the
- symbol turns out to be global. The addend is then added
- as GOT_OFST. */
- BFD_ASSERT (addend == 0 || r_type == R_MIPS_GOT_PAGE);
+ BFD_ASSERT (addend == 0);
g = mips_elf_global_got_index (dynobj, input_bfd,
&h->root, r_type, info);
if (h->tls_type == GOT_NORMAL
- && (! elf_hash_table(info)->dynamic_sections_created
- || (info->shared
- && (info->symbolic || h->root.forced_local)
- && h->root.def_regular)))
- /* This is a static link or a -Bsymbolic link. The
- symbol is defined locally, or was forced to be local.
- We must initialize this entry in the GOT. */
+ && !elf_hash_table (info)->dynamic_sections_created)
+ /* This is a static link. We must initialize the GOT entry. */
MIPS_ELF_PUT_WORD (dynobj, symbol, htab->sgot->contents + g);
}
}
@@ -5321,7 +5305,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
mips_elf_perform_relocation. So, we just fall through to the
R_MIPS_26 case here. */
case R_MIPS_26:
- if (local_p)
+ if (was_local_p)
value = ((addend | ((p + 4) & 0xf0000000)) + symbol) >> 2;
else
{
@@ -5447,12 +5431,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
R_MIPS*_GOT16; every relocation evaluates to "G". */
if (!htab->is_vxworks && local_p)
{
- bfd_boolean forced;
-
- forced = ! mips_elf_local_relocation_p (input_bfd, relocation,
- local_sections, FALSE);
value = mips_elf_got16_entry (abfd, input_bfd, info,
- symbol + addend, forced);
+ symbol + addend, !was_local_p);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
value
@@ -5467,7 +5447,6 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_TLS_GOTTPREL:
case R_MIPS_TLS_LDM:
case R_MIPS_GOT_DISP:
- got_disp:
value = g;
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -5502,11 +5481,6 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
case R_MIPS_GOT_PAGE:
- /* GOT_PAGE relocations that reference non-local symbols decay
- to GOT_DISP. The corresponding GOT_OFST relocation decays to
- 0. */
- if (! local_p)
- goto got_disp;
value = mips_elf_got_page (abfd, input_bfd, info, symbol + addend, NULL);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
@@ -5757,6 +5731,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
in the relocation. */
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
{
+ BFD_ASSERT (htab->is_vxworks || h->global_got_area != GGA_NONE);
indx = h->root.dynindx;
if (SGI_COMPAT (output_bfd))
defined_p = h->root.def_regular;
@@ -8463,7 +8438,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info)
return FALSE;
/* Count the number of GOT symbols. */
- mips_elf_link_hash_traverse (htab, mips_elf_count_got_symbols, g);
+ mips_elf_link_hash_traverse (htab, mips_elf_count_got_symbols, info);
/* Calculate the total loadable size of the output. That
will give us the maximum number of GOT_PAGE entries
@@ -8922,7 +8897,7 @@ mips_elf_adjust_addend (bfd *output_bfd, struct bfd_link_info *info,
Elf_Internal_Sym *sym;
asection *sec;
- if (mips_elf_local_relocation_p (input_bfd, rel, local_sections, FALSE))
+ if (mips_elf_local_relocation_p (input_bfd, rel, local_sections))
{
r_type = ELF_R_TYPE (output_bfd, rel->r_info);
if (r_type == R_MIPS16_GPREL
@@ -8992,7 +8967,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
r_symndx = ELF_R_SYM (input_bfd, rel->r_info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- if (mips_elf_local_relocation_p (input_bfd, rel, local_sections, FALSE))
+ if (mips_elf_local_relocation_p (input_bfd, rel, local_sections))
{
sec = local_sections[r_symndx];
h = NULL;
@@ -9057,7 +9032,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (hi16_reloc_p (r_type)
|| (got16_reloc_p (r_type)
&& mips_elf_local_relocation_p (input_bfd, rel,
- local_sections, FALSE)))
+ local_sections)))
{
if (!mips_elf_add_lo16_rel_addend (input_bfd, rel, relend,
contents, &addend))
@@ -9583,8 +9558,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
/* Run through the global symbol table, creating GOT entries for all
the symbols that need them. */
- if (g->global_gotsym != NULL
- && h->dynindx >= g->global_gotsym->dynindx)
+ if (hmips->global_got_area != GGA_NONE)
{
bfd_vma offset;
bfd_vma value;
@@ -9595,7 +9569,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
}
- if (g->next && h->dynindx != -1 && h->type != STT_TLS)
+ if (hmips->global_got_area != GGA_NONE && g->next && h->type != STT_TLS)
{
struct mips_got_entry e, *p;
bfd_vma entry;
@@ -9761,10 +9735,12 @@ _bfd_mips_vxworks_finish_dynamic_symbol (bfd *output_bfd,
asection *sgot;
struct mips_got_info *g;
struct mips_elf_link_hash_table *htab;
+ struct mips_elf_link_hash_entry *hmips;
htab = mips_elf_hash_table (info);
BFD_ASSERT (htab != NULL);
dynobj = elf_hash_table (info)->dynobj;
+ hmips = (struct mips_elf_link_hash_entry *) h;
if (h->plt.offset != (bfd_vma) -1)
{
@@ -9870,8 +9846,7 @@ _bfd_mips_vxworks_finish_dynamic_symbol (bfd *output_bfd,
BFD_ASSERT (g != NULL);
/* See if this symbol has an entry in the GOT. */
- if (g->global_gotsym != NULL
- && h->dynindx >= g->global_gotsym->dynindx)
+ if (hmips->global_got_area != GGA_NONE)
{
bfd_vma offset;
Elf_Internal_Rela outrel;
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 0c0729a..1f52f8c 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ld-mips-elf/elf-rel-got-n32.d: Swap two local GOT entries
+ and remove some duplication between the global and local GOT
+ entries. Adjust GP offsets accordingly.
+ * ld-mips-elf/elf-rel-got-n64-linux.d: Likewise.
+ * ld-mips-elf/elf-rel-xgot-n32.d: Reorder GOT entries and update
+ GP offsets accordingly.
+ * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
+ * ld-mips-elf/mips16-pic-1.gd: Move all global GOT entries to
+ the local GOT.
+ * ld-mips-elf/mips16-pic-1.dd: Update GP offsets accordingly.
+ * ld-mips-elf/multi-got-no-shared.d: Adjust GP setup for
+ smaller GOT sizes.
+
2010-09-18 Alan Modra <amodra@gmail.com>
* lib/ld-lib.exp (check_gc_sections_available): Fail more targets.
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
index 09332f3..a209aa5 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
@@ -16,97 +16,97 @@ Disassembly of section \.reginfo:
Disassembly of section \.text:
100000b0 <fn>:
-100000b0: 8f858064 lw a1,-32668\(gp\)
-100000b4: 8f858064 lw a1,-32668\(gp\)
+100000b0: 8f858018 lw a1,-32744\(gp\)
+100000b4: 8f858018 lw a1,-32744\(gp\)
100000b8: 24a5000c addiu a1,a1,12
-100000bc: 8f858064 lw a1,-32668\(gp\)
+100000bc: 8f858018 lw a1,-32744\(gp\)
100000c0: 3c010001 lui at,0x1
100000c4: 3421e240 ori at,at,0xe240
100000c8: 00a12821 addu a1,a1,at
-100000cc: 8f858064 lw a1,-32668\(gp\)
+100000cc: 8f858018 lw a1,-32744\(gp\)
100000d0: 00b12821 addu a1,a1,s1
-100000d4: 8f858064 lw a1,-32668\(gp\)
+100000d4: 8f858018 lw a1,-32744\(gp\)
100000d8: 24a5000c addiu a1,a1,12
100000dc: 00b12821 addu a1,a1,s1
-100000e0: 8f858064 lw a1,-32668\(gp\)
+100000e0: 8f858018 lw a1,-32744\(gp\)
100000e4: 3c010001 lui at,0x1
100000e8: 3421e240 ori at,at,0xe240
100000ec: 00a12821 addu a1,a1,at
100000f0: 00b12821 addu a1,a1,s1
-100000f4: 8f858018 lw a1,-32744\(gp\)
+100000f4: 8f85801c lw a1,-32740\(gp\)
100000f8: 8ca504fc lw a1,1276\(a1\)
-100000fc: 8f858018 lw a1,-32744\(gp\)
+100000fc: 8f85801c lw a1,-32740\(gp\)
10000100: 8ca50508 lw a1,1288\(a1\)
-10000104: 8f858018 lw a1,-32744\(gp\)
+10000104: 8f85801c lw a1,-32740\(gp\)
10000108: 00b12821 addu a1,a1,s1
1000010c: 8ca504fc lw a1,1276\(a1\)
-10000110: 8f858018 lw a1,-32744\(gp\)
+10000110: 8f85801c lw a1,-32740\(gp\)
10000114: 00b12821 addu a1,a1,s1
10000118: 8ca50508 lw a1,1288\(a1\)
-1000011c: 8f818018 lw at,-32744\(gp\)
+1000011c: 8f81801c lw at,-32740\(gp\)
10000120: 00250821 addu at,at,a1
10000124: 8c25051e lw a1,1310\(at\)
-10000128: 8f818018 lw at,-32744\(gp\)
+10000128: 8f81801c lw at,-32740\(gp\)
1000012c: 00250821 addu at,at,a1
10000130: ac250534 sw a1,1332\(at\)
-10000134: 8f818064 lw at,-32668\(gp\)
+10000134: 8f818018 lw at,-32744\(gp\)
10000138: 88250000 lwl a1,0\(at\)
1000013c: 98250003 lwr a1,3\(at\)
-10000140: 8f818064 lw at,-32668\(gp\)
+10000140: 8f818018 lw at,-32744\(gp\)
10000144: 2421000c addiu at,at,12
10000148: 88250000 lwl a1,0\(at\)
1000014c: 98250003 lwr a1,3\(at\)
-10000150: 8f818064 lw at,-32668\(gp\)
+10000150: 8f818018 lw at,-32744\(gp\)
10000154: 00310821 addu at,at,s1
10000158: 88250000 lwl a1,0\(at\)
1000015c: 98250003 lwr a1,3\(at\)
-10000160: 8f818064 lw at,-32668\(gp\)
+10000160: 8f818018 lw at,-32744\(gp\)
10000164: 2421000c addiu at,at,12
10000168: 00310821 addu at,at,s1
1000016c: 88250000 lwl a1,0\(at\)
10000170: 98250003 lwr a1,3\(at\)
-10000174: 8f818064 lw at,-32668\(gp\)
+10000174: 8f818018 lw at,-32744\(gp\)
10000178: 24210022 addiu at,at,34
1000017c: 00250821 addu at,at,a1
10000180: 88250000 lwl a1,0\(at\)
10000184: 98250003 lwr a1,3\(at\)
-10000188: 8f818064 lw at,-32668\(gp\)
+10000188: 8f818018 lw at,-32744\(gp\)
1000018c: 24210038 addiu at,at,56
10000190: 00250821 addu at,at,a1
10000194: a8250000 swl a1,0\(at\)
10000198: b8250003 swr a1,3\(at\)
-1000019c: 8f85801c lw a1,-32740\(gp\)
+1000019c: 8f858018 lw a1,-32744\(gp\)
100001a0: 8f858020 lw a1,-32736\(gp\)
100001a4: 8f858024 lw a1,-32732\(gp\)
-100001a8: 8f85801c lw a1,-32740\(gp\)
+100001a8: 8f858018 lw a1,-32744\(gp\)
100001ac: 00b12821 addu a1,a1,s1
100001b0: 8f858020 lw a1,-32736\(gp\)
100001b4: 00b12821 addu a1,a1,s1
100001b8: 8f858024 lw a1,-32732\(gp\)
100001bc: 00b12821 addu a1,a1,s1
-100001c0: 8f858018 lw a1,-32744\(gp\)
+100001c0: 8f85801c lw a1,-32740\(gp\)
100001c4: 8ca504fc lw a1,1276\(a1\)
-100001c8: 8f858018 lw a1,-32744\(gp\)
+100001c8: 8f85801c lw a1,-32740\(gp\)
100001cc: 8ca50508 lw a1,1288\(a1\)
-100001d0: 8f858018 lw a1,-32744\(gp\)
+100001d0: 8f85801c lw a1,-32740\(gp\)
100001d4: 00b12821 addu a1,a1,s1
100001d8: 8ca504fc lw a1,1276\(a1\)
-100001dc: 8f858018 lw a1,-32744\(gp\)
+100001dc: 8f85801c lw a1,-32740\(gp\)
100001e0: 00b12821 addu a1,a1,s1
100001e4: 8ca50508 lw a1,1288\(a1\)
-100001e8: 8f818018 lw at,-32744\(gp\)
+100001e8: 8f81801c lw at,-32740\(gp\)
100001ec: 00250821 addu at,at,a1
100001f0: 8c25051e lw a1,1310\(at\)
-100001f4: 8f818018 lw at,-32744\(gp\)
+100001f4: 8f81801c lw at,-32740\(gp\)
100001f8: 00250821 addu at,at,a1
100001fc: ac250534 sw a1,1332\(at\)
-10000200: 8f81801c lw at,-32740\(gp\)
+10000200: 8f818018 lw at,-32744\(gp\)
10000204: 88250000 lwl a1,0\(at\)
10000208: 98250003 lwr a1,3\(at\)
1000020c: 8f818020 lw at,-32736\(gp\)
10000210: 88250000 lwl a1,0\(at\)
10000214: 98250003 lwr a1,3\(at\)
-10000218: 8f81801c lw at,-32740\(gp\)
+10000218: 8f818018 lw at,-32744\(gp\)
1000021c: 00310821 addu at,at,s1
10000220: 88250000 lwl a1,0\(at\)
10000224: 98250003 lwr a1,3\(at\)
@@ -122,71 +122,71 @@ Disassembly of section \.text:
1000024c: 00250821 addu at,at,a1
10000250: a8250000 swl a1,0\(at\)
10000254: b8250003 swr a1,3\(at\)
-10000258: 8f85805c lw a1,-32676\(gp\)
+10000258: 8f858030 lw a1,-32720\(gp\)
1000025c: 8f858030 lw a1,-32720\(gp\)
-10000260: 8f99805c lw t9,-32676\(gp\)
+10000260: 8f998030 lw t9,-32720\(gp\)
10000264: 8f998030 lw t9,-32720\(gp\)
-10000268: 8f99805c lw t9,-32676\(gp\)
+10000268: 8f998030 lw t9,-32720\(gp\)
1000026c: 0411ff90 bal 100000b0 <fn>
10000270: 00000000 nop
10000274: 8f998030 lw t9,-32720\(gp\)
10000278: 0411ff8d bal 100000b0 <fn>
1000027c: 00000000 nop
-10000280: 8f858068 lw a1,-32664\(gp\)
-10000284: 8f858068 lw a1,-32664\(gp\)
+10000280: 8f858034 lw a1,-32716\(gp\)
+10000284: 8f858034 lw a1,-32716\(gp\)
10000288: 24a5000c addiu a1,a1,12
-1000028c: 8f858068 lw a1,-32664\(gp\)
+1000028c: 8f858034 lw a1,-32716\(gp\)
10000290: 3c010001 lui at,0x1
10000294: 3421e240 ori at,at,0xe240
10000298: 00a12821 addu a1,a1,at
-1000029c: 8f858068 lw a1,-32664\(gp\)
+1000029c: 8f858034 lw a1,-32716\(gp\)
100002a0: 00b12821 addu a1,a1,s1
-100002a4: 8f858068 lw a1,-32664\(gp\)
+100002a4: 8f858034 lw a1,-32716\(gp\)
100002a8: 24a5000c addiu a1,a1,12
100002ac: 00b12821 addu a1,a1,s1
-100002b0: 8f858068 lw a1,-32664\(gp\)
+100002b0: 8f858034 lw a1,-32716\(gp\)
100002b4: 3c010001 lui at,0x1
100002b8: 3421e240 ori at,at,0xe240
100002bc: 00a12821 addu a1,a1,at
100002c0: 00b12821 addu a1,a1,s1
-100002c4: 8f858018 lw a1,-32744\(gp\)
+100002c4: 8f85801c lw a1,-32740\(gp\)
100002c8: 8ca50574 lw a1,1396\(a1\)
-100002cc: 8f858018 lw a1,-32744\(gp\)
+100002cc: 8f85801c lw a1,-32740\(gp\)
100002d0: 8ca50580 lw a1,1408\(a1\)
-100002d4: 8f858018 lw a1,-32744\(gp\)
+100002d4: 8f85801c lw a1,-32740\(gp\)
100002d8: 00b12821 addu a1,a1,s1
100002dc: 8ca50574 lw a1,1396\(a1\)
-100002e0: 8f858018 lw a1,-32744\(gp\)
+100002e0: 8f85801c lw a1,-32740\(gp\)
100002e4: 00b12821 addu a1,a1,s1
100002e8: 8ca50580 lw a1,1408\(a1\)
-100002ec: 8f818018 lw at,-32744\(gp\)
+100002ec: 8f81801c lw at,-32740\(gp\)
100002f0: 00250821 addu at,at,a1
100002f4: 8c250596 lw a1,1430\(at\)
-100002f8: 8f818018 lw at,-32744\(gp\)
+100002f8: 8f81801c lw at,-32740\(gp\)
100002fc: 00250821 addu at,at,a1
10000300: ac2505ac sw a1,1452\(at\)
-10000304: 8f818068 lw at,-32664\(gp\)
+10000304: 8f818034 lw at,-32716\(gp\)
10000308: 88250000 lwl a1,0\(at\)
1000030c: 98250003 lwr a1,3\(at\)
-10000310: 8f818068 lw at,-32664\(gp\)
+10000310: 8f818034 lw at,-32716\(gp\)
10000314: 2421000c addiu at,at,12
10000318: 88250000 lwl a1,0\(at\)
1000031c: 98250003 lwr a1,3\(at\)
-10000320: 8f818068 lw at,-32664\(gp\)
+10000320: 8f818034 lw at,-32716\(gp\)
10000324: 00310821 addu at,at,s1
10000328: 88250000 lwl a1,0\(at\)
1000032c: 98250003 lwr a1,3\(at\)
-10000330: 8f818068 lw at,-32664\(gp\)
+10000330: 8f818034 lw at,-32716\(gp\)
10000334: 2421000c addiu at,at,12
10000338: 00310821 addu at,at,s1
1000033c: 88250000 lwl a1,0\(at\)
10000340: 98250003 lwr a1,3\(at\)
-10000344: 8f818068 lw at,-32664\(gp\)
+10000344: 8f818034 lw at,-32716\(gp\)
10000348: 24210022 addiu at,at,34
1000034c: 00250821 addu at,at,a1
10000350: 88250000 lwl a1,0\(at\)
10000354: 98250003 lwr a1,3\(at\)
-10000358: 8f818068 lw at,-32664\(gp\)
+10000358: 8f818034 lw at,-32716\(gp\)
1000035c: 24210038 addiu at,at,56
10000360: 00250821 addu at,at,a1
10000364: a8250000 swl a1,0\(at\)
@@ -200,20 +200,20 @@ Disassembly of section \.text:
10000384: 00b12821 addu a1,a1,s1
10000388: 8f85803c lw a1,-32708\(gp\)
1000038c: 00b12821 addu a1,a1,s1
-10000390: 8f858018 lw a1,-32744\(gp\)
+10000390: 8f85801c lw a1,-32740\(gp\)
10000394: 8ca50574 lw a1,1396\(a1\)
-10000398: 8f858018 lw a1,-32744\(gp\)
+10000398: 8f85801c lw a1,-32740\(gp\)
1000039c: 8ca50580 lw a1,1408\(a1\)
-100003a0: 8f858018 lw a1,-32744\(gp\)
+100003a0: 8f85801c lw a1,-32740\(gp\)
100003a4: 00b12821 addu a1,a1,s1
100003a8: 8ca50574 lw a1,1396\(a1\)
-100003ac: 8f858018 lw a1,-32744\(gp\)
+100003ac: 8f85801c lw a1,-32740\(gp\)
100003b0: 00b12821 addu a1,a1,s1
100003b4: 8ca50580 lw a1,1408\(a1\)
-100003b8: 8f818018 lw at,-32744\(gp\)
+100003b8: 8f81801c lw at,-32740\(gp\)
100003bc: 00250821 addu at,at,a1
100003c0: 8c250596 lw a1,1430\(at\)
-100003c4: 8f818018 lw at,-32744\(gp\)
+100003c4: 8f81801c lw at,-32740\(gp\)
100003c8: 00250821 addu at,at,a1
100003cc: ac2505ac sw a1,1452\(at\)
100003d0: 8f818034 lw at,-32716\(gp\)
@@ -238,36 +238,36 @@ Disassembly of section \.text:
1000041c: 00250821 addu at,at,a1
10000420: a8250000 swl a1,0\(at\)
10000424: b8250003 swr a1,3\(at\)
-10000428: 8f858060 lw a1,-32672\(gp\)
+10000428: 8f858048 lw a1,-32696\(gp\)
1000042c: 8f858048 lw a1,-32696\(gp\)
-10000430: 8f998060 lw t9,-32672\(gp\)
+10000430: 8f998048 lw t9,-32696\(gp\)
10000434: 8f998048 lw t9,-32696\(gp\)
-10000438: 8f998060 lw t9,-32672\(gp\)
+10000438: 8f998048 lw t9,-32696\(gp\)
1000043c: 0411001d bal 100004b4 <fn2>
10000440: 00000000 nop
10000444: 8f998048 lw t9,-32696\(gp\)
10000448: 0411001a bal 100004b4 <fn2>
1000044c: 00000000 nop
10000450: 1000ff17 b 100000b0 <fn>
-10000454: 8f858064 lw a1,-32668\(gp\)
-10000458: 8f858018 lw a1,-32744\(gp\)
+10000454: 8f858018 lw a1,-32744\(gp\)
+10000458: 8f85801c lw a1,-32740\(gp\)
1000045c: 10000015 b 100004b4 <fn2>
10000460: 8ca50574 lw a1,1396\(a1\)
10000464: 1000ff12 b 100000b0 <fn>
-10000468: 8f85801c lw a1,-32740\(gp\)
+10000468: 8f858018 lw a1,-32744\(gp\)
1000046c: 8f858038 lw a1,-32712\(gp\)
10000470: 10000010 b 100004b4 <fn2>
10000474: 00000000 nop
10000478: 8f858024 lw a1,-32732\(gp\)
1000047c: 1000ff0c b 100000b0 <fn>
10000480: 00000000 nop
-10000484: 8f858018 lw a1,-32744\(gp\)
+10000484: 8f85801c lw a1,-32740\(gp\)
10000488: 1000000a b 100004b4 <fn2>
1000048c: 8ca50574 lw a1,1396\(a1\)
-10000490: 8f858018 lw a1,-32744\(gp\)
+10000490: 8f85801c lw a1,-32740\(gp\)
10000494: 1000ff06 b 100000b0 <fn>
10000498: 8ca50508 lw a1,1288\(a1\)
-1000049c: 8f818018 lw at,-32744\(gp\)
+1000049c: 8f81801c lw at,-32740\(gp\)
100004a0: 00250821 addu at,at,a1
100004a4: 10000003 b 100004b4 <fn2>
100004a8: 8c250596 lw a1,1430\(at\)
@@ -293,8 +293,8 @@ Disassembly of section \.got:
100105b0 <_GLOBAL_OFFSET_TABLE_>:
100105b0: 00000000 .*
100105b4: 80000000 .*
-100105b8: 10010000 .*
-100105bc: 100104fc .*
+100105b8: 100104fc .*
+100105bc: 10010000 .*
100105c0: 10010508 .*
100105c4: 1002e73c .*
100105c8: 1001051e .*
@@ -308,8 +308,4 @@ Disassembly of section \.got:
100105e8: 100004b4 .*
100105ec: 00000000 .*
\.\.\.
-100105fc: 100000b0 .*
-10010600: 100004b4 .*
-10010604: 100104fc .*
-10010608: 10010574 .*
#pass
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d b/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
index e0e4882..b5a7ab8 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
@@ -18,97 +18,97 @@ Disassembly of section \.MIPS\.options:
Disassembly of section \.text:
00000001200000e0 <fn>:
- 1200000e0: df8580b8 ld a1,-32584\(gp\)
- 1200000e4: df8580b8 ld a1,-32584\(gp\)
+ 1200000e0: df858020 ld a1,-32736\(gp\)
+ 1200000e4: df858020 ld a1,-32736\(gp\)
1200000e8: 64a5000c daddiu a1,a1,12
- 1200000ec: df8580b8 ld a1,-32584\(gp\)
+ 1200000ec: df858020 ld a1,-32736\(gp\)
1200000f0: 3c010001 lui at,0x1
1200000f4: 3421e240 ori at,at,0xe240
1200000f8: 00a1282d daddu a1,a1,at
- 1200000fc: df8580b8 ld a1,-32584\(gp\)
+ 1200000fc: df858020 ld a1,-32736\(gp\)
120000100: 00b1282d daddu a1,a1,s1
- 120000104: df8580b8 ld a1,-32584\(gp\)
+ 120000104: df858020 ld a1,-32736\(gp\)
120000108: 64a5000c daddiu a1,a1,12
12000010c: 00b1282d daddu a1,a1,s1
- 120000110: df8580b8 ld a1,-32584\(gp\)
+ 120000110: df858020 ld a1,-32736\(gp\)
120000114: 3c010001 lui at,0x1
120000118: 3421e240 ori at,at,0xe240
12000011c: 00a1282d daddu a1,a1,at
120000120: 00b1282d daddu a1,a1,s1
- 120000124: df858020 ld a1,-32736\(gp\)
+ 120000124: df858028 ld a1,-32728\(gp\)
120000128: dca5052c ld a1,1324\(a1\)
- 12000012c: df858020 ld a1,-32736\(gp\)
+ 12000012c: df858028 ld a1,-32728\(gp\)
120000130: dca50538 ld a1,1336\(a1\)
- 120000134: df858020 ld a1,-32736\(gp\)
+ 120000134: df858028 ld a1,-32728\(gp\)
120000138: 00b1282d daddu a1,a1,s1
12000013c: dca5052c ld a1,1324\(a1\)
- 120000140: df858020 ld a1,-32736\(gp\)
+ 120000140: df858028 ld a1,-32728\(gp\)
120000144: 00b1282d daddu a1,a1,s1
120000148: dca50538 ld a1,1336\(a1\)
- 12000014c: df818020 ld at,-32736\(gp\)
+ 12000014c: df818028 ld at,-32728\(gp\)
120000150: 0025082d daddu at,at,a1
120000154: dc25054e ld a1,1358\(at\)
- 120000158: df818020 ld at,-32736\(gp\)
+ 120000158: df818028 ld at,-32728\(gp\)
12000015c: 0025082d daddu at,at,a1
120000160: fc250564 sd a1,1380\(at\)
- 120000164: df8180b8 ld at,-32584\(gp\)
+ 120000164: df818020 ld at,-32736\(gp\)
120000168: 88250000 lwl a1,0\(at\)
12000016c: 98250003 lwr a1,3\(at\)
- 120000170: df8180b8 ld at,-32584\(gp\)
+ 120000170: df818020 ld at,-32736\(gp\)
120000174: 6421000c daddiu at,at,12
120000178: 88250000 lwl a1,0\(at\)
12000017c: 98250003 lwr a1,3\(at\)
- 120000180: df8180b8 ld at,-32584\(gp\)
+ 120000180: df818020 ld at,-32736\(gp\)
120000184: 0031082d daddu at,at,s1
120000188: 88250000 lwl a1,0\(at\)
12000018c: 98250003 lwr a1,3\(at\)
- 120000190: df8180b8 ld at,-32584\(gp\)
+ 120000190: df818020 ld at,-32736\(gp\)
120000194: 6421000c daddiu at,at,12
120000198: 0031082d daddu at,at,s1
12000019c: 88250000 lwl a1,0\(at\)
1200001a0: 98250003 lwr a1,3\(at\)
- 1200001a4: df8180b8 ld at,-32584\(gp\)
+ 1200001a4: df818020 ld at,-32736\(gp\)
1200001a8: 64210022 daddiu at,at,34
1200001ac: 0025082d daddu at,at,a1
1200001b0: 88250000 lwl a1,0\(at\)
1200001b4: 98250003 lwr a1,3\(at\)
- 1200001b8: df8180b8 ld at,-32584\(gp\)
+ 1200001b8: df818020 ld at,-32736\(gp\)
1200001bc: 64210038 daddiu at,at,56
1200001c0: 0025082d daddu at,at,a1
1200001c4: a8250000 swl a1,0\(at\)
1200001c8: b8250003 swr a1,3\(at\)
- 1200001cc: df858028 ld a1,-32728\(gp\)
+ 1200001cc: df858020 ld a1,-32736\(gp\)
1200001d0: df858030 ld a1,-32720\(gp\)
1200001d4: df858038 ld a1,-32712\(gp\)
- 1200001d8: df858028 ld a1,-32728\(gp\)
+ 1200001d8: df858020 ld a1,-32736\(gp\)
1200001dc: 00b1282d daddu a1,a1,s1
1200001e0: df858030 ld a1,-32720\(gp\)
1200001e4: 00b1282d daddu a1,a1,s1
1200001e8: df858038 ld a1,-32712\(gp\)
1200001ec: 00b1282d daddu a1,a1,s1
- 1200001f0: df858020 ld a1,-32736\(gp\)
+ 1200001f0: df858028 ld a1,-32728\(gp\)
1200001f4: dca5052c ld a1,1324\(a1\)
- 1200001f8: df858020 ld a1,-32736\(gp\)
+ 1200001f8: df858028 ld a1,-32728\(gp\)
1200001fc: dca50538 ld a1,1336\(a1\)
- 120000200: df858020 ld a1,-32736\(gp\)
+ 120000200: df858028 ld a1,-32728\(gp\)
120000204: 00b1282d daddu a1,a1,s1
120000208: dca5052c ld a1,1324\(a1\)
- 12000020c: df858020 ld a1,-32736\(gp\)
+ 12000020c: df858028 ld a1,-32728\(gp\)
120000210: 00b1282d daddu a1,a1,s1
120000214: dca50538 ld a1,1336\(a1\)
- 120000218: df818020 ld at,-32736\(gp\)
+ 120000218: df818028 ld at,-32728\(gp\)
12000021c: 0025082d daddu at,at,a1
120000220: dc25054e ld a1,1358\(at\)
- 120000224: df818020 ld at,-32736\(gp\)
+ 120000224: df818028 ld at,-32728\(gp\)
120000228: 0025082d daddu at,at,a1
12000022c: fc250564 sd a1,1380\(at\)
- 120000230: df818028 ld at,-32728\(gp\)
+ 120000230: df818020 ld at,-32736\(gp\)
120000234: 88250000 lwl a1,0\(at\)
120000238: 98250003 lwr a1,3\(at\)
12000023c: df818030 ld at,-32720\(gp\)
120000240: 88250000 lwl a1,0\(at\)
120000244: 98250003 lwr a1,3\(at\)
- 120000248: df818028 ld at,-32728\(gp\)
+ 120000248: df818020 ld at,-32736\(gp\)
12000024c: 0031082d daddu at,at,s1
120000250: 88250000 lwl a1,0\(at\)
120000254: 98250003 lwr a1,3\(at\)
@@ -124,71 +124,71 @@ Disassembly of section \.text:
12000027c: 0025082d daddu at,at,a1
120000280: a8250000 swl a1,0\(at\)
120000284: b8250003 swr a1,3\(at\)
- 120000288: df8580a8 ld a1,-32600\(gp\)
+ 120000288: df858050 ld a1,-32688\(gp\)
12000028c: df858050 ld a1,-32688\(gp\)
- 120000290: df9980a8 ld t9,-32600\(gp\)
+ 120000290: df998050 ld t9,-32688\(gp\)
120000294: df998050 ld t9,-32688\(gp\)
- 120000298: df9980a8 ld t9,-32600\(gp\)
+ 120000298: df998050 ld t9,-32688\(gp\)
12000029c: 0411ff90 bal 1200000e0 <fn>
1200002a0: 00000000 nop
1200002a4: df998050 ld t9,-32688\(gp\)
1200002a8: 0411ff8d bal 1200000e0 <fn>
1200002ac: 00000000 nop
- 1200002b0: df8580c0 ld a1,-32576\(gp\)
- 1200002b4: df8580c0 ld a1,-32576\(gp\)
+ 1200002b0: df858058 ld a1,-32680\(gp\)
+ 1200002b4: df858058 ld a1,-32680\(gp\)
1200002b8: 64a5000c daddiu a1,a1,12
- 1200002bc: df8580c0 ld a1,-32576\(gp\)
+ 1200002bc: df858058 ld a1,-32680\(gp\)
1200002c0: 3c010001 lui at,0x1
1200002c4: 3421e240 ori at,at,0xe240
1200002c8: 00a1282d daddu a1,a1,at
- 1200002cc: df8580c0 ld a1,-32576\(gp\)
+ 1200002cc: df858058 ld a1,-32680\(gp\)
1200002d0: 00b1282d daddu a1,a1,s1
- 1200002d4: df8580c0 ld a1,-32576\(gp\)
+ 1200002d4: df858058 ld a1,-32680\(gp\)
1200002d8: 64a5000c daddiu a1,a1,12
1200002dc: 00b1282d daddu a1,a1,s1
- 1200002e0: df8580c0 ld a1,-32576\(gp\)
+ 1200002e0: df858058 ld a1,-32680\(gp\)
1200002e4: 3c010001 lui at,0x1
1200002e8: 3421e240 ori at,at,0xe240
1200002ec: 00a1282d daddu a1,a1,at
1200002f0: 00b1282d daddu a1,a1,s1
- 1200002f4: df858020 ld a1,-32736\(gp\)
+ 1200002f4: df858028 ld a1,-32728\(gp\)
1200002f8: dca505a4 ld a1,1444\(a1\)
- 1200002fc: df858020 ld a1,-32736\(gp\)
+ 1200002fc: df858028 ld a1,-32728\(gp\)
120000300: dca505b0 ld a1,1456\(a1\)
- 120000304: df858020 ld a1,-32736\(gp\)
+ 120000304: df858028 ld a1,-32728\(gp\)
120000308: 00b1282d daddu a1,a1,s1
12000030c: dca505a4 ld a1,1444\(a1\)
- 120000310: df858020 ld a1,-32736\(gp\)
+ 120000310: df858028 ld a1,-32728\(gp\)
120000314: 00b1282d daddu a1,a1,s1
120000318: dca505b0 ld a1,1456\(a1\)
- 12000031c: df818020 ld at,-32736\(gp\)
+ 12000031c: df818028 ld at,-32728\(gp\)
120000320: 0025082d daddu at,at,a1
120000324: dc2505c6 ld a1,1478\(at\)
- 120000328: df818020 ld at,-32736\(gp\)
+ 120000328: df818028 ld at,-32728\(gp\)
12000032c: 0025082d daddu at,at,a1
120000330: fc2505dc sd a1,1500\(at\)
- 120000334: df8180c0 ld at,-32576\(gp\)
+ 120000334: df818058 ld at,-32680\(gp\)
120000338: 88250000 lwl a1,0\(at\)
12000033c: 98250003 lwr a1,3\(at\)
- 120000340: df8180c0 ld at,-32576\(gp\)
+ 120000340: df818058 ld at,-32680\(gp\)
120000344: 6421000c daddiu at,at,12
120000348: 88250000 lwl a1,0\(at\)
12000034c: 98250003 lwr a1,3\(at\)
- 120000350: df8180c0 ld at,-32576\(gp\)
+ 120000350: df818058 ld at,-32680\(gp\)
120000354: 0031082d daddu at,at,s1
120000358: 88250000 lwl a1,0\(at\)
12000035c: 98250003 lwr a1,3\(at\)
- 120000360: df8180c0 ld at,-32576\(gp\)
+ 120000360: df818058 ld at,-32680\(gp\)
120000364: 6421000c daddiu at,at,12
120000368: 0031082d daddu at,at,s1
12000036c: 88250000 lwl a1,0\(at\)
120000370: 98250003 lwr a1,3\(at\)
- 120000374: df8180c0 ld at,-32576\(gp\)
+ 120000374: df818058 ld at,-32680\(gp\)
120000378: 64210022 daddiu at,at,34
12000037c: 0025082d daddu at,at,a1
120000380: 88250000 lwl a1,0\(at\)
120000384: 98250003 lwr a1,3\(at\)
- 120000388: df8180c0 ld at,-32576\(gp\)
+ 120000388: df818058 ld at,-32680\(gp\)
12000038c: 64210038 daddiu at,at,56
120000390: 0025082d daddu at,at,a1
120000394: a8250000 swl a1,0\(at\)
@@ -202,20 +202,20 @@ Disassembly of section \.text:
1200003b4: 00b1282d daddu a1,a1,s1
1200003b8: df858068 ld a1,-32664\(gp\)
1200003bc: 00b1282d daddu a1,a1,s1
- 1200003c0: df858020 ld a1,-32736\(gp\)
+ 1200003c0: df858028 ld a1,-32728\(gp\)
1200003c4: dca505a4 ld a1,1444\(a1\)
- 1200003c8: df858020 ld a1,-32736\(gp\)
+ 1200003c8: df858028 ld a1,-32728\(gp\)
1200003cc: dca505b0 ld a1,1456\(a1\)
- 1200003d0: df858020 ld a1,-32736\(gp\)
+ 1200003d0: df858028 ld a1,-32728\(gp\)
1200003d4: 00b1282d daddu a1,a1,s1
1200003d8: dca505a4 ld a1,1444\(a1\)
- 1200003dc: df858020 ld a1,-32736\(gp\)
+ 1200003dc: df858028 ld a1,-32728\(gp\)
1200003e0: 00b1282d daddu a1,a1,s1
1200003e4: dca505b0 ld a1,1456\(a1\)
- 1200003e8: df818020 ld at,-32736\(gp\)
+ 1200003e8: df818028 ld at,-32728\(gp\)
1200003ec: 0025082d daddu at,at,a1
1200003f0: dc2505c6 ld a1,1478\(at\)
- 1200003f4: df818020 ld at,-32736\(gp\)
+ 1200003f4: df818028 ld at,-32728\(gp\)
1200003f8: 0025082d daddu at,at,a1
1200003fc: fc2505dc sd a1,1500\(at\)
120000400: df818058 ld at,-32680\(gp\)
@@ -240,36 +240,36 @@ Disassembly of section \.text:
12000044c: 0025082d daddu at,at,a1
120000450: a8250000 swl a1,0\(at\)
120000454: b8250003 swr a1,3\(at\)
- 120000458: df8580b0 ld a1,-32592\(gp\)
+ 120000458: df858080 ld a1,-32640\(gp\)
12000045c: df858080 ld a1,-32640\(gp\)
- 120000460: df9980b0 ld t9,-32592\(gp\)
+ 120000460: df998080 ld t9,-32640\(gp\)
120000464: df998080 ld t9,-32640\(gp\)
- 120000468: df9980b0 ld t9,-32592\(gp\)
+ 120000468: df998080 ld t9,-32640\(gp\)
12000046c: 0411001d bal 1200004e4 <fn2>
120000470: 00000000 nop
120000474: df998080 ld t9,-32640\(gp\)
120000478: 0411001a bal 1200004e4 <fn2>
12000047c: 00000000 nop
120000480: 1000ff17 b 1200000e0 <fn>
- 120000484: df8580b8 ld a1,-32584\(gp\)
- 120000488: df858020 ld a1,-32736\(gp\)
+ 120000484: df858020 ld a1,-32736\(gp\)
+ 120000488: df858028 ld a1,-32728\(gp\)
12000048c: 10000015 b 1200004e4 <fn2>
120000490: dca505a4 ld a1,1444\(a1\)
120000494: 1000ff12 b 1200000e0 <fn>
- 120000498: df858028 ld a1,-32728\(gp\)
+ 120000498: df858020 ld a1,-32736\(gp\)
12000049c: df858060 ld a1,-32672\(gp\)
1200004a0: 10000010 b 1200004e4 <fn2>
1200004a4: 00000000 nop
1200004a8: df858038 ld a1,-32712\(gp\)
1200004ac: 1000ff0c b 1200000e0 <fn>
1200004b0: 00000000 nop
- 1200004b4: df858020 ld a1,-32736\(gp\)
+ 1200004b4: df858028 ld a1,-32728\(gp\)
1200004b8: 1000000a b 1200004e4 <fn2>
1200004bc: dca505a4 ld a1,1444\(a1\)
- 1200004c0: df858020 ld a1,-32736\(gp\)
+ 1200004c0: df858028 ld a1,-32728\(gp\)
1200004c4: 1000ff06 b 1200000e0 <fn>
1200004c8: dca50538 ld a1,1336\(a1\)
- 1200004cc: df818020 ld at,-32736\(gp\)
+ 1200004cc: df818028 ld at,-32728\(gp\)
1200004d0: 0025082d daddu at,at,a1
1200004d4: 10000003 b 1200004e4 <fn2>
1200004d8: dc2505c6 ld a1,1478\(at\)
@@ -297,9 +297,9 @@ Disassembly of section \.got:
1200105e8: 80000000 .*
1200105ec: 00000000 .*
1200105f0: 00000001 .*
- 1200105f4: 20010000 .*
+ 1200105f4: 2001052c .*
1200105f8: 00000001 .*
- 1200105fc: 2001052c .*
+ 1200105fc: 20010000 .*
120010600: 00000001 .*
120010604: 20010538 .*
120010608: 00000001 .*
@@ -323,12 +323,4 @@ Disassembly of section \.got:
120010650: 00000001 .*
120010654: 200004e4 .*
\.\.\.
- 120010678: 00000001 .*
- 12001067c: 200000e0 .*
- 120010680: 00000001 .*
- 120010684: 200004e4 .*
- 120010688: 00000001 .*
- 12001068c: 2001052c .*
- 120010690: 00000001 .*
- 120010694: 200105a4 .*
#pass
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
index ce17a5f..d1980b9 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
@@ -18,327 +18,327 @@ Disassembly of section \.text:
100000b0 <fn>:
100000b0: 3c050000 lui a1,0x0
100000b4: 00bc2821 addu a1,a1,gp
-100000b8: 8ca58034 lw a1,-32716\(a1\)
+100000b8: 8ca58018 lw a1,-32744\(a1\)
100000bc: 3c050000 lui a1,0x0
100000c0: 00bc2821 addu a1,a1,gp
-100000c4: 8ca58034 lw a1,-32716\(a1\)
+100000c4: 8ca58018 lw a1,-32744\(a1\)
100000c8: 24a5000c addiu a1,a1,12
100000cc: 3c050000 lui a1,0x0
100000d0: 00bc2821 addu a1,a1,gp
-100000d4: 8ca58034 lw a1,-32716\(a1\)
+100000d4: 8ca58018 lw a1,-32744\(a1\)
100000d8: 3c010001 lui at,0x1
100000dc: 3421e240 ori at,at,0xe240
100000e0: 00a12821 addu a1,a1,at
100000e4: 3c050000 lui a1,0x0
100000e8: 00bc2821 addu a1,a1,gp
-100000ec: 8ca58034 lw a1,-32716\(a1\)
+100000ec: 8ca58018 lw a1,-32744\(a1\)
100000f0: 00b12821 addu a1,a1,s1
100000f4: 3c050000 lui a1,0x0
100000f8: 00bc2821 addu a1,a1,gp
-100000fc: 8ca58034 lw a1,-32716\(a1\)
+100000fc: 8ca58018 lw a1,-32744\(a1\)
10000100: 24a5000c addiu a1,a1,12
10000104: 00b12821 addu a1,a1,s1
10000108: 3c050000 lui a1,0x0
1000010c: 00bc2821 addu a1,a1,gp
-10000110: 8ca58034 lw a1,-32716\(a1\)
+10000110: 8ca58018 lw a1,-32744\(a1\)
10000114: 3c010001 lui at,0x1
10000118: 3421e240 ori at,at,0xe240
1000011c: 00a12821 addu a1,a1,at
10000120: 00b12821 addu a1,a1,s1
10000124: 3c050000 lui a1,0x0
10000128: 00bc2821 addu a1,a1,gp
-1000012c: 8ca58034 lw a1,-32716\(a1\)
+1000012c: 8ca58018 lw a1,-32744\(a1\)
10000130: 8ca50000 lw a1,0\(a1\)
10000134: 3c050000 lui a1,0x0
10000138: 00bc2821 addu a1,a1,gp
-1000013c: 8ca58034 lw a1,-32716\(a1\)
+1000013c: 8ca58018 lw a1,-32744\(a1\)
10000140: 8ca5000c lw a1,12\(a1\)
10000144: 3c050000 lui a1,0x0
10000148: 00bc2821 addu a1,a1,gp
-1000014c: 8ca58034 lw a1,-32716\(a1\)
+1000014c: 8ca58018 lw a1,-32744\(a1\)
10000150: 00b12821 addu a1,a1,s1
10000154: 8ca50000 lw a1,0\(a1\)
10000158: 3c050000 lui a1,0x0
1000015c: 00bc2821 addu a1,a1,gp
-10000160: 8ca58034 lw a1,-32716\(a1\)
+10000160: 8ca58018 lw a1,-32744\(a1\)
10000164: 00b12821 addu a1,a1,s1
10000168: 8ca5000c lw a1,12\(a1\)
1000016c: 3c010000 lui at,0x0
10000170: 003c0821 addu at,at,gp
-10000174: 8c218034 lw at,-32716\(at\)
+10000174: 8c218018 lw at,-32744\(at\)
10000178: 00250821 addu at,at,a1
1000017c: 8c250022 lw a1,34\(at\)
10000180: 3c010000 lui at,0x0
10000184: 003c0821 addu at,at,gp
-10000188: 8c218034 lw at,-32716\(at\)
+10000188: 8c218018 lw at,-32744\(at\)
1000018c: 00250821 addu at,at,a1
10000190: ac250038 sw a1,56\(at\)
10000194: 3c010000 lui at,0x0
10000198: 003c0821 addu at,at,gp
-1000019c: 8c218034 lw at,-32716\(at\)
+1000019c: 8c218018 lw at,-32744\(at\)
100001a0: 88250000 lwl a1,0\(at\)
100001a4: 98250003 lwr a1,3\(at\)
100001a8: 3c010000 lui at,0x0
100001ac: 003c0821 addu at,at,gp
-100001b0: 8c218034 lw at,-32716\(at\)
+100001b0: 8c218018 lw at,-32744\(at\)
100001b4: 2421000c addiu at,at,12
100001b8: 88250000 lwl a1,0\(at\)
100001bc: 98250003 lwr a1,3\(at\)
100001c0: 3c010000 lui at,0x0
100001c4: 003c0821 addu at,at,gp
-100001c8: 8c218034 lw at,-32716\(at\)
+100001c8: 8c218018 lw at,-32744\(at\)
100001cc: 00310821 addu at,at,s1
100001d0: 88250000 lwl a1,0\(at\)
100001d4: 98250003 lwr a1,3\(at\)
100001d8: 3c010000 lui at,0x0
100001dc: 003c0821 addu at,at,gp
-100001e0: 8c218034 lw at,-32716\(at\)
+100001e0: 8c218018 lw at,-32744\(at\)
100001e4: 2421000c addiu at,at,12
100001e8: 00310821 addu at,at,s1
100001ec: 88250000 lwl a1,0\(at\)
100001f0: 98250003 lwr a1,3\(at\)
100001f4: 3c010000 lui at,0x0
100001f8: 003c0821 addu at,at,gp
-100001fc: 8c218034 lw at,-32716\(at\)
+100001fc: 8c218018 lw at,-32744\(at\)
10000200: 24210022 addiu at,at,34
10000204: 00250821 addu at,at,a1
10000208: 88250000 lwl a1,0\(at\)
1000020c: 98250003 lwr a1,3\(at\)
10000210: 3c010000 lui at,0x0
10000214: 003c0821 addu at,at,gp
-10000218: 8c218034 lw at,-32716\(at\)
+10000218: 8c218018 lw at,-32744\(at\)
1000021c: 24210038 addiu at,at,56
10000220: 00250821 addu at,at,a1
10000224: a8250000 swl a1,0\(at\)
10000228: b8250003 swr a1,3\(at\)
-1000022c: 8f858018 lw a1,-32744\(gp\)
+1000022c: 8f85801c lw a1,-32740\(gp\)
10000230: 24a506ec addiu a1,a1,1772
-10000234: 8f858018 lw a1,-32744\(gp\)
+10000234: 8f85801c lw a1,-32740\(gp\)
10000238: 24a506f8 addiu a1,a1,1784
-1000023c: 8f85801c lw a1,-32740\(gp\)
+1000023c: 8f858020 lw a1,-32736\(gp\)
10000240: 24a5e92c addiu a1,a1,-5844
-10000244: 8f858018 lw a1,-32744\(gp\)
+10000244: 8f85801c lw a1,-32740\(gp\)
10000248: 24a506ec addiu a1,a1,1772
1000024c: 00b12821 addu a1,a1,s1
-10000250: 8f858018 lw a1,-32744\(gp\)
+10000250: 8f85801c lw a1,-32740\(gp\)
10000254: 24a506f8 addiu a1,a1,1784
10000258: 00b12821 addu a1,a1,s1
-1000025c: 8f85801c lw a1,-32740\(gp\)
+1000025c: 8f858020 lw a1,-32736\(gp\)
10000260: 24a5e92c addiu a1,a1,-5844
10000264: 00b12821 addu a1,a1,s1
-10000268: 8f858018 lw a1,-32744\(gp\)
+10000268: 8f85801c lw a1,-32740\(gp\)
1000026c: 8ca506ec lw a1,1772\(a1\)
-10000270: 8f858018 lw a1,-32744\(gp\)
+10000270: 8f85801c lw a1,-32740\(gp\)
10000274: 8ca506f8 lw a1,1784\(a1\)
-10000278: 8f858018 lw a1,-32744\(gp\)
+10000278: 8f85801c lw a1,-32740\(gp\)
1000027c: 00b12821 addu a1,a1,s1
10000280: 8ca506ec lw a1,1772\(a1\)
-10000284: 8f858018 lw a1,-32744\(gp\)
+10000284: 8f85801c lw a1,-32740\(gp\)
10000288: 00b12821 addu a1,a1,s1
1000028c: 8ca506f8 lw a1,1784\(a1\)
-10000290: 8f818018 lw at,-32744\(gp\)
+10000290: 8f81801c lw at,-32740\(gp\)
10000294: 00250821 addu at,at,a1
10000298: 8c25070e lw a1,1806\(at\)
-1000029c: 8f818018 lw at,-32744\(gp\)
+1000029c: 8f81801c lw at,-32740\(gp\)
100002a0: 00250821 addu at,at,a1
100002a4: ac250724 sw a1,1828\(at\)
-100002a8: 8f818018 lw at,-32744\(gp\)
+100002a8: 8f81801c lw at,-32740\(gp\)
100002ac: 242106ec addiu at,at,1772
100002b0: 88250000 lwl a1,0\(at\)
100002b4: 98250003 lwr a1,3\(at\)
-100002b8: 8f818018 lw at,-32744\(gp\)
+100002b8: 8f81801c lw at,-32740\(gp\)
100002bc: 242106f8 addiu at,at,1784
100002c0: 88250000 lwl a1,0\(at\)
100002c4: 98250003 lwr a1,3\(at\)
-100002c8: 8f818018 lw at,-32744\(gp\)
+100002c8: 8f81801c lw at,-32740\(gp\)
100002cc: 242106ec addiu at,at,1772
100002d0: 00310821 addu at,at,s1
100002d4: 88250000 lwl a1,0\(at\)
100002d8: 98250003 lwr a1,3\(at\)
-100002dc: 8f818018 lw at,-32744\(gp\)
+100002dc: 8f81801c lw at,-32740\(gp\)
100002e0: 242106f8 addiu at,at,1784
100002e4: 00310821 addu at,at,s1
100002e8: 88250000 lwl a1,0\(at\)
100002ec: 98250003 lwr a1,3\(at\)
-100002f0: 8f818018 lw at,-32744\(gp\)
+100002f0: 8f81801c lw at,-32740\(gp\)
100002f4: 2421070e addiu at,at,1806
100002f8: 00250821 addu at,at,a1
100002fc: 88250000 lwl a1,0\(at\)
10000300: 98250003 lwr a1,3\(at\)
-10000304: 8f818018 lw at,-32744\(gp\)
+10000304: 8f81801c lw at,-32740\(gp\)
10000308: 24210724 addiu at,at,1828
1000030c: 00250821 addu at,at,a1
10000310: a8250000 swl a1,0\(at\)
10000314: b8250003 swr a1,3\(at\)
10000318: 3c050000 lui a1,0x0
1000031c: 00bc2821 addu a1,a1,gp
-10000320: 8ca5802c lw a1,-32724\(a1\)
-10000324: 8f858020 lw a1,-32736\(gp\)
+10000320: 8ca58024 lw a1,-32732\(a1\)
+10000324: 8f858028 lw a1,-32728\(gp\)
10000328: 24a500b0 addiu a1,a1,176
1000032c: 3c190000 lui t9,0x0
10000330: 033cc821 addu t9,t9,gp
-10000334: 8f39802c lw t9,-32724\(t9\)
-10000338: 8f998020 lw t9,-32736\(gp\)
+10000334: 8f398024 lw t9,-32732\(t9\)
+10000338: 8f998028 lw t9,-32728\(gp\)
1000033c: 273900b0 addiu t9,t9,176
10000340: 3c190000 lui t9,0x0
10000344: 033cc821 addu t9,t9,gp
-10000348: 8f39802c lw t9,-32724\(t9\)
+10000348: 8f398024 lw t9,-32732\(t9\)
1000034c: 0411ff58 bal 100000b0 <fn>
10000350: 00000000 nop
-10000354: 8f998020 lw t9,-32736\(gp\)
+10000354: 8f998028 lw t9,-32728\(gp\)
10000358: 273900b0 addiu t9,t9,176
1000035c: 0411ff54 bal 100000b0 <fn>
10000360: 00000000 nop
10000364: 3c050000 lui a1,0x0
10000368: 00bc2821 addu a1,a1,gp
-1000036c: 8ca58038 lw a1,-32712\(a1\)
+1000036c: 8ca5802c lw a1,-32724\(a1\)
10000370: 3c050000 lui a1,0x0
10000374: 00bc2821 addu a1,a1,gp
-10000378: 8ca58038 lw a1,-32712\(a1\)
+10000378: 8ca5802c lw a1,-32724\(a1\)
1000037c: 24a5000c addiu a1,a1,12
10000380: 3c050000 lui a1,0x0
10000384: 00bc2821 addu a1,a1,gp
-10000388: 8ca58038 lw a1,-32712\(a1\)
+10000388: 8ca5802c lw a1,-32724\(a1\)
1000038c: 3c010001 lui at,0x1
10000390: 3421e240 ori at,at,0xe240
10000394: 00a12821 addu a1,a1,at
10000398: 3c050000 lui a1,0x0
1000039c: 00bc2821 addu a1,a1,gp
-100003a0: 8ca58038 lw a1,-32712\(a1\)
+100003a0: 8ca5802c lw a1,-32724\(a1\)
100003a4: 00b12821 addu a1,a1,s1
100003a8: 3c050000 lui a1,0x0
100003ac: 00bc2821 addu a1,a1,gp
-100003b0: 8ca58038 lw a1,-32712\(a1\)
+100003b0: 8ca5802c lw a1,-32724\(a1\)
100003b4: 24a5000c addiu a1,a1,12
100003b8: 00b12821 addu a1,a1,s1
100003bc: 3c050000 lui a1,0x0
100003c0: 00bc2821 addu a1,a1,gp
-100003c4: 8ca58038 lw a1,-32712\(a1\)
+100003c4: 8ca5802c lw a1,-32724\(a1\)
100003c8: 3c010001 lui at,0x1
100003cc: 3421e240 ori at,at,0xe240
100003d0: 00a12821 addu a1,a1,at
100003d4: 00b12821 addu a1,a1,s1
100003d8: 3c050000 lui a1,0x0
100003dc: 00bc2821 addu a1,a1,gp
-100003e0: 8ca58038 lw a1,-32712\(a1\)
+100003e0: 8ca5802c lw a1,-32724\(a1\)
100003e4: 8ca50000 lw a1,0\(a1\)
100003e8: 3c050000 lui a1,0x0
100003ec: 00bc2821 addu a1,a1,gp
-100003f0: 8ca58038 lw a1,-32712\(a1\)
+100003f0: 8ca5802c lw a1,-32724\(a1\)
100003f4: 8ca5000c lw a1,12\(a1\)
100003f8: 3c050000 lui a1,0x0
100003fc: 00bc2821 addu a1,a1,gp
-10000400: 8ca58038 lw a1,-32712\(a1\)
+10000400: 8ca5802c lw a1,-32724\(a1\)
10000404: 00b12821 addu a1,a1,s1
10000408: 8ca50000 lw a1,0\(a1\)
1000040c: 3c050000 lui a1,0x0
10000410: 00bc2821 addu a1,a1,gp
-10000414: 8ca58038 lw a1,-32712\(a1\)
+10000414: 8ca5802c lw a1,-32724\(a1\)
10000418: 00b12821 addu a1,a1,s1
1000041c: 8ca5000c lw a1,12\(a1\)
10000420: 3c010000 lui at,0x0
10000424: 003c0821 addu at,at,gp
-10000428: 8c218038 lw at,-32712\(at\)
+10000428: 8c21802c lw at,-32724\(at\)
1000042c: 00250821 addu at,at,a1
10000430: 8c250022 lw a1,34\(at\)
10000434: 3c010000 lui at,0x0
10000438: 003c0821 addu at,at,gp
-1000043c: 8c218038 lw at,-32712\(at\)
+1000043c: 8c21802c lw at,-32724\(at\)
10000440: 00250821 addu at,at,a1
10000444: ac250038 sw a1,56\(at\)
10000448: 3c010000 lui at,0x0
1000044c: 003c0821 addu at,at,gp
-10000450: 8c218038 lw at,-32712\(at\)
+10000450: 8c21802c lw at,-32724\(at\)
10000454: 88250000 lwl a1,0\(at\)
10000458: 98250003 lwr a1,3\(at\)
1000045c: 3c010000 lui at,0x0
10000460: 003c0821 addu at,at,gp
-10000464: 8c218038 lw at,-32712\(at\)
+10000464: 8c21802c lw at,-32724\(at\)
10000468: 2421000c addiu at,at,12
1000046c: 88250000 lwl a1,0\(at\)
10000470: 98250003 lwr a1,3\(at\)
10000474: 3c010000 lui at,0x0
10000478: 003c0821 addu at,at,gp
-1000047c: 8c218038 lw at,-32712\(at\)
+1000047c: 8c21802c lw at,-32724\(at\)
10000480: 00310821 addu at,at,s1
10000484: 88250000 lwl a1,0\(at\)
10000488: 98250003 lwr a1,3\(at\)
1000048c: 3c010000 lui at,0x0
10000490: 003c0821 addu at,at,gp
-10000494: 8c218038 lw at,-32712\(at\)
+10000494: 8c21802c lw at,-32724\(at\)
10000498: 2421000c addiu at,at,12
1000049c: 00310821 addu at,at,s1
100004a0: 88250000 lwl a1,0\(at\)
100004a4: 98250003 lwr a1,3\(at\)
100004a8: 3c010000 lui at,0x0
100004ac: 003c0821 addu at,at,gp
-100004b0: 8c218038 lw at,-32712\(at\)
+100004b0: 8c21802c lw at,-32724\(at\)
100004b4: 24210022 addiu at,at,34
100004b8: 00250821 addu at,at,a1
100004bc: 88250000 lwl a1,0\(at\)
100004c0: 98250003 lwr a1,3\(at\)
100004c4: 3c010000 lui at,0x0
100004c8: 003c0821 addu at,at,gp
-100004cc: 8c218038 lw at,-32712\(at\)
+100004cc: 8c21802c lw at,-32724\(at\)
100004d0: 24210038 addiu at,at,56
100004d4: 00250821 addu at,at,a1
100004d8: a8250000 swl a1,0\(at\)
100004dc: b8250003 swr a1,3\(at\)
-100004e0: 8f858018 lw a1,-32744\(gp\)
+100004e0: 8f85801c lw a1,-32740\(gp\)
100004e4: 24a50764 addiu a1,a1,1892
-100004e8: 8f858018 lw a1,-32744\(gp\)
+100004e8: 8f85801c lw a1,-32740\(gp\)
100004ec: 24a50770 addiu a1,a1,1904
-100004f0: 8f85801c lw a1,-32740\(gp\)
+100004f0: 8f858020 lw a1,-32736\(gp\)
100004f4: 24a5e9a4 addiu a1,a1,-5724
-100004f8: 8f858018 lw a1,-32744\(gp\)
+100004f8: 8f85801c lw a1,-32740\(gp\)
100004fc: 24a50764 addiu a1,a1,1892
10000500: 00b12821 addu a1,a1,s1
-10000504: 8f858018 lw a1,-32744\(gp\)
+10000504: 8f85801c lw a1,-32740\(gp\)
10000508: 24a50770 addiu a1,a1,1904
1000050c: 00b12821 addu a1,a1,s1
-10000510: 8f85801c lw a1,-32740\(gp\)
+10000510: 8f858020 lw a1,-32736\(gp\)
10000514: 24a5e9a4 addiu a1,a1,-5724
10000518: 00b12821 addu a1,a1,s1
-1000051c: 8f858018 lw a1,-32744\(gp\)
+1000051c: 8f85801c lw a1,-32740\(gp\)
10000520: 8ca50764 lw a1,1892\(a1\)
-10000524: 8f858018 lw a1,-32744\(gp\)
+10000524: 8f85801c lw a1,-32740\(gp\)
10000528: 8ca50770 lw a1,1904\(a1\)
-1000052c: 8f858018 lw a1,-32744\(gp\)
+1000052c: 8f85801c lw a1,-32740\(gp\)
10000530: 00b12821 addu a1,a1,s1
10000534: 8ca50764 lw a1,1892\(a1\)
-10000538: 8f858018 lw a1,-32744\(gp\)
+10000538: 8f85801c lw a1,-32740\(gp\)
1000053c: 00b12821 addu a1,a1,s1
10000540: 8ca50770 lw a1,1904\(a1\)
-10000544: 8f818018 lw at,-32744\(gp\)
+10000544: 8f81801c lw at,-32740\(gp\)
10000548: 00250821 addu at,at,a1
1000054c: 8c250786 lw a1,1926\(at\)
-10000550: 8f818018 lw at,-32744\(gp\)
+10000550: 8f81801c lw at,-32740\(gp\)
10000554: 00250821 addu at,at,a1
10000558: ac25079c sw a1,1948\(at\)
-1000055c: 8f818018 lw at,-32744\(gp\)
+1000055c: 8f81801c lw at,-32740\(gp\)
10000560: 24210764 addiu at,at,1892
10000564: 88250000 lwl a1,0\(at\)
10000568: 98250003 lwr a1,3\(at\)
-1000056c: 8f818018 lw at,-32744\(gp\)
+1000056c: 8f81801c lw at,-32740\(gp\)
10000570: 24210770 addiu at,at,1904
10000574: 88250000 lwl a1,0\(at\)
10000578: 98250003 lwr a1,3\(at\)
-1000057c: 8f818018 lw at,-32744\(gp\)
+1000057c: 8f81801c lw at,-32740\(gp\)
10000580: 24210764 addiu at,at,1892
10000584: 00310821 addu at,at,s1
10000588: 88250000 lwl a1,0\(at\)
1000058c: 98250003 lwr a1,3\(at\)
-10000590: 8f818018 lw at,-32744\(gp\)
+10000590: 8f81801c lw at,-32740\(gp\)
10000594: 24210770 addiu at,at,1904
10000598: 00310821 addu at,at,s1
1000059c: 88250000 lwl a1,0\(at\)
100005a0: 98250003 lwr a1,3\(at\)
-100005a4: 8f818018 lw at,-32744\(gp\)
+100005a4: 8f81801c lw at,-32740\(gp\)
100005a8: 24210786 addiu at,at,1926
100005ac: 00250821 addu at,at,a1
100005b0: 88250000 lwl a1,0\(at\)
100005b4: 98250003 lwr a1,3\(at\)
-100005b8: 8f818018 lw at,-32744\(gp\)
+100005b8: 8f81801c lw at,-32740\(gp\)
100005bc: 2421079c addiu at,at,1948
100005c0: 00250821 addu at,at,a1
100005c4: a8250000 swl a1,0\(at\)
@@ -346,59 +346,60 @@ Disassembly of section \.text:
100005cc: 3c050000 lui a1,0x0
100005d0: 00bc2821 addu a1,a1,gp
100005d4: 8ca58030 lw a1,-32720\(a1\)
-100005d8: 8f858020 lw a1,-32736\(gp\)
+100005d8: 8f858028 lw a1,-32728\(gp\)
100005dc: 24a506b0 addiu a1,a1,1712
100005e0: 3c190000 lui t9,0x0
100005e4: 033cc821 addu t9,t9,gp
100005e8: 8f398030 lw t9,-32720\(t9\)
-100005ec: 8f998020 lw t9,-32736\(gp\)
+100005ec: 8f998028 lw t9,-32728\(gp\)
100005f0: 273906b0 addiu t9,t9,1712
100005f4: 3c190000 lui t9,0x0
100005f8: 033cc821 addu t9,t9,gp
100005fc: 8f398030 lw t9,-32720\(t9\)
10000600: 0411002b bal 100006b0 <fn2>
10000604: 00000000 nop
-10000608: 8f998020 lw t9,-32736\(gp\)
+10000608: 8f998028 lw t9,-32728\(gp\)
1000060c: 273906b0 addiu t9,t9,1712
10000610: 04110027 bal 100006b0 <fn2>
10000614: 00000000 nop
10000618: 3c050000 lui a1,0x0
1000061c: 00bc2821 addu a1,a1,gp
-10000620: 8ca58034 lw a1,-32716\(a1\)
+10000620: 8ca58018 lw a1,-32744\(a1\)
10000624: 1000fea2 b 100000b0 <fn>
10000628: 00000000 nop
1000062c: 3c050000 lui a1,0x0
10000630: 00bc2821 addu a1,a1,gp
-10000634: 8ca58038 lw a1,-32712\(a1\)
+10000634: 8ca5802c lw a1,-32724\(a1\)
10000638: 8ca50000 lw a1,0\(a1\)
1000063c: 1000001c b 100006b0 <fn2>
10000640: 00000000 nop
-10000644: 8f858018 lw a1,-32744\(gp\)
+10000644: 8f85801c lw a1,-32740\(gp\)
10000648: 24a506ec addiu a1,a1,1772
1000064c: 1000fe98 b 100000b0 <fn>
10000650: 00000000 nop
-10000654: 8f858018 lw a1,-32744\(gp\)
+10000654: 8f85801c lw a1,-32740\(gp\)
10000658: 24a50770 addiu a1,a1,1904
1000065c: 10000014 b 100006b0 <fn2>
10000660: 00000000 nop
-10000664: 8f85801c lw a1,-32740\(gp\)
+10000664: 8f858020 lw a1,-32736\(gp\)
10000668: 24a5e92c addiu a1,a1,-5844
1000066c: 1000fe90 b 100000b0 <fn>
10000670: 00000000 nop
-10000674: 8f858018 lw a1,-32744\(gp\)
+10000674: 8f85801c lw a1,-32740\(gp\)
10000678: 8ca50764 lw a1,1892\(a1\)
1000067c: 1000000c b 100006b0 <fn2>
10000680: 00000000 nop
-10000684: 8f858018 lw a1,-32744\(gp\)
+10000684: 8f85801c lw a1,-32740\(gp\)
10000688: 8ca506f8 lw a1,1784\(a1\)
1000068c: 1000fe88 b 100000b0 <fn>
10000690: 00000000 nop
-10000694: 8f818018 lw at,-32744\(gp\)
+10000694: 8f81801c lw at,-32740\(gp\)
10000698: 00250821 addu at,at,a1
1000069c: 8c250786 lw a1,1926\(at\)
100006a0: 10000003 b 100006b0 <fn2>
100006a4: 00000000 nop
\.\.\.
+
Disassembly of section \.data:
100106b0 <_fdata>:
@@ -412,18 +413,19 @@ Disassembly of section \.data:
10010764 <dg2>:
\.\.\.
+
Disassembly of section \.got:
100107a0 <_GLOBAL_OFFSET_TABLE_>:
100107a0: 00000000 .*
100107a4: 80000000 .*
-100107a8: 10010000 .*
-100107ac: 10030000 .*
-100107b0: 10000000 .*
-100107b4: 00000000 .*
-100107b8: 00000000 .*
-100107bc: 100000b0 .*
+100107a8: 100106ec .*
+100107ac: 10010000 .*
+100107b0: 10030000 .*
+100107b4: 100000b0 .*
+100107b8: 10000000 .*
+100107bc: 10010764 .*
100107c0: 100006b0 .*
-100107c4: 100106ec .*
-100107c8: 10010764 .*
+100107c4: 00000000 .*
+100107c8: 00000000 .*
#pass
diff --git a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
index a874fd8..075b294 100644
--- a/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
+++ b/ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
@@ -15,332 +15,333 @@ Disassembly of section \.MIPS\.options:
\.\.\.
1200000d0: 00000001 .*
1200000d4: 200187c0 .*
+
Disassembly of section \.text:
00000001200000e0 <fn>:
1200000e0: 3c050000 lui a1,0x0
1200000e4: 00bc282d daddu a1,a1,gp
- 1200000e8: dca58058 ld a1,-32680\(a1\)
+ 1200000e8: dca58020 ld a1,-32736\(a1\)
1200000ec: 3c050000 lui a1,0x0
1200000f0: 00bc282d daddu a1,a1,gp
- 1200000f4: dca58058 ld a1,-32680\(a1\)
+ 1200000f4: dca58020 ld a1,-32736\(a1\)
1200000f8: 64a5000c daddiu a1,a1,12
1200000fc: 3c050000 lui a1,0x0
120000100: 00bc282d daddu a1,a1,gp
- 120000104: dca58058 ld a1,-32680\(a1\)
+ 120000104: dca58020 ld a1,-32736\(a1\)
120000108: 3c010001 lui at,0x1
12000010c: 3421e240 ori at,at,0xe240
120000110: 00a1282d daddu a1,a1,at
120000114: 3c050000 lui a1,0x0
120000118: 00bc282d daddu a1,a1,gp
- 12000011c: dca58058 ld a1,-32680\(a1\)
+ 12000011c: dca58020 ld a1,-32736\(a1\)
120000120: 00b1282d daddu a1,a1,s1
120000124: 3c050000 lui a1,0x0
120000128: 00bc282d daddu a1,a1,gp
- 12000012c: dca58058 ld a1,-32680\(a1\)
+ 12000012c: dca58020 ld a1,-32736\(a1\)
120000130: 64a5000c daddiu a1,a1,12
120000134: 00b1282d daddu a1,a1,s1
120000138: 3c050000 lui a1,0x0
12000013c: 00bc282d daddu a1,a1,gp
- 120000140: dca58058 ld a1,-32680\(a1\)
+ 120000140: dca58020 ld a1,-32736\(a1\)
120000144: 3c010001 lui at,0x1
120000148: 3421e240 ori at,at,0xe240
12000014c: 00a1282d daddu a1,a1,at
120000150: 00b1282d daddu a1,a1,s1
120000154: 3c050000 lui a1,0x0
120000158: 00bc282d daddu a1,a1,gp
- 12000015c: dca58058 ld a1,-32680\(a1\)
+ 12000015c: dca58020 ld a1,-32736\(a1\)
120000160: dca50000 ld a1,0\(a1\)
120000164: 3c050000 lui a1,0x0
120000168: 00bc282d daddu a1,a1,gp
- 12000016c: dca58058 ld a1,-32680\(a1\)
+ 12000016c: dca58020 ld a1,-32736\(a1\)
120000170: dca5000c ld a1,12\(a1\)
120000174: 3c050000 lui a1,0x0
120000178: 00bc282d daddu a1,a1,gp
- 12000017c: dca58058 ld a1,-32680\(a1\)
+ 12000017c: dca58020 ld a1,-32736\(a1\)
120000180: 00b1282d daddu a1,a1,s1
120000184: dca50000 ld a1,0\(a1\)
120000188: 3c050000 lui a1,0x0
12000018c: 00bc282d daddu a1,a1,gp
- 120000190: dca58058 ld a1,-32680\(a1\)
+ 120000190: dca58020 ld a1,-32736\(a1\)
120000194: 00b1282d daddu a1,a1,s1
120000198: dca5000c ld a1,12\(a1\)
12000019c: 3c010000 lui at,0x0
1200001a0: 003c082d daddu at,at,gp
- 1200001a4: dc218058 ld at,-32680\(at\)
+ 1200001a4: dc218020 ld at,-32736\(at\)
1200001a8: 0025082d daddu at,at,a1
1200001ac: dc250022 ld a1,34\(at\)
1200001b0: 3c010000 lui at,0x0
1200001b4: 003c082d daddu at,at,gp
- 1200001b8: dc218058 ld at,-32680\(at\)
+ 1200001b8: dc218020 ld at,-32736\(at\)
1200001bc: 0025082d daddu at,at,a1
1200001c0: fc250038 sd a1,56\(at\)
1200001c4: 3c010000 lui at,0x0
1200001c8: 003c082d daddu at,at,gp
- 1200001cc: dc218058 ld at,-32680\(at\)
+ 1200001cc: dc218020 ld at,-32736\(at\)
1200001d0: 88250000 lwl a1,0\(at\)
1200001d4: 98250003 lwr a1,3\(at\)
1200001d8: 3c010000 lui at,0x0
1200001dc: 003c082d daddu at,at,gp
- 1200001e0: dc218058 ld at,-32680\(at\)
+ 1200001e0: dc218020 ld at,-32736\(at\)
1200001e4: 6421000c daddiu at,at,12
1200001e8: 88250000 lwl a1,0\(at\)
1200001ec: 98250003 lwr a1,3\(at\)
1200001f0: 3c010000 lui at,0x0
1200001f4: 003c082d daddu at,at,gp
- 1200001f8: dc218058 ld at,-32680\(at\)
+ 1200001f8: dc218020 ld at,-32736\(at\)
1200001fc: 0031082d daddu at,at,s1
120000200: 88250000 lwl a1,0\(at\)
120000204: 98250003 lwr a1,3\(at\)
120000208: 3c010000 lui at,0x0
12000020c: 003c082d daddu at,at,gp
- 120000210: dc218058 ld at,-32680\(at\)
+ 120000210: dc218020 ld at,-32736\(at\)
120000214: 6421000c daddiu at,at,12
120000218: 0031082d daddu at,at,s1
12000021c: 88250000 lwl a1,0\(at\)
120000220: 98250003 lwr a1,3\(at\)
120000224: 3c010000 lui at,0x0
120000228: 003c082d daddu at,at,gp
- 12000022c: dc218058 ld at,-32680\(at\)
+ 12000022c: dc218020 ld at,-32736\(at\)
120000230: 64210022 daddiu at,at,34
120000234: 0025082d daddu at,at,a1
120000238: 88250000 lwl a1,0\(at\)
12000023c: 98250003 lwr a1,3\(at\)
120000240: 3c010000 lui at,0x0
120000244: 003c082d daddu at,at,gp
- 120000248: dc218058 ld at,-32680\(at\)
+ 120000248: dc218020 ld at,-32736\(at\)
12000024c: 64210038 daddiu at,at,56
120000250: 0025082d daddu at,at,a1
120000254: a8250000 swl a1,0\(at\)
120000258: b8250003 swr a1,3\(at\)
- 12000025c: df858020 ld a1,-32736\(gp\)
+ 12000025c: df858028 ld a1,-32728\(gp\)
120000260: 64a5071c daddiu a1,a1,1820
- 120000264: df858020 ld a1,-32736\(gp\)
+ 120000264: df858028 ld a1,-32728\(gp\)
120000268: 64a50728 daddiu a1,a1,1832
- 12000026c: df858028 ld a1,-32728\(gp\)
+ 12000026c: df858030 ld a1,-32720\(gp\)
120000270: 64a5e95c daddiu a1,a1,-5796
- 120000274: df858020 ld a1,-32736\(gp\)
+ 120000274: df858028 ld a1,-32728\(gp\)
120000278: 64a5071c daddiu a1,a1,1820
12000027c: 00b1282d daddu a1,a1,s1
- 120000280: df858020 ld a1,-32736\(gp\)
+ 120000280: df858028 ld a1,-32728\(gp\)
120000284: 64a50728 daddiu a1,a1,1832
120000288: 00b1282d daddu a1,a1,s1
- 12000028c: df858028 ld a1,-32728\(gp\)
+ 12000028c: df858030 ld a1,-32720\(gp\)
120000290: 64a5e95c daddiu a1,a1,-5796
120000294: 00b1282d daddu a1,a1,s1
- 120000298: df858020 ld a1,-32736\(gp\)
+ 120000298: df858028 ld a1,-32728\(gp\)
12000029c: dca5071c ld a1,1820\(a1\)
- 1200002a0: df858020 ld a1,-32736\(gp\)
+ 1200002a0: df858028 ld a1,-32728\(gp\)
1200002a4: dca50728 ld a1,1832\(a1\)
- 1200002a8: df858020 ld a1,-32736\(gp\)
+ 1200002a8: df858028 ld a1,-32728\(gp\)
1200002ac: 00b1282d daddu a1,a1,s1
1200002b0: dca5071c ld a1,1820\(a1\)
- 1200002b4: df858020 ld a1,-32736\(gp\)
+ 1200002b4: df858028 ld a1,-32728\(gp\)
1200002b8: 00b1282d daddu a1,a1,s1
1200002bc: dca50728 ld a1,1832\(a1\)
- 1200002c0: df818020 ld at,-32736\(gp\)
+ 1200002c0: df818028 ld at,-32728\(gp\)
1200002c4: 0025082d daddu at,at,a1
1200002c8: dc25073e ld a1,1854\(at\)
- 1200002cc: df818020 ld at,-32736\(gp\)
+ 1200002cc: df818028 ld at,-32728\(gp\)
1200002d0: 0025082d daddu at,at,a1
1200002d4: fc250754 sd a1,1876\(at\)
- 1200002d8: df818020 ld at,-32736\(gp\)
+ 1200002d8: df818028 ld at,-32728\(gp\)
1200002dc: 6421071c daddiu at,at,1820
1200002e0: 88250000 lwl a1,0\(at\)
1200002e4: 98250003 lwr a1,3\(at\)
- 1200002e8: df818020 ld at,-32736\(gp\)
+ 1200002e8: df818028 ld at,-32728\(gp\)
1200002ec: 64210728 daddiu at,at,1832
1200002f0: 88250000 lwl a1,0\(at\)
1200002f4: 98250003 lwr a1,3\(at\)
- 1200002f8: df818020 ld at,-32736\(gp\)
+ 1200002f8: df818028 ld at,-32728\(gp\)
1200002fc: 6421071c daddiu at,at,1820
120000300: 0031082d daddu at,at,s1
120000304: 88250000 lwl a1,0\(at\)
120000308: 98250003 lwr a1,3\(at\)
- 12000030c: df818020 ld at,-32736\(gp\)
+ 12000030c: df818028 ld at,-32728\(gp\)
120000310: 64210728 daddiu at,at,1832
120000314: 0031082d daddu at,at,s1
120000318: 88250000 lwl a1,0\(at\)
12000031c: 98250003 lwr a1,3\(at\)
- 120000320: df818020 ld at,-32736\(gp\)
+ 120000320: df818028 ld at,-32728\(gp\)
120000324: 6421073e daddiu at,at,1854
120000328: 0025082d daddu at,at,a1
12000032c: 88250000 lwl a1,0\(at\)
120000330: 98250003 lwr a1,3\(at\)
- 120000334: df818020 ld at,-32736\(gp\)
+ 120000334: df818028 ld at,-32728\(gp\)
120000338: 64210754 daddiu at,at,1876
12000033c: 0025082d daddu at,at,a1
120000340: a8250000 swl a1,0\(at\)
120000344: b8250003 swr a1,3\(at\)
120000348: 3c050000 lui a1,0x0
12000034c: 00bc282d daddu a1,a1,gp
- 120000350: dca58048 ld a1,-32696\(a1\)
- 120000354: df858030 ld a1,-32720\(gp\)
+ 120000350: dca58038 ld a1,-32712\(a1\)
+ 120000354: df858040 ld a1,-32704\(gp\)
120000358: 64a500e0 daddiu a1,a1,224
12000035c: 3c190000 lui t9,0x0
120000360: 033cc82d daddu t9,t9,gp
- 120000364: df398048 ld t9,-32696\(t9\)
- 120000368: df998030 ld t9,-32720\(gp\)
+ 120000364: df398038 ld t9,-32712\(t9\)
+ 120000368: df998040 ld t9,-32704\(gp\)
12000036c: 673900e0 daddiu t9,t9,224
120000370: 3c190000 lui t9,0x0
120000374: 033cc82d daddu t9,t9,gp
- 120000378: df398048 ld t9,-32696\(t9\)
+ 120000378: df398038 ld t9,-32712\(t9\)
12000037c: 0411ff58 bal 1200000e0 <fn>
120000380: 00000000 nop
- 120000384: df998030 ld t9,-32720\(gp\)
+ 120000384: df998040 ld t9,-32704\(gp\)
120000388: 673900e0 daddiu t9,t9,224
12000038c: 0411ff54 bal 1200000e0 <fn>
120000390: 00000000 nop
120000394: 3c050000 lui a1,0x0
120000398: 00bc282d daddu a1,a1,gp
- 12000039c: dca58060 ld a1,-32672\(a1\)
+ 12000039c: dca58048 ld a1,-32696\(a1\)
1200003a0: 3c050000 lui a1,0x0
1200003a4: 00bc282d daddu a1,a1,gp
- 1200003a8: dca58060 ld a1,-32672\(a1\)
+ 1200003a8: dca58048 ld a1,-32696\(a1\)
1200003ac: 64a5000c daddiu a1,a1,12
1200003b0: 3c050000 lui a1,0x0
1200003b4: 00bc282d daddu a1,a1,gp
- 1200003b8: dca58060 ld a1,-32672\(a1\)
+ 1200003b8: dca58048 ld a1,-32696\(a1\)
1200003bc: 3c010001 lui at,0x1
1200003c0: 3421e240 ori at,at,0xe240
1200003c4: 00a1282d daddu a1,a1,at
1200003c8: 3c050000 lui a1,0x0
1200003cc: 00bc282d daddu a1,a1,gp
- 1200003d0: dca58060 ld a1,-32672\(a1\)
+ 1200003d0: dca58048 ld a1,-32696\(a1\)
1200003d4: 00b1282d daddu a1,a1,s1
1200003d8: 3c050000 lui a1,0x0
1200003dc: 00bc282d daddu a1,a1,gp
- 1200003e0: dca58060 ld a1,-32672\(a1\)
+ 1200003e0: dca58048 ld a1,-32696\(a1\)
1200003e4: 64a5000c daddiu a1,a1,12
1200003e8: 00b1282d daddu a1,a1,s1
1200003ec: 3c050000 lui a1,0x0
1200003f0: 00bc282d daddu a1,a1,gp
- 1200003f4: dca58060 ld a1,-32672\(a1\)
+ 1200003f4: dca58048 ld a1,-32696\(a1\)
1200003f8: 3c010001 lui at,0x1
1200003fc: 3421e240 ori at,at,0xe240
120000400: 00a1282d daddu a1,a1,at
120000404: 00b1282d daddu a1,a1,s1
120000408: 3c050000 lui a1,0x0
12000040c: 00bc282d daddu a1,a1,gp
- 120000410: dca58060 ld a1,-32672\(a1\)
+ 120000410: dca58048 ld a1,-32696\(a1\)
120000414: dca50000 ld a1,0\(a1\)
120000418: 3c050000 lui a1,0x0
12000041c: 00bc282d daddu a1,a1,gp
- 120000420: dca58060 ld a1,-32672\(a1\)
+ 120000420: dca58048 ld a1,-32696\(a1\)
120000424: dca5000c ld a1,12\(a1\)
120000428: 3c050000 lui a1,0x0
12000042c: 00bc282d daddu a1,a1,gp
- 120000430: dca58060 ld a1,-32672\(a1\)
+ 120000430: dca58048 ld a1,-32696\(a1\)
120000434: 00b1282d daddu a1,a1,s1
120000438: dca50000 ld a1,0\(a1\)
12000043c: 3c050000 lui a1,0x0
120000440: 00bc282d daddu a1,a1,gp
- 120000444: dca58060 ld a1,-32672\(a1\)
+ 120000444: dca58048 ld a1,-32696\(a1\)
120000448: 00b1282d daddu a1,a1,s1
12000044c: dca5000c ld a1,12\(a1\)
120000450: 3c010000 lui at,0x0
120000454: 003c082d daddu at,at,gp
- 120000458: dc218060 ld at,-32672\(at\)
+ 120000458: dc218048 ld at,-32696\(at\)
12000045c: 0025082d daddu at,at,a1
120000460: dc250022 ld a1,34\(at\)
120000464: 3c010000 lui at,0x0
120000468: 003c082d daddu at,at,gp
- 12000046c: dc218060 ld at,-32672\(at\)
+ 12000046c: dc218048 ld at,-32696\(at\)
120000470: 0025082d daddu at,at,a1
120000474: fc250038 sd a1,56\(at\)
120000478: 3c010000 lui at,0x0
12000047c: 003c082d daddu at,at,gp
- 120000480: dc218060 ld at,-32672\(at\)
+ 120000480: dc218048 ld at,-32696\(at\)
120000484: 88250000 lwl a1,0\(at\)
120000488: 98250003 lwr a1,3\(at\)
12000048c: 3c010000 lui at,0x0
120000490: 003c082d daddu at,at,gp
- 120000494: dc218060 ld at,-32672\(at\)
+ 120000494: dc218048 ld at,-32696\(at\)
120000498: 6421000c daddiu at,at,12
12000049c: 88250000 lwl a1,0\(at\)
1200004a0: 98250003 lwr a1,3\(at\)
1200004a4: 3c010000 lui at,0x0
1200004a8: 003c082d daddu at,at,gp
- 1200004ac: dc218060 ld at,-32672\(at\)
+ 1200004ac: dc218048 ld at,-32696\(at\)
1200004b0: 0031082d daddu at,at,s1
1200004b4: 88250000 lwl a1,0\(at\)
1200004b8: 98250003 lwr a1,3\(at\)
1200004bc: 3c010000 lui at,0x0
1200004c0: 003c082d daddu at,at,gp
- 1200004c4: dc218060 ld at,-32672\(at\)
+ 1200004c4: dc218048 ld at,-32696\(at\)
1200004c8: 6421000c daddiu at,at,12
1200004cc: 0031082d daddu at,at,s1
1200004d0: 88250000 lwl a1,0\(at\)
1200004d4: 98250003 lwr a1,3\(at\)
1200004d8: 3c010000 lui at,0x0
1200004dc: 003c082d daddu at,at,gp
- 1200004e0: dc218060 ld at,-32672\(at\)
+ 1200004e0: dc218048 ld at,-32696\(at\)
1200004e4: 64210022 daddiu at,at,34
1200004e8: 0025082d daddu at,at,a1
1200004ec: 88250000 lwl a1,0\(at\)
1200004f0: 98250003 lwr a1,3\(at\)
1200004f4: 3c010000 lui at,0x0
1200004f8: 003c082d daddu at,at,gp
- 1200004fc: dc218060 ld at,-32672\(at\)
+ 1200004fc: dc218048 ld at,-32696\(at\)
120000500: 64210038 daddiu at,at,56
120000504: 0025082d daddu at,at,a1
120000508: a8250000 swl a1,0\(at\)
12000050c: b8250003 swr a1,3\(at\)
- 120000510: df858020 ld a1,-32736\(gp\)
+ 120000510: df858028 ld a1,-32728\(gp\)
120000514: 64a50794 daddiu a1,a1,1940
- 120000518: df858020 ld a1,-32736\(gp\)
+ 120000518: df858028 ld a1,-32728\(gp\)
12000051c: 64a507a0 daddiu a1,a1,1952
- 120000520: df858028 ld a1,-32728\(gp\)
+ 120000520: df858030 ld a1,-32720\(gp\)
120000524: 64a5e9d4 daddiu a1,a1,-5676
- 120000528: df858020 ld a1,-32736\(gp\)
+ 120000528: df858028 ld a1,-32728\(gp\)
12000052c: 64a50794 daddiu a1,a1,1940
120000530: 00b1282d daddu a1,a1,s1
- 120000534: df858020 ld a1,-32736\(gp\)
+ 120000534: df858028 ld a1,-32728\(gp\)
120000538: 64a507a0 daddiu a1,a1,1952
12000053c: 00b1282d daddu a1,a1,s1
- 120000540: df858028 ld a1,-32728\(gp\)
+ 120000540: df858030 ld a1,-32720\(gp\)
120000544: 64a5e9d4 daddiu a1,a1,-5676
120000548: 00b1282d daddu a1,a1,s1
- 12000054c: df858020 ld a1,-32736\(gp\)
+ 12000054c: df858028 ld a1,-32728\(gp\)
120000550: dca50794 ld a1,1940\(a1\)
- 120000554: df858020 ld a1,-32736\(gp\)
+ 120000554: df858028 ld a1,-32728\(gp\)
120000558: dca507a0 ld a1,1952\(a1\)
- 12000055c: df858020 ld a1,-32736\(gp\)
+ 12000055c: df858028 ld a1,-32728\(gp\)
120000560: 00b1282d daddu a1,a1,s1
120000564: dca50794 ld a1,1940\(a1\)
- 120000568: df858020 ld a1,-32736\(gp\)
+ 120000568: df858028 ld a1,-32728\(gp\)
12000056c: 00b1282d daddu a1,a1,s1
120000570: dca507a0 ld a1,1952\(a1\)
- 120000574: df818020 ld at,-32736\(gp\)
+ 120000574: df818028 ld at,-32728\(gp\)
120000578: 0025082d daddu at,at,a1
12000057c: dc2507b6 ld a1,1974\(at\)
- 120000580: df818020 ld at,-32736\(gp\)
+ 120000580: df818028 ld at,-32728\(gp\)
120000584: 0025082d daddu at,at,a1
120000588: fc2507cc sd a1,1996\(at\)
- 12000058c: df818020 ld at,-32736\(gp\)
+ 12000058c: df818028 ld at,-32728\(gp\)
120000590: 64210794 daddiu at,at,1940
120000594: 88250000 lwl a1,0\(at\)
120000598: 98250003 lwr a1,3\(at\)
- 12000059c: df818020 ld at,-32736\(gp\)
+ 12000059c: df818028 ld at,-32728\(gp\)
1200005a0: 642107a0 daddiu at,at,1952
1200005a4: 88250000 lwl a1,0\(at\)
1200005a8: 98250003 lwr a1,3\(at\)
- 1200005ac: df818020 ld at,-32736\(gp\)
+ 1200005ac: df818028 ld at,-32728\(gp\)
1200005b0: 64210794 daddiu at,at,1940
1200005b4: 0031082d daddu at,at,s1
1200005b8: 88250000 lwl a1,0\(at\)
1200005bc: 98250003 lwr a1,3\(at\)
- 1200005c0: df818020 ld at,-32736\(gp\)
+ 1200005c0: df818028 ld at,-32728\(gp\)
1200005c4: 642107a0 daddiu at,at,1952
1200005c8: 0031082d daddu at,at,s1
1200005cc: 88250000 lwl a1,0\(at\)
1200005d0: 98250003 lwr a1,3\(at\)
- 1200005d4: df818020 ld at,-32736\(gp\)
+ 1200005d4: df818028 ld at,-32728\(gp\)
1200005d8: 642107b6 daddiu at,at,1974
1200005dc: 0025082d daddu at,at,a1
1200005e0: 88250000 lwl a1,0\(at\)
1200005e4: 98250003 lwr a1,3\(at\)
- 1200005e8: df818020 ld at,-32736\(gp\)
+ 1200005e8: df818028 ld at,-32728\(gp\)
1200005ec: 642107cc daddiu at,at,1996
1200005f0: 0025082d daddu at,at,a1
1200005f4: a8250000 swl a1,0\(at\)
@@ -348,59 +349,60 @@ Disassembly of section \.text:
1200005fc: 3c050000 lui a1,0x0
120000600: 00bc282d daddu a1,a1,gp
120000604: dca58050 ld a1,-32688\(a1\)
- 120000608: df858030 ld a1,-32720\(gp\)
+ 120000608: df858040 ld a1,-32704\(gp\)
12000060c: 64a506e0 daddiu a1,a1,1760
120000610: 3c190000 lui t9,0x0
120000614: 033cc82d daddu t9,t9,gp
120000618: df398050 ld t9,-32688\(t9\)
- 12000061c: df998030 ld t9,-32720\(gp\)
+ 12000061c: df998040 ld t9,-32704\(gp\)
120000620: 673906e0 daddiu t9,t9,1760
120000624: 3c190000 lui t9,0x0
120000628: 033cc82d daddu t9,t9,gp
12000062c: df398050 ld t9,-32688\(t9\)
120000630: 0411002b bal 1200006e0 <fn2>
120000634: 00000000 nop
- 120000638: df998030 ld t9,-32720\(gp\)
+ 120000638: df998040 ld t9,-32704\(gp\)
12000063c: 673906e0 daddiu t9,t9,1760
120000640: 04110027 bal 1200006e0 <fn2>
120000644: 00000000 nop
120000648: 3c050000 lui a1,0x0
12000064c: 00bc282d daddu a1,a1,gp
- 120000650: dca58058 ld a1,-32680\(a1\)
+ 120000650: dca58020 ld a1,-32736\(a1\)
120000654: 1000fea2 b 1200000e0 <fn>
120000658: 00000000 nop
12000065c: 3c050000 lui a1,0x0
120000660: 00bc282d daddu a1,a1,gp
- 120000664: dca58060 ld a1,-32672\(a1\)
+ 120000664: dca58048 ld a1,-32696\(a1\)
120000668: dca50000 ld a1,0\(a1\)
12000066c: 1000001c b 1200006e0 <fn2>
120000670: 00000000 nop
- 120000674: df858020 ld a1,-32736\(gp\)
+ 120000674: df858028 ld a1,-32728\(gp\)
120000678: 64a5071c daddiu a1,a1,1820
12000067c: 1000fe98 b 1200000e0 <fn>
120000680: 00000000 nop
- 120000684: df858020 ld a1,-32736\(gp\)
+ 120000684: df858028 ld a1,-32728\(gp\)
120000688: 64a507a0 daddiu a1,a1,1952
12000068c: 10000014 b 1200006e0 <fn2>
120000690: 00000000 nop
- 120000694: df858028 ld a1,-32728\(gp\)
+ 120000694: df858030 ld a1,-32720\(gp\)
120000698: 64a5e95c daddiu a1,a1,-5796
12000069c: 1000fe90 b 1200000e0 <fn>
1200006a0: 00000000 nop
- 1200006a4: df858020 ld a1,-32736\(gp\)
+ 1200006a4: df858028 ld a1,-32728\(gp\)
1200006a8: dca50794 ld a1,1940\(a1\)
1200006ac: 1000000c b 1200006e0 <fn2>
1200006b0: 00000000 nop
- 1200006b4: df858020 ld a1,-32736\(gp\)
+ 1200006b4: df858028 ld a1,-32728\(gp\)
1200006b8: dca50728 ld a1,1832\(a1\)
1200006bc: 1000fe88 b 1200000e0 <fn>
1200006c0: 00000000 nop
- 1200006c4: df818020 ld at,-32736\(gp\)
+ 1200006c4: df818028 ld at,-32728\(gp\)
1200006c8: 0025082d daddu at,at,a1
1200006cc: dc2507b6 ld a1,1974\(at\)
1200006d0: 10000003 b 1200006e0 <fn2>
1200006d4: 00000000 nop
\.\.\.
+
Disassembly of section \.data:
00000001200106e0 <_fdata>:
@@ -414,6 +416,7 @@ Disassembly of section \.data:
0000000120010794 <dg2>:
\.\.\.
+
Disassembly of section \.got:
00000001200107d0 <_GLOBAL_OFFSET_TABLE_>:
@@ -421,18 +424,18 @@ Disassembly of section \.got:
1200107d8: 80000000 .*
1200107dc: 00000000 .*
1200107e0: 00000001 .*
- 1200107e4: 20010000 .*
+ 1200107e4: 2001071c .*
1200107e8: 00000001 .*
- 1200107ec: 20030000 .*
+ 1200107ec: 20010000 .*
1200107f0: 00000001 .*
- 1200107f4: 20000000 .*
- \.\.\.
+ 1200107f4: 20030000 .*
+ 1200107f8: 00000001 .*
+ 1200107fc: 200000e0 .*
+ 120010800: 00000001 .*
+ 120010804: 20000000 .*
120010808: 00000001 .*
- 12001080c: 200000e0 .*
+ 12001080c: 20010794 .*
120010810: 00000001 .*
120010814: 200006e0 .*
- 120010818: 00000001 .*
- 12001081c: 2001071c .*
- 120010820: 00000001 .*
- 120010824: 20010794 .*
+ \.\.\.
#pass
diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-1.dd b/ld/testsuite/ld-mips-elf/mips16-pic-1.dd
index c853733..ba9a246 100644
--- a/ld/testsuite/ld-mips-elf/mips16-pic-1.dd
+++ b/ld/testsuite/ld-mips-elf/mips16-pic-1.dd
@@ -516,12 +516,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32660\(v0\)
+.*: [^\t]* lw v0,-32708\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32632\(v0\)
+.*: [^\t]* lw v0,-32704\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -576,12 +576,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32676\(v0\)
+.*: [^\t]* lw v0,-32700\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32656\(v0\)
+.*: [^\t]* lw v0,-32696\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -599,12 +599,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32676\(v0\)
+.*: [^\t]* lw v0,-32700\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32656\(v0\)
+.*: [^\t]* lw v0,-32696\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -656,12 +656,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32644\(v0\)
+.*: [^\t]* lw v0,-32692\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32672\(v0\)
+.*: [^\t]* lw v0,-32688\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -687,12 +687,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32668\(v0\)
+.*: [^\t]* lw v0,-32684\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32652\(v0\)
+.*: [^\t]* lw v0,-32680\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -719,12 +719,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32708\(v0\)
+.*: [^\t]* lw v0,-32676\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32704\(v0\)
+.*: [^\t]* lw v0,-32672\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -753,12 +753,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32700\(v0\)
+.*: [^\t]* lw v0,-32668\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32696\(v0\)
+.*: [^\t]* lw v0,-32664\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -781,12 +781,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32664\(v0\)
+.*: [^\t]* lw v0,-32660\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32640\(v0\)
+.*: [^\t]* lw v0,-32656\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
@@ -810,12 +810,12 @@ Disassembly of section \.text:
.*: [^\t]* addiu sp,-32
.*: [^\t]* sw v0,16\(sp\)
.*: [^\t]* sw ra,20\(sp\)
-.*: [^\t]* lw v0,-32648\(v0\)
+.*: [^\t]* lw v0,-32652\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
.*: [^\t]* move gp,v0
-.*: [^\t]* lw v0,-32636\(v0\)
+.*: [^\t]* lw v0,-32648\(v0\)
.*: [^\t]* jalr v0
.*: [^\t]* move t9,v0
.*: [^\t]* lw v0,16\(sp\)
diff --git a/ld/testsuite/ld-mips-elf/mips16-pic-1.gd b/ld/testsuite/ld-mips-elf/mips16-pic-1.gd
index 874a319..b8d8b34 100644
--- a/ld/testsuite/ld-mips-elf/mips16-pic-1.gd
+++ b/ld/testsuite/ld-mips-elf/mips16-pic-1.gd
@@ -27,31 +27,38 @@ Primary GOT:
00050024 -32716\(gp\) 00040d78
# __fn_b_used12
00050028 -32712\(gp\) 00040d8c
+# a_used13
+ 0005002c -32708\(gp\) 00040db0
+# b_used13
+ 00050030 -32704\(gp\) 00040dc4
+# a_used17
+ 00050034 -32700\(gp\) 00040e90
+# b_used17
+ 00050038 -32696\(gp\) 00040ea4
+# a_used19
+ 0005003c -32692\(gp\) 00040f00
+# b_used19
+ 00050040 -32688\(gp\) 00040f14
+# a_used20
+ 00050044 -32684\(gp\) 00040f38
+# b_used20
+ 00050048 -32680\(gp\) 00040f4c
# a_unused6
- 0005002c -32708\(gp\) 000404b1
+ 0005004c -32676\(gp\) 000404b1
# b_unused6
- 00050030 -32704\(gp\) 000404b5
+ 00050050 -32672\(gp\) 000404b5
# __fn_a_used8
- 00050034 -32700\(gp\) 00040c98
+ 00050054 -32668\(gp\) 00040c98
# __fn_b_used8
- 00050038 -32696\(gp\) 00040cac
- 0005003c -32692\(gp\) 00000000
- 00050040 -32688\(gp\) 00000000
- 00050044 -32684\(gp\) 00000000
- 00050048 -32680\(gp\) 00000000
-
- Global entries:
- Address Access Initial Sym\.Val\. Type Ndx Name
- 0005004c -32676\(gp\) 00040e90 00040e90 FUNC 7 a_used17
- 00050050 -32672\(gp\) 00040f14 00040f14 FUNC 7 b_used19
- 00050054 -32668\(gp\) 00040f38 00040f38 FUNC 7 a_used20
- 00050058 -32664\(gp\) 00040e20 00040e20 FUNC 7 a_used15
- 0005005c -32660\(gp\) 00040db0 00040db0 FUNC 7 a_used13
- 00050060 -32656\(gp\) 00040ea4 00040ea4 FUNC 7 b_used17
- 00050064 -32652\(gp\) 00040f4c 00040f4c FUNC 7 b_used20
- 00050068 -32648\(gp\) 00040f70 00040f70 FUNC 7 a_used21
- 0005006c -32644\(gp\) 00040f00 00040f00 FUNC 7 a_used19
- 00050070 -32640\(gp\) 00040e34 00040e34 FUNC 7 b_used15
- 00050074 -32636\(gp\) 00040f84 00040f84 FUNC 7 b_used21
- 00050078 -32632\(gp\) 00040dc4 00040dc4 FUNC 7 b_used13
+ 00050058 -32664\(gp\) 00040cac
+# a_used15
+ 0005005c -32660\(gp\) 00040e20
+# b_used15
+ 00050060 -32656\(gp\) 00040e34
+# a_used21
+ 00050064 -32652\(gp\) 00040f70
+# b_used21
+ 00050068 -32648\(gp\) 00040f84
+ 0005006c -32644\(gp\) 00000000
+#pass
diff --git a/ld/testsuite/ld-mips-elf/multi-got-no-shared.d b/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
index 6a539dc..25af107 100644
--- a/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
+++ b/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
@@ -9,10 +9,10 @@
Disassembly of section \.text:
004000b0 <[^>]*> 3c1c0043 lui gp,0x43
-004000b4 <[^>]*> 279c9a00 addiu gp,gp,-26112
+004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
#...
-00408d60 <[^>]*> 3c1c0044 lui gp,0x44
-00408d64 <[^>]*> 279cb348 addiu gp,gp,-19640
+00408d60 <[^>]*> 3c1c0043 lui gp,0x43
+00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
00408d68 <[^>]*> afbc0008 sw gp,8\(sp\)
#pass