OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [libgloss/] [libnosys/] [warning.h] - Blame information for rev 207

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
#ifndef __WARNING_H__
2
#define __WARNING_H__
3
 
4
#ifdef HAVE_GNU_LD
5
# ifdef HAVE_ELF
6
 
7
/* We want the .gnu.warning.SYMBOL section to be unallocated.  */
8
#  ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
9
#   define __make_section_unallocated(section_string)   \
10
  asm(".section " section_string "\n .previous");
11
#  elif defined (HAVE_ASM_POPSECTION_DIRECTIVE)
12
#   define __make_section_unallocated(section_string)   \
13
  asm(".pushsection " section_string "\n .popsection");
14
#  else
15
#   define __make_section_unallocated(section_string)
16
#  endif
17
 
18
#  ifdef HAVE_SECTION_ATTRIBUTES
19
#   define link_warning(symbol, msg)                     \
20
  static const char __evoke_link_warning_##symbol[]     \
21
    __attribute__ ((section (".gnu.warning." __SYMBOL_PREFIX #symbol), \
22
                   __used__)) = msg;
23
#  else
24
#   define link_warning(symbol, msg)
25
#  endif
26
 
27
#else /* !ELF */
28
 
29
#  define link_warning(symbol, msg)             \
30
  asm(".stabs \"" msg "\",30,0,0,0\n"   \
31
      ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
32
# endif
33
#else /* !GNULD */
34
/* We will never be heard; they will all die horribly.  */
35
# define link_warning(symbol, msg)
36
#endif
37
 
38
/* A canned warning for sysdeps/stub functions.
39
   The GNU linker prepends a "warning: " string.  */
40
#define stub_warning(name) \
41
  link_warning (name, \
42
                #name " is not implemented and will always fail")
43
 
44
#endif /* __WARNING_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.