* 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.
This commit is contained in:
Bernd Schmidt
2006-03-26 01:12:07 +00:00
parent 753a4ce392
commit 1ac4baeded
7 changed files with 211 additions and 67 deletions

View File

@ -613,7 +613,8 @@ $(srcdir)/config/m68k-parse.h: ; @true
bfin-parse.c: $(srcdir)/config/bfin-parse.y
$(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
bfin-parse.h: bfin-parse.c
bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h
bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
bfin-defs.h: ; @true
$(srcdir)/config/bfin-defs.h: ; @true
@ -1021,14 +1022,17 @@ DEPTC_bfin_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
$(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h dwarf2dbg.h \
$(srcdir)/config/bfin-defs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
$(srcdir)/config/bfin-aux.h $(INCDIR)/opcode/bfin.h
$(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
$(srcdir)/config/bfin-aux.h $(INCDIR)/opcode/bfin.h \
$(srcdir)/config/bfin-defs.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
DEPTC_bfin_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h \
dwarf2dbg.h struc-symbol.h $(srcdir)/config/bfin-defs.h \
$(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h $(srcdir)/config/bfin-aux.h \
$(INCDIR)/opcode/bfin.h
$(INCDIR)/opcode/bfin.h $(srcdir)/config/bfin-defs.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \