This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH]: Fix gas reloc for HC12 memory bank
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: binutils at sources dot redhat dot com
- Date: Fri, 17 Jan 2003 23:52:40 +0100
- Subject: [PATCH]: Fix gas reloc for HC12 memory bank
Hi!
The HC12 relocs used for memory bank addresses must be against the symbols and not
the section. Committed on mainline.
Stephane
2003-01-17 Stephane Carrez <stcarrez@nerim.fr>
* config/tc-m68hc11.c (tc_m68hc11_fix_adjustable): Prevent adjustment
of relocs for memory bank addressing.
Index: config/tc-m68hc11.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68hc11.c,v
retrieving revision 1.35
diff -u -p -r1.35 tc-m68hc11.c
--- config/tc-m68hc11.c 17 Jan 2003 22:29:54 -0000 1.35
+++ config/tc-m68hc11.c 17 Jan 2003 22:46:32 -0000
@@ -3216,11 +3216,16 @@ tc_m68hc11_fix_adjustable (fixP)
/* For the linker relaxation to work correctly, these relocs
need to be on the symbol itself. */
case BFD_RELOC_16:
- case BFD_RELOC_LO16:
case BFD_RELOC_M68HC11_RL_JUMP:
case BFD_RELOC_M68HC11_RL_GROUP:
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
+
+ /* The memory bank addressing translation also needs the original
+ symbol. */
+ case BFD_RELOC_LO16:
+ case BFD_RELOC_M68HC11_PAGE:
+ case BFD_RELOC_M68HC11_24:
return 0;
case BFD_RELOC_32: