Vmlinux. LDS. S is used to group the output of LD. The format of this file is described in ld.info. Vmlinu
The main purpose of X. LDS. S is to sort the middle sections of the output file and define the relevant symbol names. The following is a brief comment.
/* LD script to make i386 Linux Kernel
* Written by Martin mares;
*/
Output_format ("elf32-i386", "elf32-i386", "elf32-i386 ")
Output_arch (i386)/* output format */
Entry (_ start)/* DEFINE _ start as the entry point */
Sections
{
. = Page_offset_raw + 0x100000;/* defines the offset of the current segment (. represents the current counter )*/
_ Text =.;/* define the symbol _ text as the current position */
. Text: {/* defines the segment. Text (": {" is the segment definition character )*/
* (. Text)/* merge the. Text segments in all input files here */
* (. Fixup)/* merge the. fixup segments in all input files here */
* (. GNU. Warning)/* merge the. GNU. Warning segments in all input files */
} = 0x9090/* fill the gap in the merge with 0x9090 */
/* The following syntax meanings can be inferred */
. Text. Lock: {* (. Text. Lock)}/* Out-of-line lock text */
. Rodata: {* (. rodata )}
. Kstrtab: {* (. kstrtab )}
. = Align (16);/* exception table */
_ Start ___ ex_table =.;/* defines _ start_ex_table as the current position */
_ Ex_table: {* (_ ex_table )}
_ Stop ___ ex_table = .;
_ Start ___ ksymtab =.;/* kernel symbol table */
_ Ksymtab: {* (_ ksymtab )}
_ Stop ___ ksymtab = .;
_ Etext =.;/* end of text section */
. Data: {/* Data */
* (. Data)
Constructors/* merge the constructor pointer segments of C ++ here */
}
_ Edata =.;/* end of Data Section */
. = Align (8192);/* init_task */
. Data. init_task: {* (. Data. init_task )}
. = Align (4096);/* init code and Data */
_ Init_begin = .;
. Text. init: {* (. Text. init )}
. Data. init: {* (. Data. init )}
. = Align (4096);/* the output counter is aligned on the page boundary */
_ Init_end = .;
. = Align (32 );
. Data. cacheline_aligned: {* (. Data. cacheline_aligned )}
. = Align (4096 );
. Data. page_aligned: {* (. Data. IDT )}
_ Bss_start =.;/* BSS */
. BSS :{
* (. BSS)
}
_ End = .;
/* Stabs debugging sections .*/
. Stab 0: {* (. Stab)}/* 0 indicates the starting address of the segment */
. Stabstr 0: {* (. stabstr )}
. Stab. excl 0: {* (. Stab. excl )}
. Stab. exclstr 0: {* (. Stab. exclstr )}
. Stab. index 0: {* (. Stab. Index )}
. Stab. indexstr 0: {* (. Stab. indexstr )}
. Comment 0: {* (. Comment )}
}
The following is the result of the group version with "objdump -- headers vmlinux:
Vmlinux: File Format elf32-i386
Sections:
Idx name size vma lma file off algn
0. Text 0009ccb8 c0100000 c0100000 00001000 2 ** 4
Contents, alloc, load, readonly, code
1. Text. Lock 00000622 c019ccc0 c019ccc0 0009dcc0 2 ** 4
Contents, alloc, load, readonly, code
2. rodata export f4ab c019d2e4 c019d2e4 0009e2e4 2 *** 2
Contents, alloc, load, readonly, Data
3. kstrtab rj2d9c c01ac78f c01ac78f 000ad78f 2 ** 0
Contents, alloc, load, readonly, Data
4 _ ex_table 00000ba8 c01af530 c01af530 000b0530 2 ** 2
Contents, alloc, load, readonly, Data
5 _ ksymtab 00001870 c01b00d8 c01b00d8 000b10d8 2 *** 2
Contents, alloc, load, readonly, Data
6. Data 000133c0 c01b1950 c01b1950 000b2950 2 ** 4
Contents, alloc, load, Data
7. Data. init_task 00002000 c01c6000 c01c6000 000c6000 2 ** 2
Contents, alloc, load, Data
8. Text. init listen 868e c01c8000 c01c8000 000c8000 2 ** 2
Contents, alloc, load, readonly, code
9. Data. init 00003220 c01d0690 c01d0690 000d0690 2 ** 2
Contents, alloc, load, Data
10. Data. cacheline_aligned 1_1c20 c01d4000 c01d4000 000d4000 2 *** 2
Contents, alloc, load, Data
11. Data. page_aligned 00000800 c01d6000 c01d6000 000d6000 2 *** 2
Contents, alloc, load, Data
12. BSS 0001f324 c01d6800 c01d6800 000d6800 2 ** 4
Alloc
13. Comment limit 11d0 00000000 00000000 000d6800 2 ** 0
Contents, readonly
14. Note limit 11d0 limit 11d0 limit 11d0 000d79d0 2 ** 0
Contents, readonly