ELF on ld 2.17 incorrectly calculates 8- and 16-bit relocations that worked with COFF on ld 2.16.2.
h8300-coff-as -oreloc.o reloc.s h8300-coff-ld -mh8300s --oformat binary reloc.o od -tx1 a.out correctly yields: 0000000 6a 08 e0 02 00 02 while h8300-elf-as -oreloc.o reloc.s h8300-elf-ld -mh8300self --oformat binary reloc.o yields: reloc.o:(.text+0x2): relocation truncated to fit: R_H8_DIR16A8 against `addr' and h8300-elf-as -oreloc.o reloc.s h8300-elf-ld -mh8300self reloc.o h8300-elf-objdump -d a.out h8300-elf-objcopy -Obinary a.out od -tx1 a.out yields: 0000000 6a 08 e0 02 01 06 Content of reloc.s: .h8300s _start = 0 .global _start mov @addr + 2 :16, r0l addr = 0xffe000 .word label - . label: -- Summary: Incorrect 16-bit relocations in ELF Product: binutils Version: 2.17 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: markus+sw at gyger dot org CC: bug-binutils at gnu dot org GCC build triplet: i386-pc-solaris2.10 GCC host triplet: i386-pc-solaris2.10 GCC target triplet: h8300-elf http://sourceware.org/bugzilla/show_bug.cgi?id=3132 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils