30 Chapter 4. Linker Scripts4.2. Linker Script FormatLinker scripts are text files.You write a linker script as a series of commands. Each command is either a keyword, possiblyfollowed by arguments, or an assignment to a symbol. You may separate commands using semicolons.Whitespace is generally ignored.Strings such as file or format names can normally be entered directly. If the file name contains acharacter such as a comma which would otherwise serve to separate file names, you may put the filename in double quotes. There is no way to use a double quote character in a file name.You may include comments in linker scripts just as in C, delimited by /* and */. As in C, commentsare syntactically equivalent to whitespace.4.3. Simple Linker Script ExampleMany linker scripts are fairly simple.The simplest possible linker script has just one command: SECTIONS. You use the SECTIONS com-mand to describe the memory layout of the output file.The SECTIONS command is a powerful command. Here we will describe a simple use of it. Let’sassume your program consists only of code, initialized data, and uninitialized data. These will bein the .text, .data, and .bss sections, respectively. Let’s assume further that these are the onlysections which appear in your input files.For this example, let’s say that the code should be loaded at address 0x10000, and that the data shouldstart at address 0x8000000. Here is a linker script which will do that:SECTIONS{. = 0x10000;.text : { *(.text) }. = 0x8000000;.data : { *(.data) }.bss : { *(.bss) }}You write the SECTIONS command as the keyword SECTIONS, followed by a series of symbol assign-ments and output section descriptions enclosed in curly braces.The first line inside the SECTIONS command of the above example sets the value of the special symbol., which is the location counter. If you do not specify the address of an output section in some otherway (other ways are described later), the address is set from the current value of the location counter.The location counter is then incremented by the size of the output section. At the start of the SECTIONScommand, the location counter has the value 0.The second line defines an output section, .text. The colon is required syntax which may be ignoredfor now. Within the curly braces after the output section name, you list the names of the input sectionswhich should be placed into this output section. The * is a wildcard which matches any file name. Theexpression *(.text) means all .text input sections in all input files.Since the location counter is 0x10000 when the output section .text is defined, the linker will setthe address of the .text section in the output file to be 0x10000.The remaining lines define the .data and .bss sections in the output file. The linker will place the.data output section at address 0x8000000. After the linker places the .data output section, thevalue of the location counter will be 0x8000000 plus the size of the .data output section. The effectis that the linker will place the .bss output section immediately after the .data output section inmemory