From: Philippe Gerum <rpm@xenomai.org>
To: Heikki Lindholm <holindho@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: AW: [Xenomai-help] undefinedreference __xnarch_xchg_called_with_bad_pointer
Date: Wed, 01 Mar 2006 09:04:05 +0100 [thread overview]
Message-ID: <44055575.4000306@domain.hid> (raw)
In-Reply-To: <44049F19.3020901@domain.hid>
Heikki Lindholm wrote:
> Philippe Gerum kirjoitti:
>
>> Heikki Lindholm wrote:
>>
>>> Uh. I guess the compiler isn't killing the *_bad_pointer function as
>>> dead code when debug is enabled (although it is dead-code.)
>>
>>
>>
>> The optimizer is disabled by --enable-debug so that we don't get
>> strange jumps while tracing with GDB, I guess that's why the dead code
>> is not eliminated. What about just killing this check, since the same
>> code is already validated when compiling it as a kernel module?
>> (except asm-uvm/system.h, but that's not important).
>
>
> Yep. That seems like the way to go. I don't see much to gain from the
> check. Of course, paranoid way would be to add the __bad_ptr() function
> with abort() or something inside. Quick patch attached for the former case.
Applied, thanks.
>
> - hl
>
>
> ------------------------------------------------------------------------
>
> --- atomic.h.orig 2006-02-28 21:01:59.000000000 +0200
> +++ atomic.h 2006-02-28 21:01:34.000000000 +0200
> @@ -142,12 +142,6 @@
> }
> #endif
>
> -/*
> - * This function doesn't exist, so you'll get a linker error
> - * if something tries to do an invalid xchg().
> - */
> -extern void __xnarch_xchg_called_with_bad_pointer(void);
> -
> static __inline__ unsigned long
> __xchg(volatile void *ptr, unsigned long x, unsigned int size)
> {
> @@ -159,7 +153,6 @@
> return __xchg_u64(ptr, x);
> #endif
> }
> - __xnarch_xchg_called_with_bad_pointer();
> return x;
> }
>
--
Philippe.
prev parent reply other threads:[~2006-03-01 8:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 15:35 AW: [Xenomai-help] undefinedreference __xnarch_xchg_called_with_bad_pointer Roderik_Wildenburg
2006-02-28 16:27 ` Heikki Lindholm
2006-02-28 18:27 ` Philippe Gerum
2006-02-28 19:06 ` Heikki Lindholm
2006-03-01 8:04 ` Philippe Gerum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44055575.4000306@domain.hid \
--to=rpm@xenomai.org \
--cc=holindho@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.