This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

NOLOAD problem with binutils 2.16.92


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.

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	


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