Fix garbage collection of common symbols
[deliverable/binutils-gdb.git] / ld / testsuite / ld-cris / pcrelcp-1.d
CommitLineData
bb4a8e71
HPN
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
5#warning: [^\n]*recompile with -fPIC\Z
6#readelf: -a
7
8# Building a DSO with (unrecommended) non-pic pc-relative references
9# to a versioned symbol in a library got caught by an assert in
10# elf_cris_copy_indirect_symbol wherein the list of pc-relative
11# references wasn't merged, but simply asserted to be NULL before
12# copied to, on the merged-to (direct) symbol. For versioned symbols,
13# there was an "extra" copy made, to make a base-version symbol, where
14# the copied-from pc-relative list was NULL but the copied-to symbol
15# already had a list merged.
16
17# The list was used to emit warning messages, but incorrectly held the
18# relocation section for the reference, resulting in warnings being
19# emitted for any section with a pc-relative relocation.
20
21# The test checks that there's a warning message only for the
22# read-only sections section (.text) (not the read-write sections),
23# that the correct number of relocations is emitted and we also check
24# for the TEXTREL dynamic marker.
25
26#...
27 0x00000016 \(TEXTREL\)[ ]+0x0
28#...
29Relocation section '\.rela\.text' at offset .* contains 4 entries:
30#...
31Relocation section '\.rela\.data' at offset .* contains 8 entries:
32#...
33Relocation section '.rela.data2' at offset .* contains 16 entries:
34#pass
This page took 0.210669 seconds and 4 git commands to generate.