diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2020-01-28 13:01:32 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-02-01 13:37:47 +0300 |
commit | 938abd9535663d45a8ec88d5fa6acc0af8e8fd13 (patch) | |
tree | ceadde20304f496f757947258927fb27e2696ece /node.gypi | |
parent | d80c40047bedbf829bc1854a720b40e63bdb76fc (diff) |
src: use __executable_start for linux hugepages
`__executable_start` is provided by GNU's and LLVM's default linker
scripts, obviating the need to plug in a custom linker script.
The problem with our bespoke linker script is that it works with ld.bfd
but not ld.gold and cannot easily be ported because the latter linker
doesn't understand the `INSERT BEFORE` directive.
The /proc/self/maps scanner is updated to account for the fact that
there are a number of sections between `&__executable_start` and
the start of the .text section.
Fortunately, those sections are all mapped into the same memory segment
so we only need to look at the next line to find the start of our text
segment.
Fixes: https://github.com/nodejs/node/issues/31520
PR-URL: https://github.com/nodejs/node/pull/31547
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'node.gypi')
-rw-r--r-- | node.gypi | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/node.gypi b/node.gypi index e6f5872cc75..a83c63e23da 100644 --- a/node.gypi +++ b/node.gypi @@ -306,22 +306,6 @@ 'ldflags': [ '-Wl,-z,relro', '-Wl,-z,now' ] }], - [ 'OS=="linux" and ' - 'target_arch=="x64" and ' - 'llvm_version=="0.0"', { - 'ldflags': [ - '-Wl,-T', - '<!(echo "$(pwd)/src/large_pages/ld.implicit.script")', - ] - }], - [ 'OS=="linux" and ' - 'target_arch=="x64" and ' - 'llvm_version!="0.0"', { - 'ldflags': [ - '-Wl,-T', - '<!(echo "$(pwd)/src/large_pages/ld.implicit.script.lld")', - ] - }], [ 'node_use_openssl=="true"', { 'defines': [ 'HAVE_OPENSSL=1' ], 'conditions': [ |