Skip to content

WIP: Protect qsave_program/2 from strip clobbering #1371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xelxebar
Copy link

Addresses #1370.

In the case of ELF standalon executables, our quick save data isn't referenced
by an ELF section, meaning that binutils' strip will remove it contrary to
expectations. Here we protect the archive data with a .zipdata section.
@xelxebar
Copy link
Author

Correctly setting the .zipdata ELF section, but apparently I've broken something:

[FATAL ERROR: at Sat May 31 17:21:56 2025
        Resource database "/src/swipl-devel/build/man/pldoc2tex" does not contain "$prolog/state.qlf"]

and yet,

$ unzip -l /src/swipl-devel/build/man/pldoc2tex
Archive:  man/pldoc2tex
warning [man/pldoc2tex]:  24 extra bytes at beginning or within zipfile
  (attempting to process anyway)
  Length      Date    Time    Name
---------  ---------- -----   ----
      176  05-31-2025 17:21   $prolog/options.txt
  1141536  05-31-2025 17:21   $prolog/state.qlf
---------                     -------
  1141712                     2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant