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]

Re: The meaning of LMA and location counter in GNU ld


3.4.4 Assign alias names to memory regions
SECTIONS
{
     .text :
     {
         *(.text)
     } > REGION_TEXT
    .rodata :
    {
        *(.rodata)
        rodata_end = .;
    } > REGION_RODATA
    .data : AT (rodata_end)
    {
        data_start = .;
        *(.data)
     } > REGION_DATA
     data_size = SIZEOF(.data);
     data_load_start = LOADADDR(.data);
     .bss :
     {
         *(.bss)
     } > REGION_BSS
}
---------------------------------------------------------------
I have copied part of the manual for ld.
In front of .data, there is an AT command: AT (rodata_end)
Is it necessary to write it? If I do not write it, any ways the load
address for .data section will be after .rodata regardless of
REGION_RODATA. Is that right?


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