aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf/undefined.s
AgeCommit message (Collapse)AuthorFilesLines
2018-03-03PR ld/21900: MIPS: Fix relocation processing with undefined symbolsJames Cowgill1-0/+4
Currently, when `mips_elf_calculate_relocation' is asked to relocate an undefined symbol, it reports an error or a warning and immediately returns without performing the relocation. This is fine if the link fails, but if unresolved_syms_in_objects == RM_GENERATE_WARNING, the link will continue and output some unrelocated code, which is a regression from commit e7e2196da3f0 ("MIPS/BFD: Correctly report undefined relocations"). Fix this by continuing after calling the `undefined_symbol' hook unless this is an error condition. bfd/ PR ld/21900 * elfxx-mips.c (mips_elf_calculate_relocation): Only return after calling `undefined_symbol' hook if this is an error condition. Assume the value of 0 for the symbol requested otherwise. ld/ PR ld/21900 * testsuite/ld-mips-elf/undefined-warn.d: New test. * testsuite/ld-mips-elf/undefined.s: Add padding at the end. * testsuite/ld-mips-elf/mips-elf.exp: Run the new test.
2009-12-10 bfd/Maciej W. Rozycki1-0/+24
* elfxx-mips.c (mips_elf_calculate_relocation): Correct handling of undefined symbols. ld/testsuite/ * ld-mips-elf/undefined.d: New test. * ld-mips-elf/undefined.s: Source for the new test. * ld-mips-elf/mips-elf.exp: Run the new test.