This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
mn10300 GAS PC-rel relocations
- To: binutils at sources dot redhat dot com
- Subject: mn10300 GAS PC-rel relocations
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 09 May 2001 10:31:41 -0300
- Organization: GCC Team, Red Hat
The mn10300 assembler failed to handle PC-relative relocations in
certain complex cases. Unfortunately, I can't post the original
testcase, and I couldn't create a simplified one. This patch fixes
the problem. I'm checking it in, approved by Richard Henderson.
Index: gas/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs.
Index: gas/config/tc-mn10300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mn10300.c,v
retrieving revision 1.22
diff -u -p -r1.22 tc-mn10300.c
--- gas/config/tc-mn10300.c 2001/05/06 20:05:28 1.22
+++ gas/config/tc-mn10300.c 2001/05/09 13:30:49
@@ -1901,14 +1901,17 @@ md_apply_fix3 (fixp, valuep, seg)
switch (fixp->fx_r_type)
{
case BFD_RELOC_8:
+ case BFD_RELOC_8_PCREL:
size = 1;
break;
case BFD_RELOC_16:
+ case BFD_RELOC_16_PCREL:
size = 2;
break;
case BFD_RELOC_32:
+ case BFD_RELOC_32_PCREL:
size = 4;
break;
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me