aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-04-08 05:11:49 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-04-08 05:11:49 +0000
commitfdbafa100f18778c445ae309ab2c2e4fd83cf9d8 (patch)
treeb62317c46cce3057aafe03377e07f1630e22a737 /bfd/elf32-mips.c
parentaf9539e4e537df73df80ac513416c37be5b5f6a0 (diff)
downloadgdb-fdbafa100f18778c445ae309ab2c2e4fd83cf9d8.zip
gdb-fdbafa100f18778c445ae309ab2c2e4fd83cf9d8.tar.gz
gdb-fdbafa100f18778c445ae309ab2c2e4fd83cf9d8.tar.bz2
2001-04-05 Steven J. Hill <sjhill@cotw.com>
* config.bfd (mips*el*-*-linux-gnu*): Use traditional little endian MIPS ELF target. * config.bfd (mips*-*-linux-gnu*): Use traditional big endian MIPS ELF target. * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional 64bit big endian MIPS ELF target. (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little endian MIPS ELF target. * configure: Regenerated. * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and little endian targets. (mips_elf_sym_is_global): Handle traditional targets. * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional 64bit big endian MIPS ELF target. (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little endian MIPS ELF target. * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec and bfd_elf64_tradlittlemips_vec.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 33b5e4e..b90178e 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -208,6 +208,9 @@ static int sort_dynamic_relocs
PARAMS ((const void *, const void *));
extern const bfd_target bfd_elf32_tradbigmips_vec;
+extern const bfd_target bfd_elf32_tradlittlemips_vec;
+extern const bfd_target bfd_elf64_tradbigmips_vec;
+extern const bfd_target bfd_elf64_tradlittlemips_vec;
/* The level of IRIX compatibility we're striving for. */
@@ -225,8 +228,7 @@ static bfd *reldyn_sorting_bfd;
#define ABI_N32_P(abfd) \
((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0)
-/* Nonzero if ABFD is using the 64-bit ABI. FIXME: This is never
- true, yet. */
+/* Nonzero if ABFD is using the 64-bit ABI. */
#define ABI_64_P(abfd) \
((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0)
@@ -234,7 +236,10 @@ static bfd *reldyn_sorting_bfd;
executables or "normal" MIPS ELF ABI executables. */
#define IRIX_COMPAT(abfd) \
- (abfd->xvec == &bfd_elf32_tradbigmips_vec ? ict_none : \
+ (((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \
+ (abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \
+ (abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
+ (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
/* Whether we are trying to be compatible with IRIX at all. */
@@ -2301,7 +2306,12 @@ mips_elf_sym_is_global (abfd, sym)
bfd *abfd ATTRIBUTE_UNUSED;
asymbol *sym;
{
- return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
+ if (SGI_COMPAT(abfd))
+ return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
+ else
+ return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+ || bfd_is_und_section (bfd_get_section (sym))
+ || bfd_is_com_section (bfd_get_section (sym)));
}
/* Set the right machine number for a MIPS ELF file. This is used for