diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-04-23 18:40:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-04-23 18:40:34 +0000 |
commit | fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d (patch) | |
tree | 4818c0449af831829cd11af09ed878566e103829 /gas/config | |
parent | 554387026911a74af6e23cd8791d16ce5a1a0070 (diff) | |
download | gdb-fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d.zip gdb-fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d.tar.gz gdb-fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d.tar.bz2 |
2008-04-23 Mike Frysinger <vapier@gentoo.org>
* Makefile.am (OBJ_FORMAT_CFILES): Add config/obj-fdpicelf.c.
(OBJ_FORMAT_HFILES): Add config/obj-fdpicelf.h.
(obj-fdpicelf.o): Define.
* Makefile.in: Regenerate.
* configure.tgt: Set bfd_gas to yes when fmt is fdpicelf.
(bfin-*-*): Delete.
(bfin-*-linux-uclibc): New; set fmt to fdpicelf and em to linux.
(bfin-*-uclinux*): New; set fmt to elf and em to linux.
* config/obj-fdpicelf.c: New.
* config/obj-fdpicelf.h: Likewise.
* config/tc-bfin.c (bfin_flags, bfin_pic_flag): Set default based on
the OBJ_FDPIC_ELF define.
(OPTION_NOPIC): Define.
(md_longopts): Add mnopic and mno-fdpic.
(md_parse_option): Handle OPTION_NOPIC.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-fdpicelf.c | 1 | ||||
-rw-r--r-- | gas/config/obj-fdpicelf.h | 2 | ||||
-rw-r--r-- | gas/config/tc-bfin.c | 20 |
3 files changed, 20 insertions, 3 deletions
diff --git a/gas/config/obj-fdpicelf.c b/gas/config/obj-fdpicelf.c new file mode 100644 index 0000000..a992b35 --- /dev/null +++ b/gas/config/obj-fdpicelf.c @@ -0,0 +1 @@ +#include "obj-elf.c" diff --git a/gas/config/obj-fdpicelf.h b/gas/config/obj-fdpicelf.h new file mode 100644 index 0000000..9f1af5d --- /dev/null +++ b/gas/config/obj-fdpicelf.h @@ -0,0 +1,2 @@ +#define OBJ_FDPIC_ELF 1 +#include "obj-elf.h" diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c index 4652efa..3991622 100644 --- a/gas/config/tc-bfin.c +++ b/gas/config/tc-bfin.c @@ -50,8 +50,14 @@ FILE *errorf; /* Flags to set in the elf header */ #define DEFAULT_FLAGS 0 -static flagword bfin_flags = DEFAULT_FLAGS; -static const char *bfin_pic_flag = (const char *)0; +#ifdef OBJ_FDPIC_ELF +# define DEFAULT_FDPIC EF_BFIN_FDPIC +#else +# define DEFAULT_FDPIC 0 +#endif + +static flagword bfin_flags = DEFAULT_FLAGS | DEFAULT_FDPIC; +static const char *bfin_pic_flag = DEFAULT_FDPIC ? "-mfdpic" : (const char *)0; /* Registers list. */ struct bfin_reg_entry @@ -305,10 +311,13 @@ const char FLT_CHARS[] = "fFdDxX"; const char *md_shortopts = ""; #define OPTION_FDPIC (OPTION_MD_BASE) +#define OPTION_NOPIC (OPTION_MD_BASE + 1) struct option md_longopts[] = { - { "mfdpic", no_argument, NULL, OPTION_FDPIC }, + { "mfdpic", no_argument, NULL, OPTION_FDPIC }, + { "mnopic", no_argument, NULL, OPTION_NOPIC }, + { "mno-fdpic", no_argument, NULL, OPTION_NOPIC }, { NULL, no_argument, NULL, 0 }, }; @@ -327,6 +336,11 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED) bfin_flags |= EF_BFIN_FDPIC; bfin_pic_flag = "-mfdpic"; break; + + case OPTION_NOPIC: + bfin_flags &= ~(EF_BFIN_FDPIC); + bfin_pic_flag = 0; + break; } return 1; |