KVM
Macros | Functions | Variables
gen-hyprel.c File Reference
#include <elf.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <generated/autoconf.h>
Include dependency graph for gen-hyprel.c:

Go to the source code of this file.

Macros

#define HYP_SECTION_PREFIX   ".hyp"
 
#define HYP_RELOC_SECTION   ".hyp.reloc"
 
#define HYP_SECTION_SYMBOL_PREFIX   "__hyp_section_"
 
#define R_AARCH64_ABS64   257
 
#define R_AARCH64_PREL64   260
 
#define R_AARCH64_PREL32   261
 
#define R_AARCH64_PREL16   262
 
#define R_AARCH64_PLT32   314
 
#define R_AARCH64_LD_PREL_LO19   273
 
#define R_AARCH64_ADR_PREL_LO21   274
 
#define R_AARCH64_ADR_PREL_PG_HI21   275
 
#define R_AARCH64_ADR_PREL_PG_HI21_NC   276
 
#define R_AARCH64_ADD_ABS_LO12_NC   277
 
#define R_AARCH64_LDST8_ABS_LO12_NC   278
 
#define R_AARCH64_TSTBR14   279
 
#define R_AARCH64_CONDBR19   280
 
#define R_AARCH64_JUMP26   282
 
#define R_AARCH64_CALL26   283
 
#define R_AARCH64_LDST16_ABS_LO12_NC   284
 
#define R_AARCH64_LDST32_ABS_LO12_NC   285
 
#define R_AARCH64_LDST64_ABS_LO12_NC   286
 
#define R_AARCH64_MOVW_PREL_G0   287
 
#define R_AARCH64_MOVW_PREL_G0_NC   288
 
#define R_AARCH64_MOVW_PREL_G1   289
 
#define R_AARCH64_MOVW_PREL_G1_NC   290
 
#define R_AARCH64_MOVW_PREL_G2   291
 
#define R_AARCH64_MOVW_PREL_G2_NC   292
 
#define R_AARCH64_MOVW_PREL_G3   293
 
#define R_AARCH64_LDST128_ABS_LO12_NC   299
 
#define fatal_error(fmt, ...)
 
#define fatal_perror(msg)
 
#define assert_op(lhs, rhs, fmt, op)
 
#define assert_eq(lhs, rhs, fmt)   assert_op(lhs, rhs, fmt, ==)
 
#define assert_ne(lhs, rhs, fmt)   assert_op(lhs, rhs, fmt, !=)
 
#define assert_lt(lhs, rhs, fmt)   assert_op(lhs, rhs, fmt, <)
 
#define assert_ge(lhs, rhs, fmt)   assert_op(lhs, rhs, fmt, >=)
 
#define elf_ptr(type, off)   ((type *)(elf.begin + (off)))
 
#define for_each_section(var)    for (var = elf.sh_table; var < elf.sh_table + elf16toh(elf.ehdr->e_shnum); ++var)
 
#define for_each_rela(shdr, var)
 

Functions

static bool starts_with (const char *str, const char *prefix)
 
static const char * section_name (Elf64_Shdr *shdr)
 
static const char * section_begin (Elf64_Shdr *shdr)
 
static Elf64_Shdr * section_by_off (Elf64_Off off)
 
static Elf64_Shdr * section_by_idx (uint16_t idx)
 
static void init_elf (const char *path)
 
static void emit_prologue (void)
 
static void emit_section_prologue (const char *sh_orig_name)
 
static void emit_rela_abs64 (Elf64_Rela *rela, const char *sh_orig_name)
 
static void emit_epilogue (void)
 
static void emit_rela_section (Elf64_Shdr *sh_rela)
 
static void emit_all_relocs (void)
 
int main (int argc, const char **argv)
 

Variables

struct {
   const char *   path
 
   char *   begin
 
   size_t   size
 
   Elf64_Ehdr *   ehdr
 
   Elf64_Shdr *   sh_table
 
   const char *   sh_string
 
elf
 

Macro Definition Documentation

◆ assert_eq

#define assert_eq (   lhs,
  rhs,
  fmt 
)    assert_op(lhs, rhs, fmt, ==)

Definition at line 189 of file gen-hyprel.c.

◆ assert_ge

