From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108781 invoked by alias); 21 Apr 2015 18:52:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 108771 invoked by uid 89); 21 Apr 2015 18:52:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-HELO: cvs.linux-mips.org Received: from eddie.linux-mips.org (HELO cvs.linux-mips.org) (148.251.95.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Apr 2015 18:52:29 +0000 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S27009833AbbDUSwZhfrpv (ORCPT ); Tue, 21 Apr 2015 20:52:25 +0200 Date: Tue, 21 Apr 2015 18:52:00 -0000 From: "Maciej W. Rozycki" To: Petar Jovanovic cc: gcc-patches@gcc.gnu.org, Catherine_Moore@mentor.com, Matthew.Fortune@imgtec.com Subject: Re: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro In-Reply-To: <005001d07c5a$8c9e9b90$a5dbd2b0$@rt-rk.com> Message-ID: References: <005001d07c5a$8c9e9b90$a5dbd2b0$@rt-rk.com> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01227.txt.bz2 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