discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nm not finding __objc_class names Re: Loading bundle resources using


From: Matt Rice
Subject: Re: nm not finding __objc_class names Re: Loading bundle resources using GNUstep runtime 2.0
Date: Wed, 19 Feb 2020 00:42:15 +0000

On Mon, Feb 17, 2020 at 12:00 PM David Chisnall
<gnustep@theravensnest.org> wrote:
>
> Note that, if you want to enumerate all of the classes in a library, you
> can do so on ELF platforms by using dl_iterate_phdr to find the
> `__objc_classes` section in each loaded ELF image and collect the
> classes directly (this section is an array of pointers to classes
> declared in the ELF file).  This will work irrespective of build system goo.
>
> On Windows, the corresponding section is `.objcrt$CLS` (though I believe
> the CLS part is a sub-section and is stripped during linkage).

I believe that there is (or at least was) already dl_iterate_phdr,
and that for some reason this was added to get the list of classes
without actually loading
the object file?  If that path still exists, its perhaps possible this
series of issues, is people using this API,
and calling frameworkClasses without causing the loading shared object.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]