[PATCH]: Add %page and %addr modifier to gas HC11
Stephane Carrez
stcarrez@nerim.fr
Sat Apr 5 12:46:00 GMT 2003
Hi!
I committed the following patch to:
- add a %addr(expr) and %page(expr) modifiers for memory bank support.
%addr() represents the physical address of the symbol within the memory window
(-> BFD_RELOC_M68HC11_LO16)
%page() represents the page number where the symbol is defined
(-> BFD_RELOC_M68HC11_PAGE)
- fix a bug when assembling: 'leax sym,x' and 'sym' is a symbol defined
in the same section. It was treated as a PC-reloc offset but the semantic
is really the address of 'sym' (this insn does: x := x + sym)
- make sure the relocs are against their symbols and not the section.
This is important for linker relaxation and for trampoline generation.
For the BFD_RELOC_32, this is temporary until I update the bfd reloc part
(according to Alan recommendation back in october)
Stephane
2003-04-05 Stephane Carrez <stcarrez@nerim.fr>
* config/tc-m68hc11.c (M6811_OP_CALL_ADDR): New internal define.
(M6811_OP_PAGE_ADDR): New internal define.
(get_operand): New modifier %page and %addr to obtain page and
address part of a far-function.
(fixup8): Use BFD_RELOC_M68HC11_PAGE for a %page modifier; don't
complain on overflow for the BFD_RELOC_M68HC11_PAGE and truncation
relocs.
(fixup16): Use BFD_RELOC_M68HC11_LO16 for a %addr modifier.
(find_opcode): Add comment.
(md_estimate_size_before_relax): Force relocation of
STATE_UNDEXED_OFFSET types when the symbol is not absolute.
(tc_m68hc11_fix_adjustable): Check for BFD_RELOC_M68HC11_LO16
instead of BFD_RELOC_LO16; temporarily make the BFD_RELOC_32
on the symbol itself so that DWARF2 strings are merged correctly.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tc-m68hc11.c.diffs
URL: <https://sourceware.org/pipermail/binutils/attachments/20030405/2a4b11a8/attachment.ksh>
More information about the Binutils
mailing list