This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]