# X64 - Global Desriptor Table (GDT) [TOC] ## References ### [Arch2001 04 SegmentationAndPrivilege 03 GDT&LDT 01](https://youtu.be/9pEDSX240zI) {%youtube 9pEDSX240zI %} ### [Arch2001 04 SegmentationAndPrivilege 03 GDT&LDT 02](https://youtu.be/n0gaQKPZzrg) {%youtube n0gaQKPZzrg %} ### [Arch2001 04 SegmentationAndPrivilege 03 GDT&LDT 05](https://youtu.be/-SqHRTKu_Bw) {%youtube -SqHRTKu_Bw %} ## In Linux ### [arch/x86/kernel/idt.c](https://elixir.bootlin.com/linux/latest/source/arch/x86/kernel/idt.c#L20) Albeit an excerpt from IDT-related source code, this file contains macro defin ```c #define G(_vector, _addr, _ist, _type, _dpl, _segment) \ { \ .vector = _vector, \ .bits.ist = _ist, \ .bits.type = _type, \ .bits.dpl = _dpl, \ .bits.p = 1, \ .addr = _addr, \ .segment = _segment, \ } ```