bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NOLOAD problem with binutils 2.16.92


From: Ashutosh Yeole
Subject: NOLOAD problem with binutils 2.16.92
Date: Fri, 7 Jul 2006 15:31:29 +0530

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 = 5;
}

LINKER SCRIPT:
--------------
        .bss :
        {
                _bss = .;
                *(.bss)
                *(COMMON)
                _ebss = .;
                _end = .;
        }
        .stack 0x00083800 :
        {
                _stack = .;
        }
        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.

Regards,
Ashutosh Yeole
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    




reply via email to

[Prev in Thread] Current Thread [Next in Thread]