branch type relocs.
(alpha_force_relocation): Don't special-case branch type relocs.
* gas/alpha/elf-reloc-7.s: New.
* gas/alpha/elf-reloc-7.d: New.
* gas/alpha/alpha.exp: Run it.
+2002-09-19 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.c (md_pcrel_from): Only adjust special for
+ branch type relocs.
+ (alpha_force_relocation): Don't special-case branch type relocs.
+
2002-09-19 Nick Clifton <nickc@redhat.com>
* config/tc-m68k.c (select_control_regs): Handle situation where
valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;
switch (fixP->fx_r_type)
{
- case BFD_RELOC_ALPHA_GPDISP:
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- return addr;
+ case BFD_RELOC_23_PCREL_S2:
+ case BFD_RELOC_ALPHA_HINT:
+ case BFD_RELOC_ALPHA_BRSGP:
+ return addr + 4;
default:
- return fixP->fx_size + addr;
+ return addr;
}
}
case BFD_RELOC_ALPHA_TPREL16:
return 1;
- case BFD_RELOC_23_PCREL_S2:
- case BFD_RELOC_ALPHA_HINT:
- return 0;
-
default:
break;
}
+2002-09-19 Richard Henderson <rth@redhat.com>
+
+ * gas/alpha/elf-reloc-7.s: New.
+ * gas/alpha/elf-reloc-7.d: New.
+ * gas/alpha/alpha.exp: Run it.
+
2002-09-18 Chris Demetriou <cgd@broadcom.com>
* gas/mips/mips-abi32-pic2.s: New file.
run_dump_test "elf-reloc-4"
run_dump_test "elf-reloc-5"
run_list_test "elf-reloc-6" ""
+ run_dump_test "elf-reloc-7"
run_dump_test "elf-tls-1"
run_list_test "elf-tls-2" ""
run_list_test "elf-tls-3" ""
--- /dev/null
+#objdump: -r
+#name: alpha elf-reloc-7
+
+.*: file format elf64-alpha
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET TYPE VALUE
+0*0000008 BRADDR bar
+
+
+RELOCATION RECORDS FOR \[\.data\]:
+OFFSET TYPE VALUE
+0*0000004 SREL32 \.data2\+0x0*0000004
+0*0000008 SREL32 BAR
+
+
+RELOCATION RECORDS FOR \[\.text2\]:
+OFFSET TYPE VALUE
+0*0000004 BRADDR \.text\+0x0*0000010
+0*0000008 BRADDR bar
+
+
--- /dev/null
+ .section .data2,"wa"
+ .globl BAR
+ .long 0
+FOO: .long 0
+BAR: .long 0
+ .long FOO - .
+ .long BAR - .
+
+ .data
+ .long 0
+ .long FOO - .
+ .long BAR - .
+
+ .text
+ .globl bar
+ nop
+ br foo
+ br bar
+ nop
+foo: nop
+bar: nop
+
+ .section .text2,"ax"
+ nop
+ br foo
+ br bar