Skip to content

Commit 04e246e

Browse files
[[ Bug 15718 ]] Fix the symbol list generated for revsecurity
The issue came back after gypification of libopenssl project (was fixed in a5fd9a8)
1 parent e6935dd commit 04e246e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/notes/bugfix-15718.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 'SSL library not found' error thrown on iOS when using SSL & Encryption library

util/build_libinfo.pl

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

8181
$symbolExterns .= "extern \"C\" void *$symbol;\n";
82-
$symbolEntries .= " { \"$symbol\", $symbol },\n";
82+
$symbolEntries .= " { \"$symbol\", &$symbol },\n";
8383
}
8484

8585
print OUTPUT $symbolExterns;
86+
output "extern \"C\" {";
8687
output "struct LibExport { const char *name; void *address; };";
8788
output "struct LibInfo { const char **name; struct LibExport *exports; };";
8889
output "static const char *__libexternalname = \"$name\";";
@@ -96,7 +97,8 @@ sub trim
9697
output " &__libexternalname,";
9798
output " __libexports";
9899
output "};";
99-
output "LibInfo *__libinfoptr_$name __attribute__((__visibility__(\"default\"))) = &__libinfo;";
100+
output "__attribute((__visibility__(\"default\"),section(\"__DATA,__libs\"))) volatile struct LibInfo *__libinfoptr_$name = &__libinfo;";
101+
output "};";
100102

101103
sub output
102104
{

0 commit comments

Comments
 (0)