Automatic date update in version.in
[binutils-gdb.git] / ld / testsuite / ld-mips-elf / undefined.s
blob98f46de6f44acc609b5cb8364fe94265c380b857
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:
7 # BFD_ASSERT (h->dynindx >= global_got_dynindx);
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.
16 .abicalls
17 .text
18 .globl foo
19 .type foo, @function
20 .ent foo
21 foo:
22 li $2, %got_page(bar)
23 .end foo
24 .size foo, . - foo
26 # Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
27 .align 4, 0
28 .space 16