- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: LD_PRELOAD unresolved symbols
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2006 12:02 AM
тАО08-22-2006 12:02 AM
LD_PRELOAD unresolved symbols
Here is what happens:
# LD_PRELOAD=/home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2 date
/usr/lib/dld.sl: Unresolved symbol: __data_start (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved symbol: end (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved module for symbol: GC_dirty_maintained (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved module for symbol: GC_n_kinds (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved module for symbol: GC_root_size (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved module for symbol: GC_time_limit (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved module for symbol: GC_is_initialized (data) from /home/project-releases/tmp/gc6.4.redirect/.libs/libgc.sl.1.2
/usr/lib/dld.sl: Unresolved module for symbol: malloc (code) from /usr/lib/libpthread.1
Abort(coredump)
#
The first two symbols are special and I assume may need some porting work on my part. However, the others are in the library:
# odump -slexport $PR/tmp/gc6.4.redirect/.libs/libgc.sl.1.2 | grepword 'GC_dirty_maintained|GC_n_kinds|GC_root_size|GC_time_limit|GC_is_initialized|malloc'
000000074 -00000001 00001 0x40004270 Data 000000,155 00 GC_time_limit
000000077 -00000001 00015 0x400045f4 Data 000000,155 00 GC_is_initialized
000000080 -00000001 00014 0x40004404 Data 000000,155 00 GC_root_size
000000085 000000009 00018 0x40004644 Data 000000,155 00 GC_dirty_maintained
000000132 -00000001 00013 0x400043d4 Data 000000,155 00 GC_n_kinds
000000417 -00000001 00011 0x0001d9f4 Code 000000,155 00 malloc
Can anyone shed some light on this?
Joe Buehler
- Tags:
- LD_PRELOAD
- leak
- unsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2006 12:46 AM
тАО08-22-2006 12:46 AM
Re: LD_PRELOAD unresolved symbols
Second problem, there is some bizarreness in the way that SHLIB_PATH and/or LD_PRELOAD need to be set.
The following works:
env SHLIB_PATH=/the/dir/with/libgc.sl LD_PRELOAD=libgc.sl test_binary.exe
I found that exporting the two environment variables in a subshell does NOT work for whatever reason:
(export SHLIB_PATH=whatever; export LD_PRELOAD=whatever; test_binary.exe)
that just results in a memory fault...
Joe Buehler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2006 01:03 AM
тАО08-22-2006 01:03 AM
Re: LD_PRELOAD unresolved symbols
Verify patch dependencies or linking to dynamic libraries in /usr/lib options in $SHLIB_PATH.
echo $SHLIB_PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2006 01:06 PM
тАО08-22-2006 01:06 PM
Re: LD_PRELOAD unresolved symbols
LD_PRELOAD is very dangerous. It would be better if you just link your application with that new GC.
>The first two symbols are special and I assume may need some porting work on my part.
These are the problem. You look at "Unresolved symbol" for the missing ones and the "Unresolved module" are the reason. So to fix the issue you need to relink your application with -Wl,+ee,__data_start -Wl,+ee,end.
But if you could do that, you might as well link with libgc.sl.1.2.
>Joseph: I found that exporting the two environment variables in a subshell does NOT work
Right, you never want to export that variable, only use it sparingly as possible. And you may want to consider LD_PRELOAD_ONCE if you have the appropriate patches.
Also SHLIB_PATH is not needed if you give the absolute path for LD_PRELOAD, unless there are dependent libs.
- Tags:
- LD_PRELOAD_ONCE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-23-2006 05:33 AM
тАО08-23-2006 05:33 AM
Re: LD_PRELOAD unresolved symbols
It's easier to link against libgc.sl of course, but much nicer to be able to use LD_PRELOAD on an arbitrary application to temporarily fix customer-discovered memory leaks.