[PATCH]: Generate relax relocations in gas HC11/HC12
Stephane Carrez
stcarrez@nerim.fr
Tue Aug 13 15:21:00 GMT 2002
Hi!
This patch adds the necessary support to generate the relocs for linker
relaxation (HC11/HC12). A RL_JUMP reloc is put at beginning of each branch
instruction. The assembler must not resolve relocs itself and transform them
to be based on sections. The linker will need the real symbol to know if relaxation
of the instruction can be done.
Committed on mainline.
Stephane
2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
* config/tc-m68hc11.h (MD_PCREL_FROM_SECTION): Remove.
(TC_HANDLES_FX_DONE): Define to let md_apply_fix3 set fx_done flag
according to the reloc.
(tc_fix_adjustable, tc_m68hc11_fix_adjustable): Define.
(TC_FORCE_RELOCATION): Define.
(tc_m68hc11_force_relocation): Declare.
* config/tc-m68hc11.c (md_pseudo_table): Add relax command.
(s_m68hc11_relax): New function for relax group.
(build_insn, build_jump_insn): Emit a M68HC11_RL_JUMP reloc at
beginning of jump instruction.
(md_pcrel_from): Rename from md_pcrel_from_section and fix
address computation.
(tc-gen_reloc): Update.
(md_estimate_size_before_relax): Create the BFD_RELOC_16_PCREL as
PC-relative fixup.
(tc_m68hc11_force_relocation): New function, handle new relocs.
(tc_m68hc11_fix_adjustable): New to make sure there are enough
reloc for the linker relax pass.
(md_apply_fix3): Handle M68HC11_RL_JUMP, M68HC11_RL_GROUP
and VTABLE relocs.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tc-m68hc11.c.diffs
URL: <https://sourceware.org/pipermail/binutils/attachments/20020813/b755ea6d/attachment.ksh>
More information about the Binutils
mailing list