--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ --- systemd-stable-255.4.old/tools/elf2efi.py 2024-02-27 17:26:04.000000000 -0000 +++ systemd-stable-255.4/tools/elf2efi.py 2024-04-01 11:30:04.080806734 -0000 @@ -26,6 +26,7 @@ import io import os import pathlib +import sys import time import typing from ctypes import ( @@ -212,6 +213,7 @@ ".eh_frame", ".eh_frame_hdr", ".ARM.exidx", + ".relro_padding", ] IGNORE_SECTION_TYPES = [ @@ -270,10 +272,14 @@ elf_s["sh_flags"] & SH_FLAGS.SHF_ALLOC == 0 or elf_s["sh_type"] in IGNORE_SECTION_TYPES or elf_s.name in IGNORE_SECTIONS + or elf_s["sh_size"] == 0 ): continue if elf_s["sh_type"] not in ["SHT_PROGBITS", "SHT_NOBITS"]: raise RuntimeError(f"Unknown section {elf_s.name}.") + if elf_s.name == '.got': + # FIXME: figure out why those sections are inserted + print("WARNING: Non-empty .got section", file=sys.stderr) if elf_s["sh_flags"] & SH_FLAGS.SHF_EXECINSTR: rwx = PE_CHARACTERISTICS_RX