Welcome! Log In Create A New Profile

Advanced

Dynamic Module Portability

Joseph Spencer
June 29, 2017 03:28AM
I'm looking to create a portable binary, and from everything I can read, it
is almost impossible. The recommended approach seems to be to expose
source code and require users to compile. This is painful because it
requires the source code and gcc to be available: a hard sell for the lazy
sysadmin.

My goal is to create a proprietary module that is used in conjunction with
a paid service. Users simply install the module and provide access token
credentials.

As you can imagine it's been really difficult, mainly because practically
*every* configure option is compared at run time.

I added some logging, and found that the module signature is indeed
embedded in the resulting .so file. I was able to successfully use sed to
get my module to work, but I'm thinking this is an obvious hack not even
worth considering for a production binary:

sed -i''
's|8,4,8,0011111111010111001111111111111111|8,4,8,0000111111010111001110101111000110|'
ngx_my_custom_module-nginx-1.11.5.so

Having nginx -V is nice, but it could be beneficial to
expose NGX_MODULE_SIGNATURE somehow. That way I could have an installer
script that checkes to ensure that essential modules are available and
modify the binary after it's been downloaded. I realize this is dangerous,
but I'm not willing to expose source code and require gcc yet.

Any opinions or guidance would be greatly appreciated.

--
Thanks,
Joe Spencer (member)
Kogo Software LLC
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Dynamic Module Portability

Joseph Spencer 498 June 29, 2017 03:28AM

Re: Dynamic Module Portability

Joseph Spencer 320 June 29, 2017 03:40AM

Re: Dynamic Module Portability

Joseph Spencer 243 June 29, 2017 04:18AM

Re: Dynamic Module Portability

Maxim Dounin 242 June 29, 2017 10:08AM

Re: Dynamic Module Portability

Joseph Spencer 261 June 29, 2017 11:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 274
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready