All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] xeno-config --no-mode-check still has -lmodechk
@ 2018-04-04 19:58 Giulio Moro
  2018-04-05  6:43 ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Giulio Moro @ 2018-04-04 19:58 UTC (permalink / raw)
  To: xenomai

 /usr/xenomai/bin/xeno-config --skin cobalt --ldflags --no-mode-check

returns
-Wl,--no-as-needed   /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt

which removes the modechk wrappers, but leaves -lmodechk in. Is this expected?

As I understand it, libmodechk provides implementations for __wrap_malloc, __wrap_free and __real_malloc, __real_free() are these needed even when the wrappers are disabled, or should -lmodechk not be included?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] xeno-config --no-mode-check still has -lmodechk
  2018-04-04 19:58 [Xenomai] xeno-config --no-mode-check still has -lmodechk Giulio Moro
@ 2018-04-05  6:43 ` Philippe Gerum
  2018-04-05 11:15   ` Giulio Moro
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2018-04-05  6:43 UTC (permalink / raw)
  To: Giulio Moro, xenomai

On 04/04/2018 09:58 PM, Giulio Moro wrote:
>  /usr/xenomai/bin/xeno-config --skin cobalt --ldflags --no-mode-check
> 
> returns
> -Wl,--no-as-needed   /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
> 
> which removes the modechk wrappers, but leaves -lmodechk in. Is this expected?
> 
> As I understand it, libmodechk provides implementations for __wrap_malloc, __wrap_free and __real_malloc, __real_free() are these needed even when the wrappers are disabled, or should -lmodechk not be included?
> 
> 

The main exec may still depend on external libs built with mode checking
wrappers.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] xeno-config --no-mode-check still has -lmodechk
  2018-04-05  6:43 ` Philippe Gerum
@ 2018-04-05 11:15   ` Giulio Moro
  2018-04-05 13:09     ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Giulio Moro @ 2018-04-05 11:15 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

so would it not be up to the external libs to specify in their docs that they should be linked with -lmodechk?
________________________________________
From: Philippe Gerum <rpm@xenomai.org>
Sent: 05 April 2018 07:43
To: Giulio Moro; xenomai@xenomai.org
Subject: Re: [Xenomai] xeno-config --no-mode-check still has -lmodechk

On 04/04/2018 09:58 PM, Giulio Moro wrote:
>  /usr/xenomai/bin/xeno-config --skin cobalt --ldflags --no-mode-check
>
> returns
> -Wl,--no-as-needed   /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
>
> which removes the modechk wrappers, but leaves -lmodechk in. Is this expected?
>
> As I understand it, libmodechk provides implementations for __wrap_malloc, __wrap_free and __real_malloc, __real_free() are these needed even when the wrappers are disabled, or should -lmodechk not be included?
>
>

The main exec may still depend on external libs built with mode checking
wrappers.

--
Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Xenomai]  xeno-config --no-mode-check still has -lmodechk
  2018-04-05 11:15   ` Giulio Moro
@ 2018-04-05 13:09     ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2018-04-05 13:09 UTC (permalink / raw)
  To: Giulio Moro, xenomai

On 04/05/2018 01:15 PM, Giulio Moro wrote:
> so would it not be up to the external libs to specify in their docs that they should be linked with -lmodechk?

You likely mean mentioning such dependency in their LDFLAGS as DSOs when
linked, which is right.

Over time, I received several reports from users of 3rd party libs which
could not assume that unfortunately. So the question boils down to:
should we break those builds to remove a generally useless dependency on
libmodechk, or should we keep this dependency to please those users and
maintain backward compat.

Another question this raises is about calling __real_* symbols directly
from the application code - which would be ok as a way to bypass the
assertion checking in this case (likewise the other way around,
referring to __wrap* calls). Not depending on libmodechk would
invalidate such usage, ending up in undefined references.

Open question AFAIC.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] xeno-config --no-mode-check still has -lmodechk
@ 2018-04-25 16:45 Lange Norbert
  0 siblings, 0 replies; 6+ messages in thread
From: Lange Norbert @ 2018-04-25 16:45 UTC (permalink / raw)
  To: Xenomai (xenomai@xenomai.org), Philippe Gerum (rpm@xenomai.org)

Ok, I believe that's my entirely the fault of my changes, ignore the previous mail

Norbert
________________________________

This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.

ANDRITZ HYDRO GmbH


Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation

Firmensitz/ Registered seat: Wien

Firmenbuchgericht/ Court of registry: Handelsgericht Wien

Firmenbuchnummer/ Company registration: FN 61833 g

DVR: 0605077

UID-Nr.: ATU14756806


Thank You
________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai] xeno-config --no-mode-check still has -lmodechk
@ 2018-04-25 16:40 Lange Norbert
  0 siblings, 0 replies; 6+ messages in thread
From: Lange Norbert @ 2018-04-25 16:40 UTC (permalink / raw)
  To: Xenomai (xenomai@xenomai.org), Philippe Gerum (rpm@xenomai.org)

Hello,

Since I just ran into this….
libcobalt seems to really need libmodechk to define __real_malloc and __real_free.
I believe this to be a bug?

$ nm /home/lano/buildroot/host/x86_64-buildroot-linux-gnu/sysroot/usr/xenomai/lib/libcobalt.so | grep malloc
00000000000199f0 T malloc_ex
                 U malloc@@GLIBC_2.2.5
000000000001aef0 T malloc_usable_size_ex
                 U __real_malloc
000000000001a430 T tlsf_malloc

Norbert
________________________________

This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.

ANDRITZ HYDRO GmbH


Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation

Firmensitz/ Registered seat: Wien

Firmenbuchgericht/ Court of registry: Handelsgericht Wien

Firmenbuchnummer/ Company registration: FN 61833 g

DVR: 0605077

UID-Nr.: ATU14756806


Thank You
________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-25 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-04 19:58 [Xenomai] xeno-config --no-mode-check still has -lmodechk Giulio Moro
2018-04-05  6:43 ` Philippe Gerum
2018-04-05 11:15   ` Giulio Moro
2018-04-05 13:09     ` Philippe Gerum
2018-04-25 16:40 Lange Norbert
2018-04-25 16:45 Lange Norbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.