Honza Fikar writes:
> The bootloader made with as 2.9.1 works, while with 2.9.5 doesn't. The
> command line is :
>  
> as -o boot.o boot.S
>  
> I have attached the boot.S and the two results as well. If I add -a flag
> and compare the results, I can see, that there is a difference between
> the two outputs and it's only around instructions bne, b, beq, bl, bleq,
> blt.

This is expected - the way branches work in the toolchain changed around
2.9.5 (which is a pain because object files are now harder to follow when
objdumping them).

You can still work out the correct branch target by:

1. mask off the offset field from the branch instruction
2. sign extend
3. add 2
4. multiply by 4
5. add this to the current address.

> Is this a bug in gnu-as, or am I missing some command-line parameter, or
> should be the source changed?

I don't see anything wrong.  What matters is what happens after when boot.o
becomes part of a larger object/binary.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [EMAIL PROTECTED]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to