summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-06-30 18:16:46 +0000
committerIan Lance Taylor <ian@airs.com>1999-06-30 18:16:46 +0000
commit5c6beb623145d7a41f15085baf697b9e02a71958 (patch)
treeaf14080106aefbae2dbd725ac0ef77864fff6516
parentadaf4052284592b635e58d01bcc8470ab47c96f7 (diff)
downloadgdb-5c6beb623145d7a41f15085baf697b9e02a71958.tar.gz
* elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-mips.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9bb3cee970e..80c13e81e94 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+1999-06-30 Ian Lance Taylor <ian@zembu.com>
+
+ * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
+ relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
+
1999-06-04 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf_backend_got_header_size): Define.
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index c152e8af5fd..fa69ab5f953 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -4175,11 +4175,12 @@ mips_elf_final_link (abfd, info)
/* If all the things we linked together were PIC, but we're
producing an executable (rather than a shared object), then the
resulting file is CPIC (i.e., it calls PIC code.) */
- if (!info->shared && elf_elfheader (abfd)->e_flags & EF_MIPS_PIC)
+ if (!info->shared
+ && !info->relocateable
+ && elf_elfheader (abfd)->e_flags & EF_MIPS_PIC)
{
elf_elfheader (abfd)->e_flags &= ~EF_MIPS_PIC;
elf_elfheader (abfd)->e_flags |= EF_MIPS_CPIC;
-
}
/* On IRIX5, we omit the .options section. On IRIX6, however, we