From: Roland McGrath <roland@hack.frob.com>
To: libc-ports@sourceware.org
Subject: [PATCH roland/arm-dl-machine-clear-cache] Move Linuxism out of sysdeps/arm/dl-machine.h
Date: Wed, 01 Aug 2012 18:43:00 -0000 [thread overview]
Message-ID: <20120801184338.4990A2C0B6@topped-with-meat.com> (raw)
A sysdeps/MACHINE file should not have anything that is OS-specific in it.
Ok? (Just merge my branch if you like, or I can do it on approval.)
Thanks,
Roland
ports/ChangeLog.arm
2012-08-01 Roland McGrath <roland@hack.frob.com>
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Don't define it.
Instead, #error if it's not defined.
* sysdeps/unix/sysv/linux/arm/dl-machine.h: New file.
diff --git a/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h
index 8d905e8..442fc3d 100644
--- a/ports/sysdeps/arm/dl-machine.h
+++ b/ports/sysdeps/arm/dl-machine.h
@@ -1,6 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
- 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,8 +26,9 @@
#include <dl-tlsdesc.h>
#include <dl-irel.h>
-#define CLEAR_CACHE(BEG,END) \
- INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
+#ifndef CLEAR_CACHE
+# error CLEAR_CACHE definition required to handle TEXTREL
+#endif
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
diff --git a/ports/sysdeps/unix/sysv/linux/arm/dl-machine.h b/ports/sysdeps/unix/sysv/linux/arm/dl-machine.h
new file mode 100644
index 0000000..7c96cb7
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/arm/dl-machine.h
@@ -0,0 +1,28 @@
+/* Machine-dependent ELF dynamic relocation inline functions. ARM/Linux version
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef dl_machine_h
+
+/* This definition is Linux-specific. */
+#define CLEAR_CACHE(BEG,END) \
+ INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
+
+/* The rest is just machine-specific. */
+#include <sysdeps/arm/dl-machine.h>
+
+#endif
next reply other threads:[~2012-08-01 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 18:43 Roland McGrath [this message]
2012-08-01 19:30 ` Joseph S. Myers
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=20120801184338.4990A2C0B6@topped-with-meat.com \
--to=roland@hack.frob.com \
--cc=libc-ports@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).