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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [libnosys/] [warning.h] - Blame information for rev 1774

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

Line No. Rev Author Line
1 56 joel
#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 "; .previous");
11
#  elif defined (HAVE_ASM_POPSECTION_DIRECTIVE)
12
#   define __make_section_unallocated(section_string)   \
13
  asm(".pushsection " section_string "; .popsection");
14
#  else
15
#   define __make_section_unallocated(section_string)
16
#  endif
17
 
18
#  define link_warning(symbol, msg)                     \
19
  __make_section_unallocated (".gnu.warning." #symbol)  \
20
  static const char __evoke_link_warning_##symbol[]     \
21
    __attribute__ ((section (".gnu.warning." #symbol))) = msg;
22
 
23
#else /* !ELF */
24
 
25
#  define link_warning(symbol, msg)             \
26
  asm(".stabs \"" msg "\",30,0,0,0\n"   \
27
      ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
28
# endif
29
#else /* !GNULD */
30
/* We will never be heard; they will all die horribly.  */
31
# define link_warning(symbol, msg)
32
#endif
33
 
34
/* A canned warning for sysdeps/stub functions.  */
35
#define stub_warning(name) \
36
  link_warning (name, \
37
                "warning: " #name " is not implemented and will always fail")
38
 
39
#endif /* __WARNING_H__ */

powered by: WebSVN 2.1.0

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