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
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
.
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
.
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.
27 0x00000016 \(TEXTREL\)[ ]+0x0
29 Relocation section '\
.rela\
.text
' at offset .* contains 4 entries:
31 Relocation section '\
.rela\
.data
' at offset .* contains 8 entries:
33 Relocation section '.rela
.data2
' at offset .* contains 16 entries: