mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 23:34:02 +08:00
* elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
occurrences of the same test changed in the previous patch. Optimize.
This commit is contained in:
parent
18adea3ff6
commit
93a2b7ae81
@ -1,3 +1,9 @@
|
|||||||
|
2003-04-12 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
|
* elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
|
||||||
|
occurrences of the same test changed in the previous patch.
|
||||||
|
Optimize.
|
||||||
|
|
||||||
2003-04-11 Alexandre Oliva <aoliva@redhat.com>
|
2003-04-11 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
* elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
|
* elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
|
||||||
|
@ -3221,12 +3221,14 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
|
|||||||
switch (r_type)
|
switch (r_type)
|
||||||
{
|
{
|
||||||
case R_MIPS_GOT_PAGE:
|
case R_MIPS_GOT_PAGE:
|
||||||
|
case R_MIPS_GOT_OFST:
|
||||||
/* If this symbol got a global GOT entry, we have to decay
|
/* If this symbol got a global GOT entry, we have to decay
|
||||||
GOT_PAGE/GOT_OFST to GOT_DISP/addend. */
|
GOT_PAGE/GOT_OFST to GOT_DISP/addend. */
|
||||||
if (local_p || ! h
|
local_p = local_p || ! h
|
||||||
|| (h->root.dynindx
|
|| (h->root.dynindx
|
||||||
< mips_elf_get_global_gotsym_index (elf_hash_table (info)
|
< mips_elf_get_global_gotsym_index (elf_hash_table (info)
|
||||||
->dynobj)))
|
->dynobj));
|
||||||
|
if (local_p || r_type == R_MIPS_GOT_OFST)
|
||||||
break;
|
break;
|
||||||
/* Fall through. */
|
/* 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
|
/* GOT_PAGE relocations that reference non-local symbols decay
|
||||||
to GOT_DISP. The corresponding GOT_OFST relocation decays to
|
to GOT_DISP. The corresponding GOT_OFST relocation decays to
|
||||||
0. */
|
0. */
|
||||||
if (! (local_p || ! h || h->root.dynindx < 0))
|
if (! local_p)
|
||||||
goto got_disp;
|
goto got_disp;
|
||||||
value = mips_elf_got_page (abfd, input_bfd, info, symbol + addend, NULL);
|
value = mips_elf_got_page (abfd, input_bfd, info, symbol + addend, NULL);
|
||||||
if (value == MINUS_ONE)
|
if (value == MINUS_ONE)
|
||||||
@ -3523,7 +3525,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case R_MIPS_GOT_OFST:
|
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);
|
mips_elf_got_page (abfd, input_bfd, info, symbol + addend, &value);
|
||||||
else
|
else
|
||||||
value = addend;
|
value = addend;
|
||||||
|
Loading…
Reference in New Issue
Block a user