Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Symbol visibility fix #47

Closed
wants to merge 1 commit into from

6 participants

@sj26

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

Fixes ruby-debug19, along with many other extensions.

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


Fixes ruby-debug19, along with many other extensions.
1f88c47
@sj26

This fixes passenger support, too.

@cfis

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

@nurse
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.

@nurse nurse closed this
@sj26

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?

@banister

@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

@nurse nurse reopened this
@sj26

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.

@gucki

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 :)

@nobu 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. @sj26

    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
View
1  configure.in
@@ -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.