#define assert_ge (   lhs,
  rhs,
  fmt 
)    assert_op(lhs, rhs, fmt, >=)

Definition at line 192 of file gen-hyprel.c.

◆ assert_lt

#define assert_lt (   lhs,
  rhs,
  fmt 
)    assert_op(lhs, rhs, fmt, <)

Definition at line 191 of file gen-hyprel.c.

◆ assert_ne

#define assert_ne (   lhs,
  rhs,
  fmt 
)    assert_op(lhs, rhs, fmt, !=)

Definition at line 190 of file gen-hyprel.c.

◆ assert_op

#define assert_op (   lhs,
  rhs,
  fmt,
  op 
)
Value:
({ \
typeof(lhs) _lhs = (lhs); \
typeof(rhs) _rhs = (rhs); \
\
if (!(_lhs op _rhs)) { \
fatal_error("assertion " #lhs " " #op " " #rhs \
" failed (lhs=" fmt ", rhs=" fmt \
", line=%d)", _lhs, _rhs, __LINE__); \
} \
})
static char * fmt
Definition: sys_regs.h:104

Definition at line 177 of file gen-hyprel.c.

◆ elf_ptr

#define elf_ptr (   type,
  off 
)    ((type *)(elf.begin + (off)))

Definition at line 198 of file gen-hyprel.c.

◆ fatal_error

#define fatal_error (   fmt,
  ... 
)
Value:
({ \
fprintf(stderr, "error: %s: " fmt "\n", \
elf.path, ## __VA_ARGS__); \
exit(EXIT_FAILURE); \
__builtin_unreachable(); \
})
static struct @2 elf

Definition at line 161 of file gen-hyprel.c.

◆ fatal_perror

#define fatal_perror (   msg)
Value:
({ \
fprintf(stderr, "error: %s: " msg ": %s\n", \
elf.path, strerror(errno)); \
exit(EXIT_FAILURE); \
__builtin_unreachable(); \
})

Definition at line 169 of file gen-hyprel.c.

◆ for_each_rela

#define for_each_rela (   shdr,
  var 
)
Value:
for (var = elf_ptr(Elf64_Rela, elf64toh(shdr->sh_offset)); \
var < elf_ptr(Elf64_Rela, elf64toh(shdr->sh_offset) + elf64toh(shdr->sh_size)); var++)
#define elf_ptr(type, off)
Definition: gen-hyprel.c:198

Definition at line 205 of file gen-hyprel.c.

◆ for_each_section

#define for_each_section (   var)     for (var = elf.sh_table; var < elf.sh_table + elf16toh(elf.ehdr->e_shnum); ++var)

Definition at line 201 of file gen-hyprel.c.

◆ HYP_RELOC_SECTION

#define HYP_RELOC_SECTION   ".hyp.reloc"

Definition at line 43 of file gen-hyprel.c.

◆ HYP_SECTION_PREFIX

#define HYP_SECTION_PREFIX   ".hyp"

Definition at line 42 of file gen-hyprel.c.

◆ HYP_SECTION_SYMBOL_PREFIX

#define HYP_SECTION_SYMBOL_PREFIX   "__hyp_section_"

Definition at line 44 of file gen-hyprel.c.

◆ R_AARCH64_ABS64

#define R_AARCH64_ABS64   257

Definition at line 51 of file gen-hyprel.c.

◆ R_AARCH64_ADD_ABS_LO12_NC

#define R_AARCH64_ADD_ABS_LO12_NC   277

Definition at line 78 of file gen-hyprel.c.

◆ R_AARCH64_ADR_PREL_LO21

#define R_AARCH64_ADR_PREL_LO21   274

Definition at line 69 of file gen-hyprel.c.

◆ R_AARCH64_ADR_PREL_PG_HI21

#define R_AARCH64_ADR_PREL_PG_HI21   275

Definition at line 72 of file gen-hyprel.c.

◆ R_AARCH64_ADR_PREL_PG_HI21_NC

#define R_AARCH64_ADR_PREL_PG_HI21_NC   276

Definition at line 75 of file gen-hyprel.c.

◆ R_AARCH64_CALL26

#define R_AARCH64_CALL26   283

Definition at line 93 of file gen-hyprel.c.

