blob: 340fe7ae137f423636876f0c7390bf7170f974a8 [file] [log] [blame]
Aaron Durbinad935522012-12-24 14:28:37 -06001/*
2 * This linker script is used to link rmodules (relocatable modules). It
3 * links at zero so that relocation fixups are easy when placing the binaries
4 * anywhere in the address space.
5 *
6 * NOTE: The program's loadable sections (text, module_params, and data) are
Aaron Durbin3eb8eb72014-03-10 16:13:58 -05007 * packed into the flat blob. The rmodule loader assumes the entire program
8 * resides in one contiguous address space. Therefore, alignment for a given
9 * section (if required) needs to be done at the end of the preceeding section.
10 * e.g. if the data section should be aligned to an 8 byte address the text
11 * section should have ALIGN(8) at the end of its section. Otherwise there
12 * won't be a consistent mapping between the flat blob and the loaded program.
Aaron Durbinad935522012-12-24 14:28:37 -060013 */
14
Aaron Durbindde76292015-09-05 12:59:26 -050015#include <memlayout.h>
16#include <arch/header.ld>
Aaron Durbinf69a99d2015-03-10 11:45:25 -050017
Aaron Durbinad935522012-12-24 14:28:37 -060018SECTIONS
19{
Aaron Durbindde76292015-09-05 12:59:26 -050020 SET_COUNTER(rmodule, 0x00000000)
Aaron Durbinad935522012-12-24 14:28:37 -060021
Aaron Durbindde76292015-09-05 12:59:26 -050022 /* program.ld is directly included because there's no one particular
23 * class that rmodule is used on. */
24 #include <lib/program.ld>
Aaron Durbinad935522012-12-24 14:28:37 -060025}