From d50879074249f8af4961f2722b7bd189d017bc1e Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 5 Sep 2003 07:18:27 +0000 Subject: gas/ * config/tc-frv.c (md_pcrel_from_section): Heed TC_FORCE_RELOCATION. gas/testsuite/ * gas/frv/reloc1.[sd]: New test. * gas/frv/allinsn.exp: Run it. --- gas/config/tc-frv.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c index 2b8d3ea..6c73cb8 100644 --- a/gas/config/tc-frv.c +++ b/gas/config/tc-frv.c @@ -1164,16 +1164,11 @@ md_convert_frag (abfd, sec, fragP) long md_pcrel_from_section (fixP, sec) fixS * fixP; - segT sec; + segT sec ATTRIBUTE_UNUSED; { - if (fixP->fx_addsy != (symbolS *) NULL - && (! S_IS_DEFINED (fixP->fx_addsy) - || S_GET_SEGMENT (fixP->fx_addsy) != sec)) - { - /* The symbol is undefined (or is defined but not in this section). - Let the linker figure it out. */ - return 0; - } + /* Make no adjustment for relocations that will be written out. */ + if (TC_FORCE_RELOCATION (fixP)) + return 0; return (fixP->fx_frag->fr_address + fixP->fx_where) & ~1; } -- cgit v1.1