From b7191cb536c3bc7b97d2d93a190f12aaa6847195 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Fri, 16 Apr 1993 20:37:41 +0000 Subject: [PATCH] Don't put relocatable items into .text if -pic-lib. From-SVN: r4163 --- gcc/config/i386/osfrose.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h index 3e3928938b7..3158b09ad0a 100644 --- a/gcc/config/i386/osfrose.h +++ b/gcc/config/i386/osfrose.h @@ -288,19 +288,25 @@ do \ while (0) #undef SELECT_SECTION -#define SELECT_SECTION(DECL,RELOC) \ +#define SELECT_SECTION(DECL, RELOC) \ { \ - if (TREE_CODE (DECL) == STRING_CST) \ + if (RELOC && HALF_PIC_P ()) \ + data_section (); \ + \ + else if (TREE_CODE (DECL) == STRING_CST) \ { \ if (flag_writable_strings) \ data_section (); \ else \ readonly_data_section (); \ } \ + \ else if (TREE_CODE (DECL) != VAR_DECL) \ readonly_data_section (); \ + \ else if (!TREE_READONLY (DECL)) \ data_section (); \ + \ else \ readonly_data_section (); \ } -- 2.30.2