aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-frv.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-05-06 02:46:45 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-05-06 02:46:45 +0000
commit996991aa957771a9dac87e9aa8c860bb188ff0c5 (patch)
treefb884402f069725acaf86cad15bc0661fa5721a6 /gas/config/tc-frv.c
parent43850d5b4bc33f27ee2c8b66073a16350927b44c (diff)
downloadgdb-996991aa957771a9dac87e9aa8c860bb188ff0c5.zip
gdb-996991aa957771a9dac87e9aa8c860bb188ff0c5.tar.gz
gdb-996991aa957771a9dac87e9aa8c860bb188ff0c5.tar.bz2
* configure.in: Set em=linux for frv-*-*linux*.
* configure: Rebuilt. * config/tc-frv.h (TARGET_FORMAT): Use elf32-frvfdpic if... (frv_md_fdpic_enabled): New. * config/tc-frv.c (frv_md_fdpic_enabled): New. (DEFAULT_FDPIC): New. (frv_flags): Use DEFAULT_FDPIC. (frv_pic_flag): Likewise. (OPTION_NOPIC): New. (md_longopts): Add -mnopic. (md_parse_option): Handle it. (md_show_usage): Add -mfdpic and -mnopic.
Diffstat (limited to 'gas/config/tc-frv.c')
-rw-r--r--gas/config/tc-frv.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c
index 6c6528b..e85db95 100644
--- a/gas/config/tc-frv.c
+++ b/gas/config/tc-frv.c
@@ -162,15 +162,21 @@ static FRV_VLIW vliw;
#endif
#endif
+#ifdef TE_LINUX
+# define DEFAULT_FDPIC EF_FRV_FDPIC
+#else
+# define DEFAULT_FDPIC 0
+#endif
+
static unsigned long frv_mach = bfd_mach_frv;
static bfd_boolean fr400_audio;
/* Flags to set in the elf header */
-static flagword frv_flags = DEFAULT_FLAGS;
+static flagword frv_flags = DEFAULT_FLAGS | DEFAULT_FDPIC;
static int frv_user_set_flags_p = 0;
static int frv_pic_p = 0;
-static const char *frv_pic_flag = (const char *)0;
+static const char *frv_pic_flag = DEFAULT_FDPIC ? "-mfdpic" : (const char *)0;
/* Print tomcat-specific debugging info. */
static int tomcat_debug = 0;
@@ -220,6 +226,7 @@ const char * md_shortopts = FRV_SHORTOPTS;
#define OPTION_PACK (OPTION_MD_BASE + 19)
#define OPTION_NO_PACK (OPTION_MD_BASE + 20)
#define OPTION_FDPIC (OPTION_MD_BASE + 21)
+#define OPTION_NOPIC (OPTION_MD_BASE + 22)
struct option md_longopts[] =
{
@@ -246,6 +253,7 @@ struct option md_longopts[] =
{ "mpack", no_argument, NULL, OPTION_PACK },
{ "mno-pack", no_argument, NULL, OPTION_NO_PACK },
{ "mfdpic", no_argument, NULL, OPTION_FDPIC },
+ { "mnopic", no_argument, NULL, OPTION_NOPIC },
{ NULL, no_argument, NULL, 0 },
};
@@ -428,6 +436,12 @@ md_parse_option (c, arg)
frv_pic_flag = "-mfdpic";
break;
+ case OPTION_NOPIC:
+ frv_flags &= ~(EF_FRV_FDPIC | EF_FRV_PIC
+ | EF_FRV_BIGPIC | EF_FRV_LIBPIC);
+ frv_pic_flag = 0;
+ break;
+
case OPTION_TOMCAT_DEBUG:
tomcat_debug = 1;
break;
@@ -461,6 +475,8 @@ md_show_usage (stream)
fprintf (stream, _("-mpic Note small position independent code\n"));
fprintf (stream, _("-mPIC Note large position independent code\n"));
fprintf (stream, _("-mlibrary-pic Compile library for large position indepedent code\n"));
+ fprintf (stream, _("-mfdpic Assemble for the FDPIC ABI\n"));
+ fprintf (stream, _("-mnopic Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"));
fprintf (stream, _("-mcpu={fr500|fr550|fr400|fr405|fr450|fr300|frv|simple|tomcat}\n"));
fprintf (stream, _(" Record the cpu type\n"));
fprintf (stream, _("-mtomcat-stats Print out stats for tomcat workarounds\n"));
@@ -496,6 +512,12 @@ md_begin ()
frv_vliw_reset (& vliw, frv_mach, frv_flags);
}
+bfd_boolean
+frv_md_fdpic_enabled (void)
+{
+ return (frv_flags & EF_FRV_FDPIC) != 0;
+}
+
int chain_num = 0;
struct vliw_insn_list *frv_insert_vliw_insn PARAMS ((bfd_boolean));