Issue
I am reading Understanding Linux Kernel, and in it I read about the Global Descriptor table and the Local Descriptor Table.
In which source file(s)(of linux kernel) the data structure for GDT and LDT are defined?
Solution
A google search for the term "Linux Kernel file gdt" yields the exact results that you are looking for. This is the link to the search result of the book with the contents describing where the GDT and LDT are defined.
All GDTs are stored in the cpu_gdt_table array.
If you look in the source code index, you can see that these symbols are defined in the file
arch/i386/kernel/head.S
. However, I think the source code index can be viewed when you have a copy of the book. But nevertheless, the file where GDT is defined is given.
Answered By - Ramesh Answer Checked By - Dawn Plyler (WPSolving Volunteer)