This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Petar Jovanovic <petar dot jovanovic at rt-rk dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Catherine_Moore at mentor dot com, Matthew dot Fortune at imgtec dot com
- Date: Tue, 21 Apr 2015 19:52:25 +0100 (BST)
- Subject: Re: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro
- Authentication-results: sourceware.org; auth=none
- References: <005001d07c5a$8c9e9b90$a5dbd2b0$ at rt-rk dot com>
On Tue, 21 Apr 2015, Petar Jovanovic wrote:
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/mips/call-from-init.c
> @@ -0,0 +1,10 @@
> +/* Check that __do_global_ctors_aux can be reached from .init section that
> + is in a different (256MB) region. */
> +/* { dg-do run } */
> +/* { dg-options "-Wl,--section-start=.init=0x0FF00000" } */
> +/* { dg-options "-Wl,--section-start=.text=0x10000000" } */
Hmm, the addresses should work for any virtual-memory targets, however if
this is going to be a run-time test, then not for bare-iron ones, as they
won't normally support mapped addresses. And we may not be able to come
up with better ones, because a typical bare-iron target will often not
have enough memory to span a 256MB boundary. I think this will best be
reduced to a link-only test on bare iron, hoping for a link failure.
Speaking of which, have you been able to make a linker test case out of
this example for a bug report against binutils? Not necessarily a proper
LD test suite addition, I wouldn't be asking for *that*! Just a small
case will do, e.g. a pair of .s files generated out of this source and the
generated crtbegin.s file, preferably with unrelated clutter removed,
together with a recipe how to assemble them and link to show the missing
error message. That will certainly help covering this issue all and for
good!
Thanks,
Maciej