Re:VFS shim that allows a SQLite database to be appended to ...
by phaedrus on Friday June 08, 2018 @11:21AM
(#17266305)
I could use this! While converting someone's Win32 C program to C++, it struck me that most of the magic numbers, window class names, arrays of GUI control data etc. which are defined in code (in both windows.h and the user source code) could be defined in a read-only sqlite database instead. And with this link here, it wouldn't even have to be a separate file.
[ Parent
| on HN ]
Re:VFS shim that allows a SQLite database to be appended to ...
by roel_v on Friday June 08, 2018 @11:36AM
(#17266484)
On the user side, most of that can be stored in the resource section (for PE format executables, so Windows only for all practical intents and purposes). It has annoyed me many times that no such thing exist in Unix land (ELF, basically), and instead I have to rely on 'bin2hex' style tools and store that data in the data section.
Re:VFS shim that allows a SQLite database to be appended to ...
by dmitrygr on Friday June 08, 2018 @01:04PM
(#17267440)
Elf has the concept of sections, and you can make as many of them as you want. The standard gnu Linker also automatically creates labels that you can use to get ahold of those sections. For example for a section titled XYZ, it'll automatically create to extern variables named __xyz_start and @__xyz_end sorry some such thing. You can place things into sections from source code, or add them later using objcopy