summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker_set.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename __weak to __weak_symbol to avoid language conflict with objective-C.hselasky2015-06-231-2/+2
| | | | | | PR: 200972 (exp-run) Suggested by: theraven@ MFC after: 3 days
* Add support for empty data sets. Data set begin and end pointershselasky2014-07-021-3/+3
| | | | | should resolve to "NULL" when not present. This is done by declaring the data set begin and end symbols as "weak".
* Workaround for bug in GCC on powerpc64. Symbols that are exported arehselasky2014-06-301-5/+16
| | | | by fault required to be all "static" or all "extern".
* After some off-list discussion, revert a number of changes to thedim2010-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | DPCPU_DEFINE and VNET_DEFINE macros, as these cause problems for various people working on the affected files. A better long-term solution is still being considered. This reversal may give some modules empty set_pcpu or set_vnet sections, but these are harmless. Changes reverted: ------------------------------------------------------------------------ r215318 | dim | 2010-11-14 21:40:55 +0100 (Sun, 14 Nov 2010) | 4 lines Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined. ------------------------------------------------------------------------ r215317 | dim | 2010-11-14 21:38:11 +0100 (Sun, 14 Nov 2010) | 3 lines Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree. ------------------------------------------------------------------------ r215316 | dim | 2010-11-14 21:23:02 +0100 (Sun, 14 Nov 2010) | 2 lines Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.
* Instead of unconditionally emitting .globl's for the __start_set_xxx anddim2010-11-141-2/+2
| | | | | __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined.
* Revert r103230, which depended on ld preserving the __start_xxx anddim2010-11-111-0/+2
| | | | | | | | | | | __stop_xxx symbols for custom sections, even when these were not referenced (at link time). This behaviour was changed again in binutils commit 0b8ed435c3fe8bd09a08c23920e65bfb03251221. This time, put the __GLOBL macro definition in cdefs.h, so it can be reused in a few other places where it will be needed. Reviewed by: kib
* netchild's mega-patch to isolate compiler dependencies into a centraljoerg2005-03-021-4/+8
| | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago
* Typo fix.keramida2005-01-141-1/+1
|
* Emply __used attribute to prevent compiler from removing unreferencedkan2004-07-281-1/+1
| | | | | | static symbols. This wasn't a problem with previous GCC releases, but unit-at-a-time mode of GCC 3.4.2 prevents linker set components from being emitted at all.
* These are changes to allow to use the Intel C/C++ compiler (lang/icc)trhodes2004-03-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild
* Add a __section(x) macro as well. Use this in linker_set.h. ie:peter2002-09-231-1/+1
| | | | | | | | | | | | | | static void const * const __set_##set##_sym_##sym __attribute__((__section__("set_" #set),__unused__)) = &sym becomes: static void const * const __set_##set##_sym_##sym __section("set_" #set) __unused = &sym Like the other macros, these #define away for unrecognized compilers or lint. Also, fix the argments in the previous commit for the non-gcc case. lint might be a bit happier about that. Note that the gcc <= 2.6 case needs some research.
* Initiate deorbit burn for the i386-only a.out related support. Moves arepeter2002-09-171-48/+0
| | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha
* Sometime after binutils-2.9 (ie: ages ago), the handling of __start_set_*peter2002-09-111-6/+0
| | | | | | | | and __stop_set_* became friendlier. This trick to force the export of the section delimiter symbols is no longer necessary. We needed to force this so that we could look up the symbols via a symbol table search when the module was loaded at run time. ld used to eliminate them if they were not referenced at compile/link time.
* Wrap GCC-specific stuff and provide alternative for lint.markm2002-04-211-0/+7
|
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-131-35/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* Remove underscores from linker set stabs for the a.out case, afterpeter2001-02-251-1/+1
| | | | the demise of asnames.h.
* o Add explicit alignment to linker set definitions. On i386, datamarcel2001-01-291-8/+2
| | | | | | | declarations will not be aligned by default. o Remove the alignment work-around for alpha. Our current alpha as(1) does not assume alignment after section switching, nor does the ia64 as(1).
* Change ".align 3" to ".p2align 3" so that this works with ia64.dfr2000-09-291-2/+2
|
* Add a comment explaining the obscure lines:jdp2000-05-131-0/+7
| | | | | | static void const * const __set_##set##_sym_##sym = &sym; in the MAKE_SET macros.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* ABS_SET() and BSS_SET() are no longer used. The sole remaining user ofpeter1999-06-261-5/+1
| | | | TEXT_SET() is DDB's command tables.
* ls_items[] is most definately not a set of pointers to const objects..peter1999-05-081-3/+3
| | | | | | | | | | sysinits, for example, are sorted by swapping those objects(!). Perhaps they should be const and the sysinit sorting should be swapping the pointers rather than the targets. This is on my revisit list, but it has the side effect of removing a lot of warnings. With -Wcast-qual, it doesn't seem easy to get rid of the constness when you *know* it's not. (With apologies to bde, this essentially reverts rev 1.21 of kernel.h from back in 1996)
* Move the linker set definitions into a new header filejdp1999-01-141-0/+89
<sys/linker_set.h>. <sys/kernel.h> includes the new header, so functionally everything is still the same.
OpenPOWER on IntegriCloud