Wrong address calling library function

  • Note: This was originally posted on 18th December 2009 at http://forums.arm.com

    Have you check the disassembled code of the compiled image to see if you pulled in the wrong version of libc.a? (in ARM code rather than thumb).
  • Note: This was originally posted on 18th December 2009 at http://forums.arm.com

    Its slightly strange that the compiler isn't just using a BL,
    which suggests there might be some interesting compiler options involved,
    or that there is something unusual about the "variables" involved.
    Does the following further simplified code have the same problem in your environment?
    (It just compiles to a BL using the same version of GCC outside of CoBuilder):

    volatile unsigned long long a;
    volatile unsigned int b;
    volatile unsigned long long c;

    int main(void)
    {

    while(1) {
      c = (a * b) / 1000000;
    }

    return 0;
    }


    hth
    s.
  • Note: This was originally posted on 4th February 2010 at http://forums.arm.com

    What so the problem occurs in the original and in the new test code? If the problem occurs in the new test code then you've found your problem haven't you. I'm new to all this so I'm trying to learn.
More questions in this forum