aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-frv.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-09-05 07:18:27 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2003-09-05 07:18:27 +0000
commitd50879074249f8af4961f2722b7bd189d017bc1e (patch)
tree9882dbf52e1ec2c640d52909ed2d81485d81890a /gas/config/tc-frv.c
parentceae570b2169c3122a1cb921a88f0ef9485d9b9c (diff)
downloadfsf-binutils-gdb-d50879074249f8af4961f2722b7bd189d017bc1e.zip
fsf-binutils-gdb-d50879074249f8af4961f2722b7bd189d017bc1e.tar.gz
fsf-binutils-gdb-d50879074249f8af4961f2722b7bd189d017bc1e.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-frv.c')
-rw-r--r--gas/config/tc-frv.c13
1 files changed, 4 insertions, 9 deletions
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;
}