Created attachment 314122
Patch to add __RTLD_SPROF to dlopen_doit() mask
Description of problem:
In recent glibc such as the one included in RHEL5, sprof is not able to open shared librairies anymore. That used to work in previous versions of the glibc such as the one we shipped in RHEL4
Version-Release number of selected component (if applicable):
sprof: failed to load shared object `libgtk-x11-2.0.so.0'
Expected results:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
index % time self children called name
[0] 0.0 0.00 0.00 0 g_param_spec_object [0]
...
Additional info:
The bug was introduced in dlfcn/dlopen.c in dlopen_doit() by adding a mask for the mode and that mode is missing __RTLD_SPROF so that sprof cannot open the shared lib.
The patch attached adds __RTLD_SPROF to the mode mode so that sprof works.
Created attachment 314122
Patch to add __RTLD_SPROF to dlopen_doit() mask
Description of problem:
In recent glibc such as the one included in RHEL5, sprof is not able to open shared librairies anymore. That used to work in previous versions of the glibc such as the one we shipped in RHEL4
Version-Release number of selected component (if applicable):
glibc-2.5-24
How reproducible:
100% reproducible
Steps to Reproduce:
1. LD_PROFILE_ OUTPUT= ${PWD} LD_PROFILE= libgtk- x11-2.0. so.0 gnome-calculator
2. sprof libgtk-x11-2.0.so.0
3.
Actual results:
sprof: failed to load shared object `libgtk- x11-2.0. so.0'
Expected results:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
index % time self children called name
[0] 0.0 0.00 0.00 0 g_param_spec_object [0]
...
Additional info:
The bug was introduced in dlfcn/dlopen.c in dlopen_doit() by adding a mask for the mode and that mode is missing __RTLD_SPROF so that sprof cannot open the shared lib.
The patch attached adds __RTLD_SPROF to the mode mode so that sprof works.