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.
This commit is contained in:
parent
ceae570b21
commit
d508790742
6 changed files with 49 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-09-05 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* config/tc-frv.c (md_pcrel_from_section): Heed TC_FORCE_RELOCATION.
|
||||||
|
|
||||||
2003-09-04 Nick Clifton <nickc@redhat.com>
|
2003-09-04 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* config/tc-v850.c (set_machine): Accept v850e1 machine number.
|
* config/tc-v850.c (set_machine): Accept v850e1 machine number.
|
||||||
|
|
|
@ -1164,16 +1164,11 @@ md_convert_frag (abfd, sec, fragP)
|
||||||
long
|
long
|
||||||
md_pcrel_from_section (fixP, sec)
|
md_pcrel_from_section (fixP, sec)
|
||||||
fixS * fixP;
|
fixS * fixP;
|
||||||
segT sec;
|
segT sec ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
if (fixP->fx_addsy != (symbolS *) NULL
|
/* Make no adjustment for relocations that will be written out. */
|
||||||
&& (! S_IS_DEFINED (fixP->fx_addsy)
|
if (TC_FORCE_RELOCATION (fixP))
|
||||||
|| S_GET_SEGMENT (fixP->fx_addsy) != sec))
|
return 0;
|
||||||
{
|
|
||||||
/* The symbol is undefined (or is defined but not in this section).
|
|
||||||
Let the linker figure it out. */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (fixP->fx_frag->fr_address + fixP->fx_where) & ~1;
|
return (fixP->fx_frag->fr_address + fixP->fx_where) & ~1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-09-05 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* gas/frv/reloc1.[sd]: New test.
|
||||||
|
* gas/frv/allinsn.exp: Run it.
|
||||||
|
|
||||||
2003-09-04 Nick Clifton <nickc@redhat.com>
|
2003-09-04 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* gas/v850/v850e1.s: New test source file.
|
* gas/v850/v850e1.s: New test source file.
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
if [istarget frv*-*-*] {
|
if [istarget frv*-*-*] {
|
||||||
run_dump_test "allinsn"
|
run_dump_test "allinsn"
|
||||||
|
run_dump_test "reloc1"
|
||||||
}
|
}
|
||||||
|
|
21
gas/testsuite/gas/frv/reloc1.d
Normal file
21
gas/testsuite/gas/frv/reloc1.d
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#objdump: -dr
|
||||||
|
|
||||||
|
.* elf32-frv
|
||||||
|
|
||||||
|
Disassembly.*:
|
||||||
|
|
||||||
|
.* <begin>:
|
||||||
|
.*: 80 88 00 00 * nop
|
||||||
|
.*: 80 88 00 00 * nop
|
||||||
|
.* <f1>:
|
||||||
|
.*: 80 88 00 00 * nop
|
||||||
|
.*: 80 88 00 00 * nop
|
||||||
|
.*: 80 88 00 00 * nop
|
||||||
|
.* <f2>:
|
||||||
|
.*: 80 3c 00 00 * call.*
|
||||||
|
.*: R_FRV_LABEL24 f1
|
||||||
|
.*: c0 1a 00 00 * bra.*
|
||||||
|
.*: R_FRV_LABEL16 f1
|
||||||
|
.*: fe 3f ff fe * call .* <f2>
|
||||||
|
.*: c0 1a ff fd * bra .* <f2>
|
||||||
|
\.\.\.
|
14
gas/testsuite/gas/frv/reloc1.s
Normal file
14
gas/testsuite/gas/frv/reloc1.s
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
.globl f1
|
||||||
|
begin:
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
f1:
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
f2:
|
||||||
|
call f1
|
||||||
|
bra f1
|
||||||
|
call f2
|
||||||
|
bra f2
|
||||||
|
.space 16
|
Loading…
Reference in a new issue