summaryrefslogtreecommitdiff
path: root/gcc/config/vxworks.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-26 15:53:51 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-26 15:53:51 +0000
commit6c181a06910945b84fbe73a7cd4415542bec4867 (patch)
treebc456dae4427f9afc91988189cd6ee26800382a0 /gcc/config/vxworks.h
parentd4c1506135aa7e2264bfede7cba0f3fcfaf1972a (diff)
downloadgcc-6c181a06910945b84fbe73a7cd4415542bec4867.tar.gz
* output.h (assemble_addr_to_section): Declare.
(get_cdtor_priority_section): Likewise. * varasm.c (assemble_addr_to_section): New function. (get_cdtor_priority_section): Likewise. (default_named_section_asm_out_destructor): Use them. (destor_dtor_section_asm_out_destructor): Likewise. (default_named_section_asm_out_constructor): Likewise. (default_ctor_section_asm_out_constructor): Likewise. * config.gcc (*-*-vxworks*): Include vxworks.o. * config/t-vxworks (vxworks.o): New target. * config/vxworks.h (ALWAYS_NUMBER_CTORS_SECTIONS): Remove. (TARGET_ASM_CONSTRUCTOR): Define. (TARGET_ASM_DESTRUCTOR): Likewise. (vxworks_asm_out_constructor): Declare. (vxworks_asm_out_destructor): Likewise. * c-common.c (get_priority): Check that we have not just an INTEGER_CST, but an integer constant with integeral type. * gcc.dg/vxworks/vxworks.exp: New file. * gcc.dg/vxworks/initpri1.c: Likewise. * gcc.dg/vxworks/initpri2.c: Likewise. * gcc.dg/initpri2.c: Add more tests. * g++.dg/special/initpri2.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/vxworks.h')
-rw-r--r--gcc/config/vxworks.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index 2d07b621969..4c668116c31 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -90,11 +90,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
targetm.have_ctors_dtors = TARGET_VXWORKS_RTP; \
} while (0)
-/* The VxWorks runtime uses a clever trick to get the sentinel entry
- (-1) inserted at the beginning of the .ctors segment. This trick
- will not work if we ever generate any entries in plain .ctors
- sections; we must always use .ctors.PRIORITY. */
-#define ALWAYS_NUMBER_CTORS_SECTIONS 1
+/* VxWorks requires special handling of constructors and destructors.
+ All VxWorks configurations must use these functions. */
+#define TARGET_ASM_CONSTRUCTOR vxworks_asm_out_constructor
+#define TARGET_ASM_DESTRUCTOR vxworks_asm_out_destructor
+extern void vxworks_asm_out_constructor (rtx symbol, int priority);
+extern void vxworks_asm_out_destructor (rtx symbol, int priority);
/* The name of the symbol for the table of GOTs in a particular
RTP. */