mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
* config/tc-mips.c (md_estimate_size_before_relax): Handle the
case of a symbol equated to another symbol when using SVR4_PIC.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
Fri Mar 14 15:33:38 1997 Ian Lance Taylor <ian@cygnus.com>
|
Fri Mar 14 15:33:38 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* config/tc-mips.c (md_estimate_size_before_relax): Handle the
|
||||||
|
case of a symbol equated to another symbol when using SVR4_PIC.
|
||||||
|
|
||||||
* Makefile.in (TARG_CPU_DEP_sparc): Add opcode/sparc.h.
|
* Makefile.in (TARG_CPU_DEP_sparc): Add opcode/sparc.h.
|
||||||
|
|
||||||
Thu Mar 13 11:20:51 1997 Ian Lance Taylor <ian@cygnus.com>
|
Thu Mar 13 11:20:51 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
@ -8068,12 +8068,12 @@ struct option md_longopts[] = {
|
|||||||
{"mips16", no_argument, NULL, OPTION_MIPS16},
|
{"mips16", no_argument, NULL, OPTION_MIPS16},
|
||||||
#define OPTION_NO_MIPS16 (OPTION_MD_BASE + 23)
|
#define OPTION_NO_MIPS16 (OPTION_MD_BASE + 23)
|
||||||
{"no-mips16", no_argument, NULL, OPTION_NO_MIPS16},
|
{"no-mips16", no_argument, NULL, OPTION_NO_MIPS16},
|
||||||
/* start-sanitize-5900 */
|
/* start-sanitize-r5900 */
|
||||||
#define OPTION_M5900 (OPTION_MD_BASE + 24)
|
#define OPTION_M5900 (OPTION_MD_BASE + 24)
|
||||||
{"m5900", no_argument, NULL, OPTION_M5900},
|
{"m5900", no_argument, NULL, OPTION_M5900},
|
||||||
#define OPTION_NO_M5900 (OPTION_MD_BASE + 25)
|
#define OPTION_NO_M5900 (OPTION_MD_BASE + 25)
|
||||||
{"no-m5900", no_argument, NULL, OPTION_NO_M5900},
|
{"no-m5900", no_argument, NULL, OPTION_NO_M5900},
|
||||||
/* end-sanitize-5900 */
|
/* end-sanitize-r5900 */
|
||||||
|
|
||||||
#define OPTION_CALL_SHARED (OPTION_MD_BASE + 7)
|
#define OPTION_CALL_SHARED (OPTION_MD_BASE + 7)
|
||||||
#define OPTION_NON_SHARED (OPTION_MD_BASE + 8)
|
#define OPTION_NON_SHARED (OPTION_MD_BASE + 8)
|
||||||
@ -9922,7 +9922,26 @@ md_estimate_size_before_relax (fragp, segtype)
|
|||||||
}
|
}
|
||||||
else if (mips_pic == SVR4_PIC)
|
else if (mips_pic == SVR4_PIC)
|
||||||
{
|
{
|
||||||
asection *symsec = fragp->fr_symbol->bsym->section;
|
symbolS *sym;
|
||||||
|
asection *symsec;
|
||||||
|
|
||||||
|
sym = fragp->fr_symbol;
|
||||||
|
|
||||||
|
/* Handle the case of a symbol equated to another symbol. */
|
||||||
|
while (sym->sy_value.X_op == O_symbol
|
||||||
|
&& (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
|
||||||
|
{
|
||||||
|
symbolS *n;
|
||||||
|
|
||||||
|
/* It's possible to get a loop here in a badly written
|
||||||
|
program. */
|
||||||
|
n = sym->sy_value.X_add_symbol;
|
||||||
|
if (n == sym)
|
||||||
|
break;
|
||||||
|
sym = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
symsec = S_GET_SEGMENT (sym);
|
||||||
|
|
||||||
/* This must duplicate the test in adjust_reloc_syms. */
|
/* This must duplicate the test in adjust_reloc_syms. */
|
||||||
change = (symsec != &bfd_und_section
|
change = (symsec != &bfd_und_section
|
||||||
@ -9969,7 +9988,8 @@ mips_fix_adjustable (fixp)
|
|||||||
return 1;
|
return 1;
|
||||||
#ifdef S_GET_OTHER
|
#ifdef S_GET_OTHER
|
||||||
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
|
if (OUTPUT_FLAVOR == bfd_target_elf_flavour
|
||||||
&& S_GET_OTHER (fixp->fx_addsy) == STO_MIPS16)
|
&& S_GET_OTHER (fixp->fx_addsy) == STO_MIPS16
|
||||||
|
&& fixp->fx_subsy == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user