From: Richard Sandiford Date: Mon, 1 Aug 2005 11:59:33 +0000 (+0000) Subject: * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5211a5487be06a0bc2172036a8a426b00c0d427;p=binutils-gdb.git * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension of MIPS32 and MIPS64r2 as an extension of MIPS32r2. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 957841eb104..cca0de31c05 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-08-01 Richard Sandiford + + * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension + of MIPS32 and MIPS64r2 as an extension of MIPS32r2. + 2005-07-30 David Daney * elflink.c (elf_gc_sweep): Set dynsymcount to correct value. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 316114e3b8f..53b5c9ee918 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -9661,11 +9661,26 @@ mips_mach_extends_p (unsigned long base, unsigned long extension) { size_t i; - for (i = 0; extension != base && i < ARRAY_SIZE (mips_mach_extensions); i++) + if (extension == base) + return TRUE; + + if (base == bfd_mach_mipsisa32 + && mips_mach_extends_p (bfd_mach_mipsisa64, extension)) + return TRUE; + + if (base == bfd_mach_mipsisa32r2 + && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension)) + return TRUE; + + for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++) if (extension == mips_mach_extensions[i].extension) - extension = mips_mach_extensions[i].base; + { + extension = mips_mach_extensions[i].base; + if (extension == base) + return TRUE; + } - return extension == base; + return FALSE; } diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index f22a81a6710..aa755107a21 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-08-01 Richard Sandiford + + * ld-mips/mips-elf-flags.exp: Add more good_combination tests. + 2005-07-28 Ben Elliston * lib/ld-lib.exp (run_ld_link_exec_tests): Add new parameter diff --git a/ld/testsuite/ld-mips-elf/mips-elf-flags.exp b/ld/testsuite/ld-mips-elf/mips-elf-flags.exp index 50ea39acee8..b65e02b1a35 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf-flags.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf-flags.exp @@ -158,3 +158,6 @@ good_combination { "-mips3 -32" "-mips64r2 -32" "-mips64 -32" } { mips64r2 } good_combination { "-march=vr4120 -mabi=32" "-mips3 -mabi=32" } { 4120 o32 } good_combination { "-march=sb1 -mgp32 -32" "-march=4000 -mgp32 -32" } { sb1 o32 } +good_combination { "-mips32 -mabi=32" "-march=sb1 -mabi=32" } { sb1 o32 } +good_combination { "-mips64r2 -mabi=32" "-mips32 -mabi=32" } { mips64r2 o32 } +good_combination { "-mips5 -mabi=o64" "-mips64r2 -mabi=o64" } { mips64r2 o64 }