From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3224 invoked by alias); 18 Jul 2006 12:54:37 -0000 Received: (qmail 3216 invoked by uid 22791); 18 Jul 2006 12:54:36 -0000 X-Spam-Check-By: sourceware.org Received: from sohm.kpit.com (HELO sohm.kpit.com) (203.197.93.231) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Jul 2006 12:54:34 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: NOLOAD problem with binutils 2.16.92 Date: Tue, 18 Jul 2006 12:54:00 -0000 Message-ID: <4A1BE23A7B777442B60F4B4916AE0F130CEE5AD4@sohm.kpit.com> From: "Ashutosh Yeole" To: Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00225.txt.bz2 Hi, I am facing a problem in binutils 2.16.92. Please refer to the code and the linker script below. CODE: ----- char ldTest __attribute__ ((section("TEST"))); int main(void) { ldTest =3D 5; } LINKER SCRIPT: -------------- .bss : { _bss =3D .; *(.bss) *(COMMON) _ebss =3D .; _end =3D .; } .stack 0x00083800 : { _stack =3D .; } TEST 0x00FFEC00 (NOLOAD) : { *(TEST) } In the Linker script the user defined section "TEST" is assigned as NOLOAD. Here it is expected that "TEST" section to behave same as ".bss" section. When above code is linked using the binutils 2.16.92, "TEST" section is assigned PROGBITS type whereas ".bss" section is assigned NOBITS type. But when the same code and linker script are linked using binutils 2.16.1 then the "TEST" and ".bss" sections are assigned as NOBITS type. Below are the results observed: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al . . [ 8] .bss NOBITS 000827c4 00203c 00002a 00 WA 0 0 4 [ 9] TEST PROGBITS 00ffec00 00203c 000001 00 WA 0 0 1 . . . TEST section is assigned PROGBITS instead of NOBITS when linked using ld (binutils 2.16.92). Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al . . [ 9] .bss NOBITS 00082740 001de6 000046 00 WA 0 0 4 [10] TEST NOBITS 00ffec00 001de6 000001 00 WA 0 0 1 . . . TEST section is assigned NOBITS when linked using ld (binutils 2.16.1). This problem exists on both SH and H8/300 targets. Please let me know why this is happening and any solution to fix this problem. The same bug has been reported on, http://lists.gnu.org/archive/html/bug-binutils/2006-07/msg00041.html however we did not receive any reply to the same. Can anyone help us to resolve this issue? Regards, Ashutosh Yeole KPIT Cummins InfoSystems Ltd. Pune, India ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=09 Free download of GNU based tool-chains for Renesas SH, H8, R8C, M16C and M32C Series. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU tools were released on June 1, 2006. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=09