Automatic date update in version.in
[binutils-gdb.git] / ld / testsuite / ld-cris / pcrelcp-1.d
blob0d5f6b8ae9ce66b7d9f2efb0013befff6fb1737b
1 #as: --no-underscore --em=criself
2 #ld: -shared -m crislinux -z nocombreloc
3 #ld_after_inputfiles: tmpdir/libdso-1b.so
4 #warning: \A[^\n]*\.o, section `.text', to symbol `expfn@@TST2':[^\n]*recompile with -fPIC\Z
5 #readelf: -a
7 # Building a DSO with (unrecommended) non-pic pc-relative references
8 # to a versioned symbol in a library got caught by an assert in
9 # elf_cris_copy_indirect_symbol wherein the list of pc-relative
10 # references wasn't merged, but simply asserted to be NULL before
11 # copied to, on the merged-to (direct) symbol. For versioned symbols,
12 # there was an "extra" copy made, to make a base-version symbol, where
13 # the copied-from pc-relative list was NULL but the copied-to symbol
14 # already had a list merged.
16 # The list was used to emit warning messages, but incorrectly held the
17 # relocation section for the reference, resulting in warnings being
18 # emitted for any section with a pc-relative relocation.
20 # The test checks that there's a warning message only for the
21 # read-only sections section (.text) (not the read-write sections),
22 # that the correct number of relocations is emitted and we also check
23 # for the TEXTREL dynamic marker.
25 #...
26 0x00000016 \(TEXTREL\)[ ]+0x0
27 #...
28 Relocation section '\.rela\.text' at offset .* contains 4 entries:
29 #...
30 Relocation section '\.rela\.data' at offset .* contains 8 entries:
31 #...
32 Relocation section '.rela.data2' at offset .* contains 16 entries:
33 #pass