|
@@ -60,12 +60,15 @@
|
60
|
60
|
/** Provide a symbol within this object file */
|
61
|
61
|
#ifdef ASSEMBLY
|
62
|
62
|
#define PROVIDE_SYMBOL( _sym ) \
|
|
63
|
+ .section ".provided", "a", @nobits ; \
|
|
64
|
+ .hidden _sym ; \
|
63
|
65
|
.globl _sym ; \
|
64
|
|
- .comm _sym, 0
|
|
66
|
+ _sym: ; \
|
|
67
|
+ .previous
|
65
|
68
|
#else /* ASSEMBLY */
|
66
|
69
|
#define PROVIDE_SYMBOL( _sym ) \
|
67
|
|
- extern char _sym[]; \
|
68
|
|
- char _sym[0]
|
|
70
|
+ char _sym[0] \
|
|
71
|
+ __attribute__ (( section ( ".provided" ) ))
|
69
|
72
|
#endif /* ASSEMBLY */
|
70
|
73
|
|
71
|
74
|
/** Require a symbol within this object file
|
|
@@ -652,7 +655,7 @@ int __debug_disable;
|
652
|
655
|
* be in the public domain.
|
653
|
656
|
*/
|
654
|
657
|
#define FILE_LICENCE_PUBLIC_DOMAIN \
|
655
|
|
- PROVIDE_SYMBOL ( __licence_public_domain )
|
|
658
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__public_domain__ ) )
|
656
|
659
|
|
657
|
660
|
/** Declare a file as being under version 2 (or later) of the GNU GPL
|
658
|
661
|
*
|
|
@@ -661,7 +664,7 @@ int __debug_disable;
|
661
|
664
|
* (at your option) any later version".
|
662
|
665
|
*/
|
663
|
666
|
#define FILE_LICENCE_GPL2_OR_LATER \
|
664
|
|
- PROVIDE_SYMBOL ( __licence_gpl2_or_later )
|
|
667
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__gpl2_or_later__ ) )
|
665
|
668
|
|
666
|
669
|
/** Declare a file as being under version 2 of the GNU GPL
|
667
|
670
|
*
|
|
@@ -670,7 +673,7 @@ int __debug_disable;
|
670
|
673
|
* "or, at your option, any later version" clause.
|
671
|
674
|
*/
|
672
|
675
|
#define FILE_LICENCE_GPL2_ONLY \
|
673
|
|
- PROVIDE_SYMBOL ( __licence_gpl2_only )
|
|
676
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__gpl2_only__ ) )
|
674
|
677
|
|
675
|
678
|
/** Declare a file as being under any version of the GNU GPL
|
676
|
679
|
*
|
|
@@ -682,7 +685,7 @@ int __debug_disable;
|
682
|
685
|
* version ever published by the Free Software Foundation".
|
683
|
686
|
*/
|
684
|
687
|
#define FILE_LICENCE_GPL_ANY \
|
685
|
|
- PROVIDE_SYMBOL ( __licence_gpl_any )
|
|
688
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__gpl_any__ ) )
|
686
|
689
|
|
687
|
690
|
/** Declare a file as being under the three-clause BSD licence
|
688
|
691
|
*
|
|
@@ -707,7 +710,7 @@ int __debug_disable;
|
707
|
710
|
* functionally equivalent to the standard three-clause BSD licence.
|
708
|
711
|
*/
|
709
|
712
|
#define FILE_LICENCE_BSD3 \
|
710
|
|
- PROVIDE_SYMBOL ( __licence_bsd3 )
|
|
713
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__bsd3__ ) )
|
711
|
714
|
|
712
|
715
|
/** Declare a file as being under the two-clause BSD licence
|
713
|
716
|
*
|
|
@@ -728,7 +731,7 @@ int __debug_disable;
|
728
|
731
|
* functionally equivalent to the standard two-clause BSD licence.
|
729
|
732
|
*/
|
730
|
733
|
#define FILE_LICENCE_BSD2 \
|
731
|
|
- PROVIDE_SYMBOL ( __licence_bsd2 )
|
|
734
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__bsd2__ ) )
|
732
|
735
|
|
733
|
736
|
/** Declare a file as being under the one-clause MIT-style licence
|
734
|
737
|
*
|
|
@@ -738,7 +741,7 @@ int __debug_disable;
|
738
|
741
|
* permission notice appear in all copies.
|
739
|
742
|
*/
|
740
|
743
|
#define FILE_LICENCE_MIT \
|
741
|
|
- PROVIDE_SYMBOL ( __licence_mit )
|
|
744
|
+ PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__mit__ ) )
|
742
|
745
|
|
743
|
746
|
/** Declare a particular licence as applying to a file */
|
744
|
747
|
#define FILE_LICENCE( _licence ) FILE_LICENCE_ ## _licence
|