[PATCH] Fix gcc.c-torture/execute/20010124-1 on MIPS...

Richard Sandiford richard@codesourcery.com
Fri Sep 9 07:07:00 GMT 2005


David Daney <ddaney@avtrex.com> writes:
> I am not really a MIPS ABI expert either so I don't know off the top of
> my head exactly what causes the issues that the linker is complaining
> about.  Perhaps it really is a bug in the MIPS backend.

No, it's not a bug.  It's just that with o32, you need to know whether
a symbol is global or local before generating GOT accesses for it.  We
still think that memcpy() is global when the main function is called
(indeed, we couldn't use memcpy() for block moves if it wasn't), so we
generate a GOT access for a global.

As you've already seen, explicit user-level occurences of externs
followed by statics are rejected, so this isn't a general problem.

Also, in case you're wondering why we needed the builtins.exp harness:
one of the reasons is that the OS start-up code call these standard
functions, so if we override them and abort(), we could end up abort()ing
outside of main().

Richard



More information about the Gcc-patches mailing list