◆ R_AARCH64_CONDBR19

#define R_AARCH64_CONDBR19   280

Definition at line 87 of file gen-hyprel.c.

◆ R_AARCH64_JUMP26

#define R_AARCH64_JUMP26   282

Definition at line 90 of file gen-hyprel.c.

◆ R_AARCH64_LD_PREL_LO19

#define R_AARCH64_LD_PREL_LO19   273

Definition at line 66 of file gen-hyprel.c.

◆ R_AARCH64_LDST128_ABS_LO12_NC

#define R_AARCH64_LDST128_ABS_LO12_NC   299

Definition at line 126 of file gen-hyprel.c.

◆ R_AARCH64_LDST16_ABS_LO12_NC

#define R_AARCH64_LDST16_ABS_LO12_NC   284

Definition at line 96 of file gen-hyprel.c.

◆ R_AARCH64_LDST32_ABS_LO12_NC

#define R_AARCH64_LDST32_ABS_LO12_NC   285

Definition at line 99 of file gen-hyprel.c.

◆ R_AARCH64_LDST64_ABS_LO12_NC

#define R_AARCH64_LDST64_ABS_LO12_NC   286

Definition at line 102 of file gen-hyprel.c.

◆ R_AARCH64_LDST8_ABS_LO12_NC

#define R_AARCH64_LDST8_ABS_LO12_NC   278

Definition at line 81 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G0

#define R_AARCH64_MOVW_PREL_G0   287

Definition at line 105 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G0_NC

#define R_AARCH64_MOVW_PREL_G0_NC   288

Definition at line 108 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G1

#define R_AARCH64_MOVW_PREL_G1   289

Definition at line 111 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G1_NC

#define R_AARCH64_MOVW_PREL_G1_NC   290

Definition at line 114 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G2

#define R_AARCH64_MOVW_PREL_G2   291

Definition at line 117 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G2_NC

#define R_AARCH64_MOVW_PREL_G2_NC   292

Definition at line 120 of file gen-hyprel.c.

◆ R_AARCH64_MOVW_PREL_G3

#define R_AARCH64_MOVW_PREL_G3   293

Definition at line 123 of file gen-hyprel.c.

◆ R_AARCH64_PLT32

#define R_AARCH64_PLT32   314

Definition at line 63 of file gen-hyprel.c.

◆ R_AARCH64_PREL16

#define R_AARCH64_PREL16   262

Definition at line 60 of file gen-hyprel.c.

◆ R_AARCH64_PREL32

#define R_AARCH64_PREL32   261

Definition at line 57 of file gen-hyprel.c.

◆ R_AARCH64_PREL64

#define R_AARCH64_PREL64   260

Definition at line 54 of file gen-hyprel.c.

◆ R_AARCH64_TSTBR14

#define R_AARCH64_TSTBR14   279

Definition at line 84 of file gen-hyprel.c.

Function Documentation

◆ emit_all_relocs()

static void emit_all_relocs ( void  )
static

Definition at line 426 of file gen-hyprel.c.

427 {
428  Elf64_Shdr *shdr;
429 
430  for_each_section(shdr) {
431  switch (elf32toh(shdr->sh_type)) {
432  case SHT_REL:
433  fatal_error("Unexpected SHT_REL section \"%s\"",
434  section_name(shdr));
435  case SHT_RELA:
436  emit_rela_section(shdr);
437  break;
438  }
439  }
440 }
#define for_each_section(var)
Definition: gen-hyprel.c:201
static const char * section_name(Elf64_Shdr *shdr)
Definition: gen-hyprel.c:216
static void emit_rela_section(Elf64_Shdr *sh_rela)
Definition: gen-hyprel.c:360
#define fatal_error(fmt,...)
Definition: gen-hyprel.c:161
Here is the call graph for this function:
Here is the caller graph for this function:

◆ emit_epilogue()

static void emit_epilogue ( void  )
static

Definition at line 348 of file gen-hyprel.c.

349 {
350  printf(".popsection\n");
351 }
Here is the caller graph for this function:

◆ emit_prologue()

static void emit_prologue ( void  )
static

Definition at line 297 of file gen-hyprel.c.

