Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Symbol visibility fix #47

Closed
wants to merge 1 commit into from

6 participants

Samuel Cochran Charlie Savage NARUSE, Yui John Mair Corin Langosch Nobuyoshi Nakada
Samuel Cochran

Removing visibility flag hiding required symbols in ruby binary during final linking.

Fixes ruby-debug19, along with many other extensions.

Samuel Cochran sj26 Removing visibility flag hiding required symbols in ruby binary durin…
…g final linking.


Fixes ruby-debug19, along with many other extensions.
1f88c47
Samuel Cochran

This fixes passenger support, too.

Charlie Savage

You might want to look at:

http://redmine.ruby-lang.org/issues/5193

Which is about getting ruby-debug working again on 1.9.3

NARUSE, Yui
Owner

As @cfis says, We are considering about ruby-debug, so at least ruby-debug will work on 1.9.3 release.
If you know yet another library which is broken by visibility, please notice us.

NARUSE, Yui nurse closed this
Samuel Cochran

The problem is that these symbols are marked as RUBY_EXTERN, are globally available in the ruby static library, but are not visible in the ruby binary itself.

ruby_current_thread, for example, is marked as an external symbol in the data section, and is visible in libruby-static.a but not in ruby:

$ nm -U libruby-static.a | grep ruby_current_thread
0000000000131e88 D _ruby_current_thread
$ nm -U ruby | grep ruby_current_thread    
00000001002249d0 d _ruby_current_thread

Is this by design? Should these symbols only be used by the primarily linking binary and not by shared libraries?

John Mair

@nurse will you expose ruby_current_thread symbol when 1.9.3 is released? i have a library (also related to debugging but not ruby-debug) that depends on the visibility of this symbol

NARUSE, Yui nurse reopened this
Samuel Cochran

The impression I got was that there might be an official interface to this instead? In any case, hiding symbols is going to break compatibility with many plugins.

Corin Langosch

After installing the tuned ruby using https://gist.github.com/1688857 my specs run about 10-20% faster. No problems nor instabilities so far -> +1 :)

Nobuyoshi Nakada nobu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 16, 2011
  1. Samuel Cochran

    Removing visibility flag hiding required symbols in ruby binary durin…

    sj26 authored
    …g final linking.
    
    
    Fixes ruby-debug19, along with many other extensions.
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 1 deletion.
  1. +0 1  configure.in
1  configure.in
View
@@ -493,7 +493,6 @@ if test "$GCC" = ""; then
AS_CASE(["$target_os"],[aix*],[warnflags="-qinfo=por"])
fi
if test "$GCC" = yes; then
- RUBY_TRY_CFLAGS(-fvisibility=hidden, [RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden)])
AC_SUBST(WERRORFLAG, "-Werror")
if test "$visibility_option" = yes; then
RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden)
Something went wrong with that request. Please try again.