ruby/template
Alan Wu 7d4395cb69 YJIT: Fix shared/static library symbol leaks
Rust 1.58.0 unfortunately doesn't provide facilities to control symbol
visibility/presence, but we care about controlling the list of
symbols exported from libruby-static.a and libruby.so.

This commit uses `ld -r` to make a single object out of rustc's
staticlib output, libyjit.a. This moves libyjit.a out of MAINLIBS and adds
libyjit.o into COMMONOBJS, which obviates the code for merging libyjit.a
into libruby-static.a. The odd appearance of libyjit.a in SOLIBS is also
gone.

To filter out symbols we do not want to export on ELF platforms, we use
objcopy after the partial link. On darwin, we supply a symbol list to
the linker which takes care of hiding unprefixed symbols.

[Bug #19255]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-01-27 12:28:09 -05:00
..
Doxyfile.tmpl document for commit 5bbba76489 [ci skip] 2022-12-07 15:09:12 +09:00
GNUmakefile.in [Bug #19181] Separate the rule for unicode_normalize/tables.rb timestamp 2022-12-10 13:58:20 +09:00
Makefile.in YJIT: Fix shared/static library symbol leaks 2023-01-27 12:28:09 -05:00
builtin_binary.inc.tmpl Fixed a typo 2020-05-10 18:40:47 +09:00
call_iseq_optimized.inc.tmpl fix inline method cache sync bug 2020-12-15 13:29:30 +09:00
configure-ext.mk.tmpl Retrieve configured gems info 2022-04-07 09:47:10 +09:00
depend.tmpl Added depend files 2019-07-14 01:31:29 +09:00
encdb.h.tmpl Fix syntax error in generated code 2021-06-21 11:20:31 +09:00
extinit.c.tmpl extinit.c.tmpl: drop after dot 2017-01-23 02:19:00 +00:00
exts.mk.tmpl Fix paths of exts.mk to clean 2022-08-11 17:43:46 +09:00
fake.rb.in Debugging snapshot [ci skip] 2022-09-05 13:08:23 +09:00
id.c.tmpl Generate token ID indexes in id.def 2022-09-08 18:18:56 +09:00
id.h.tmpl Generate token ID indexes in id.def 2022-09-08 18:18:56 +09:00
known_errors.inc.tmpl
limits.c.tmpl Freeze RbConfig::SIZEOF and RbConfig::LIMITS 2017-04-06 02:33:40 +00:00
prelude.c.tmpl Follow up "Rework `first_lineno` to be `int`." 2022-10-28 19:33:19 +09:00
ruby-gdb.in Added install-dbg 2020-06-13 08:22:06 +09:00
ruby-lldb.in Added install-dbg 2020-06-13 08:22:06 +09:00
ruby-runner.h.in ruby-runner.c: enable MJIT_SEARCH_BUILD_DIR 2018-11-07 04:02:14 +00:00
ruby.pc.in Move DEFFILE to EXTDLDFLAGS 2021-08-29 13:04:42 +09:00
sizes.c.tmpl Fix trivial -Wundef warnings 2021-05-04 14:56:55 +02:00
transdb.h.tmpl Get rid of use of special variables 2020-01-20 16:58:58 +09:00
unicode_norm_gen.tmpl Use `_` instead of `_n_` 2019-10-18 20:24:36 +09:00
verconf.h.tmpl MJIT header for multiarch 2018-02-08 15:19:32 +00:00