From: Heikki Lindholm <holindho@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: AW: [Xenomai-help] undefinedreference __xnarch_xchg_called_with_bad_pointer
Date: Tue, 28 Feb 2006 21:06:01 +0200 [thread overview]
Message-ID: <44049F19.3020901@domain.hid> (raw)
In-Reply-To: <44049605.2000108@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
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.
- hl
[-- Attachment #2: xeno-atomic-badptr.patch --]
[-- Type: text/plain, Size: 550 bytes --]
--- 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;
}
next prev parent reply other threads:[~2006-02-28 19:06 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 [this message]
2006-03-01 8:04 ` Philippe Gerum
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=44049F19.3020901@domain.hid \
--to=holindho@domain.hid \
--cc=rpm@xenomai.org \
--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.