rename pdp10_elf36.hrl to libelf.hrl

This commit is contained in:
Mikael Pettersson
2025-08-10 22:28:47 +02:00
parent 78a2a4f827
commit 77d7658247
13 changed files with 25 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
%%% -*- erlang-indent-level: 2 -*-
%%%
%%% 'ar' and 'ranlib' for pdp10-elf
%%% Copyright (C) 2013-2023 Mikael Pettersson
%%% Copyright (C) 2013-2025 Mikael Pettersson
%%%
%%% This file is part of pdp10-tools.
%%%
@@ -24,7 +24,7 @@
-include_lib("kernel/include/file.hrl").
-include_lib("lib/include/pdp10_ar.hrl").
-include_lib("lib/include/archive.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-record(options,
{ operation :: $d | $q | $r | $s | $t | $x | print_armap

View File

@@ -1,7 +1,7 @@
%%% -*- erlang-indent-level: 2 -*-
%%%
%%% sections assembler for pdp10-elf as
%%% Copyright (C) 2013-2023 Mikael Pettersson
%%% Copyright (C) 2013-2025 Mikael Pettersson
%%%
%%% This file is part of pdp10-tools.
%%%
@@ -25,7 +25,7 @@
]).
-include("tunit.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-spec tunit(#tunit{}) -> {ok, #tunit{}} | {error, {module(), term()}}.
tunit(Tunit) ->

View File

@@ -1,7 +1,7 @@
%%% -*- erlang-indent-level: 2 -*-
%%%
%%% input processing phase for pdp10-elf as
%%% Copyright (C) 2013-2023 Mikael Pettersson
%%% Copyright (C) 2013-2025 Mikael Pettersson
%%%
%%% This file is part of pdp10-tools.
%%%
@@ -25,7 +25,7 @@
]).
-include("tunit.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-spec files([string()]) -> {ok, #tunit{}} | {error, {module(), term()}}.
files(Files0) ->

View File

@@ -52,7 +52,7 @@
]).
-include("tunit.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-record(strtab,
{ map :: #{string() => non_neg_integer()}

View File

@@ -1,7 +1,7 @@
%%% -*- erlang-indent-level: 2 -*-
%%%
%%% parser for pdp10-elf as
%%% Copyright (C) 2013-2023 Mikael Pettersson
%%% Copyright (C) 2013-2025 Mikael Pettersson
%%%
%%% This file is part of pdp10-tools.
%%%
@@ -27,7 +27,7 @@
-include("token.hrl").
-include("tunit.hrl").
-include_lib("lib/include/pdp10_opcodes.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-type location() :: scan:location().

View File

@@ -34,7 +34,7 @@
, format_error/1
]).
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-record(options,
{ verbose :: boolean() % -v/--verbose

View File

@@ -21,7 +21,7 @@
-ifndef(LD_INTERNAL_HRL).
-define(LD_INTERNAL_HRL, 1).
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-type ifile() :: string() % explicit input .o-file
| { Archive :: string() % archive name

View File

@@ -1,6 +1,6 @@
%%% -*- erlang-indent-level: 2 -*-
%%%
%%% pdp10_elf36.hrl -- ELF definitions for PDP10
%%% libelf.hrl -- ELF definitions for Erlang
%%% Copyright (C) 2013-2025 Mikael Pettersson
%%%
%%% This file is part of pdp10-tools.
@@ -20,12 +20,14 @@
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% This is essentially the standard Elf32 declarations with 8/16/32-bit
%%% primitive types replaced by 9/18/36-bit primitive types, and Elf32
%%% replaced by elf36.
%%% These are the standard ELF32 and ELF64 declarations adapted for Erlang.
%%%
%%% As an extension ELF36 is defined as ELF32 where each N x 8 bit integer
%%% has been expanded to N x 9 bits, making Uchar 9 bits, Half 18 bits, and
%%% Word 32-bits. This would be appropriate for e.g. the PDP-10.
-ifndef(PDP10_ELF36_HRL).
-define(PDP10_ELF36_HRL, 1).
-ifndef(LIBELF_HRL).
-define(LIBELF_HRL, 1).
-include("pdp10_stdint.hrl").
@@ -1728,4 +1730,4 @@
-define(AT_SUN_BRAND_AUX3, 2022).
-define(AT_SUN_CAP_HW2, 2023). % Extension of AT_SUN_CAP_HW1.
-endif. % PDP10_ELF36_HRL
-endif. % LIBELF_HRL

View File

@@ -30,7 +30,7 @@
-include_lib("kernel/include/file.hrl").
-include_lib("lib/include/pdp10_ar.hrl").
-include_lib("lib/include/archive.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-type file() :: pdp10_stdio:file().

View File

@@ -37,7 +37,7 @@
, format_error/1
]).
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-include_lib("lib/include/pdp10_stdint.hrl").
-type read_field() :: fun((pdp10_stdio:file())

View File

@@ -23,7 +23,7 @@
-include_lib("lib/include/pdp10_ar.hrl").
-include_lib("lib/include/archive.hrl").
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-record(options,
{ print_file_name = false % -A, -o, --print-file-name

View File

@@ -21,7 +21,7 @@
-module(readelf).
-export([main/1]).
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-include_lib("lib/include/pdp10_opcodes.hrl").
-record(options,

View File

@@ -28,7 +28,7 @@
, format_error/1
]).
-include_lib("lib/include/pdp10_elf36.hrl").
-include_lib("lib/include/libelf.hrl").
-type address() :: non_neg_integer().