NetBSD/sys/rump/librump/rump_domain.c
pooka 48b3a6f7a3 binutils 2.19 has changed the old behaviour of defining __start_SECTNAME
for orphaned sections to using PROVIDE.  What this means is that
unless a rump component internally references that symbol, it will
not be included in the component shared library, and hence cannot
be referenced when the component is loaded.  Add a workaround which
works both with 2.16 and 2.19: force a reference to the __start
symbol internally and hence retain it in the resulting library.
2009-09-13 22:51:41 +00:00

15 lines
520 B
C

/* $NetBSD: rump_domain.c,v 1.1 2009/09/13 22:51:42 pooka Exp $ */
/*
* Force reference to __start_link_set_domains, so that the
* binutils 2.19 linker does not lose the symbol due to it being
* PROVIDEd in 2.19 as opposed to earlier versions where it was
* defined.
*
* Note: look into this again when all platforms use 2.19
*/
extern void *__start_link_set_domains;
void *rump_start_domains = &__start_link_set_domains;
extern void *__stop_link_set_domains;
void *rump_stop_domains = &__stop_link_set_domains;