-- ELF dumper (library).
-- Copyright (C) 2006 Tristan Gingold
--
-- GHDL is free software; you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free
-- Software Foundation; either version 2, or (at your option) any later
-- version.
--
-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or
-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-- for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with GCC; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
with System; use System;
with Elf_Common; use Elf_Common;
with Elf_Arch; use Elf_Arch;
with Ada.Unchecked_Conversion;
package Elfdumper is
procedure Disp_Ehdr (Ehdr : Elf_Ehdr);
type Strtab_Fat_Type is array (Elf_Size) of Character;
type Strtab_Fat_Acc is access all Strtab_Fat_Type;
type Strtab_Type is record
Base : Strtab_Fat_Acc;
Length : Elf_Size;
end record;
Null_Strtab : constant Strtab_Type := (null, 0);
Nul : constant Character := Character'Val (0);
function Get_String (Strtab : Strtab_Type; N : Elf_Size)