Loading ...
Sorry, an error occurred while loading the content.

5137arm-elf-gcc output binary differences

Expand Messages
  • Chuck Sweng
    Dec 2, 2011
    • 0 Attachment
      Hello,
       
      We’ve got the ARM GCC-3.4.3 cross toolchain built for two different host platforms:
         
         Solaris (Sun Sparc)     tools: (SUN CC, unknown version)
         Linux (X86_64)             tools: (GCC,  Red Hat 3.4.6-11)
       
      Options used:
      --target=arm-elf --enable-interwork --enable-multilib --with-float=soft --enable-languages=c,c++ --with-newlib --with-headers=../newlib-1.12.0/newlib/libc/include
      Thread model: single
      gcc version 3.4.3
       
      We would like to achieve binary equivalent output of arm-elf-gcc when compiling a C file on either host, but are finding some differences.
       
      One difference we’ve found is additional ARM instruction used in conjunction with LDR/STR instructions with the Linux implementation, see below examples.
       
      Hoping someone on this forum might know what might cause such differences, and ways to make them equivalent.
       
      Thanks!
       
      Chuck 
       
       
      LINUX:
           39c:       e24b102c        sub     r1, fp, #44     ; 0x2c
            3a0:       e5813000        str     r3, [r1]

      SOLARIS:
            39c:       e50b302c        str     r3, [fp, #-44]
       
       
       
      LINUX:
          3dc:       e24b302c        sub     r3, fp, #44     ; 0x2c
          3e0:       e5933000        ldr     r3, [r3]

      SOLARIS:
          3d8:       e51b102c        ldr     r1, [fp, #-44]



    • Show all 2 messages in this topic