298 {
299  printf(".data\n"
300  ".pushsection " HYP_RELOC_SECTION ", \"a\"\n");
301 }
#define HYP_RELOC_SECTION
Definition: gen-hyprel.c:43
Here is the caller graph for this function:

◆ emit_rela_abs64()

static void emit_rela_abs64 ( Elf64_Rela *  rela,
const char *  sh_orig_name 
)
static

Definition at line 326 of file gen-hyprel.c.

327 {
328  /* Offset of this reloc from the beginning of HYP_RELOC_SECTION. */
329  static size_t reloc_offset;
330 
331  /* Create storage for the 32-bit offset. */
332  printf(".word 0\n");
333 
334  /*
335  * Create a PREL32 relocation which instructs the linker of `vmlinux`
336  * to insert offset to position <base> + <offset>, where <base> is
337  * a symbol at the beginning of the relocated section, and <offset>
338  * is `rela->r_offset`.
339  */
340  printf(".reloc %lu, R_AARCH64_PREL32, %s%s + 0x%lx\n",
341  reloc_offset, HYP_SECTION_SYMBOL_PREFIX, sh_orig_name,
342  elf64toh(rela->r_offset));
343 
344  reloc_offset += 4;
345 }
#define HYP_SECTION_SYMBOL_PREFIX
Definition: gen-hyprel.c:44
Here is the caller graph for this function:

◆ emit_rela_section()

static void emit_rela_section ( Elf64_Shdr *  sh_rela)
static

Definition at line 360 of file gen-hyprel.c.

361 {
362  Elf64_Shdr *sh_orig = &elf.sh_table[elf32toh(sh_rela->sh_info)];
363  const char *sh_orig_name = section_name(sh_orig);
364  Elf64_Rela *rela;
365 
366  /* Skip all non-hyp sections. */
367  if (!starts_with(sh_orig_name, HYP_SECTION_PREFIX))
368  return;
369 
370  emit_section_prologue(sh_orig_name);
371 
372  for_each_rela(sh_rela, rela) {
373  uint32_t type = (uint32_t)elf64toh(rela->r_info);
374 
375  /* Check that rela points inside the relocated section. */
376  assert_lt(elf64toh(rela->r_offset), elf64toh(sh_orig->sh_size), "0x%lx");
377 
378  switch (type) {
379  /*
380  * Data relocations to generate absolute addressing.
381  * Emit a hyp relocation.
382  */
383  case R_AARCH64_ABS64:
384  emit_rela_abs64(rela, sh_orig_name);
385  break;
386  /* Allow position-relative data relocations. */
387  case R_AARCH64_PREL64:
388  case R_AARCH64_PREL32:
389  case R_AARCH64_PREL16:
390  case R_AARCH64_PLT32:
391  break;
392  /* Allow relocations to generate PC-relative addressing. */
403  break;
404  /* Allow relative relocations for control-flow instructions. */
405  case R_AARCH64_TSTBR14:
406  case R_AARCH64_CONDBR19:
407  case R_AARCH64_JUMP26:
408  case R_AARCH64_CALL26:
409  break;
410  /* Allow group relocations to create PC-relative offset inline. */
418  break;
419  default:
420  fatal_error("Unexpected RELA type %u", type);
421  }
422  }
423 }
#define R_AARCH64_MOVW_PREL_G3
Definition: gen-hyprel.c:123
#define R_AARCH64_LDST8_ABS_LO12_NC
Definition: gen-hyprel.c:81
#define R_AARCH64_CONDBR19
Definition: gen-hyprel.c:87
static bool starts_with(const char *str, const char *prefix)
Definition: gen-hyprel.c:210
#define R_AARCH64_PREL32
Definition: gen-hyprel.c:57
#define R_AARCH64_PREL16
Definition: gen-hyprel.c:60
#define R_AARCH64_LDST64_ABS_LO12_NC
Definition: gen-hyprel.c:102
#define assert_lt(lhs, rhs, fmt)
Definition: gen-hyprel.c:191
#define R_AARCH64_MOVW_PREL_G2
Definition: gen-hyprel.c:117
#define R_AARCH64_CALL26
Definition: gen-hyprel.c:93
#define R_AARCH64_PLT32
Definition: gen-hyprel.c:63
#define HYP_SECTION_PREFIX
Definition: gen-hyprel.c:42
static void emit_rela_abs64(Elf64_Rela *rela, const char *sh_orig_name)
Definition: gen-hyprel.c:326
#define R_AARCH64_ABS64
Definition: gen-hyprel.c:51
#define R_AARCH64_MOVW_PREL_G2_NC
Definition: gen-hyprel.c:120
#define R_AARCH64_ADR_PREL_PG_HI21_NC
Definition: gen-hyprel.c:75
#define R_AARCH64_MOVW_PREL_G1
Definition: gen-hyprel.c:111
#define R_AARCH64_LDST128_ABS_LO12_NC
Definition: gen-hyprel.c:126
#define R_AARCH64_JUMP26
Definition: gen-hyprel.c:90
#define R_AARCH64_MOVW_PREL_G0_NC
Definition: gen-hyprel.c:108
#define R_AARCH64_LD_PREL_LO19
Definition: gen-hyprel.c:66
#define for_each_rela(shdr, var)
Definition: gen-hyprel.c:205
#define R_AARCH64_ADD_ABS_LO12_NC
Definition: gen-hyprel.c:78
#define R_AARCH64_ADR_PREL_LO21
Definition: gen-hyprel.c:69
#define R_AARCH64_PREL64
Definition: gen-hyprel.c:54
static void emit_section_prologue(const char *sh_orig_name)
Definition: gen-hyprel.c:304
#define R_AARCH64_MOVW_PREL_G0
Definition: gen-hyprel.c:105
#define R_AARCH64_TSTBR14
Definition: gen-hyprel.c:84
#define R_AARCH64_LDST32_ABS_LO12_NC
Definition: gen-hyprel.c:99
#define R_AARCH64_LDST16_ABS_LO12_NC
Definition: gen-hyprel.c:96
#define R_AARCH64_ADR_PREL_PG_HI21
Definition: gen-hyprel.c:72
#define R_AARCH64_MOVW_PREL_G1_NC
Definition: gen-hyprel.c:114
Here is the call graph for this function:
Here is the caller graph for this function:

