mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
* config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Remove.
* config/tc-mips.c (RDATA_SECTION_NAME, mips_target_format): Remove a.out support. (md_begin, mips_ip, md_parse_option, s_change_sec, s_option, s_abicalls, nopic_need_relax, tc_gen_reloc): Remove uses of USE_GLOBAL_POINTER_OPT.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2004-04-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
||||||
|
|
||||||
|
* config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Remove.
|
||||||
|
* config/tc-mips.c (RDATA_SECTION_NAME, mips_target_format): Remove
|
||||||
|
a.out support.
|
||||||
|
(md_begin, mips_ip, md_parse_option, s_change_sec, s_option,
|
||||||
|
s_abicalls, nopic_need_relax, tc_gen_reloc): Remove uses of
|
||||||
|
USE_GLOBAL_POINTER_OPT.
|
||||||
|
|
||||||
2004-04-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
2004-04-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
||||||
|
|
||||||
* config/tc-mips.c (macro): One more use of load_delay_nop.
|
* config/tc-mips.c (macro): One more use of load_delay_nop.
|
||||||
|
@ -111,9 +111,7 @@ static char *mips_regmask_frag;
|
|||||||
extern int target_big_endian;
|
extern int target_big_endian;
|
||||||
|
|
||||||
/* The name of the readonly data section. */
|
/* The name of the readonly data section. */
|
||||||
#define RDATA_SECTION_NAME (OUTPUT_FLAVOR == bfd_target_aout_flavour \
|
#define RDATA_SECTION_NAME (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
|
||||||
? ".data" \
|
|
||||||
: OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
|
|
||||||
? ".rdata" \
|
? ".rdata" \
|
||||||
: OUTPUT_FLAVOR == bfd_target_coff_flavour \
|
: OUTPUT_FLAVOR == bfd_target_coff_flavour \
|
||||||
? ".rdata" \
|
? ".rdata" \
|
||||||
@ -1083,8 +1081,6 @@ mips_target_format (void)
|
|||||||
{
|
{
|
||||||
switch (OUTPUT_FLAVOR)
|
switch (OUTPUT_FLAVOR)
|
||||||
{
|
{
|
||||||
case bfd_target_aout_flavour:
|
|
||||||
return target_big_endian ? "a.out-mips-big" : "a.out-mips-little";
|
|
||||||
case bfd_target_ecoff_flavour:
|
case bfd_target_ecoff_flavour:
|
||||||
return target_big_endian ? "ecoff-bigmips" : ECOFF_LITTLE_FORMAT;
|
return target_big_endian ? "ecoff-bigmips" : ECOFF_LITTLE_FORMAT;
|
||||||
case bfd_target_coff_flavour:
|
case bfd_target_coff_flavour:
|
||||||
@ -1241,7 +1237,6 @@ md_begin (void)
|
|||||||
/* set the default alignment for the text section (2**2) */
|
/* set the default alignment for the text section (2**2) */
|
||||||
record_alignment (text_section, 2);
|
record_alignment (text_section, 2);
|
||||||
|
|
||||||
if (USE_GLOBAL_POINTER_OPT)
|
|
||||||
bfd_set_gp_size (stdoutput, g_switch_value);
|
bfd_set_gp_size (stdoutput, g_switch_value);
|
||||||
|
|
||||||
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
||||||
@ -8894,8 +8889,7 @@ do_msbd:
|
|||||||
|
|
||||||
if (*args == 'f'
|
if (*args == 'f'
|
||||||
|| (*args == 'l'
|
|| (*args == 'l'
|
||||||
&& (! USE_GLOBAL_POINTER_OPT
|
&& (mips_pic == EMBEDDED_PIC
|
||||||
|| mips_pic == EMBEDDED_PIC
|
|
||||||
|| g_switch_value < 4
|
|| g_switch_value < 4
|
||||||
|| (temp[0] == 0 && temp[1] == 0)
|
|| (temp[0] == 0 && temp[1] == 0)
|
||||||
|| (temp[2] == 0 && temp[3] == 0))))
|
|| (temp[2] == 0 && temp[3] == 0))))
|
||||||
@ -8983,7 +8977,7 @@ do_msbd:
|
|||||||
default: /* unused default case avoids warnings. */
|
default: /* unused default case avoids warnings. */
|
||||||
case 'L':
|
case 'L':
|
||||||
newname = RDATA_SECTION_NAME;
|
newname = RDATA_SECTION_NAME;
|
||||||
if ((USE_GLOBAL_POINTER_OPT && g_switch_value >= 8)
|
if ((g_switch_value >= 8)
|
||||||
|| mips_pic == EMBEDDED_PIC)
|
|| mips_pic == EMBEDDED_PIC)
|
||||||
newname = ".lit8";
|
newname = ".lit8";
|
||||||
break;
|
break;
|
||||||
@ -8994,8 +8988,7 @@ do_msbd:
|
|||||||
newname = RDATA_SECTION_NAME;
|
newname = RDATA_SECTION_NAME;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
assert (!USE_GLOBAL_POINTER_OPT
|
assert (g_switch_value >= 4);
|
||||||
|| g_switch_value >= 4);
|
|
||||||
newname = ".lit4";
|
newname = ".lit4";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -10491,7 +10484,7 @@ md_parse_option (int c, char *arg)
|
|||||||
|
|
||||||
case OPTION_MEMBEDDED_PIC:
|
case OPTION_MEMBEDDED_PIC:
|
||||||
mips_pic = EMBEDDED_PIC;
|
mips_pic = EMBEDDED_PIC;
|
||||||
if (USE_GLOBAL_POINTER_OPT && g_switch_seen)
|
if (g_switch_seen)
|
||||||
{
|
{
|
||||||
as_bad (_("-G may not be used with embedded PIC code"));
|
as_bad (_("-G may not be used with embedded PIC code"));
|
||||||
return 0;
|
return 0;
|
||||||
@ -10554,12 +10547,7 @@ md_parse_option (int c, char *arg)
|
|||||||
#endif /* OBJ_ELF */
|
#endif /* OBJ_ELF */
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
if (! USE_GLOBAL_POINTER_OPT)
|
if (mips_pic == SVR4_PIC || mips_pic == EMBEDDED_PIC)
|
||||||
{
|
|
||||||
as_bad (_("-G is not supported for this configuration"));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (mips_pic == SVR4_PIC || mips_pic == EMBEDDED_PIC)
|
|
||||||
{
|
{
|
||||||
as_bad (_("-G may not be used with SVR4 or embedded PIC code"));
|
as_bad (_("-G may not be used with SVR4 or embedded PIC code"));
|
||||||
return 0;
|
return 0;
|
||||||
@ -11540,53 +11528,31 @@ s_change_sec (int sec)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
if (USE_GLOBAL_POINTER_OPT)
|
|
||||||
{
|
|
||||||
seg = subseg_new (RDATA_SECTION_NAME,
|
seg = subseg_new (RDATA_SECTION_NAME,
|
||||||
(subsegT) get_absolute_expression ());
|
(subsegT) get_absolute_expression ());
|
||||||
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
||||||
{
|
{
|
||||||
bfd_set_section_flags (stdoutput, seg,
|
bfd_set_section_flags (stdoutput, seg, (SEC_ALLOC | SEC_LOAD
|
||||||
(SEC_ALLOC
|
| SEC_READONLY | SEC_RELOC
|
||||||
| SEC_LOAD
|
|
||||||
| SEC_READONLY
|
|
||||||
| SEC_RELOC
|
|
||||||
| SEC_DATA));
|
| SEC_DATA));
|
||||||
if (strcmp (TARGET_OS, "elf") != 0)
|
if (strcmp (TARGET_OS, "elf") != 0)
|
||||||
record_alignment (seg, 4);
|
record_alignment (seg, 4);
|
||||||
}
|
}
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
as_bad (_("No read only data section in this object file format"));
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
if (USE_GLOBAL_POINTER_OPT)
|
|
||||||
{
|
|
||||||
seg = subseg_new (".sdata", (subsegT) get_absolute_expression ());
|
seg = subseg_new (".sdata", (subsegT) get_absolute_expression ());
|
||||||
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
||||||
{
|
{
|
||||||
bfd_set_section_flags (stdoutput, seg,
|
bfd_set_section_flags (stdoutput, seg,
|
||||||
SEC_ALLOC | SEC_LOAD | SEC_RELOC
|
SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA);
|
||||||
| SEC_DATA);
|
|
||||||
if (strcmp (TARGET_OS, "elf") != 0)
|
if (strcmp (TARGET_OS, "elf") != 0)
|
||||||
record_alignment (seg, 4);
|
record_alignment (seg, 4);
|
||||||
}
|
}
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
as_bad (_("Global pointers not supported; recompile -G 0"));
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto_align = 1;
|
auto_align = 1;
|
||||||
}
|
}
|
||||||
@ -11781,7 +11747,7 @@ s_option (int x ATTRIBUTE_UNUSED)
|
|||||||
else
|
else
|
||||||
as_bad (_(".option pic%d not supported"), i);
|
as_bad (_(".option pic%d not supported"), i);
|
||||||
|
|
||||||
if (USE_GLOBAL_POINTER_OPT && mips_pic == SVR4_PIC)
|
if (mips_pic == SVR4_PIC)
|
||||||
{
|
{
|
||||||
if (g_switch_seen && g_switch_value != 0)
|
if (g_switch_seen && g_switch_value != 0)
|
||||||
as_warn (_("-G may not be used with SVR4 PIC code"));
|
as_warn (_("-G may not be used with SVR4 PIC code"));
|
||||||
@ -12022,12 +11988,11 @@ s_abicalls (int ignore ATTRIBUTE_UNUSED)
|
|||||||
{
|
{
|
||||||
mips_pic = SVR4_PIC;
|
mips_pic = SVR4_PIC;
|
||||||
mips_abicalls = TRUE;
|
mips_abicalls = TRUE;
|
||||||
if (USE_GLOBAL_POINTER_OPT)
|
|
||||||
{
|
|
||||||
if (g_switch_seen && g_switch_value != 0)
|
if (g_switch_seen && g_switch_value != 0)
|
||||||
as_warn (_("-G may not be used with SVR4 PIC code"));
|
as_warn (_("-G may not be used with SVR4 PIC code"));
|
||||||
g_switch_value = 0;
|
g_switch_value = 0;
|
||||||
}
|
|
||||||
bfd_set_gp_size (stdoutput, 0);
|
bfd_set_gp_size (stdoutput, 0);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
@ -12584,7 +12549,7 @@ nopic_need_relax (symbolS *sym, int before_relaxing)
|
|||||||
if (sym == 0)
|
if (sym == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (USE_GLOBAL_POINTER_OPT && g_switch_value > 0)
|
if (g_switch_value > 0)
|
||||||
{
|
{
|
||||||
const char *symname;
|
const char *symname;
|
||||||
int change;
|
int change;
|
||||||
@ -13090,12 +13055,9 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (OUTPUT_FLAVOR != bfd_target_aout_flavour)
|
|
||||||
/* A gruesome hack which is a result of the gruesome gas reloc
|
/* A gruesome hack which is a result of the gruesome gas reloc
|
||||||
handling. */
|
handling. */
|
||||||
reloc->addend = pcrel_address;
|
reloc->addend = pcrel_address;
|
||||||
else
|
|
||||||
reloc->addend = -pcrel_address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -167,10 +167,6 @@ extern void mips_elf_final_processing (void);
|
|||||||
extern void md_mips_end (void);
|
extern void md_mips_end (void);
|
||||||
#define md_end() md_mips_end()
|
#define md_end() md_mips_end()
|
||||||
|
|
||||||
#define USE_GLOBAL_POINTER_OPT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
|
|
||||||
|| OUTPUT_FLAVOR == bfd_target_coff_flavour \
|
|
||||||
|| OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
|
||||||
|
|
||||||
extern void mips_pop_insert (void);
|
extern void mips_pop_insert (void);
|
||||||
#define md_pop_insert() mips_pop_insert()
|
#define md_pop_insert() mips_pop_insert()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user