#!/usr/bin/env python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 import argparse import sys import struct import os from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection gdt_pd_fmt = "> 16) & 0xFF base_hi = (base >> 24) & 0xFF limit_lo = limit & 0xFFFF limit_hi = (limit >> 16) & 0xF return (base_lo, base_mid, base_hi, limit_lo, limit_hi) gdt_ent_fmt = "