◆ emit_section_prologue()

static void emit_section_prologue ( const char *  sh_orig_name)
static

Definition at line 304 of file gen-hyprel.c.

305 {
306  /* Declare the hyp section symbol. */
307  printf(".global %s%s\n", HYP_SECTION_SYMBOL_PREFIX, sh_orig_name);
308 }
Here is the caller graph for this function:

◆ init_elf()

static void init_elf ( const char *  path)
static

Definition at line 245 of file gen-hyprel.c.

246 {
247  int fd, ret;
248  struct stat stat;
249 
250  /* Store path in the global struct for error printing. */
251  elf.path = path;
252 
253  /* Open the ELF file. */
254  fd = open(path, O_RDONLY);
255  if (fd < 0)
256  fatal_perror("Could not open ELF file");
257 
258  /* Get status of ELF file to obtain its size. */
259  ret = fstat(fd, &stat);
260  if (ret < 0) {
261  close(fd);
262  fatal_perror("Could not get status of ELF file");
263  }
264 
265  /* mmap() the entire ELF file read-only at an arbitrary address. */
266  elf.begin = mmap(0, stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
267  if (elf.begin == MAP_FAILED) {
268  close(fd);
269  fatal_perror("Could not mmap ELF file");
270  }
271 
272  /* mmap() was successful, close the FD. */
273  close(fd);
274 
275  /* Get pointer to the ELF header. */
276  assert_ge(stat.st_size, sizeof(*elf.ehdr), "%lu");
277  elf.ehdr = elf_ptr(Elf64_Ehdr, 0);
278 
279  /* Check the ELF magic. */
280  assert_eq(elf.ehdr->e_ident[EI_MAG0], ELFMAG0, "0x%x");
281  assert_eq(elf.ehdr->e_ident[EI_MAG1], ELFMAG1, "0x%x");
282  assert_eq(elf.ehdr->e_ident[EI_MAG2], ELFMAG2, "0x%x");
283  assert_eq(elf.ehdr->e_ident[EI_MAG3], ELFMAG3, "0x%x");
284 
285  /* Sanity check that this is an ELF64 relocatable object for AArch64. */
286  assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u");
287  assert_eq(elf.ehdr->e_ident[EI_DATA], ELFENDIAN, "%u");
288  assert_eq(elf16toh(elf.ehdr->e_type), ET_REL, "%u");
289  assert_eq(elf16toh(elf.ehdr->e_machine), EM_AARCH64, "%u");
290 
291  /* Populate fields of the global struct. */
292  elf.sh_table = section_by_off(elf64toh(elf.ehdr->e_shoff));
293  elf.sh_string = section_begin(section_by_idx(elf16toh(elf.ehdr->e_shstrndx)));
294 }
static Elf64_Shdr * section_by_idx(uint16_t idx)
Definition: gen-hyprel.c:235
static const char * section_begin(Elf64_Shdr *shdr)
Definition: gen-hyprel.c:222
const char * path
Definition: gen-hyprel.c:131
#define assert_eq(lhs, rhs, fmt)
Definition: gen-hyprel.c:189
#define fatal_perror(msg)
Definition: gen-hyprel.c:169
static Elf64_Shdr * section_by_off(Elf64_Off off)
Definition: gen-hyprel.c:228
#define assert_ge(lhs, rhs, fmt)
Definition: gen-hyprel.c:192
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
const char **  argv 
)

