summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2017-05-31 03:24:21 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2017-05-31 03:24:21 +0000
commitfc9fe7d0b7e7185b1ad47a12d208091fc32123fa (patch)
treee2e6c8999362d124ebe459ee4a4b3389d5e09bb4 /gnu
parentdb48b8a0ea24c8455d7b37a284ce103aa8b690ae (diff)
Make gcc move switch tables into .rodata instead of .text on i386/amd64
For C++, gcc has to make use of comdat sections instead of .gnu.linkonce sections for this because switch tables and functions would now end up in different .gnu.linkonce sections. This can cause ld to sometimes incorrectly discard the switch tables, which causes linker errors. With comdat sections, making the switch table and function sections belong together is more reliable. ok deraadt@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gcc/gcc/config/i386/openbsd64.h2
-rw-r--r--gnu/usr.bin/cc/cc_tools/auto-host.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/gnu/gcc/gcc/config/i386/openbsd64.h b/gnu/gcc/gcc/config/i386/openbsd64.h
index 5a5584bd588..24444e505e0 100644
--- a/gnu/gcc/gcc/config/i386/openbsd64.h
+++ b/gnu/gcc/gcc/config/i386/openbsd64.h
@@ -126,4 +126,4 @@ Boston, MA 02111-1307, USA. */
#define OBSD_HAS_CORRECT_SPECS
#undef JUMP_TABLES_IN_TEXT_SECTION
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
+#define JUMP_TABLES_IN_TEXT_SECTION 0
diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h
index 532db8d4bac..a37fafc1675 100644
--- a/gnu/usr.bin/cc/cc_tools/auto-host.h
+++ b/gnu/usr.bin/cc/cc_tools/auto-host.h
@@ -1,6 +1,6 @@
/* auto-host.h. enerated b configure. */
/* config.in. Generated from configure.ac by autoheader. */
-/* $OpenBSD: auto-host.h,v 1.6 2015/08/23 15:33:18 kettenis Exp $ */
+/* $OpenBSD: auto-host.h,v 1.7 2017/05/31 03:24:20 stefan Exp $ */
/* Define as the number of bits in a byte, if \`limits.h' doesn't. */
#ifndef USED_FOR_TARGET
@@ -181,7 +181,7 @@
/* Define true if the assembler supports '.long foo@GOTOFF'. */
#ifndef USED_FOR_TARGET
-#define HAVE_AS_GOTOFF_IN_DATA 0
+#define HAVE_AS_GOTOFF_IN_DATA 1
#endif
@@ -315,7 +315,7 @@
/* Define 0/1 if your assembler and linker support COMDAT groups. */
#ifndef USED_FOR_TARGET
-#define HAVE_COMDAT_GROUP 0
+#define HAVE_COMDAT_GROUP 1
#endif