Re: size of objects in a dynamic library
Re: size of objects in a dynamic library
- Subject: Re: size of objects in a dynamic library
- From: André-John Mas <email@hidden>
- Date: Sun, 26 Feb 2006 21:26:41 -0500
Just out of curosity, what are you wanting to do with this
information. By understanding the problem it should help find a
suitable solution.
Andre
On 26-Feb-06, at 17:12 , Brendan Creane wrote:
Has anyone figured out a way to infer the size of an object in the
data segment of a Mach-O dynamic library? This is straight-forward
under Linux – the dl_info struct, as returned by a call to dladdr
(), has a “size_t dli_size” field that reports the size of the
nearest symbol.
My hope is that there’s an official API to do this, or at least an
API that is likely to be supported in the future.
My fall-back strategy is to store the size (using sizeof at compile
time) in a related symbol. Clunky, but workable.
thanks for your help,
bcreane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden