https://sourceware.org/bugzilla/show_bug.cgi?id=16847
Bug ID: 16847 Summary: processing branch instruction in .S might be wrong Product: binutils Version: 2.15 Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: chaujohnthan at gmail dot com Created attachment 7554 --> https://sourceware.org/bugzilla/attachment.cgi?id=7554&action=edit projext files here is my initmem.S @ init sdram 0-16M mov r0, #0 mov r1, #0 mov r2, #0x1000000 sub r2, r2, #0x200 init_sdram: str r0, [r1], #4 cmp r1, r2 bne init_sdram @ .long 0xbafffffc <-0x1a000002 init_done: @ .long 0xeafffffe <-0xea000005 b . ================================= here is my makefile: CROSS-COMPILE=arm-c2-linux-gnu- CC=$(CROSS-COMPILE)gcc -c AS=$(CROSS-COMPILE)as LD=$(CROSS-COMPILE)ld OBJCOPY=$(CROSS-COMPILE)objcopy OBJDUMP=$(CROSS-COMPILE)objdump SOURCES_GCC := $(notdir $(wildcard $(SRC)/*.c)) SOURCES_AS := $(notdir $(wildcard $(STR)/*.S)) OBJECTS_GCC := $(SOURCES_GCC:.c=.o) OBJECTS_AS := $(SOURCES_AS:.S=.o) all: sstflash.bin initmem.bin %.bin: %.os @echo @echo objcopy $< ... $(OBJCOPY) -O binary $< $@ $(OBJDUMP) -M reg-names-std -d $< %.os : %.S @echo @echo assemble $< ... $(AS) $< -o $@ clean: rm -f *.bin cov initmem ================================= here is its output: assemble initmem.S ... arm-c2-linux-gnu-as initmem.S -o initmem.os objcopy initmem.os ... arm-c2-linux-gnu-objcopy -O binary initmem.os initmem.bin arm-c2-linux-gnu-objdump -M reg-names-std -d initmem.os initmem.os: file format elf32-littlearm Disassembly of section .text: 00000000 <.text>: 0: e3a00000 mov r0, #0 ; 0x0 4: e3a01000 mov r1, #0 ; 0x0 8: e3a02401 mov r2, #16777216 ; 0x1000000 c: e2422c02 sub r2, r2, #512 ; 0x200 10: e4810004 str r0, [r1], #4 14: e1510002 cmp r1, r2 18: 1a000002 bne 28 <init_done+0xc> 1c: ea000005 b 38 <init_done+0x1c> ============================== i don't believe it. this gives an impression that binutils-2.15.97 cross compile to arm, no one used it before!? or maybe because crosstool-0.43 did sth wrong? i downloaded binutils-2.15.tar.bz2 binutils-2.15.tar.bz2 31-Aug-2011 09:48 11M then recompiled the tool chain. no success. waiting for ur reply. sincerely, johnthan chau 2014-04-16 -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils