dynamic linker in RTEMS 5 ?
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Dec 22 06:07:20 UTC 2017
On 22/12/17 00:18, Chris Johns wrote:
> On 22/12/2017 09:47, Till Straumann wrote:
>> On 12/21/2017 04:36 PM, Chris Johns wrote:
>>> On 22/12/2017 08:34, Joel Sherrill wrote:
>>>> On Dec 21, 2017 3:04 PM, "Till Straumann" <strauman at slac.stanford.edu
>>>> <mailto:strauman at slac.stanford.edu>> wrote:
>>>> On 12/20/2017 02:46 PM, Chris Johns wrote:
>>>> On 21/12/17 2:22 am, Till Straumann wrote:
>>>> I think it would not be very difficult to add support for dlopen to
>>>> cexpsh.
>>>>
>>>> Great. Is there a public repo with the latest code?
>>>>
>>>> https://github.com/till-s/cexpsh <https://github.com/till-s/cexpsh>
>>> Thanks.
>>>
>>>> Can just the cexp part be brought into RTEMS under say libmisc?
>>>>
>>>> In principle, yes, but I'd think it might be more useful if we add
>>>> support for loading modules via dlopen (under linux this already works
>>>> but I'd expect RTEMS' variant to differ; in particular I'm using dlinfo
>>>> and dl_iterate_phdr, i.e., some sort of inspection is required).
>>> We do not support dl_iterate_phdr and I am not sure what is present in dlinfo.
>> dl_iterate_phdr is necessary to support the following:
> I see it is in Linux and FreeBSD and not the standard, this is why it was missed:
>
> http://pubs.opengroup.org/onlinepubs/009695399/basedefs/dlfcn.h.html
>
> I do not keep the ELF headers or any ELF detail about and this call is awkward
> because RTEMS supports more than ELF as a format. Further to this Linux and
> FreeBSD provide different structs so what is considered portable?
>
> If we can find a suitable struct for this call then adding it should not be
> difficult if the locking can be sorted, ie holding the RTL lock while in the
> call back. Keeping ELF data on RTEMS just in case this call is made is an
> overhead I do not like as it does not fit our embedded systems approach.
>
At least at the moment all RTEMS targets use ELF. I removed all non-ELF
support in Binutils for obsolete RTEMS targets in January 2017.
It would be nice to have the ELF headers in RTEMS (or Newlib) also for
simple bootloaders.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list