<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks a lot Scott for replying.<br>
<br>
The attribute section is working, but one problem: the compiler is
automatically assigning address for the section and ld returns error is
I try to assign the address for this section in a linker script:<br>
<br>
Following is the disassembly when I don't specify an address for the
same section name in the linker script:<br>
Disassembly of section .l2_scratch:<br>
<br>
004ae820 <.l2_scratch>:<br>
4ae820: 3c1c0fb9 lui gp,0xfb9<br>
4ae824: 279c1d90 addiu gp,gp,7568<br>
4ae828: 0399e021 addu gp,gp,t9<br>
4ae82c: 27bdffd0 addiu sp,sp,-48<br>
4ae830: afbf0028 sw ra,40(sp)<br>
4ae834: afbe0024 sw s8,36(sp)<br>
4ae838: ---------- ---- ---------<br>
<br>
<br>
And the section shows:<br>
Idx Name Size VMA LMA File off Algn<br>
0 .reginfo 00000018 00400094 00400094 00000094 2**2<br>
CONTENTS, ALLOC, LOAD, READONLY, DATA,
LINK_ONCE_SAME_SIZE<br>
1 .init 00000088 004000ac 004000ac 000000ac 2**2<br>
CONTENTS, ALLOC, LOAD, READONLY, CODE<br>
2 .text 000ae6e0 00400140 00400140 00000140 2**4<br>
CONTENTS, ALLOC, LOAD, READONLY, CODE<br>
3 .l2_scratch 000004f0 004ae820 004ae820 000ae820 2**2<br>
CONTENTS, ALLOC, LOAD, READONLY, CODE<br>
4 ----- --------------------------------------------------------<br>
<br>
<br>
39 more lines