From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112753 invoked by alias); 18 May 2016 09:11:11 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 112728 invoked by uid 89); 18 May 2016 09:11:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=spu**, spu-*-*, UD:em, orphans X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 May 2016 09:10:59 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8AE6C49445; Wed, 18 May 2016 09:10:58 +0000 (UTC) Received: from [10.36.4.243] (vpn1-4-243.ams2.redhat.com [10.36.4.243]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4I9Auo1014668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 May 2016 05:10:57 -0400 Subject: Re: New ld failure with STB_GNU_UNIQUE patch To: "Maciej W. Rozycki" References: <8760ucpz4e.fsf@redhat.com> Cc: binutils@sourceware.org From: Nick Clifton Message-ID: Date: Wed, 18 May 2016 09:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------37E8B88CC61D9B67547F6502" X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00243.txt.bz2 This is a multi-part message in MIME format. --------------37E8B88CC61D9B67547F6502 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-length: 1294 Hi Maciej, > So it's just that on `ft32-elf' all tests that call LD with no substitute > linker script supplied fail with this error, unless they hit `-shared not > supported' first. I think this means that the default linker script is > broken, and this newly-enabled test just follows the pattern. Does this > observation address your concern? It does. I am going to check in the patch below to address this problem, and several others in connection with the FT32 target and linker tests. Cheers Nick ld/ChangeLog 2016-05-18 Nick Clifton * scripttempl/ft32.sc: Use fixed constants for memory region lengths. Include DWARF debug sections. (.data .bss): Do not assign locations during relocatable links. * testsuite/ld-elf/compressed1d.d: Skip for FT32. * testsuite/ld-elf/sec-to-seg.exp: Likewise. * testsuite/ld-elf/sec64k.exp: Likewise. * testsuite/ld-elf/init-fini-array.d: XFail for FT32. * testsuite/ld-elf/merge.d: Likewise. * testsuite/ld-elf/orphan-region.d: Likewise. * testsuite/ld-elf/orphan.s: Likewise. * testsuite/ld-elf/orphan3.d: Likewise. * testsuite/ld-elf/pr349.d: Likewise. * testsuite/ld-elf/warn2.d: Likewise. * testsuite/lib/ld-lib.exp (check_shared_lib_support): Note that the FT32 does not support shared libraries. --------------37E8B88CC61D9B67547F6502 Content-Type: text/x-patch; name="ft32.ld.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ft32.ld.patch" Content-length: 7168 diff --git a/ld/scripttempl/ft32.sc b/ld/scripttempl/ft32.sc index 5f5df22..bc55d10 100644 --- a/ld/scripttempl/ft32.sc +++ b/ld/scripttempl/ft32.sc @@ -14,13 +14,12 @@ OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) ${LIB_SEARCH_DIRS} -PROVIDE( __PMSIZE = 256K ); -PROVIDE( __RAMSIZE = 64K ); - MEMORY { - flash (rx) : ORIGIN = 0, LENGTH = __PMSIZE - ram (rw!x) : ORIGIN = 0x800000, LENGTH = __RAMSIZE + /* Note - we cannot use "PROVIDE(len)" ... "LENGTH = len" as + PROVIDE statements are not evaluated inside MEMORY blocks. */ + flash (rx) : ORIGIN = 0, LENGTH = 256K + ram (rw!x) : ORIGIN = 0x800000, LENGTH = 64K } SECTIONS { @@ -35,14 +34,14 @@ SECTIONS . = ALIGN(4); } ${RELOCATING+ > flash} ${CONSTRUCTING+${TORS}} - .data : AT (ADDR (.text) + SIZEOF (.text)) + .data : ${RELOCATING+ AT (ADDR (.text) + SIZEOF (.text))} { *(.data) *(.rodata) *(.rodata*) ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ram} - .bss SIZEOF(.data) + ADDR(.data) : + .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : { ${RELOCATING+ _bss_start = . ; } *(.bss) @@ -61,5 +60,10 @@ SECTIONS { *(.stabstr) } +EOF + +. $srcdir/scripttempl/DWARF.sc + +cat <