DragonFly BSD
DragonFly bugs List (threaded) for 2012-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[DragonFlyBSD - Bug #2335] Markus rtld ghc patch only on master?


From: John Marino via Redmine <bugtracker-admin@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Mar 2012 12:13:45 -0700

Issue #2335 has been updated by John Marino.

Assignee set to John Marino


----------------------------------------
Bug #2335: Markus rtld ghc patch only on master?
http://bugs.dragonflybsd.org/issues/2335

Author: G. Isenmann
Status: New
Priority: Normal
Assignee: John Marino
Category: 
Target version: 


As far as I understand, the rtld patch for ghc from Markus
http://leaf.dragonflybsd.org/~profmakx/0004-rtld-tls-fix.patch
went only into the master branch.

It would be nice, if this fix

--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -2323,7 +2323,12 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve,
         */
        if (ELF_ST_TYPE(def->st_info) == STT_FUNC)
            return (make_function_pointer(def, defobj));
-       else
+       else if (ELF_ST_TYPE(def->st_info) == STT_TLS) {
+           tls_index ti;
+           ti.ti_module = defobj->tlsindex;
+           ti.ti_offset = def->st_value;
+           return (__tls_get_addr(&ti));
+       } else
            return (defobj->relocbase + def->st_value);
     }

could go into 3.0.x.

I am only guessing, that this is an equivalent fix (same change at a
similar looking place in an older rtld version?), but this change seems
to work for me...



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]