GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: make process.dlopen() load well-known symbol by bnoordhuis · Pull Request #18934 · nodejs/node

Conversation

@bnoordhuis

@bnoordhuis bnoordhuis commented Feb 22, 2018

Copy link
Copy Markdown
Member

Look for symbol node_register_module_v${NODE_MODULE_VERSION} if the
add-on didn't self-register. This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

An experiment to make add-on loading more flexible. Can be extended to n-api, cc @nodejs/n-api.

Longer term, I'd like to get rid of the __attribute__((constructor)) approach. It's convoluted and complicated for no good reason.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fishrock123 and Talbot3 reacted with hooray emoji
All reactions
  • 🎉 2 reactions
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Feb 22, 2018
fhinkel
fhinkel approved these changes Feb 22, 2018
View reviewed changes
danbev
danbev approved these changes Feb 23, 2018
View reviewed changes
tniessen
tniessen approved these changes Feb 23, 2018
View reviewed changes

@tniessen tniessen left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mmarchini
mmarchini approved these changes Feb 26, 2018
View reviewed changes
cjihrig
cjihrig approved these changes Feb 26, 2018
View reviewed changes
jasnell
jasnell approved these changes Feb 26, 2018
View reviewed changes
joyeecheung
joyeecheung approved these changes Feb 27, 2018
View reviewed changes
@joyeecheung

joyeecheung commented Feb 27, 2018

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/13393/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis
bnoordhuis force-pushed the better-addon-loading branch from 8c6aa00 to 1021bbf Compare February 27, 2018 22:36
@bnoordhuis

bnoordhuis commented Feb 27, 2018

Copy link
Copy Markdown
Member Author

Small fix-up to make the test export the symbol on Windows: https://ci.nodejs.org/job/node-test-pull-request/13401/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bnoordhuis added 2 commits March 1, 2018 13:44
@bnoordhuis
src: clean up process.dlopen()
6631522
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: nodejs#18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@bnoordhuis
src: make process.dlopen() load well-known symbol
3828fc6
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: nodejs#18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@bnoordhuis
bnoordhuis force-pushed the better-addon-loading branch from 1021bbf to 3828fc6 Compare March 1, 2018 12:48
@bnoordhuis bnoordhuis closed this Mar 1, 2018
@bnoordhuis
bnoordhuis deleted the better-addon-loading branch March 1, 2018 12:48
@bnoordhuis bnoordhuis added the semver-minor PRs that contain new features and should be released in the next minor version. label Mar 1, 2018
@bnoordhuis

bnoordhuis commented Mar 1, 2018

Copy link
Copy Markdown
Member Author

Landed in 197fbbe...3828fc6, thanks for the reviews.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis
bnoordhuis merged commit 3828fc6 into nodejs:master Mar 1, 2018
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: clean up process.dlopen()
16ffc2b
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: make process.dlopen() load well-known symbol
9ea4a73
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 6, 2018
v9.8.0 proposal #19181
Merged
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: clean up process.dlopen()
ca5c59e
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: make process.dlopen() load well-known symbol
a30b30f
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: clean up process.dlopen()
bb51e95
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: make process.dlopen() load well-known symbol
1d1a241
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: clean up process.dlopen()
62dc43d
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 6, 2018
@bnoordhuis @MylesBorins
src: make process.dlopen() load well-known symbol
86fa308
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins added a commit that referenced this pull request Mar 6, 2018
@MylesBorins
2018-03-06, Version 9.8.0 (Current)
12e4454
Notable Changes:

* crypto:
  - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson)
    #17690
* lib:
  - v8_prof_processor works again 🎉 (Anna Henningsen)
    #19059
* loader:
  - --inspect-brk now works properly for esmodules (Gus Caplan)
    #18949
* src:
  - handle exceptions in env-\>SetImmediates (James M Snell)
    #18297
  - make process.dlopen() load well-known symbol (Ben Noordhuis)
    #18934
* trace_events:
  - add file pattern cli option (Andreas Madsen)
    #18480

PR-URL: #19181
MylesBorins pushed a commit that referenced this pull request Mar 7, 2018
@bnoordhuis @MylesBorins
src: clean up process.dlopen()
89edbae
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 7, 2018
@bnoordhuis @MylesBorins
src: make process.dlopen() load well-known symbol
4fae6e3
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: #18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MylesBorins added a commit that referenced this pull request Mar 7, 2018
@MylesBorins
2018-03-07, Version 9.8.0 (Current)
3e9be23
Notable Changes:

