You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
linking fails with ld.gold (binutils-2.33.1) in this way:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /var/tmp/portage/net-libs/nodejs-13.7.0-r1/work/node-v13.7.0/src/large_pages/ld.implicit.script:10:10: syntax error, unexpected STRING
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: unable to parse script file /var/tmp/portage/net-libs/nodejs-13.7.0-r1/work/node-v13.7.0/src/large_pages/ld.implicit.script
collect2: error: ld returned 1 exit status
make: *** [cctest.target.mk:195: /var/tmp/portage/net-libs/nodejs-13.7.0-r1/work/node-v13.7.0/out/Release/cctest] Error 1
make: *** Waiting for unfinished jobs....
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /var/tmp/portage/net-libs/nodejs-13.7.0-r1/work/node-v13.7.0/src/large_pages/ld.implicit.script:10:10: syntax error, unexpected STRING
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: unable to parse script file /var/tmp/portage/net-libs/nodejs-13.7.0-r1/work/node-v13.7.0/src/large_pages/ld.implicit.script
collect2: error: ld returned 1 exit status
make: *** [mkcodecache.target.mk:172: /var/tmp/portage/net-libs/nodejs-13.7.0-r1/work/node-v13.7.0/out/Release/mkcodecache] Error 1
switching to ld.bfd yields in a error-less compilation and installation on gentoo.
Forcing the ld.bfd linker was done by prepending LDFLAGS="${LDFLAGS} -Wl,-fuse-ld=bfd" to the emerge command.
It's not quite the same as #31249, although you'll get the same link errors when you remove the INSERT BEFORE line from the linker script. ^^
I don't have time to look into it today but we probably don't need the linker script if we switch to the __executable_start symbol provided by LLVM's and GNU ld's default linker script; run ld --verbose to view it.
Caveat emptor: they're not completely interchangeable because there are a number of sections in between. __executable_start is about 8 MB below __nodetext so some code tweaking is necessary.
Activity
richardlau commentedon Jan 26, 2020
Similar to #31249.
bnoordhuis commentedon Jan 27, 2020
It's not quite the same as #31249, although you'll get the same link errors when you remove the
INSERT BEFOREline from the linker script. ^^I don't have time to look into it today but we probably don't need the linker script if we switch to the
__executable_startsymbol provided by LLVM's and GNU ld's default linker script; runld --verboseto view it.Caveat emptor: they're not completely interchangeable because there are a number of sections in between.
__executable_startis about 8 MB below__nodetextso some code tweaking is necessary.src: use __executable_start for linux hugepages
bnoordhuis commentedon Jan 28, 2020
@drwulsen Can you try #31547?
drwulsen commentedon Feb 8, 2020
Sorry for the (too) late reply; just tested and it compiled as I hoped for.
Thank you for the quick steps taken!
src: use __executable_start for linux hugepages
src: use __executable_start for linux hugepages
src: use __executable_start for linux hugepages
src: use __executable_start for linux hugepages