Definition at line 442 of file gen-hyprel.c.

443 {
444  if (argc != 2) {
445  fprintf(stderr, "Usage: %s <elf_input>\n", argv[0]);
446  return EXIT_FAILURE;
447  }
448 
449  init_elf(argv[1]);
450 
451  emit_prologue();
452  emit_all_relocs();
453  emit_epilogue();
454 
455  return EXIT_SUCCESS;
456 }
static void init_elf(const char *path)
Definition: gen-hyprel.c:245
static void emit_all_relocs(void)
Definition: gen-hyprel.c:426
static void emit_epilogue(void)
Definition: gen-hyprel.c:348
static void emit_prologue(void)
Definition: gen-hyprel.c:297
Here is the call graph for this function:

◆ section_begin()

static const char* section_begin ( Elf64_Shdr *  shdr)
inlinestatic

Definition at line 222 of file gen-hyprel.c.

223 {
224  return elf_ptr(char, elf64toh(shdr->sh_offset));
225 }
Here is the caller graph for this function:

◆ section_by_idx()

static Elf64_Shdr* section_by_idx ( uint16_t  idx)
inlinestatic

Definition at line 235 of file gen-hyprel.c.

236 {
237  assert_ne(idx, SHN_UNDEF, "%u");
238  return &elf.sh_table[idx];
239 }
#define assert_ne(lhs, rhs, fmt)
Definition: gen-hyprel.c:190
Here is the caller graph for this function:

◆ section_by_off()

static Elf64_Shdr* section_by_off ( Elf64_Off  off)
inlinestatic

Definition at line 228 of file gen-hyprel.c.

229 {
230  assert_ne(off, 0UL, "%lu");
231  return elf_ptr(Elf64_Shdr, off);
232 }
Here is the caller graph for this function:

◆ section_name()

static const char* section_name ( Elf64_Shdr *  shdr)
inlinestatic

Definition at line 216 of file gen-hyprel.c.

217 {
218  return elf.sh_string + elf32toh(shdr->sh_name);
219 }
Here is the caller graph for this function:

◆ starts_with()

static bool starts_with ( const char *  str,
const char *  prefix 
)
inlinestatic

Definition at line 210 of file gen-hyprel.c.

211 {
212  return memcmp(str, prefix, strlen(prefix)) == 0;
213 }
Here is the caller graph for this function:

Variable Documentation

◆ begin

char* begin

Definition at line 132 of file gen-hyprel.c.

◆ ehdr

Elf64_Ehdr* ehdr

Definition at line 134 of file gen-hyprel.c.

◆ 

struct { ... } elf

◆ path

const char* path

Definition at line 131 of file gen-hyprel.c.

◆ sh_string

const char* sh_string

Definition at line 136 of file gen-hyprel.c.

◆ sh_table

Elf64_Shdr* sh_table

Definition at line 135 of file gen-hyprel.c.

◆ size

size_t size

Definition at line 133 of file gen-hyprel.c.