diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2019-04-24 22:46:59 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-04-24 22:46:59 +0000 |
commit | 2493e718159bdee3a589234196ce177d37b1e649 (patch) | |
tree | 1fcbbacd1e37224ecd98458ffb0021f4a4efbf5d /libphobos/libdruntime/config/common | |
parent | 7c3e085e4405ef4148edf4ea5bedd7930df23c58 (diff) | |
download | gcc-2493e718159bdee3a589234196ce177d37b1e649.zip gcc-2493e718159bdee3a589234196ce177d37b1e649.tar.gz gcc-2493e718159bdee3a589234196ce177d37b1e649.tar.bz2 |
libphobos: Fix linker warning and SEGV in core.thread tests.
The monolithic core/threadasm.S source has been removed, and split into
multiple parts, one for each intended target CPU/OS.
Added .type and .size directives for all asm implementations of
fiber_switchContent and callWithStackShell where they were missing.
libphobos/ChangeLog:
2019-04-25 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/90086
* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): New macro.
* configure.ac: Use it.
* configure: Regenerate.
* libdruntime/Makefile.am: Add new config sources to
DRUNTIME_SOURCES_CONFIGURED.
* libdruntime/Makefile.in: Regenerate.
* libdruntime/config/aarch64/switchcontext.S: New file.
* libdruntime/config/arm/switchcontext.S: New file.
* libdruntime/config/common/threadasm.S: New file.
* libdruntime/config/mingw/switchcontext.S: New file.
* libdruntime/config/mips/switchcontext.S: New file.
* libdruntime/config/powerpc/switchcontext.S: New file.
* libdruntime/config/powerpc64/callwithstack.S: New file.
* libdruntime/config/x86/switchcontext.S: New file.
* libdruntime/core/threadasm.S: Remove.
From-SVN: r270560
Diffstat (limited to 'libphobos/libdruntime/config/common')
-rw-r--r-- | libphobos/libdruntime/config/common/threadasm.S | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libphobos/libdruntime/config/common/threadasm.S b/libphobos/libdruntime/config/common/threadasm.S new file mode 100644 index 0000000..4f43722 --- /dev/null +++ b/libphobos/libdruntime/config/common/threadasm.S @@ -0,0 +1,43 @@ +/* Support code for fibers and multithreading. + Copyright (C) 2019 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + +#if (__linux__ || __FreeBSD__ || __NetBSD__ || __DragonFly__) && __ELF__ +/* + * Mark the resulting object file as not requiring execution permissions on + * stack memory. The absence of this section would mark the whole resulting + * library as requiring an executable stack, making it impossible to + * dynamically load druntime on several Linux platforms where this is + * forbidden due to security policies. + */ + .section .note.GNU-stack,"",%progbits +#endif + +/* Let preprocessor tell us if C symbols have a prefix: __USER_LABEL_PREFIX__ */ +#ifdef __USER_LABEL_PREFIX__ +#define __CONCAT2(a, b) a ## b +#define __CONCAT(a, b) __CONCAT2(a, b) +#define CSYM(name) __CONCAT(__USER_LABEL_PREFIX__, name) +#else +#define CSYM(name) name +#endif |