Bug 3433

Summary: FDPIC Crash / ELF_RTYPE_CLASS_DLSYM missing in dlsym()
Product: uClibc Reporter: mbm
Component: Shared Library SupportAssignee: unassigned
Status: RESOLVED FIXED    
Severity: major CC: uclibc-cvs
Priority: P5    
Version: 0.9.32   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:
Attachments: patch to add ELF_RTYPE_CLASS_DLSYM

Description mbm 2011-03-07 22:11:50 UTC
Created attachment 3121 [details]
patch to add ELF_RTYPE_CLASS_DLSYM

On FDPIC platforms, functions are passed by function descriptor, not by pointers. If you don't specify ELF_RTYPE_CLASS_DLSYM when calling _dl_find_hash() the return value from dlsym() will be a pointer not a function descriptor, crashing the program.

The bug was introduced when TLS support was added in 534661b91c98492995274c364c8177c45efc63db
Comment 1 Bernhard Reutner-Fischer 2011-06-14 15:01:06 UTC
Hi,

Thanks.

Please note that a Signed-off-by line was missing!
Please see http://uclibc.org/developing.html#contrib