bfd/
[deliverable/binutils-gdb.git] / ld / testsuite / ld-mips-elf / undefined.s
CommitLineData
e7e2196d
MR
1# Relocations against undefined symbols would be incorrectly let through
2# by mips_elf_calculate_relocation() once the result of the
3# ->undefined_symbol() callback has been interpreted in the opposite
4# sense. The link would fail anyway, but for R_MIPS_GOT_PAGE relocations
5# a failure of the following assertion:
6#
7# BFD_ASSERT (h->dynindx >= global_got_dynindx);
8#
9# would additionally be reported in mips_elf_global_got_index(), because
10# at this point h->dynindx for the undefined symbol would be set to -1.
11# Other kinds of GOT relocations allocate a GOT index for the symbol
12# referred and set its h->dynindx in _bfd_mips_elf_check_relocs(), but
13# R_MIPS_GOT_PAGE relocations only allocate a GOT page at that point and
14# for undefined symbols the page never gets resolved any further.
15
16 .abicalls
17 .text
18 .globl foo
19 .type foo, @function
20 .ent foo
21foo:
22 li $2, %got_page(bar)
23 .end foo
24 .size foo, . - foo
This page took 0.15851 seconds and 4 git commands to generate.