diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2006-03-26 01:12:07 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@codesourcery.com> | 2006-03-26 01:12:07 +0000 |
commit | 1ac4baededff2d76a62f27ae00467ff87f56d674 (patch) | |
tree | 791300575144d04f6b39f835483d97d285771567 /gas/config/bfin-parse.y | |
parent | 753a4ce3929a5db443ed75e9d82c3e976c61f072 (diff) | |
download | gdb-1ac4baededff2d76a62f27ae00467ff87f56d674.zip gdb-1ac4baededff2d76a62f27ae00467ff87f56d674.tar.gz gdb-1ac4baededff2d76a62f27ae00467ff87f56d674.tar.bz2 |
* config/bfin-defs.h (Expr_Node_Type enum): Add Expr_Node_GOT_Reloc.
* config/bfin-lex.l: Recognize GOT17M4 and FUNCDESC_GOT17M4.
* config/bfin-parse.y: Include "libbfd.h", "elf/common.h" and
"elf/bfin.h".
(GOT17M4, FUNCDESC_GOT17M4): New tokens of type <value>.
(any_gotrel): New rule.
(got): Use it, and create Expr_Node_GOT_Reloc nodes.
* config/tc-bfin.c: Include "libbfd.h", "elf/common.h" and
"elf/bfin.h".
(DEFAULT_FLAGS, bfin_flags, bfin_pic_flag): New.
(bfin_pic_ptr): New function.
(md_pseudo_table): Add it for ".picptr".
(OPTION_FDPIC): New macro.
(md_longopts): Add -mfdpic.
(md_parse_option): Handle it.
(md_begin): Set BFD flags.
(md_apply_fix3, bfin_fix_adjustable): Handle new relocs.
(bfin_gen_ldstidxi): Adjust to match the trees that the parser gives
us for GOT relocs.
* Makefile.am (bfin-parse.o): Update dependencies.
(DEPTC_bfin_elf): Likewise.
* Makefile.in: Regenerate.
Diffstat (limited to 'gas/config/bfin-parse.y')
-rw-r--r-- | gas/config/bfin-parse.y | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y index f1e4887..917c2d2 100644 --- a/gas/config/bfin-parse.y +++ b/gas/config/bfin-parse.y @@ -21,10 +21,14 @@ %{ #include <stdio.h> -#include "bfin-aux.h" #include <stdarg.h> #include <obstack.h> +#include "bfin-aux.h" // opcode generating auxiliaries +#include "libbfd.h" +#include "elf/common.h" +#include "elf/bfin.h" + #define DSP32ALU(aopcde, HL, dst1, dst0, src0, src1, s, x, aop) \ bfin_gen_dsp32alu (HL, aopcde, aop, s, x, dst0, dst1, src0, src1) @@ -485,7 +489,8 @@ is_group2 (INSTR_T x) %token STATUS_REG %token MNOP %token SYMBOL NUMBER -%token GOT AT PLTPC +%token GOT GOT17M4 FUNCDESC_GOT17M4 +%token AT PLTPC /* Types. */ %type <instr> asm @@ -544,7 +549,7 @@ is_group2 (INSTR_T x) %type <expr> got %type <expr> got_or_expr %type <expr> pltpc - +%type <value> any_gotrel GOT GOT17M4 FUNCDESC_GOT17M4 /* Precedence rules. */ %left BAR @@ -4111,9 +4116,20 @@ symbol: SYMBOL } ; -got: symbol AT GOT +any_gotrel: + GOT + { $$ = BFD_RELOC_BFIN_GOT; } + | GOT17M4 + { $$ = BFD_RELOC_BFIN_GOT17M4; } + | FUNCDESC_GOT17M4 + { $$ = BFD_RELOC_BFIN_FUNCDESC_GOT17M4; } + ; + +got: symbol AT any_gotrel { - $$ = $1; + Expr_Node_Value val; + val.i_value = $3; + $$ = Expr_Node_Create (Expr_Node_GOT_Reloc, val, $1, NULL); } ; |