* crypto:
  - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson)
    #17690
* lib:
  - v8_prof_processor works again 🎉 (Anna Henningsen)
    #19059
* loader:
  - --inspect-brk now works properly for esmodules (Gus Caplan)
    #18949
* src:
  - handle exceptions in env-\>SetImmediates (James M Snell)
    #18297
  - make process.dlopen() load well-known symbol (Ben Noordhuis)
    #18934
* trace_events:
  - add file pattern cli option (Andreas Madsen)
    #18480

PR-URL: #19181
MylesBorins added a commit that referenced this pull request Mar 7, 2018
@MylesBorins
2018-03-07, Version 9.8.0 (Current)
27ba6e2
Notable Changes:

* crypto:
  - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson)
    #17690
* http2:
  - Fixed issues with aborted connections in the HTTP/2 implementation
    (Anna Henningsen)
    #18987
    #19002
* loader:
  - --inspect-brk now works properly for esmodules (Gus Caplan)
    #18949
* src:
  - make process.dlopen() load well-known symbol (Ben Noordhuis)
    #18934
* trace_events:
  - add file pattern cli option (Andreas Madsen)
    #18480
* Added new collaborators:
  - Chen Gang (MoonBall) https://github.com/MoonBall

PR-URL: #19181
MylesBorins added a commit that referenced this pull request Mar 8, 2018
@MylesBorins
2018-03-07, Version 9.8.0 (Current)
282e65c
Notable Changes:

* crypto:
  - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson)
    #17690
* http2:
  - Fixed issues with aborted connections in the HTTP/2 implementation
    (Anna Henningsen)
    #18987
    #19002
* loader:
  - --inspect-brk now works properly for esmodules (Gus Caplan)
    #18949
* src:
  - make process.dlopen() load well-known symbol (Ben Noordhuis)
    #18934
* trace_events:
  - add file pattern cli option (Andreas Madsen)
    #18480
* Added new collaborators:
  - Chen Gang (MoonBall) https://github.com/MoonBall

PR-URL: #19181
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@bnoordhuis @MayaLekova
src: clean up process.dlopen()
0bcdcba
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.

PR-URL: nodejs#18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@bnoordhuis @MayaLekova
src: make process.dlopen() load well-known symbol
0cddeb3
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register.  This can be used to create add-ons that
support multiple Node.js versions from a single shared object.

PR-URL: nodejs#18934
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@MylesBorins @MayaLekova
2018-03-07, Version 9.8.0 (Current)
1874c27
Notable Changes:

* crypto:
  - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson)
    nodejs#17690
* http2:
  - Fixed issues with aborted connections in the HTTP/2 implementation
    (Anna Henningsen)
    nodejs#18987
    nodejs#19002
* loader:
  - --inspect-brk now works properly for esmodules (Gus Caplan)
    nodejs#18949
* src:
  - make process.dlopen() load well-known symbol (Ben Noordhuis)
    nodejs#18934
* trace_events:
  - add file pattern cli option (Andreas Madsen)
    nodejs#18480
* Added new collaborators:
  - Chen Gang (MoonBall) https://github.com/MoonBall

PR-URL: nodejs#19181
@fs-eire fs-eire mentioned this pull request Jun 12, 2018
Is well-known symbol the recommended way to build addon? #21291
Closed
@MylesBorins MylesBorins added the dont-land-on-v8.x label Aug 7, 2018
@MylesBorins

MylesBorins commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

set as don't land for v8.x. Feel free to change label and open backport PR if it should land

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis bnoordhuis mentioned this pull request Oct 2, 2022
Explicit initialisation of Node-API addons #44853
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@cjihrig cjihrig cjihrig approved these changes
@tniessen tniessen tniessen approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes
+3 more reviewers
@fhinkel fhinkel fhinkel approved these changes
@danbev danbev danbev approved these changes
@mmarchini mmarchini mmarchini approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@bnoordhuis @joyeecheung @MylesBorins @fhinkel @danbev @jasnell @cjihrig @tniessen @mmarchini @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.