NetBSD/sys/rump/ldscript.rump
pooka fbc989bbef Use linker script to make __start/stop_link_set_modules be present
in libs built with binutils >=2.19.  This is a less error-prone
method than the previous where components had to be tagged in the
Makefile as modules (and if they weren't, things broke.  and vice
versa).
2009-12-12 17:10:19 +00:00

29 lines
663 B
Plaintext

/* $NetBSD: ldscript.rump,v 1.1 2009/12/12 17:10:19 pooka Exp $ */
/*
* From binutils 2.19 onwards (in NetBSD) binutils ld PROVIDEs
* __start/__stop for orphaned sections. This means that
* __start_link_set_modules/__stop_link_set_modules will no
* longer automatically be present in shared libraries. This
* ldscript forces those symbols to be present for all rump
* shared lib components.
*/
SECTIONS
{
link_set_modules :
{
__start_link_set_modules = .;
*(link_set_modules);
__stop_link_set_modules = .;
}
link_set_domains :
{
__start_link_set_domains = .;
*(link_set_domains);
__stop_link_set_domains = .;
}
}
INSERT AFTER .data;