This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
linker script question
- To: binutils at sourceware dot cygnus dot com
- Subject: linker script question
- From: Nick Papadonis <npapadon at yahoo dot com>
- Date: 28 Mar 2001 21:49:21 -0500
- Organization: None
Hi... Don't know if anyone has encountered this...
I have a linker script and want to have a pointer to the 'end' of
memory in my program. I have this last piece of code in my linker script:
.bss :
{
_sbss = . ;
*(.bss)
*(COMMON)
_ebss = . ;
_end = . ;
} > ram
.endram :
{
_eram = . ;
} > endram
I would assume that _ebss would be the end of memory. Nope. The linker puts
some .stab symbols in after the .bss section/_end symbol. I thought
using *(COMMON) was supposed to include all other symbols?:
...
...
00018b9c B clipminy
00018ba0 B _ebss
00018ba0 B _ebss
00018ba0 B _end
00018ba0 B _end
0001a4d8 ? .stab
0001a4d8 ? .stab
0001b33c ? .stab
0001b33c ? .stab
...
...
I tried adding:
*(.bss)
*(COMMON)
*(.stab)
to put the .stab section before the _ebss symbol. As a result I have no
debugging information in the program.
Does anyone knoe how to find the absolute end of loaded memory? I
want to use that as my program data space. Any insight MUCH
appreciated.
Thanks.
--
- Nick