[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preview: portable dumper
From: |
Daniel Colascione |
Subject: |
Re: Preview: portable dumper |
Date: |
Fri, 16 Feb 2018 07:02:33 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 02/16/2018 12:30 AM, Eli Zaretskii wrote:
Cc: Eli Zaretskii <address@hidden>, Angelo Graziosi <address@hidden>,
address@hidden
From: Daniel Colascione <address@hidden>
Date: Thu, 15 Feb 2018 17:07:29 -0800
A simpler approach would be to just concatenate the dump to temacs, then
add a special header with a signature and a dump length.
But it will have to be a special section, right? Because otherwise we
again will prevent Binutils from doing useful stuff with such an
executable, right?
Just concatenating bytes to the end of an executable doesn't break that
executable, at least not on any platform I know about. binutils keeps
working. No special section required. Strip does remove the extra data
though, unfortunately, and this procedure does break any cryptographic
signatures (although we're not using any right now).
~/edev/trunk/src
$ readelf -h ./emacs
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x41e9f0
Start of program headers: 64 (bytes into file)
Start of section headers: 51310168 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 41
Section header string table index: 40
~/edev/trunk/src
$ ./emacs -batch -Q --eval '(kill-emacs)'
~/edev/trunk/src
$ unzip -t kittens.zip
Archive: kittens.zip
testing: kittens.jpg OK
No errors detected in compressed data of kittens.zip.
~/edev/trunk/src
$ cat emacs kittens.zip > emacs-with-kittens
~/edev/trunk/src
$ readelf -h ./emacs-with-kittens
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x41e9f0
Start of program headers: 64 (bytes into file)
Start of section headers: 51310168 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 41
Section header string table index: 40
~/edev/trunk/src
$ chmod +x emacs-with-kittens
~/edev/trunk/src
$ ./emacs-with-kittens -batch -Q --eval '(kill-emacs)'
~/edev/trunk/src
$ unzip -t emacs-with-kittens
Archive: emacs-with-kittens
warning [emacs-with-kittens]: 51312792 extra bytes at beginning or
within zipfile
(attempting to process anyway)
testing: kittens.jpg OK
No errors detected in compressed data of emacs-with-kittens.
- Re: Preview: portable dumper, (continued)
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/14
- Re: Preview: portable dumper, Alan Third, 2018/02/15
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/15
- Re: Preview: portable dumper, Alan Third, 2018/02/15
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/15
- Re: Preview: portable dumper, Alan Third, 2018/02/15
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/15
- Re: Preview: portable dumper, Paul Eggert, 2018/02/15
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/15
- Re: Preview: portable dumper, Eli Zaretskii, 2018/02/16
- Re: Preview: portable dumper,
Daniel Colascione <=
- Re: Preview: portable dumper, Eli Zaretskii, 2018/02/16
- Re: Preview: portable dumper, Andy Moreton, 2018/02/16
- Re: Preview: portable dumper, Stefan Monnier, 2018/02/15
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/15
- Self-contained emacs binary?, Daniel Colascione, 2018/02/15
- Re: Self-contained emacs binary?, Ken Raeburn, 2018/02/18
- Re: Preview: portable dumper, Phillip Lord, 2018/02/21
- Re: Preview: portable dumper, Daniel Colascione, 2018/02/26
- Re: Preview: portable dumper, Phillip Lord, 2018/02/26
- Re: Preview: portable dumper, Clément Pit-Claudel, 2018/02/26