Skip to content

Commit 78f18d3

Browse files
[[ Bug 14766 ]] Fix the perl script generating libinfo.ios.cpp
1 parent c0d853b commit 78f18d3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/notes/bugfix-14766.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# iOs standalone encryption not working in LiveCode 7.0

util/build_libinfo.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ sub trim
6969
$symbol =~ s/:$// ;
7070

7171
$symbolExterns .= "extern \"C\" void *$symbol;\n";
72-
$symbolEntries .= " { \"$symbol\", $symbol },\n";
72+
$symbolEntries .= " { \"$symbol\", &$symbol },\n";
7373
}
7474

7575
print STDOUT $symbolExterns;
76+
output "extern \"C\" {";
7677
output "struct LibExport { const char *name; void *address; };";
7778
output "struct LibInfo { const char **name; struct LibExport *exports; };";
7879
output "static const char *__libexternalname = \"$name\";";
@@ -86,7 +87,8 @@ sub trim
8687
output " &__libexternalname,";
8788
output " __libexports";
8889
output "};";
89-
output "LibInfo *__libinfoptr_$name = &__libinfo;";
90+
output "__attribute((section(\"__DATA,__libs\"))) volatile struct LibInfo *__libinfoptr_revsecurity = &__libinfo;";
91+
output "};";
9092

9193
sub output
9294
{

0 commit comments

Comments
 (0)