summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2011-12-09 15:33:59 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2011-12-09 15:33:59 +0000
commit59e71ee80c65426b2f569cc4c60936053cc9caa5 (patch)
tree0b4c61bbd10fbb1fd3c00a877f4a9df6338496e9 /firmware/target
parent9653ae364cc8b558c846d3391e3ef9eb843d2385 (diff)
downloadrockbox-59e71ee80c65426b2f569cc4c60936053cc9caa5.tar.gz
rockbox-59e71ee80c65426b2f569cc4c60936053cc9caa5.tar.bz2
rockbox-59e71ee80c65426b2f569cc4c60936053cc9caa5.zip
Introduce USED_ATTR wrapper for __attribute__((used)).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31188 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/imx31/dvfs_dptc-imx31.c3
-rw-r--r--firmware/target/arm/s3c2440/system-s3c2440.c3
-rw-r--r--firmware/target/arm/thread-arm.c4
-rw-r--r--firmware/target/arm/thread-pp.c4
-rw-r--r--firmware/target/coldfire/system-coldfire.c2
-rw-r--r--firmware/target/coldfire/thread-coldfire.c4
-rw-r--r--firmware/target/hosted/thread-arm.c4
-rw-r--r--firmware/target/mips/thread-mips32.c4
-rw-r--r--firmware/target/sh/thread-sh.c4
9 files changed, 23 insertions, 9 deletions
diff --git a/firmware/target/arm/imx31/dvfs_dptc-imx31.c b/firmware/target/arm/imx31/dvfs_dptc-imx31.c
index e8dee17416..02955a5aa4 100644
--- a/firmware/target/arm/imx31/dvfs_dptc-imx31.c
+++ b/firmware/target/arm/imx31/dvfs_dptc-imx31.c
@@ -29,6 +29,7 @@
#include "avic-imx31.h"
#include "dvfs_dptc-imx31.h"
#include "dvfs_dptc_tables-target.h"
+#include "gcc_extensions.h"
/* Most of the code in here is based upon the Linux BSP provided by Freescale
* Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved. */
@@ -181,7 +182,7 @@ static void set_current_dvfs_level(unsigned int level)
}
/* DVFS Interrupt handler */
-static void __attribute__((used)) dvfs_int(void)
+static void USED_ATTR dvfs_int(void)
{
unsigned long pmcr0 = CCM_PMCR0;
unsigned long fsvai = pmcr0 & CCM_PMCR0_FSVAI;
diff --git a/firmware/target/arm/s3c2440/system-s3c2440.c b/firmware/target/arm/s3c2440/system-s3c2440.c
index 577b46966c..1e5613f7b6 100644
--- a/firmware/target/arm/s3c2440/system-s3c2440.c
+++ b/firmware/target/arm/s3c2440/system-s3c2440.c
@@ -23,6 +23,7 @@
#include "panic.h"
#include "mmu-arm.h"
#include "cpu.h"
+#include "gcc_extensions.h"
#define default_interrupt(name) \
extern __attribute__((weak,alias("UIRQ"))) void name (void)
@@ -60,7 +61,7 @@ default_interrupt(SPI1);
default_interrupt(RTC);
default_interrupt(ADC);
-static void (* const irqvector[32])(void) __attribute__((__used__)) =
+static void (* const irqvector[32])(void) USED_ATTR =
{
EINT0, EINT1, EINT2, EINT3,
EINT4_7, EINT8_23, CAM, nBATT_FLT, TICK, WDT_AC97,
diff --git a/firmware/target/arm/thread-arm.c b/firmware/target/arm/thread-arm.c
index 60bbefa6b6..302b1592d8 100644
--- a/firmware/target/arm/thread-arm.c
+++ b/firmware/target/arm/thread-arm.c
@@ -21,11 +21,13 @@
*
****************************************************************************/
+#include "gcc_extensions.h"
+
/*---------------------------------------------------------------------------
* Start the thread running and terminate it if it returns
*---------------------------------------------------------------------------
*/
-static void __attribute__((naked,used)) start_thread(void)
+static void __attribute__((naked)) USED_ATTR start_thread(void)
{
/* r0 = context */
asm volatile (
diff --git a/firmware/target/arm/thread-pp.c b/firmware/target/arm/thread-pp.c
index 3eb7238a25..5e834bc6ad 100644
--- a/firmware/target/arm/thread-pp.c
+++ b/firmware/target/arm/thread-pp.c
@@ -21,6 +21,8 @@
*
****************************************************************************/
+#include "gcc_extensions.h"
+
#if defined(MAX_PHYS_SECTOR_SIZE) && MEMORYSIZE == 64
/* Support a special workaround object for large-sector disks */
#define IF_NO_SKIP_YIELD(...) __VA_ARGS__
@@ -546,7 +548,7 @@ void core_wake(unsigned int othercore)
#endif /* CPU_PPxxxx */
/* Keep constant pool in range of inline ASM */
-static void __attribute__((naked, used)) dump_ltorg(void)
+static void __attribute__((naked)) USED_ATTR dump_ltorg(void)
{
asm volatile (".ltorg");
}
diff --git a/firmware/target/coldfire/system-coldfire.c b/firmware/target/coldfire/system-coldfire.c
index 1fbd00825a..bc8c78b860 100644
--- a/firmware/target/coldfire/system-coldfire.c
+++ b/firmware/target/coldfire/system-coldfire.c
@@ -171,7 +171,7 @@ default_interrupt (ADC); /* A/D converter */
#endif
static void system_display_exception_info(unsigned long format,
- unsigned long pc) __attribute__ ((noreturn, used));
+ unsigned long pc) __attribute__ ((noreturn)) USED_ATTR;
static void system_display_exception_info(unsigned long format,
unsigned long pc)
{
diff --git a/firmware/target/coldfire/thread-coldfire.c b/firmware/target/coldfire/thread-coldfire.c
index c94580a4e7..d328e4af9a 100644
--- a/firmware/target/coldfire/thread-coldfire.c
+++ b/firmware/target/coldfire/thread-coldfire.c
@@ -21,12 +21,14 @@
*
****************************************************************************/
+#include "gcc_extensions.h"
+
/*---------------------------------------------------------------------------
* Start the thread running and terminate it if it returns
*---------------------------------------------------------------------------
*/
void start_thread(void); /* Provide C access to ASM label */
-static void __attribute__((used)) __start_thread(void)
+static void USED_ATTR __start_thread(void)
{
/* a0=macsr, a1=context */
asm volatile (
diff --git a/firmware/target/hosted/thread-arm.c b/firmware/target/hosted/thread-arm.c
index d2fa7d1e5d..f8e58c031c 100644
--- a/firmware/target/hosted/thread-arm.c
+++ b/firmware/target/hosted/thread-arm.c
@@ -23,11 +23,13 @@
****************************************************************************/
#include <system.h>
+#include "gcc_extensions.h"
+
/*---------------------------------------------------------------------------
* Start the thread running and terminate it if it returns
*---------------------------------------------------------------------------
*/
-static void __attribute__((naked,used)) start_thread(void)
+static void __attribute__((naked)) USED_ATTR start_thread(void)
{
/* r0 = context */
asm volatile (
diff --git a/firmware/target/mips/thread-mips32.c b/firmware/target/mips/thread-mips32.c
index e2fccb8022..2b34d3ce3d 100644
--- a/firmware/target/mips/thread-mips32.c
+++ b/firmware/target/mips/thread-mips32.c
@@ -21,13 +21,15 @@
*
****************************************************************************/
+#include "gcc_extensions.h"
+
/*---------------------------------------------------------------------------
* Start the thread running and terminate it if it returns
*---------------------------------------------------------------------------
*/
void start_thread(void); /* Provide C access to ASM label */
-static void __attribute__((used)) _start_thread(void)
+static void USED_ATTR _start_thread(void)
{
/* t1 = context */
asm volatile (
diff --git a/firmware/target/sh/thread-sh.c b/firmware/target/sh/thread-sh.c
index 25e0aadf96..36c20686b0 100644
--- a/firmware/target/sh/thread-sh.c
+++ b/firmware/target/sh/thread-sh.c
@@ -21,12 +21,14 @@
*
****************************************************************************/
+#include "gcc_extensions.h"
+
/*---------------------------------------------------------------------------
* Start the thread running and terminate it if it returns
*---------------------------------------------------------------------------
*/
void start_thread(void); /* Provide C access to ASM label */
-static void __attribute__((used)) __start_thread(void)
+static void USED_ATTR __start_thread(void)
{
/* r8 = context */
asm volatile (