#6491: dlsym() / dladdr() work strange ---------------------------+------------------------------------------------ Reporter: Guest One | Owner: nobody Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/POSIX | Version: R1/Development Resolution: | Keywords: Blocked By: | Has a Patch: 0 Platform: All | Blocking: ---------------------------+------------------------------------------------ Comment (by Guest One): I have an idea on this problem, but I won't have a single minute to test it for some time. Here ( http://dev.haiku- os.org/browser/haiku/trunk/src/system/libroot/posix/dlfcn.c?rev=29112 ) we have such condition: {{{#!C if (symType == B_SYMBOL_TYPE_TEXT && symLocation <= addr && symLocation >= info->dli_saddr) }}} If I see things right this means that dladdr() search only for exported functions, not variables, so problem could be solved by: {{{#!C if ( (symType == B_SYMBOL_TYPE_TEXT || symType == B_SYMBOL_TYPE_DATA ) && symLocation <= addr && symLocation >= info->dli_saddr) }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/6491#comment:3> Haiku <http://dev.haiku-os.org> Haiku - the operating system.