From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Tue, 2 Oct 2012 18:40:05 -0500 Subject: [U-Boot] [PATCH 2/5] common: Implement support for linker-generated arrays In-Reply-To: <1348964274-12489-3-git-send-email-marex@denx.de> References: <1348964274-12489-1-git-send-email-marex@denx.de> <1348964274-12489-3-git-send-email-marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, On Sat, Sep 29, 2012 at 7:17 PM, Marek Vasut wrote: > This patch adds support for linker-generated array. These arrays > are a generalization of the U-Boot command declaration approach. > > Basically, the idea is to generate an array, where elements of the > array are statically initialized at compile time and each element > is declared separatelly at different place. Such array is assembled > together into continuous piece of memory by linker and a pointer to > it's first entry can then be retrieved via accessor. > > The actual implementation relies on placing any variable that is to > represent an element of LG-array into particular subsection of the > .u_boot_list linker section . The subsection is determined by user > options. Once compiled, it is possible to dump all symbols placed > in .u_boot_list section and the subsections in which they should be > and generate appropriate bounds for each requested subsection of the > .u_boot_list section. Each such subsection thus contains __start and > __end entries at the begining and end respecitively. > > This allows for simple run-time traversing of the array, since the > symbols are properly defined. > > Signed-off-by: Marek Vasut > Cc: Joe Hershberger > Cc: Mike Frysinger > --- Tested-by: Joe Hershberger Acked-by: Joe Hershberger