This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to specify page of a linker section

Hi,

I have data structure that I need to put at a particular address.  It is placed by a SectionSpec with the loadAddress specified.

    Program.sectMap[".resource_table"] = new Program.SectionSpec();
    Program.sectMap[".resource_table"].loadAddress = 0x81000000;

By default it places this data into page 0.  I need to specify page 1.  Is there anyway to do this?  Here is a snippet of the map file showing the location of the .resource_table section is page 0. 

SECTION ALLOCATION MAP

 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
.init_array
*          1    81000000    00000000     UNINITIALIZED

.vecs      0    80000000    00000020     
                  80000000    00000020     rpmsg_test_eve0_pearp32.oearp32 (.vecs)

.resource_table
*          0    81000000    0000004c     
                  81000000    0000004c     simvayu_rsc_tbl.oearp32 (.resource_table)

xdc.meta   1    81000000    0000011c     COPY SECTION
                  81000000    0000011c     rpmsg_test_eve0_pearp32.oearp32 (xdc.meta)

.far.1     1    81000000    00040564     UNINITIALIZED
                  81000000    00040564     ti.ipc.rpmsg.aearp32 : MessageQCopy_s2s.oearp32 (.far)

  • Cris,
    Program.SectionSpec does not have a property that would let you specify the page attribute. If you already have a linker command file, you should move your section allocation for .resource_table to that file and use standard linker command file syntax. If you don't have a linker command file, you can use the solution from this thread. Look for the message posted on Mar 16th, at 5PM, the part of the message that starts with "For .args ...", but instead for .args, you'll create allocation for .resource_table, again using the standard linker command file syntax.

    BTW, this post belongs to the BIOS forum, but I can't move it there. If you can, please do.