aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
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
commit0dda5f7af8dee588f3be3787370e5ab2a1094b6b (patch)
tree6aff2537443f18f2b20627699d571949e294155b /bfd/elf32-mips.c
parent04f7c78d649df5ef7724460619e37c7904f6af28 (diff)
downloadgdb-0dda5f7af8dee588f3be3787370e5ab2a1094b6b.zip
gdb-0dda5f7af8dee588f3be3787370e5ab2a1094b6b.tar.gz
gdb-0dda5f7af8dee588f3be3787370e5ab2a1094b6b.tar.bz2
* elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index c152e8a..fa69ab5 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