diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-04-12 08:50:28 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2003-04-12 08:50:28 +0000 |
commit | 93a2b7ae81eb2f7ddbbe7d3711138d499dd9e14e (patch) | |
tree | db7a652b3bb20eedc490b73c1e08666454d67bba /bfd/elfxx-mips.c | |
parent | 18adea3ff6f8b511a0a0a819dd3a10a3704badf7 (diff) | |
download | gdb-93a2b7ae81eb2f7ddbbe7d3711138d499dd9e14e.zip gdb-93a2b7ae81eb2f7ddbbe7d3711138d499dd9e14e.tar.gz gdb-93a2b7ae81eb2f7ddbbe7d3711138d499dd9e14e.tar.bz2 |
* elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
occurrences of the same test changed in the previous patch.
Optimize.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 73d0520..0c3a5d9 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -3221,12 +3221,14 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info, switch (r_type) { case R_MIPS_GOT_PAGE: + case R_MIPS_GOT_OFST: /* If this symbol got a global GOT entry, we have to decay GOT_PAGE/GOT_OFST to GOT_DISP/addend. */ - if (local_p || ! h - || (h->root.dynindx - < mips_elf_get_global_gotsym_index (elf_hash_table (info) - ->dynobj))) + local_p = local_p || ! h + || (h->root.dynindx + < mips_elf_get_global_gotsym_index (elf_hash_table (info) + ->dynobj)); + if (local_p || r_type == R_MIPS_GOT_OFST) break; /* Fall through. */ @@ -3512,7 +3514,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info, /* GOT_PAGE relocations that reference non-local symbols decay to GOT_DISP. The corresponding GOT_OFST relocation decays to 0. */ - if (! (local_p || ! h || h->root.dynindx < 0)) + if (! local_p) goto got_disp; value = mips_elf_got_page (abfd, input_bfd, info, symbol + addend, NULL); if (value == MINUS_ONE) @@ -3523,7 +3525,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info, break; case R_MIPS_GOT_OFST: - if (local_p || ! h || h->root.dynindx < 0) + if (local_p) mips_elf_got_page (abfd, input_bfd, info, symbol + addend, &value); else value = addend; |