+2007-05-21 Richard Sandiford <richard@codesourcery.com>
+
+ * objdump.c (disassemble_bytes): Ignore disassembler_needs_relocs
+ for executables and shared libraries.
+
2007-05-18 Nathan Sidwell <nathan@codesourcery.com>
* objcopy.c (strip_main): Detect identical input and output file
info->flags = 0;
if (info->disassembler_needs_relocs
+ && (bfd_get_file_flags (aux->abfd) & EXEC_P) == 0
+ && (bfd_get_file_flags (aux->abfd) & DYNAMIC) == 0
&& *relppp < relppend)
{
bfd_signed_vma distance_to_rel;
+2007-05-21 Richard Sandiford <richard@codesourcery.com>
+
+ * ld-arm/emit-relocs1.d, ld-arm/emit-relocs1.s,
+ * ld-arm/emit-relocs1-vxworks.d: New tests.
+ * ld-arm/arm-elf.exp: Run them.
+ * ld-arm/vxworks1.dd: Expect proper branch targets.
+
2007-05-18 Joseph Myers <joseph@codesourcery.com>
* ld-elf/group.ld: Discard .reginfo.
}
run_ld_link_tests $armvxworkstests
run_dump_test "vxworks1-static"
+ run_dump_test "emit-relocs1-vxworks"
}
# Exclude non-ARM-ELF targets.
run_dump_test "group-relocs-ldc-bad"
run_dump_test "thumb2-bl-as-thumb1-bad"
run_dump_test "thumb2-bl-bad"
+run_dump_test "emit-relocs1"
# Exclude non-ARM-EABI targets.
--- /dev/null
+#source: emit-relocs1.s
+#ld: -Ttext 0x10000 --defsym target=0xc000 -e0 --emit-relocs
+#objdump: -dr
+#...
+ +10000: e1a00000 nop .*
+ +10004: e1a00000 nop .*
+ +10008: e1a00000 nop .*
+ +1000c: e1a00000 nop .*
+ +10010: eaffeffa b c000 <target>
+ +10010: R_ARM_PC24 target\+0xf+8
+ +10014: eaffeffd b c010 <target\+0x10>
+ +10014: R_ARM_PC24 target\+0x8
--- /dev/null
+#source: emit-relocs1.s
+#ld: -Ttext 0x10000 --defsym target=0xc000 -e0 --emit-relocs
+#objdump: -dr
+#...
+ +10000: e1a00000 nop .*
+ +10004: e1a00000 nop .*
+ +10008: e1a00000 nop .*
+ +1000c: e1a00000 nop .*
+ +10010: eaffeffa b c000 <target>
+ +10010: R_ARM_(JUMP|PC)24 target
+ +10014: eaffeffd b c010 <target\+0x10>
+ +10014: R_ARM_(JUMP|PC)24 target
--- /dev/null
+ nop
+ nop
+ nop
+ nop
+ b target
+ b target+16
Disassembly of section \.text:
00080c00 <_start>:
- 80c00: ebffff08 bl 80428 <.*>
+ 80c00: ebffff08 bl 80828 <.*>
80c00: R_ARM_PC24 \.plt\+0x20
- 80c04: eb000000 bl 80c14 <sexternal\+0x8>
+ 80c04: eb000000 bl 80c0c <sexternal>
80c04: R_ARM_PC24 sexternal\+0xfffffff8
- 80c08: eaffff00 b 80408 <.*>
+ 80c08: eaffff00 b 80810 <.*>
80c08: R_ARM_PC24 \.plt\+0x8
00080c0c <sexternal>: